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 types.SpendMsg, dir string) (sig []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) 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 { Height int64 TrustNode bool NodeURI string InputAddresses string Client rpcclient.Client Decoder UTXODecoder UTXOStore 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)
Prepares a simple rpc.Client
func (ClientContext) GetPassphraseFromStdin ¶
func (ctx ClientContext) GetPassphraseFromStdin(addr common.Address) (pass string, err error)
Get passphrase from std input
func (ClientContext) GetSignature ¶
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) 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