Categorygithub.com/HyperService-Consortium/go-mpt
modulepackage
1.1.1
Repository: https://github.com/hyperservice-consortium/go-mpt.git
Documentation: pkg.go.dev

# README

go-MPT

Datastructure of Merkle Patricia Tree from go-Ethereum

# Functions

BigToAddress returns Address with byte values of b.
BigToHash sets byte representation of b to hash.
Bytes2Hex returns the hexadecimal encoding of d.
BytesToAddress returns Address with value b.
BytesToHash sets b to hash.
CopyBytes returns an exact copy of the provided bytes.
DecodeNode parses the RLP encoding of a trie node.
No description provided by the author
FromHex returns the bytes represented by the hexadecimal string s.
Hex2Bytes returns the bytes represented by the hexadecimal string str.
Hex2BytesFixed returns bytes of a specified fixed length flen.
HexToAddress returns Address with byte values of s.
HexToHash sets byte representation of s to hash.
IsHexAddress verifies whether a string can represent a valid hex-encoded Ethereum address or not.
No description provided by the author
Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.
LeftPadBytes zero-pads slice to the left up to length l.
NewMixedcaseAddress constructor (mainly for testing).
NewMixedcaseAddressFromString is mainly meant for unit-testing.
No description provided by the author
No description provided by the author
New creates a trie with an existing root node from db.
RightPadBytes zero-pads slice to the right up to length l.
No description provided by the author
ToHex returns the hex representation of b, prefixed with '0x'.
ToHexArray creates a array of hex-string based on []byte.

# Constants

AddressLength is the expected length of the address.
HashLength is the expected length of the hash.

# Structs

No description provided by the author
MissingNodeError is returned by the trie functions (TryGet, TryUpdate, TryDelete) in the case where a trie node is not present in the local database.
MixedcaseAddress retains the original string, which may or may not be correctly checksummed.
No description provided by the author
No description provided by the author
Trie is a Merkle Patricia Trie.

# Type aliases

Address represents the 20 byte address of an Ethereum account.
Hash represents the 32 byte Keccak256 hash of arbitrary data.
No description provided by the author
LeafCallback is a callback type invoked when a trie operation reaches a leaf node.
No description provided by the author
UnprefixedAddress allows marshaling an Address without 0x prefix.
UnprefixedHash allows marshaling a Hash without 0x prefix.
No description provided by the author