Documentation ¶
Index ¶
- type CoreContext
- func (ctx CoreContext) BroadcastTx(tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
- func (ctx CoreContext) GetFromAddress() (from sdk.Address, err error)
- func (ctx CoreContext) GetNode() (rpcclient.Client, error)
- func (ctx CoreContext) GetPassphraseFromStdin(name string) (pass string, err error)
- func (c CoreContext) NextSequence(address []byte) (int64, error)
- func (ctx CoreContext) Query(key cmn.HexBytes, storeName string) (res []byte, err error)
- func (ctx CoreContext) SignAndBuild(name, passphrase string, msg sdk.Msg, cdc *wire.Codec) ([]byte, error)
- func (ctx CoreContext) SignBuildBroadcast(name string, msg sdk.Msg, cdc *wire.Codec) (*ctypes.ResultBroadcastTxCommit, error)
- func (c CoreContext) WithAccountStore(accountStore string) CoreContext
- func (c CoreContext) WithChainID(chainID string) CoreContext
- func (c CoreContext) WithClient(client rpcclient.Client) CoreContext
- func (c CoreContext) WithDecoder(decoder sdk.AccountDecoder) CoreContext
- func (c CoreContext) WithFromAddressName(fromAddressName string) CoreContext
- func (c CoreContext) WithHeight(height int64) CoreContext
- func (c CoreContext) WithNodeURI(nodeURI string) CoreContext
- func (c CoreContext) WithSequence(sequence int64) CoreContext
- func (c CoreContext) WithTrustNode(trustNode bool) CoreContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreContext ¶
type CoreContext struct { ChainID string Height int64 TrustNode bool NodeURI string FromAddressName string Sequence int64 Client rpcclient.Client Decoder sdk.AccountDecoder AccountStore string }
func (CoreContext) BroadcastTx ¶
func (ctx CoreContext) BroadcastTx(tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
Broadcast the transaction bytes to Tendermint
func (CoreContext) GetFromAddress ¶
func (ctx CoreContext) GetFromAddress() (from sdk.Address, err error)
Get the from address from the name flag
func (CoreContext) GetNode ¶
func (ctx CoreContext) GetNode() (rpcclient.Client, error)
GetNode prepares a simple rpc.Client
func (CoreContext) GetPassphraseFromStdin ¶
func (ctx CoreContext) GetPassphraseFromStdin(name string) (pass string, err error)
get passphrase from std input
func (CoreContext) NextSequence ¶ added in v0.15.0
func (c CoreContext) NextSequence(address []byte) (int64, error)
get the next sequence for the account address
func (CoreContext) SignAndBuild ¶
func (ctx CoreContext) SignAndBuild(name, passphrase string, msg sdk.Msg, cdc *wire.Codec) ([]byte, error)
sign and build the transaction from the msg
func (CoreContext) SignBuildBroadcast ¶
func (ctx CoreContext) SignBuildBroadcast(name string, msg sdk.Msg, cdc *wire.Codec) (*ctypes.ResultBroadcastTxCommit, error)
sign and build the transaction from the msg
func (CoreContext) WithAccountStore ¶ added in v0.15.0
func (c CoreContext) WithAccountStore(accountStore string) CoreContext
WithAccountStore - return a copy of the context with an updated AccountStore
func (CoreContext) WithChainID ¶
func (c CoreContext) WithChainID(chainID string) CoreContext
WithChainID - return a copy of the context with an updated chainID
func (CoreContext) WithClient ¶
func (c CoreContext) WithClient(client rpcclient.Client) CoreContext
WithClient - return a copy of the context with an updated RPC client instance
func (CoreContext) WithDecoder ¶ added in v0.15.0
func (c CoreContext) WithDecoder(decoder sdk.AccountDecoder) CoreContext
WithDecoder - return a copy of the context with an updated Decoder
func (CoreContext) WithFromAddressName ¶
func (c CoreContext) WithFromAddressName(fromAddressName string) CoreContext
WithFromAddressName - return a copy of the context with an updated from address
func (CoreContext) WithHeight ¶
func (c CoreContext) WithHeight(height int64) CoreContext
WithHeight - return a copy of the context with an updated height
func (CoreContext) WithNodeURI ¶
func (c CoreContext) WithNodeURI(nodeURI string) CoreContext
WithNodeURI - return a copy of the context with an updated node URI
func (CoreContext) WithSequence ¶
func (c CoreContext) WithSequence(sequence int64) CoreContext
WithSequence - return a copy of the context with an updated sequence number
func (CoreContext) WithTrustNode ¶
func (c CoreContext) WithTrustNode(trustNode bool) CoreContext
WithTrustNode - return a copy of the context with an updated TrustNode flag