core

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSignature added in v0.3.0

func MakeSignature(msg authtypes.StdSignMsg, pk crypto.PrivKey) (sig authtypes.StdSignature, err error)

Types

type CoreContext

type CoreContext struct {
	ChainID         string
	Height          int64
	TrustNode       bool
	NodeURI         string
	FromAddressName string
	Sequence        uint64
	Memo            string
	Offline         bool
	Client          rpcclient.Client
	PrivKey         crypto.PrivKey
	Fees            sdk.Coins
	TxEncoder       sdk.TxEncoder
}

CoreContext - context used in terminal

func (CoreContext) BroadcastTx

func (ctx CoreContext) BroadcastTx(txBytes []byte) (sdk.TxResponse, error)

BroadcastTx - broadcast the transaction bytes to Tendermint

func (CoreContext) BuildAndSign added in v0.3.0

func (ctx CoreContext) BuildAndSign(msgs []sdk.Msg, optionalSigners ...OptionalSigner) ([]byte, error)

func (CoreContext) BuildSignMsg added in v0.3.0

func (ctx CoreContext) BuildSignMsg(msgs []sdk.Msg, seq uint64) (authtypes.StdSignMsg, error)

func (CoreContext) DoTxPrintResponse added in v0.3.0

func (ctx CoreContext) DoTxPrintResponse(msg sdk.Msg, optionalSigners ...OptionalSigner) error

func (CoreContext) GetNode

func (ctx CoreContext) GetNode() (rpcclient.Client, error)

GetNode prepares a simple rpc.Client

func (CoreContext) Query

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

Query - query from Tendermint with the provided key and storename

func (CoreContext) Sign added in v0.3.0

func (ctx CoreContext) Sign(msg []authtypes.StdSignMsg, keys []crypto.PrivKey) ([]byte, error)

func (CoreContext) SignBuildBroadcast

func (ctx CoreContext) SignBuildBroadcast(msgs []sdk.Msg, optionalSigners ...OptionalSigner) (sdk.TxResponse, 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) WithFees added in v0.3.0

func (c CoreContext) WithFees(fees string) CoreContext

WithFees - mount fees

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

func (CoreContext) WithTxEncoder added in v0.3.0

func (c CoreContext) WithTxEncoder(encoder sdk.TxEncoder) CoreContext

WithCodec - mount cdc on context.

type OptionalSigner added in v0.6.0

type OptionalSigner struct {
	PrivKey crypto.PrivKey
	Seq     uint64
}

Jump to

Keyboard shortcuts

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