Documentation ¶
Index ¶
- func CalTxHash(rawTx string) string
- func DecodeTx(rawTx string) (string, error)
- func EcRecover(signature, message string, addPrefix bool) string
- func GenerateMnemonic() (string, error)
- func GenerateRawTransactionWithSignature(txType int, chainId, unsignedRawTx, r, s, v string) (string, error)
- func GetDerivedPath(index int) string
- func GetDerivedPrivateKey(mnemonic string, hdPath string) (string, error)
- func GetEthereumMessagePrefix(message string) string
- func GetNewAddress(prvHex string) string
- func MessageHash(data string) string
- func SignEip1559Transaction(chainId *big.Int, tx *types.Transaction, prvKey *ecdsa.PrivateKey) ([]byte, string, error)
- func SignTransaction(txJson, prvHex string) (string, error)
- func ValidAddress(address string) bool
- type SignParams
- type SignedTx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMnemonic ¶
func GetDerivedPath ¶
func GetDerivedPrivateKey ¶
func GetNewAddress ¶
func MessageHash ¶
func SignEip1559Transaction ¶
func SignEip1559Transaction(chainId *big.Int, tx *types.Transaction, prvKey *ecdsa.PrivateKey) ([]byte, string, error)
func SignTransaction ¶
func ValidAddress ¶
Types ¶
type SignParams ¶
type SignParams struct { Type int `json:"type"` ChainId string `json:"chainId"` Nonce string `json:"nonce"` MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas"` MaxFeePerGas string `json:"maxFeePerGas"` GasLimit string `json:"gasLimit"` To string `json:"to"` Value string `json:"value"` Data string `json:"data"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.