Documentation ¶
Index ¶
- Constants
- func AppendEncode(enc []byte, inNode ipld.Node) ([]byte, error)
- func DecodeTrieNode(na ipld.NodeAssembler, in io.Reader, codec uint64) error
- func DecodeTrieNodeBytes(na ipld.NodeAssembler, src []byte, codec uint64) error
- func Encode(node ipld.Node, w io.Writer) error
- type NodeKind
- type ValueKind
Constants ¶
View Source
const ( UNKNOWN_NODE NodeKind = "unknown" BRANCH_NODE NodeKind = "TrieBranchNode" EXTENSION_NODE NodeKind = "TrieExtensionNode" LEAF_NODE NodeKind = "TrieLeafNode" UNKNOWN_VALUE ValueKind = "unknown" TX_VALUE ValueKind = "Transaction" RCT_VALUE ValueKind = "Receipt" STATE_VALUE ValueKind = "Account" STORAGE_VALUE ValueKind = "Bytes" LOG_VALUE ValueKind = "Log" )
Variables ¶
This section is empty.
Functions ¶
func AppendEncode ¶
AppendEncode is like Encode, but it uses a destination buffer directly. This means less copying of bytes, and if the destination has enough capacity, fewer allocations.
func DecodeTrieNode ¶
DecodeTrieNode provides an IPLD codec decode interface for eth merkle patricia trie nodes It's not possible to meet the Decode(na ipld.NodeAssembler, in io.Reader) interface for a function that supports all trie types (multicodec types), unlike with encoding. this is used by Decode functions for each trie type, which are the ones registered to their corresponding multicodec
func DecodeTrieNodeBytes ¶
DecodeTrieNodeBytes is like DecodeTrieNode, but it uses an input buffer directly.
Types ¶
Click to show internal directories.
Click to hide internal directories.