Documentation ¶
Index ¶
- type CoreContext
- func (ctx CoreContext) BroadcastTx(tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
- func (ctx CoreContext) GetNode() (rpcclient.Client, error)
- func (ctx CoreContext) GetPassphraseFromStdin(name string) (pass string, err error)
- func (ctx CoreContext) Query(key cmn.HexBytes, storeName string) (res []byte, err error)
- func (ctx CoreContext) QuerySubspace(cdc *wire.Codec, subspace []byte, storeName string) (res []sdk.KVPair, err error)
- func (ctx CoreContext) SignAndBuild(msgs []sdk.Msg, cdc *wire.Codec) ([]byte, error)
- func (ctx CoreContext) SignBuildBroadcast(msgs []sdk.Msg, cdc *wire.Codec) (*ctypes.ResultBroadcastTxCommit, error)
- func (c CoreContext) WithChainID(chainID string) CoreContext
- func (c CoreContext) WithClient(client rpcclient.Client) 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) WithPrivKey(privKey crypto.PrivKey) CoreContext
- func (c CoreContext) WithSequence(sequence uint64) 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 uint64 Memo string Client rpcclient.Client PrivKey crypto.PrivKey }
CoreContext - context used in terminal
func (CoreContext) BroadcastTx ¶
func (ctx CoreContext) BroadcastTx(tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
BroadcastTx - broadcast the transaction bytes to Tendermint
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) QuerySubspace ¶
func (ctx CoreContext) QuerySubspace(cdc *wire.Codec, subspace []byte, storeName string) (res []sdk.KVPair, err error)
QuerySubspace - query from Tendermint with the provided storename and subspace
func (CoreContext) SignAndBuild ¶
sign and build the transaction from the msg
func (CoreContext) SignBuildBroadcast ¶
func (ctx CoreContext) SignBuildBroadcast( msgs []sdk.Msg, cdc *wire.Codec) (*ctypes.ResultBroadcastTxCommit, error)
sign and build the transaction from the msg
func (CoreContext) WithChainID ¶
func (c CoreContext) WithChainID(chainID string) CoreContext
WithChainID - mount chain id on context
func (CoreContext) WithClient ¶
func (c CoreContext) WithClient(client rpcclient.Client) CoreContext
WithClient - mount client on context
func (CoreContext) WithFromAddressName ¶
func (c CoreContext) WithFromAddressName(fromAddressName string) CoreContext
WithFromAddressName - mount from address on context
func (CoreContext) WithHeight ¶
func (c CoreContext) WithHeight(height int64) CoreContext
WithHeight - mount height on context
func (CoreContext) WithNodeURI ¶
func (c CoreContext) WithNodeURI(nodeURI string) CoreContext
WithNodeURI - mount node uri on context
func (CoreContext) WithPrivKey ¶
func (c CoreContext) WithPrivKey(privKey crypto.PrivKey) CoreContext
WithPrivKey - mount private key on context
func (CoreContext) WithSequence ¶
func (c CoreContext) WithSequence(sequence uint64) CoreContext
WithSequence - mount sequence number on context
func (CoreContext) WithTrustNode ¶
func (c CoreContext) WithTrustNode(trustNode bool) CoreContext
WithTrustNode - mount trust node on context