tx

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MsgSwap

func MsgSwap(poolCreator string, poolId uint64, swapTypeId uint32, offerCoin sdk.Coin,
	demandCoinDenom string, orderPrice sdk.Dec, swapFeeRate sdk.Dec) (sdk.Msg, error)

MsgSwap creates swap message and returns MsgWithdraw MsgSwap message.

Types

type Transaction

type Transaction struct {
	Client  *client.Client `json:"client"`
	ChainID string         `json:"chain_id"`
	Fees    sdk.Coins      `json:"fees"`
}

Transaction is an object that has common fields when signing transaction.

func NewTransaction

func NewTransaction(client *client.Client, chainID string, fees sdk.Coins) *Transaction

NewTransaction returns new Transaction object.

func (*Transaction) BroadcastTx

func (t *Transaction) BroadcastTx(ctx context.Context, txBytes []byte) (*sdktx.BroadcastTxResponse, error)

BroadcastTx broadcasts transaction.

func (*Transaction) Sign

func (t *Transaction) Sign(ctx context.Context, accSeq uint64, accNum uint64, privKey *secp256k1.PrivKey, msgs ...sdk.Msg) ([]byte, error)

Sign signs message(s) with the account's private key and braodacasts the message(s).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL