@ethereumjs/verkle
Ƭ Checkpoint: Object
Name | Type |
---|---|
keyValueMap |
Map <string , Uint8Array | undefined > |
root |
Uint8Array |
Ƭ FoundNodeFunction: (nodeRef
: Uint8Array
, node
: VerkleNode
| null
, key
: Uint8Array
, walkController
: WalkController
) => void
▸ (nodeRef
, node
, key
, walkController
): void
Name | Type |
---|---|
nodeRef |
Uint8Array |
node |
VerkleNode | null |
key |
Uint8Array |
walkController |
WalkController |
void
Ƭ Proof: Uint8Array
[]
Ƭ VerkleNode: TypedVerkleNode
[VerkleNodeType
]
Ƭ VerkleTreeOptsWithDefaults: VerkleTreeOpts
& { cacheSize
: number
; useRootPersistence
: boolean
}
• Const
NODE_WIDTH: 256
• Const
POINT_IDENTITY: Point
• Const
ROOT_DB_KEY: Uint8Array
▸ decodeNode(raw
): VerkleNode
Name | Type |
---|---|
raw |
Uint8Array |
▸ decodeRawNode(raw
): VerkleNode
Name | Type |
---|---|
raw |
Uint8Array [] |
▸ getKey(stem
, subIndex
): Uint8Array
Dev
Returns the tree key for a given verkle tree stem, and sub index.
Dev
Assumes that the verkle node width = 256
Name | Type | Description |
---|---|---|
stem |
Uint8Array |
The 31-bytes verkle tree stem as a Uint8Array. |
subIndex |
Uint8Array |
The sub index of the tree to generate the key for as a Uint8Array. |
Uint8Array
The tree key as a Uint8Array.
▸ getStem(address
, treeIndex?
): Uint8Array
Dev
Returns the 31-bytes verkle tree stem for a given address and tree index.
Dev
Assumes that the verkle node width = 256
Name | Type | Default value | Description |
---|---|---|---|
address |
Address |
undefined |
The address to generate the tree key for. |
treeIndex |
number | bigint |
0 |
The index of the tree to generate the key for. Defaults to 0. |
Uint8Array
The 31-bytes verkle tree stem as a Uint8Array.
▸ isRawNode(node
): node is Uint8Array[]
Name | Type |
---|---|
node |
Uint8Array | Uint8Array [] |
node is Uint8Array[]
▸ matchingBytesLength(bytes1
, bytes2
): number
Compares two byte arrays and returns the count of consecutively matching items from the start.
Function
Name | Type | Description |
---|---|---|
bytes1 |
Uint8Array |
The first Uint8Array to compare. |
bytes2 |
Uint8Array |
The second Uint8Array to compare. |
number
The count of consecutively matching items from the start.
▸ pedersenHash(input
): Uint8Array
Name | Type |
---|---|
input |
Uint8Array |
Uint8Array
▸ verifyProof(root
, proof
, keyValues
): Uint8Array
Name | Type |
---|---|
root |
Uint8Array |
proof |
Uint8Array |
keyValues |
Map <any , any > |
Uint8Array
▸ verifyUpdate(root
, proof
, keyValues
): Uint8Array
Name | Type |
---|---|
root |
Uint8Array |
proof |
Uint8Array |
keyValues |
Map <any , any > |
Uint8Array