Skip to content

LeafNode⚓︎

LeafNode
Leaf node in a compact Patricia tree.

Extends⚓︎

Constructors⚓︎

new LeafNode()⚓︎

new LeafNode(path, value): LeafNode

Creates a leaf node.

Parameters⚓︎

Parameter Type Description
path PatriciaTreePath Leaf path.
value Hash256 Leaf value.

Returns⚓︎

LeafNode

Overrides⚓︎

TreeNode.constructor

Properties⚓︎

Property Type Description Inherited from
path PatriciaTreePath Node path. TreeNode.path
value Hash256 Leaf value. -

Accessors⚓︎

hexPath⚓︎

Get Signature⚓︎

get hexPath(): string

Gets hex representation of path.

Returns⚓︎

string

Hex representation of path.

Inherited from⚓︎

TreeNode.hexPath

Methods⚓︎

calculateHash()⚓︎

calculateHash(): Hash256

LeafNode.calculateHash
Calculates node hash.

Returns⚓︎

Hash256

Hash of the node.

Inherited from⚓︎

TreeNode.calculateHash