Documentation
¶
Index ¶
- Constants
- func BytesToAddress(b []byte) types.Address
- func BytesToHash(b []byte) types.Hash
- func CopyBytes(b []byte) (copiedBytes []byte)
- func FromHex(s string) []byte
- func HashAlg() hash.Hash
- func Hex2Bytes(str string) []byte
- func HexToAddress(s string) types.Address
- func HexToHash(s string) types.Hash
- func NewTransaction(nonce uint64, to types.Address, amount *big.Int, gasLimit uint64, ...) *types.Transaction
- func TxHash(tx *types.Transaction) types.Hash
Constants ¶
View Source
const ( AddressLength = 20 HashLength = 32 )
Lengths of hashes and addresses in bytes.
Variables ¶
This section is empty.
Functions ¶
func BytesToAddress ¶ added in v1.0.0
BytesToAddress returns Address with value b. If b is larger than len(h), b will be cropped from the left.
func BytesToHash ¶ added in v1.1.0
BytesToHash sets b to hash. If b is larger than len(h), b will be cropped from the left.
func FromHex ¶ added in v1.0.0
FromHex returns the bytes represented by the hexadecimal string s. s may be prefixed with "0x".
func Hex2Bytes ¶ added in v1.0.0
Hex2Bytes returns the bytes represented by the hexadecimal string str.
func HexToAddress ¶ added in v1.0.0
HexToAddress returns Address with byte values of s. If s is larger than len(h), s will be cropped from the left.
func HexToHash ¶ added in v1.1.0
HexToHash sets byte representation of s to hash. If b is larger than len(h), b will be cropped from the left.
func NewTransaction ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.