Documentation ¶
Index ¶
- type TxContext
- func (ctx TxContext) Build(msgs []sdk.Msg) (auth.StdSignMsg, error)
- func (ctx TxContext) BuildAndSign(name, passphrase string, msgs []sdk.Msg) ([]byte, error)
- func (ctx TxContext) Sign(name, passphrase string, msg auth.StdSignMsg) ([]byte, error)
- func (ctx TxContext) WithAccountNumber(accnum int64) TxContext
- func (ctx TxContext) WithChainID(chainID string) TxContext
- func (ctx TxContext) WithCodec(cdc *wire.Codec) TxContext
- func (ctx TxContext) WithFee(fee string) TxContext
- func (ctx TxContext) WithGas(gas int64) TxContext
- func (ctx TxContext) WithMemo(memo string) TxContext
- func (ctx TxContext) WithSequence(sequence int64) TxContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TxContext ¶
type TxContext struct { Codec *wire.Codec AccountNumber int64 Sequence int64 Gas int64 ChainID string Memo string Fee string }
TxContext implements a transaction context created in SDK modules.
func NewTxContextFromCLI ¶
func NewTxContextFromCLI() TxContext
NewTxContextFromCLI returns a new initialized TxContext with parameters from the command line using Viper.
func (TxContext) Build ¶
Build builds a single message to be signed from a TxContext given a set of messages. It returns an error if a fee is supplied but cannot be parsed.
func (TxContext) BuildAndSign ¶
BuildAndSign builds a single message to be signed, and signs a transaction with the built message given a name, passphrase, and a set of messages.
func (TxContext) Sign ¶
Sign signs a transaction given a name, passphrase, and a single message to signed. An error is returned if signing fails.
func (TxContext) WithAccountNumber ¶
WithAccountNumber returns a copy of the context with an account number.
func (TxContext) WithChainID ¶
WithChainID returns a copy of the context with an updated chainID.
func (TxContext) WithSequence ¶
WithSequence returns a copy of the context with an updated sequence number.