cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteAndBroadcastTxCLI

func CompleteAndBroadcastTxCLI(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, msgs []sdk.Msg, fromaddr sdk.AccAddress) error

CompleteAndBroadcastTxCLI implements a utility function that facilitates sending a series of messages in a signed transaction given a TxBuilder and a QueryContext. It ensures that the account exists, has a proper number and sequence set. In addition, it builds and signs a transaction with the supplied messages. Finally, it broadcasts the signed transaction to a node.

NOTE: Also see CompleteAndBroadcastTxREST.

func GetCmdBroadCast

func GetCmdBroadCast(cdc *codec.Codec) *cobra.Command

junying-todo-20190327 GetCmdBroadCast is the CLI command for broadcasting a signed transaction

inspired by
hscli tx broadcast signed.json

func GetCmdCall added in v1.1.0

func GetCmdCall(cdc *codec.Codec) *cobra.Command

junying-todo, 2020-04-01 GetCmdCall is the CLI command for call contract.

func GetCmdCreate

func GetCmdCreate(cdc *codec.Codec) *cobra.Command

junying-todo-20190326 GetCmdCreate is the CLI command for creating unsigned transaction

inspired by
hscli send --generate-only cosmos1yqgv2rhxcgrf5jqrxlg80at5szzlarlcy254re 5htdftoken --from junying > unsigned.json
utils.PrintUnsignedStdTx(txBldr, cliCtx, []sdk.Msg{msg},false)
Tips:
check functions in utils

func GetCmdSend

func GetCmdSend(cdc *codec.Codec) *cobra.Command

junying-todo-20190325 GetCmdSend is the CLI command for sending a Send transaction

inspired by
hscli send cosmos1yqgv2rhxcgrf5jqrxlg80at5szzlarlcy254re 5htdftoken --from junying

func GetCmdSign

func GetCmdSign(cdc *codec.Codec) *cobra.Command

junying-todo-20190327 GetCmdSign is the CLI command for signing unsigned transaction

inspired by
hscli tx sign unsigned.json --name junying >> signed.json
hscli tx sign --validate-signatures signed.json
hscli tx sign --signature-only  test.json --name junying

func PrepareTxBuilder

func PrepareTxBuilder(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, fromaddr sdk.AccAddress) (authtxb.TxBuilder, error)

PrepareTxBuilder populates a TxBuilder in preparation for the build of a Tx.

func PrintUnsignedStdTx

func PrintUnsignedStdTx(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, msgs []sdk.Msg, encodeflag bool) (err error)

PrintUnsignedStdTx builds an unsigned StdTx and prints it to os.Stdout. Don't perform online validation or lookups if offline is true.

func SignStdTx

func SignStdTx(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, stdTx auth.StdTx, passphrase string, offline bool) (signedTx auth.StdTx, err error)

func SignTransaction

func SignTransaction(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, stdTx auth.StdTx, passphrase string, offline bool) (res []byte, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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