Documentation ¶
Index ¶
- Constants
- func BuildTx(param CommonParam, messages []*types.Any, privateKeyHex string) (string, error)
- func BuildTxAction(param CommonParam, messages []*types.Any, privateKeyHex string, ...) (string, error)
- func BuildTxActionForSignMessage(param CommonParam, messages []*types.Any, privateKeyHex string, ...) (string, string, error)
- func GetAddressByPublicKey(pubKeyHex string, HRP string) (string, error)
- func GetRawJsonTransaction(param interface{}) (string, error)
- func GetRawTransaction(param interface{}, publicKeyCompressed string) (string, error)
- func GetSignedJsonTransaction(signDoc string, publicKey string, signature string) (string, error)
- func GetSignedTransaction(signDoc string, signature string) (string, error)
- func GetSigningHash(rawTxByte string) (string, error)
- func HashMessage(p []byte) []byte
- func IbcTransfer(param IbcTransferParam, privateKeyHex string) (string, error)
- func IbcTransferAction(param IbcTransferParam, privateKeyHex string, useEthSecp256k1 bool) (string, error)
- func MakeTransactionWithMessage(p CommonParam, publicKeyCompressed string, messages []*types.Any) (string, error)
- func MakeTransactionWithSignDoc(body string, auth string, ChainId string, AccountNumber uint64) (string, error)
- func NewAddress(privateKey string, hrp string, followETH bool) (string, error)
- func SignAminoMessage(data string, privateKeyHex string) (string, error)
- func SignDoc(body string, auth string, privateKeyHex string, ChainId string, ...) (string, string, error)
- func SignMessage(data string, privateKeyHex string) (string, string, error)
- func SignMessageAction(data string, privateKeyHex string, useEthSecp256k1 bool) (string, string, error)
- func SignRawJsonTransaction(signDoc string, privateKey *btcec.PrivateKey) (string, error)
- func SignRawTransaction(signDoc string, privateKey *btcec.PrivateKey) (string, error)
- func Transfer(param TransferParam, privateKeyHex string) (string, error)
- func TransferAction(param TransferParam, privateKeyHex string, useEthSecp256k1 bool) (string, error)
- func ValidateAddress(address string, hrp string) bool
- type CommonParam
- type IbcTransferParam
- type MessageData
- type TransferParam
Constants ¶
View Source
const (
ATOM_HRP = "cosmos"
)
Variables ¶
This section is empty.
Functions ¶
func BuildTxAction ¶
func GetAddressByPublicKey ¶
func GetRawJsonTransaction ¶
func GetRawTransaction ¶
GetRawTransaction Gets the string to be signed param - (TransferParam | IbcTransferParam) publicKeyCompressed - (hex 33 bytes) return signDoc
func GetSignedTransaction ¶
GetSignedTransaction - Getting signed transactions signDoc - Transaction string to be signed(hex) signature - Transaction signature (hex)
func GetSigningHash ¶
func HashMessage ¶
func IbcTransfer ¶
func IbcTransfer(param IbcTransferParam, privateKeyHex string) (string, error)
func IbcTransferAction ¶
func IbcTransferAction(param IbcTransferParam, privateKeyHex string, useEthSecp256k1 bool) (string, error)
func SignMessage ¶
SignMessage Sign the message, using JSON format
func SignMessageAction ¶
func SignRawJsonTransaction ¶
func SignRawTransaction ¶
func TransferAction ¶
func TransferAction(param TransferParam, privateKeyHex string, useEthSecp256k1 bool) (string, error)
func ValidateAddress ¶
Types ¶
type CommonParam ¶
type IbcTransferParam ¶
type MessageData ¶
type MessageData struct { ChainId string `json:"chain_id,omitempty"` AccountNumber string `json:"account_number,omitempty"` Sequence string `json:"sequence,omitempty"` Fee struct { Gas string `json:"gas,omitempty"` Amount []types.Coin `json:"amount,omitempty"` } `json:"fee,omitempty"` Msgs []struct { T string `json:"type,omitempty"` V interface{} `json:"value,omitempty"` } `json:"msgs,omitempty"` Memo string `json:"memo,omitempty"` }
type TransferParam ¶
type TransferParam struct { CommonParam FromAddress string ToAddress string Demon string Amount string }
Click to show internal directories.
Click to hide internal directories.