@proto-kit/module 0.1.1-develop.263 → 0.1.1-develop.267
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@proto-kit/module",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.1.1-develop.
|
|
5
|
+
"version": "0.1.1-develop.267+b252853",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc -p tsconfig.json",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"snarkyjs": "0.12.0",
|
|
32
32
|
"tsyringe": "^4.7.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "b2528538c73747d000cc3ea99ee26ee415d8248d"
|
|
35
35
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AsyncMerkleTreeStore,
|
|
3
|
+
InMemoryMerkleTreeStorage,
|
|
4
|
+
noop,
|
|
5
|
+
} from "@proto-kit/protocol";
|
|
2
6
|
|
|
3
7
|
export class MockAsyncMerkleTreeStore implements AsyncMerkleTreeStore {
|
|
4
8
|
public readonly store = new InMemoryMerkleTreeStorage();
|
|
@@ -11,18 +15,18 @@ export class MockAsyncMerkleTreeStore implements AsyncMerkleTreeStore {
|
|
|
11
15
|
noop();
|
|
12
16
|
}
|
|
13
17
|
|
|
14
|
-
public async
|
|
18
|
+
public async getNodeAsync(
|
|
15
19
|
key: bigint,
|
|
16
20
|
level: number
|
|
17
21
|
): Promise<bigint | undefined> {
|
|
18
22
|
return this.store.getNode(key, level);
|
|
19
23
|
}
|
|
20
24
|
|
|
21
|
-
public async
|
|
25
|
+
public async setNodeAsync(
|
|
22
26
|
key: bigint,
|
|
23
27
|
level: number,
|
|
24
28
|
value: bigint
|
|
25
29
|
): Promise<void> {
|
|
26
30
|
this.store.setNode(key, level, value);
|
|
27
31
|
}
|
|
28
|
-
}
|
|
32
|
+
}
|