Documentation
¶
Index ¶
- func CompleteAndBroadcastTxCLI(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, msgs []sdk.Msg, ...) error
- func GetCmdBroadCast(cdc *codec.Codec) *cobra.Command
- func GetCmdCreate(cdc *codec.Codec) *cobra.Command
- func GetCmdSend(cdc *codec.Codec) *cobra.Command
- func GetCmdSign(cdc *codec.Codec) *cobra.Command
- func PrepareTxBuilder(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, fromaddr sdk.AccAddress) (authtxb.TxBuilder, error)
- func PrintUnsignedStdTx(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, msgs []sdk.Msg, ...) (err error)
- func SignStdTx(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, stdTx auth.StdTx, ...) (signedTx auth.StdTx, err error)
- func SignTransaction(txBldr authtxb.TxBuilder, cliCtx context.CLIContext, stdTx auth.StdTx, ...) (res []byte, err error)
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 ¶
junying-todo-20190327 GetCmdBroadCast is the CLI command for broadcasting a signed transaction
inspired by hscli tx broadcast signed.json
func GetCmdCreate ¶
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 ¶
junying-todo-20190325 GetCmdSend is the CLI command for sending a Send transaction
inspired by hscli send cosmos1yqgv2rhxcgrf5jqrxlg80at5szzlarlcy254re 5htdftoken --from junying
func GetCmdSign ¶
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.
Types ¶
This section is empty.