Versions in this module Expand all Collapse all v1 v1.0.0 Jun 3, 2021 Changes in this version + func CompressPubkey(pubkey *ecdsa.PublicKey) []byte + func DecompressPubkey(pubkey []byte) (*ecdsa.PublicKey, error) + func Ecrecover(hash, sig []byte) ([]byte, error) + func S256() elliptic.Curve + func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error) + func Sign(hash []byte, prv *ecdsa.PrivateKey) ([]byte, error) + func ToECDSA(d []byte) (*ecdsa.PrivateKey, error) + func TxStatus(txReceipt *TransactionReceipt, isToken bool) bool + func VerifySignature(pubkey, hash, signature []byte) bool + type Block struct + Transactions []*Transaction + type BlockHeader struct + Coinbase string + GasLimit hexutil.Uint64 + GasUsed hexutil.Uint64 + Hash string + Number hexutil.Uint64 + ParentHash string + Size hexutil.Uint64 + Timestamp hexutil.Uint64 + type BlockTxHashes struct + Transactions []string + func Block2BlockTxHashes(b *Block) *BlockTxHashes + func (b *BlockTxHashes) Bytes() ([]byte, error) + type Eth struct + func NewETH(host string, clientIdentifier string, chainId int64, isEip155 bool) (*Eth, error) + func (eth *Eth) GetBalance(address string, result interface{}) error + func (eth *Eth) GetBlockByHash(height uint64, isFullTx bool, result interface{}) error + func (eth *Eth) GetBlockByNumber(height uint64, isFullTx bool, result interface{}) error + func (eth *Eth) GetCode(contract string) (hexutil.Bytes, error) + func (eth *Eth) GetLatestBlock(isFullTx bool, result interface{}) error + func (eth *Eth) GetNonce(address string) (hexutil.Uint64, error) + func (eth *Eth) GetTokenBalance(contract, address string, blockNumber *big.Int, result interface{}) error + func (eth *Eth) GetTokenDecimals(contract string) (decimals big.Int, err error) + func (eth *Eth) GetTokenName(contract string) (name string, err error) + func (eth *Eth) GetTokenSymbol(contract string) (symbol string, err error) + func (eth *Eth) GetTokenTotalSupply(contract string) (totalSupply big.Int, err error) + func (eth *Eth) GetTransactionByHash(hash string, result interface{}) error + func (eth *Eth) GetTransactionReceipt(hash string, result interface{}) error + func (eth *Eth) IsContract(address string) (bool, error) + func (eth *Eth) SendRawTransactionMethod(tx *RawTransaction) (string, error) + func (eth *Eth) SignTx(privateKey string, to *types.Address, value *big.Int, nonce uint64, ...) (*RawTransaction, error) + type RawTransaction struct + GaPrice *big.Int + Gas uint64 + Input []byte + Nonce uint64 + R *big.Int + S *big.Int + To *types.Address + V *big.Int + Value *big.Int + func (t *RawTransaction) GetRawTx() []byte + func (t *RawTransaction) GetTxHash() string + type TokenTransferInput struct + From string + Method string + MethodName string + To string + Value string + func ParseInput(input string) *TokenTransferInput + func ParseInputBytes(inputBytes hexutil.Bytes) *TokenTransferInput + type TokenTransferParams struct + From string + MethodName string + To string + Value decimal.Decimal + func ParseTransferInput(input *TokenTransferInput) *TokenTransferParams + type Transaction struct + BlockHash string + BlockNumber hexutil.Uint64 + From types.Address + GasLimit hexutil.Uint64 + GasPrice *hexutil.Big + Hash string + Input hexutil.Bytes + Nonce hexutil.Uint64 + To *types.Address + TransactionIndex hexutil.Uint64 + Value *hexutil.Big + func (tx *Transaction) Bytes() ([]byte, error) + type TransactionDetail struct + ContractAddress *types.Address + CumulativeGasUsed hexutil.Uint64 + GasUsed hexutil.Uint64 + InputFormat *TokenTransferInput + Logs json.RawMessage + Status bool + type TransactionReceipt struct + BlockHash string + BlockNumber hexutil.Uint64 + ContractAddress *types.Address + CumulativeGasUsed hexutil.Uint64 + From types.Address + GasUsed hexutil.Uint64 + Logs json.RawMessage + Status hexutil.Uint64 + To *types.Address + TransactionHash string + TransactionIndex hexutil.Uint64 + func (t *TransactionReceipt) Bytes() ([]byte, error)