Documentation ¶
Index ¶
- func CreateAccount(name, passWd string) (info keys.Info, mnemo string, err error)
- func CreateAccountWithMnemo(mnemonic, name, passWd string) (info keys.Info, mnemo string, err error)
- func CreateAccountWithPrivateKey(privateKey, name, passWd string) (info keys.Info, err error)
- func ErrClientQuery(errMsg string) error
- func ErrFilterDataFromBaseResponse(kind, errMsg string) error
- func ErrFilterDataFromListResponse(kind, errMsg string) error
- func ErrMarshalJSON(errMsg string) error
- func ErrUnmarshalJSON(errMsg string) error
- func GenerateMnemonic() (mnemo string, err error)
- func GeneratePrivateKeyFromMnemo(mnemo string) (privKey string, err error)
- func GetDataFromBaseResponse(bytes []byte, ptr interface{}) error
- func GetOrderIDsFromResponse(txResp *sdk.TxResponse) (orderIDs []string)
- func GetStdTxFromFile(codec sdk.SDKCodec, filePath string) (stdTx sdk.StdTx, err error)
- func ParseBlock(cdc sdk.SDKCodec, pTmBlock *tmtypes.Block) (block types.Block, err error)
- func ParseBlockResults(pTmBlockResults *ctypes.ResultBlockResults) types.BlockResults
- func ParseCommitResult(pTmCommitResult *ctypes.ResultCommit) types.ResultCommit
- func ParseTransfersStr(str string) ([]types.TransferUnit, error)
- func ParseTxResult(pTmTxResult *ctypes.ResultTx) types.ResultTx
- func ParseTxsResult(pTmTxsResult *ctypes.ResultTxSearch) types.ResultTxs
- func ParseValAddresses(valAddrsStr []string) ([]sdk.ValAddress, error)
- func ParseValidatorsResult(pTmValsResult *ctypes.ResultValidators) types.ResultValidators
- func UnmarshalListResponse(bz []byte, ptr interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAccount ¶
CreateAccount creates a random key info with the given name and password
func CreateAccountWithMnemo ¶
func CreateAccountWithMnemo(mnemonic, name, passWd string) (info keys.Info, mnemo string, err error)
CreateAccountWithMnemo creates the key info with the given mnemonic, name and password
func CreateAccountWithPrivateKey ¶
CreateAccountWithPrivateKey creates the key info with the given privateKey string, name and password
func ErrClientQuery ¶
ErrClientQuery returns an error when client failed in query
func ErrFilterDataFromBaseResponse ¶
ErrFilterDataFromBaseResponse returns an error when it failed to filter data from backend base response
func ErrFilterDataFromListResponse ¶
ErrFilterDataFromListResponse returns an error when it failed to filter data from backend list response
func ErrMarshalJSON ¶
ErrMarshalJSON returns an error when it failed in marshaling JSON
func ErrUnmarshalJSON ¶
ErrUnmarshalJSON returns an error when it failed in unmarshaling JSON
func GenerateMnemonic ¶
GenerateMnemonic creates a random mnemonic
func GeneratePrivateKeyFromMnemo ¶
GeneratePrivateKeyFromMnemo converts mnemonic to private key
func GetDataFromBaseResponse ¶
GetDataFromBaseResponse gets the detail data from the base response bytes
func GetOrderIDsFromResponse ¶
func GetOrderIDsFromResponse(txResp *sdk.TxResponse) (orderIDs []string)
GetOrderIDsFromResponse filters the orderID from the tx response a useful tool
func GetStdTxFromFile ¶
GetStdTxFromFile gets the instance of stdTx from a json file
func ParseBlock ¶
ParseBlock converts raw tendermint block type to the one gosdk requires
func ParseBlockResults ¶
func ParseBlockResults(pTmBlockResults *ctypes.ResultBlockResults) types.BlockResults
ParseBlockResults converts raw tendermint block result type to the one gosdk requires
func ParseCommitResult ¶
func ParseCommitResult(pTmCommitResult *ctypes.ResultCommit) types.ResultCommit
ParseCommitResult converts raw tendermint commit result type to the one gosdk requires
func ParseTransfersStr ¶
func ParseTransfersStr(str string) ([]types.TransferUnit, error)
ParseTransfersStr parses the whole multi-send info string into TransferUnit Example: `addr1 1okt
addr2 2okt`
func ParseTxResult ¶
ParseTxResult converts raw tendermint tx result type to the one gosdk requires
func ParseTxsResult ¶
func ParseTxsResult(pTmTxsResult *ctypes.ResultTxSearch) types.ResultTxs
ParseTxsResult converts raw tendermint txs result type to the one gosdk requires
func ParseValAddresses ¶
func ParseValAddresses(valAddrsStr []string) ([]sdk.ValAddress, error)
ParseValAddresses parses validator address string to types.ValAddress
func ParseValidatorsResult ¶
func ParseValidatorsResult(pTmValsResult *ctypes.ResultValidators) types.ResultValidators
ParseValidatorsResult converts raw tendermint validators result type to the one gosdk requires
func UnmarshalListResponse ¶
UnmarshalListResponse unmarshals the list response from data bytes
Types ¶
This section is empty.