Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MsgSwap

Executes a market swap between 2 denominations at the exchange rate registered by the Oracle module. The account will lose the amount of coins offered, and receive funds in the requested denomination after a swap fee has been applied.

Hierarchy

Index

Constructors

constructor

  • new MsgSwap(trader: string, offer_coin: Coin, ask_denom: string): MsgSwap
  • Parameters

    • trader: string

      trader's account address

    • offer_coin: Coin

      coin to be swapped (from)

    • ask_denom: string

      desired denomination (to)

    Returns MsgSwap

Properties

ask_denom

ask_denom: string

offer_coin

offer_coin: Coin

trader

trader: string

Methods

packAny

  • packAny(): Any

toAmino

toAminoJSON

  • toAminoJSON(): string
  • Returns string

toData

toJSON

  • toJSON(): string
  • Returns string

toProto

  • toProto(): MsgSwap

Static fromAmino

Static fromData

Static fromProto

Static unpackAny