core

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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
}

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) Query

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

Query from Tendermint with the provided key and storename

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) WithChainID

func (c CoreContext) WithChainID(chainID string) CoreContext

func (CoreContext) WithClient

func (c CoreContext) WithClient(client rpcclient.Client) CoreContext

func (CoreContext) WithFromAddressName

func (c CoreContext) WithFromAddressName(fromAddressName string) CoreContext

func (CoreContext) WithHeight

func (c CoreContext) WithHeight(height int64) CoreContext

func (CoreContext) WithNodeURI

func (c CoreContext) WithNodeURI(nodeURI string) CoreContext

func (CoreContext) WithSequence

func (c CoreContext) WithSequence(sequence int64) CoreContext

func (CoreContext) WithTrustNode

func (c CoreContext) WithTrustNode(trustNode bool) CoreContext

Jump to

Keyboard shortcuts

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