ethereumjs-monorepo

@ethereumjs/mpt


@ethereumjs/mpt / createMPT

Function: createMPT()

createMPT(opts?): Promise<MerklePatriciaTrie>

Defined in: constructors.ts:24

Creates a Merkle Patricia Trie instance.

Preferred entry point over constructing MerklePatriciaTrie directly. When useRootPersistence is enabled and a database is provided, loads or stores the trie root under the internal root key.

Parameters

opts?

MPTOpts

Trie configuration (database, root, key hashing, value encoding, etc.)

Returns

Promise<MerklePatriciaTrie>

Initialized trie ready for reads and writes