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