Documentation ¶
Index ¶
- type ClientContext
- func (ctx ClientContext) BroadcastTx(tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
- func (ctx ClientContext) GetInputAddresses(dir string) (from [2]common.Address, err error)
- func (ctx ClientContext) GetNode() (rpcclient.Client, error)
- func (ctx ClientContext) GetPassphraseFromStdin(addr common.Address) (pass string, err error)
- func (ctx ClientContext) GetSignature(addr common.Address, msg utxo.SpendMsg, dir string) (sig []byte, err error)
- func (ctx ClientContext) Query(path string, data cmn.HexBytes) (res []byte, err error)
- func (ctx ClientContext) QueryStore(key cmn.HexBytes, storeName string) (res []byte, err error)
- func (ctx ClientContext) QuerySubspace(subspace []byte, storeName string) (res []sdk.KVPair, err error)
- func (ctx ClientContext) QueryWithData(path string, data []byte) (res []byte, err error)
- func (ctx ClientContext) SignBuildBroadcast(addrs [2]common.Address, msg types.SpendMsg, dir string) (res *ctypes.ResultBroadcastTxCommit, err error)
- func (c ClientContext) WithClient(client rpcclient.Client) ClientContext
- func (c ClientContext) WithCodec(cdc *codec.Codec) ClientContext
- func (c ClientContext) WithDecoder(decoder UTXODecoder) ClientContext
- func (c ClientContext) WithHeight(height int64) ClientContext
- func (c ClientContext) WithInputAddresses(inputAddresses string) ClientContext
- func (c ClientContext) WithNodeURI(nodeURI string) ClientContext
- func (c ClientContext) WithTrustNode(trustNode bool) ClientContext
- func (c ClientContext) WithUTXOStore(utxoStore string) ClientContext
- type UTXODecoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientContext ¶
type ClientContext struct { Codec *codec.Codec Height int64 TrustNode bool NodeURI string InputAddresses string Client rpcclient.Client Decoder UTXODecoder Verifier tmlite.Verifier UTXOStore string PlasmaStore string }
func NewClientContextFromViper ¶
func NewClientContextFromViper() ClientContext
Return a new context with parameters from the command line
func (ClientContext) BroadcastTx ¶
func (ctx ClientContext) BroadcastTx(tx []byte) (*ctypes.ResultBroadcastTxCommit, error)
Broadcast the transaction bytes to Tendermint
func (ClientContext) GetInputAddresses ¶
func (ctx ClientContext) GetInputAddresses(dir string) (from [2]common.Address, err error)
Get the from address from the name flag
func (ClientContext) GetNode ¶
func (ctx ClientContext) GetNode() (rpcclient.Client, error)
GetNode returns an RPC client. If the context's client is not defined, an error is returned.
func (ClientContext) GetPassphraseFromStdin ¶
func (ctx ClientContext) GetPassphraseFromStdin(addr common.Address) (pass string, err error)
Get passphrase from std input
func (ClientContext) GetSignature ¶
func (ClientContext) QueryStore ¶
QueryStore performs a query from a Tendermint node with the provided key and store name.
func (ClientContext) QuerySubspace ¶
func (ctx ClientContext) QuerySubspace(subspace []byte, storeName string) (res []sdk.KVPair, err error)
QuerySubspace performs a query from a Tendermint node with the provided store name and subspace.
func (ClientContext) QueryWithData ¶
func (ctx ClientContext) QueryWithData(path string, data []byte) (res []byte, err error)
Query information about the connected node with a data payload
func (ClientContext) SignBuildBroadcast ¶
func (ctx ClientContext) SignBuildBroadcast(addrs [2]common.Address, msg types.SpendMsg, dir string) (res *ctypes.ResultBroadcastTxCommit, err error)
sign and build the transaction from the msg
func (ClientContext) WithClient ¶
func (c ClientContext) WithClient(client rpcclient.Client) ClientContext
Returns a copy of the context with an updated RPC client instance
func (ClientContext) WithCodec ¶
func (c ClientContext) WithCodec(cdc *codec.Codec) ClientContext
func (ClientContext) WithDecoder ¶
func (c ClientContext) WithDecoder(decoder UTXODecoder) ClientContext
Returns a copy of the context with an updated utxo decoder
func (ClientContext) WithHeight ¶
func (c ClientContext) WithHeight(height int64) ClientContext
Returns a copy of the context with an updated height
func (ClientContext) WithInputAddresses ¶
func (c ClientContext) WithInputAddresses(inputAddresses string) ClientContext
Returns a copy of the context with an updated from address
func (ClientContext) WithNodeURI ¶
func (c ClientContext) WithNodeURI(nodeURI string) ClientContext
Returns a copy of the xontext with an updated node URI
func (ClientContext) WithTrustNode ¶
func (c ClientContext) WithTrustNode(trustNode bool) ClientContext
Returns a copy of the context with an updated TrustNode flag
func (ClientContext) WithUTXOStore ¶
func (c ClientContext) WithUTXOStore(utxoStore string) ClientContext
Returns a copy of the context with an updated UTXOStore