# Packages
No description provided by the author
# Functions
BytesToAddress 将地址20字节转换为地址类型 @param b @return Address.
No description provided by the author
CreateAddress 用户安装合约时生成的合约地址 @param addr @param nonce @return Address.
CreateAddress2 creates an Ethereum address following the CREATE2 Opcode.
No description provided by the author
Ecrecover @param hash @param sig @return []byte @return error.
EncodeSignature generates a signature value based on the R, S and V value.
EncodeToHex 将二进制转换为以太坊格式的Hex @param str @return string.
HexToBytes converts a hex string to a byte array.
IsZeroAddress 判断是否空地址 @param addr @return bool.
Keccak256 calculates the Keccak256.
MarshalPublicKey marshals a public key on the secp256k1 elliptic curve.
No description provided by the author
NewEIP155Signer returns a new EIP155Signer object.
NewSafeUint256 基于字节数组创建SafeUint256 @param x @return *SafeUint256 @return bool.
NewSafeUint256FromUint64 基于Uint64创建SafeUint256 @param i @return *SafeUint256.
NewSigner creates a new signer object (EIP155 or FrontierSigner).
No description provided by the author
ParseAddress 解析字符串成以太坊地址 @param str 必须以0x开头的40字节Hex或者就是40字节的Hex @return Address @return error.
ParseAddressStrict 解析以太坊地址,严格检查格式包括EIP-55大小写要求,而且必须0x开头 @param str @return Address @return error.
ParsePrivateKey 解析二进制位私钥 @param buf @return *ecdsa.PrivateKey @return error.
ParsePublicKey parses bytes into a public key on the secp256k1 elliptic curve.
ParseSafeUint256 get uint256 obj from str.
PubKeyBytesToAddress 公钥二进制转换为地址 @param data @return Address.
PubKeyToAddress returns the Ethereum address of a public key.
RecoverPubkey verifies the compact signature "signature" of "hash" for the secp256k1 curve.
SafeAdd sets z to the sum x+y and returns z.
SafeDiv sets z to the quotient x/y for y != 0 and returns z.
SafeMul sets z to the product x*y and returns z.
SafeSub sets z to the difference x-y and returns z.
StringToAddress 忽略错误的可能,直接将字符串转换为地址 @param str @return Address.
No description provided by the author
UnmarshalPublicKey 反序列化公钥 @param data @return *ecdsa.PublicKey.
No description provided by the author
ValidateSignatureValues checks if the signature values are correct.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
EmptyRootHash is the root when there are no transactions.
EmptyUncleHash is the root when there are no uncles.
S256 is the secp256k1 elliptic curve.
No description provided by the author
SafeUintOne is 1.
ZeroAddress 空地址.
No description provided by the author
# Structs
AccessTuple is the element type of an access list.
DynamicFeeTx EIP-1559 Tx.
No description provided by the author
No description provided by the author
LegacyTransaction is the Ethereum consensus transaction type prior to the Berlin hard fork.
Transaction represents a transaction that will serialize to the Ethereum RLP.
# Type aliases
AccessList is an EIP-2930 access list.
Address 以太坊地址.
No description provided by the author
SafeUint256 calculation uint256.
No description provided by the author