context

package
v0.0.0-...-da22cf9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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 (ctx ClientContext) GetSignature(addr common.Address, msg utxo.SpendMsg, dir string) (sig []byte, err error)

func (ClientContext) Query

func (ctx ClientContext) Query(path string, data cmn.HexBytes) (res []byte, err error)

Query performs a query for information about the connected node.

func (ClientContext) QueryStore

func (ctx ClientContext) QueryStore(key cmn.HexBytes, storeName string) (res []byte, err error)

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

type UTXODecoder

type UTXODecoder func(utxoBytes []byte) (utxo.UTXO, error)

redefine in utxo.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL