ethereumjs-monorepo

@ethereumjs/binarytree


@ethereumjs/binarytree / createBinaryTree

Function: createBinaryTree()

createBinaryTree(opts?): Promise<BinaryTree>

Defined in: constructors.ts:25

Creates a Binary Tree instance (EIP-7864 state tree).

Preferred entry point over constructing BinaryTree directly. Applies sensible defaults (MapDB, Blake3 hashing) and initializes an empty root node when no persisted root is found.

Parameters

opts?

Partial<BinaryTreeOpts>

Partial tree configuration (database, root persistence, cache size, hash function)

Returns

Promise<BinaryTree>

Initialized binary tree ready for reads and writes