Documentation ¶
Index ¶
- func EIP712Hash(typedData apitypes.TypedData) (hash []byte, err error)
- func Ecrecover(hash, signature []byte) (publicBy []byte, address common.Address, err error)
- func Encrypt(publicKey string, message []byte) ([]byte, error)
- func EthToBN(amount float64) (bn *big.Int)
- func GweiToBN(amount float64) (bn *big.Int)
- type Contract
- func (c *Contract) CallMethod(methodName, tag string, args ...interface{}) (res string, err error)
- func (c *Contract) DecodeData(data []byte) (methodName string, params map[string]interface{}, err error)
- func (c *Contract) DecodeDataHex(dataHex string) (methodName string, params map[string]interface{}, err error)
- func (c *Contract) DecodeEvent(topics []common.Hash, data []byte) (eventName string, values map[string]interface{}, err error)
- func (c *Contract) DecodeEventHex(topicsHex []string, dataHex string) (eventName string, values map[string]interface{}, err error)
- func (c *Contract) EncodeData(methodName string, args ...interface{}) ([]byte, error)
- func (c *Contract) EncodeDataHex(methodName string, args ...interface{}) (hex string, err error)
- func (c *Contract) ExecMethod(methodName string, opts *TxOpts, args ...interface{}) (txHash string, err error)
- func (c *Contract) GetAddress() string
- type Signer
- func (s Signer) Decrypt(ct []byte) ([]byte, error)
- func (s Signer) GetPrivateKey() *ecdsa.PrivateKey
- func (s Signer) GetPublicKey() []byte
- func (s Signer) GetPublicKeyHex() string
- func (s *Signer) SignLegacyTx(nonce int, to common.Address, amount *big.Int, gasLimit int, gasPrice *big.Int, ...) (tx *types.Transaction, err error)
- func (s Signer) SignMsg(msg []byte) (sig []byte, err error)
- func (s *Signer) SignTx(nonce int, to common.Address, amount *big.Int, gasLimit int, ...) (tx *types.Transaction, err error)
- func (s Signer) SignTypedData(typedData apitypes.TypedData) (sig []byte, err error)
- type TxOpts
- type Wallet
- func (w *Wallet) GetAddress() string
- func (w *Wallet) GetBalance() (balance big.Int, err error)
- func (w *Wallet) GetNonce() (nonce int, err error)
- func (w *Wallet) GetPendingNonce() (nonce int, err error)
- func (w *Wallet) SendLegacyTx(to common.Address, amount *big.Int, data []byte, opts *TxOpts) (txHash string, err error)
- func (w *Wallet) SendTx(to common.Address, amount *big.Int, data []byte, opts *TxOpts) (txHash string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Contract ¶
func NewContract ¶
func (*Contract) CallMethod ¶
CallMethod Only read contract status tag:
HEX String - an integer block number String "earliest" for the earliest/genesis block String "latest" - for the latest mined block String "pending" - for the pending state/transactions
func (*Contract) DecodeData ¶
func (*Contract) DecodeDataHex ¶
func (*Contract) DecodeEvent ¶
func (*Contract) DecodeEventHex ¶
func (*Contract) EncodeData ¶
func (*Contract) EncodeDataHex ¶
func (*Contract) ExecMethod ¶
func (c *Contract) ExecMethod(methodName string, opts *TxOpts, args ...interface{}) (txHash string, err error)
ExecMethod Execute tx
func (*Contract) GetAddress ¶
type Signer ¶
func NewSignerFromPath ¶
func (Signer) GetPrivateKey ¶
func (s Signer) GetPrivateKey() *ecdsa.PrivateKey
func (Signer) GetPublicKey ¶
func (Signer) GetPublicKeyHex ¶
func (*Signer) SignLegacyTx ¶
type Wallet ¶
func NewWalletFromPath ¶
func (*Wallet) GetAddress ¶
func (*Wallet) GetPendingNonce ¶
func (*Wallet) SendLegacyTx ¶
Click to show internal directories.
Click to hide internal directories.