@aztec/kv-store 0.77.0-testnet-ignition.26 → 0.77.0-testnet-ignition.27

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.
Files changed (83) hide show
  1. package/package.json +5 -5
  2. package/dest/config.d.ts +0 -17
  3. package/dest/config.d.ts.map +0 -1
  4. package/dest/indexeddb/array.d.ts +0 -21
  5. package/dest/indexeddb/array.d.ts.map +0 -1
  6. package/dest/indexeddb/index.d.ts +0 -7
  7. package/dest/indexeddb/index.d.ts.map +0 -1
  8. package/dest/indexeddb/map.d.ts +0 -26
  9. package/dest/indexeddb/map.d.ts.map +0 -1
  10. package/dest/indexeddb/set.d.ts +0 -17
  11. package/dest/indexeddb/set.d.ts.map +0 -1
  12. package/dest/indexeddb/singleton.d.ts +0 -16
  13. package/dest/indexeddb/singleton.d.ts.map +0 -1
  14. package/dest/indexeddb/store.d.ts +0 -97
  15. package/dest/indexeddb/store.d.ts.map +0 -1
  16. package/dest/interfaces/array.d.ts +0 -80
  17. package/dest/interfaces/array.d.ts.map +0 -1
  18. package/dest/interfaces/array_test_suite.d.ts +0 -3
  19. package/dest/interfaces/array_test_suite.d.ts.map +0 -1
  20. package/dest/interfaces/common.d.ts +0 -23
  21. package/dest/interfaces/common.d.ts.map +0 -1
  22. package/dest/interfaces/counter.d.ts +0 -59
  23. package/dest/interfaces/counter.d.ts.map +0 -1
  24. package/dest/interfaces/index.d.ts +0 -8
  25. package/dest/interfaces/index.d.ts.map +0 -1
  26. package/dest/interfaces/map.d.ts +0 -134
  27. package/dest/interfaces/map.d.ts.map +0 -1
  28. package/dest/interfaces/map_test_suite.d.ts +0 -3
  29. package/dest/interfaces/map_test_suite.d.ts.map +0 -1
  30. package/dest/interfaces/set.d.ts +0 -44
  31. package/dest/interfaces/set.d.ts.map +0 -1
  32. package/dest/interfaces/set_test_suite.d.ts +0 -3
  33. package/dest/interfaces/set_test_suite.d.ts.map +0 -1
  34. package/dest/interfaces/singleton.d.ts +0 -29
  35. package/dest/interfaces/singleton.d.ts.map +0 -1
  36. package/dest/interfaces/singleton_test_suite.d.ts +0 -3
  37. package/dest/interfaces/singleton_test_suite.d.ts.map +0 -1
  38. package/dest/interfaces/store.d.ts +0 -145
  39. package/dest/interfaces/store.d.ts.map +0 -1
  40. package/dest/interfaces/store_test_suite.d.ts +0 -3
  41. package/dest/interfaces/store_test_suite.d.ts.map +0 -1
  42. package/dest/interfaces/utils.d.ts +0 -16
  43. package/dest/interfaces/utils.d.ts.map +0 -1
  44. package/dest/lmdb/array.d.ts +0 -23
  45. package/dest/lmdb/array.d.ts.map +0 -1
  46. package/dest/lmdb/counter.d.ts +0 -19
  47. package/dest/lmdb/counter.d.ts.map +0 -1
  48. package/dest/lmdb/index.d.ts +0 -12
  49. package/dest/lmdb/index.d.ts.map +0 -1
  50. package/dest/lmdb/map.d.ts +0 -52
  51. package/dest/lmdb/map.d.ts.map +0 -1
  52. package/dest/lmdb/set.d.ts +0 -18
  53. package/dest/lmdb/set.d.ts.map +0 -1
  54. package/dest/lmdb/singleton.d.ts +0 -14
  55. package/dest/lmdb/singleton.d.ts.map +0 -1
  56. package/dest/lmdb/store.d.ts +0 -110
  57. package/dest/lmdb/store.d.ts.map +0 -1
  58. package/dest/lmdb-v2/array.d.ts +0 -18
  59. package/dest/lmdb-v2/array.d.ts.map +0 -1
  60. package/dest/lmdb-v2/factory.d.ts +0 -9
  61. package/dest/lmdb-v2/factory.d.ts.map +0 -1
  62. package/dest/lmdb-v2/index.d.ts +0 -3
  63. package/dest/lmdb-v2/index.d.ts.map +0 -1
  64. package/dest/lmdb-v2/map.d.ts +0 -86
  65. package/dest/lmdb-v2/map.d.ts.map +0 -1
  66. package/dest/lmdb-v2/message.d.ts +0 -112
  67. package/dest/lmdb-v2/message.d.ts.map +0 -1
  68. package/dest/lmdb-v2/read_transaction.d.ts +0 -14
  69. package/dest/lmdb-v2/read_transaction.d.ts.map +0 -1
  70. package/dest/lmdb-v2/singleton.d.ts +0 -12
  71. package/dest/lmdb-v2/singleton.d.ts.map +0 -1
  72. package/dest/lmdb-v2/store.d.ts +0 -43
  73. package/dest/lmdb-v2/store.d.ts.map +0 -1
  74. package/dest/lmdb-v2/utils.d.ts +0 -19
  75. package/dest/lmdb-v2/utils.d.ts.map +0 -1
  76. package/dest/lmdb-v2/write_transaction.d.ts +0 -19
  77. package/dest/lmdb-v2/write_transaction.d.ts.map +0 -1
  78. package/dest/stores/index.d.ts +0 -2
  79. package/dest/stores/index.d.ts.map +0 -1
  80. package/dest/stores/l2_tips_store.d.ts +0 -13
  81. package/dest/stores/l2_tips_store.d.ts.map +0 -1
  82. package/dest/utils.d.ts +0 -12
  83. package/dest/utils.d.ts.map +0 -1
@@ -1,44 +0,0 @@
1
- import type { Key, Range } from './common.js';
2
- /**
3
- * A set backed by a persistent store.
4
- */
5
- interface AztecBaseSet<K extends Key> {
6
- /**
7
- * Adds the given value.
8
- * @param key - The key to add.
9
- */
10
- add(key: K): Promise<void>;
11
- /**
12
- * Deletes the given key.
13
- * @param key - The key to delete.
14
- */
15
- delete(key: K): Promise<void>;
16
- }
17
- export interface AztecSet<K extends Key> extends AztecBaseSet<K> {
18
- /**
19
- * Checks if a key exists in the set.
20
- * @param key - The key to check
21
- * @returns True if the key exists, false otherwise
22
- */
23
- has(key: K): boolean;
24
- /**
25
- * Iterates over the sets's keys entries in the key's natural order
26
- * @param range - The range of keys to iterate over
27
- */
28
- entries(range?: Range<K>): IterableIterator<K>;
29
- }
30
- export interface AztecAsyncSet<K extends Key> extends AztecBaseSet<K> {
31
- /**
32
- * Checks if a key exists in the set.
33
- * @param key - The key to check
34
- * @returns True if the key exists, false otherwise
35
- */
36
- hasAsync(key: K): Promise<boolean>;
37
- /**
38
- * Iterates over the sets's keys entries in the key's natural order
39
- * @param range - The range of keys to iterate over
40
- */
41
- entriesAsync(range?: Range<K>): AsyncIterableIterator<K>;
42
- }
43
- export {};
44
- //# sourceMappingURL=set.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../src/interfaces/set.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,UAAU,YAAY,CAAC,CAAC,SAAS,GAAG;IAClC;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,GAAG,CAAE,SAAQ,YAAY,CAAC,CAAC,CAAC;IAC9D;;;;OAIG;IACH,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,GAAG,CAAE,SAAQ,YAAY,CAAC,CAAC,CAAC;IACnE;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnC;;;OAGG;IACH,YAAY,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;CAC1D"}
@@ -1,3 +0,0 @@
1
- import type { AztecAsyncKVStore, AztecKVStore } from './store.js';
2
- export declare function describeAztecSet(testName: string, getStore: () => AztecKVStore | Promise<AztecAsyncKVStore>, forceAsync?: boolean): void;
3
- //# sourceMappingURL=set_test_suite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"set_test_suite.d.ts","sourceRoot":"","sources":["../../src/interfaces/set_test_suite.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGlE,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,EACzD,UAAU,GAAE,OAAe,QAoE5B"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Represents a singleton value in the database.
3
- * Note: The singleton loses type info so it's recommended to serialize to buffer when storing it.
4
- */
5
- interface AztecBaseSingleton<T> {
6
- /**
7
- * Sets the value.
8
- * @param val - The new value
9
- */
10
- set(val: T): Promise<boolean>;
11
- /**
12
- * Deletes the value.
13
- */
14
- delete(): Promise<boolean>;
15
- }
16
- export interface AztecSingleton<T> extends AztecBaseSingleton<T> {
17
- /**
18
- * Gets the value.
19
- */
20
- get(): T | undefined;
21
- }
22
- export interface AztecAsyncSingleton<T> extends AztecBaseSingleton<T> {
23
- /**
24
- * Gets the value.
25
- */
26
- getAsync(): Promise<T | undefined>;
27
- }
28
- export {};
29
- //# sourceMappingURL=singleton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../../src/interfaces/singleton.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,UAAU,kBAAkB,CAAC,CAAC;IAC5B;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9B;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5B;AACD,MAAM,WAAW,cAAc,CAAC,CAAC,CAAE,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC9D;;OAEG;IACH,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,CAAE,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IACnE;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;CACpC"}
@@ -1,3 +0,0 @@
1
- import type { AztecAsyncKVStore, AztecKVStore } from './store.js';
2
- export declare function describeAztecSingleton(testName: string, getStore: () => AztecKVStore | Promise<AztecAsyncKVStore>, forceAsync?: boolean): void;
3
- //# sourceMappingURL=singleton_test_suite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"singleton_test_suite.d.ts","sourceRoot":"","sources":["../../src/interfaces/singleton_test_suite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGlE,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,EACzD,UAAU,GAAE,OAAe,QAoC5B"}
@@ -1,145 +0,0 @@
1
- import type { AztecArray, AztecAsyncArray } from './array.js';
2
- import type { Key, StoreSize } from './common.js';
3
- import type { AztecAsyncCounter, AztecCounter } from './counter.js';
4
- import type { AztecAsyncMap, AztecAsyncMultiMap, AztecMap, AztecMapWithSize, AztecMultiMap, AztecMultiMapWithSize } from './map.js';
5
- import type { AztecAsyncSet, AztecSet } from './set.js';
6
- import type { AztecAsyncSingleton, AztecSingleton } from './singleton.js';
7
- /** A key-value store */
8
- export interface AztecKVStore {
9
- syncGetters: true;
10
- /**
11
- * Creates a new map.
12
- * @param name - The name of the map
13
- * @returns The map
14
- */
15
- openMap<K extends Key, V>(name: string): AztecMap<K, V>;
16
- /**
17
- * Creates a new set.
18
- * @param name - The name of the set
19
- * @returns The set
20
- */
21
- openSet<K extends Key>(name: string): AztecSet<K>;
22
- /**
23
- * Creates a new multi-map.
24
- * @param name - The name of the multi-map
25
- * @returns The multi-map
26
- */
27
- openMultiMap<K extends Key, V>(name: string): AztecMultiMap<K, V>;
28
- /**
29
- * Creates a new multi-map with size.
30
- * @param name - The name of the multi-map
31
- * @returns The multi-map
32
- */
33
- openMultiMapWithSize<K extends Key, V>(name: string): AztecMultiMapWithSize<K, V>;
34
- /**
35
- * Creates a new map with size.
36
- * @param name - The name of the map
37
- * @returns The map
38
- */
39
- openMapWithSize<K extends Key, V>(name: string): AztecMapWithSize<K, V>;
40
- /**
41
- * Creates a new array.
42
- * @param name - The name of the array
43
- * @returns The array
44
- */
45
- openArray<T>(name: string): AztecArray<T>;
46
- /**
47
- * Creates a new singleton.
48
- * @param name - The name of the singleton
49
- * @returns The singleton
50
- */
51
- openSingleton<T>(name: string): AztecSingleton<T>;
52
- /**
53
- * Creates a new count map.
54
- * @param name - name of the counter
55
- */
56
- openCounter<K extends Key>(name: string): AztecCounter<K>;
57
- /**
58
- * Starts a transaction. All calls to read/write data while in a transaction are queued and executed atomically.
59
- * @param callback - The callback to execute in a transaction
60
- */
61
- transaction<T extends Exclude<any, Promise<any>>>(callback: () => T): Promise<T>;
62
- /**
63
- * Clears all entries in the store
64
- */
65
- clear(): Promise<void>;
66
- /**
67
- * Forks the store.
68
- */
69
- fork(): Promise<AztecKVStore>;
70
- /**
71
- * Deletes the store
72
- */
73
- delete(): Promise<void>;
74
- /**
75
- * Estimates the size of the store in bytes.
76
- */
77
- estimateSize(): Promise<StoreSize>;
78
- /**
79
- * Closes the store
80
- */
81
- close(): Promise<void>;
82
- }
83
- export interface AztecAsyncKVStore {
84
- /**
85
- * Creates a new map.
86
- * @param name - The name of the map
87
- * @returns The map
88
- */
89
- openMap<K extends Key, V>(name: string): AztecAsyncMap<K, V>;
90
- /**
91
- * Creates a new set.
92
- * @param name - The name of the set
93
- * @returns The set
94
- */
95
- openSet<K extends Key>(name: string): AztecAsyncSet<K>;
96
- /**
97
- * Creates a new multi-map.
98
- * @param name - The name of the multi-map
99
- * @returns The multi-map
100
- */
101
- openMultiMap<K extends Key, V>(name: string): AztecAsyncMultiMap<K, V>;
102
- /**
103
- * Creates a new array.
104
- * @param name - The name of the array
105
- * @returns The array
106
- */
107
- openArray<T>(name: string): AztecAsyncArray<T>;
108
- /**
109
- * Creates a new singleton.
110
- * @param name - The name of the singleton
111
- * @returns The singleton
112
- */
113
- openSingleton<T>(name: string): AztecAsyncSingleton<T>;
114
- /**
115
- * Creates a new count map.
116
- * @param name - name of the counter
117
- */
118
- openCounter<K extends Key>(name: string): AztecAsyncCounter<K>;
119
- /**
120
- * Starts a transaction. All calls to read/write data while in a transaction are queued and executed atomically.
121
- * @param callback - The callback to execute in a transaction
122
- */
123
- transactionAsync<T extends Exclude<any, Promise<any>>>(callback: () => Promise<T>): Promise<T>;
124
- /**
125
- * Clears all entries in the store
126
- */
127
- clear(): Promise<void>;
128
- /**
129
- * Forks the store.
130
- */
131
- fork(): Promise<AztecAsyncKVStore>;
132
- /**
133
- * Deletes the store
134
- */
135
- delete(): Promise<void>;
136
- /**
137
- * Estimates the size of the store in bytes.
138
- */
139
- estimateSize(): Promise<StoreSize>;
140
- /**
141
- * Closes the store
142
- */
143
- close(): Promise<void>;
144
- }
145
- //# sourceMappingURL=store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/interfaces/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE1E,wBAAwB;AACxB,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,IAAI,CAAC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BAAiB,CAAC,CAAC;IAEnC;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAEnC;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB"}
@@ -1,3 +0,0 @@
1
- import type { AztecAsyncKVStore, AztecKVStore } from './store.js';
2
- export declare function describeAztecStore(testName: string, getPersistentStore: () => Promise<AztecKVStore | AztecAsyncKVStore>, getPersistentNoPathStore: () => Promise<AztecKVStore | AztecAsyncKVStore>, getEphemeralStore: () => Promise<AztecKVStore | AztecAsyncKVStore>): void;
3
- //# sourceMappingURL=store_test_suite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store_test_suite.d.ts","sourceRoot":"","sources":["../../src/interfaces/store_test_suite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGlE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,MAAM,OAAO,CAAC,YAAY,GAAG,iBAAiB,CAAC,EACnE,wBAAwB,EAAE,MAAM,OAAO,CAAC,YAAY,GAAG,iBAAiB,CAAC,EACzE,iBAAiB,EAAE,MAAM,OAAO,CAAC,YAAY,GAAG,iBAAiB,CAAC,QA6CnE"}
@@ -1,16 +0,0 @@
1
- import type { AztecAsyncKVStore, AztecKVStore } from './store.js';
2
- export declare const mockLogger: {
3
- debug: (msg: string, data: any) => void;
4
- info: (msg: string, data: any) => void;
5
- warn: (msg: string, data: any) => void;
6
- error: (msg: string, data: any) => void;
7
- fatal: (msg: string, data: any) => void;
8
- silent: (_msg: string, _data: any) => void;
9
- verbose: (msg: string, data: any) => void;
10
- trace: (msg: string, data: any) => void;
11
- level: "trace";
12
- isLevelEnabled: (_level: string) => boolean;
13
- module: string;
14
- };
15
- export declare function isSyncStore(store: AztecKVStore | AztecAsyncKVStore): store is AztecAsyncKVStore;
16
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/interfaces/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGlE,eAAO,MAAM,UAAU;iBACR,MAAM,QAAQ,GAAG;gBAClB,MAAM,QAAQ,GAAG;gBACjB,MAAM,QAAQ,GAAG;iBAChB,MAAM,QAAQ,GAAG;iBACjB,MAAM,QAAQ,GAAG;mBACf,MAAM,SAAS,GAAG;mBAClB,MAAM,QAAQ,GAAG;iBACnB,MAAM,QAAQ,GAAG;;6BAEL,MAAM;;CAEhC,CAAC;AAGF,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,iBAAiB,GAAG,KAAK,IAAI,iBAAiB,CAE/F"}
@@ -1,23 +0,0 @@
1
- import type { Database, Key } from 'lmdb';
2
- import type { AztecArray, AztecAsyncArray } from '../interfaces/array.js';
3
- /**
4
- * An persistent array backed by LMDB.
5
- */
6
- export declare class LmdbAztecArray<T> implements AztecArray<T>, AztecAsyncArray<T> {
7
- #private;
8
- constructor(db: Database<unknown, Key>, arrName: string);
9
- get length(): number;
10
- lengthAsync(): Promise<number>;
11
- push(...vals: T[]): Promise<number>;
12
- pop(): Promise<T | undefined>;
13
- at(index: number): T | undefined;
14
- atAsync(index: number): Promise<T | undefined>;
15
- setAt(index: number, val: T): Promise<boolean>;
16
- entries(): IterableIterator<[number, T]>;
17
- entriesAsync(): AsyncIterableIterator<[number, T]>;
18
- values(): IterableIterator<T>;
19
- valuesAsync(): AsyncIterableIterator<T>;
20
- [Symbol.iterator](): IterableIterator<T>;
21
- [Symbol.asyncIterator](): AsyncIterableIterator<T>;
22
- }
23
- //# sourceMappingURL=array.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":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Key, Database } from 'lmdb';
2
- import type { Key, Range } from '../interfaces/common.js';
3
- import type { AztecAsyncCounter, AztecCounter } from '../interfaces/counter.js';
4
- /**
5
- * A counter implementation backed by LMDB
6
- */
7
- export declare class LmdbAztecCounter<K extends Key> implements AztecCounter<K>, AztecAsyncCounter<K> {
8
- #private;
9
- constructor(db: Database<unknown, BaseKey>, name: string);
10
- set(key: K, value: number): Promise<void>;
11
- update(key: K, delta?: number): Promise<void>;
12
- get(key: K): number;
13
- getAsync(key: K): Promise<number>;
14
- entries(range?: Range<K>): IterableIterator<[K, number]>;
15
- entriesAsync(range?: Range<K>): AsyncIterableIterator<[K, number]>;
16
- keys(range?: Range<K>): IterableIterator<K>;
17
- keysAsync(range?: Range<K>): AsyncIterableIterator<K>;
18
- }
19
- //# sourceMappingURL=counter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"counter.d.ts","sourceRoot":"","sources":["../../src/lmdb/counter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,IAAI,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErD,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGhF;;GAEG;AACH,qBAAa,gBAAgB,CAAC,CAAC,SAAS,GAAG,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC;;gBAK/E,EAAE,EAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM;IAMlD,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,SAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBxC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM;IAInB,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjC,OAAO,CAAC,KAAK,GAAE,KAAK,CAAC,CAAC,CAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAIrD,YAAY,CAAC,KAAK,GAAE,KAAK,CAAC,CAAC,CAAM,GAAG,qBAAqB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAI7E,IAAI,CAAC,KAAK,GAAE,KAAK,CAAC,CAAC,CAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC;IAIxC,SAAS,CAAC,KAAK,GAAE,KAAK,CAAC,CAAC,CAAM,GAAG,qBAAqB,CAAC,CAAC,CAAC;CAGjE"}
@@ -1,12 +0,0 @@
1
- import { type Logger } from '@aztec/foundation/log';
2
- import type { DataStoreConfig } from '../config.js';
3
- import { AztecLmdbStore } from './store.js';
4
- export { AztecLmdbStore } from './store.js';
5
- export declare function createStore(name: string, config: DataStoreConfig, log?: Logger): AztecLmdbStore | Promise<AztecLmdbStore>;
6
- /**
7
- * Opens a temporary store for testing purposes.
8
- * @param ephemeral - true if the store should only exist in memory and not automatically be flushed to disk. Optional
9
- * @returns A new store
10
- */
11
- export declare function openTmpStore(ephemeral?: boolean): AztecLmdbStore;
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lmdb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAIlE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,GAAE,MAAiC,4CAiBxG;AACD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,SAAS,GAAE,OAAe,GAAG,cAAc,CAGvE"}
@@ -1,52 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import type { Database } from 'lmdb';
4
- import type { Key, Range } from '../interfaces/common.js';
5
- import type { AztecAsyncMultiMap, AztecMapWithSize, AztecMultiMap } from '../interfaces/map.js';
6
- /** The slot where a key-value entry would be stored */
7
- type MapValueSlot<K extends Key | Buffer> = ['map', string, 'slot', K];
8
- /**
9
- * A map backed by LMDB.
10
- */
11
- export declare class LmdbAztecMap<K extends Key, V> implements AztecMultiMap<K, V>, AztecAsyncMultiMap<K, V> {
12
- protected db: Database<[K, V], MapValueSlot<K>>;
13
- protected name: string;
14
- protected startSentinel: MapValueSlot<Buffer>;
15
- protected endSentinel: MapValueSlot<Buffer>;
16
- constructor(rootDb: Database, mapName: string);
17
- close(): Promise<void>;
18
- get(key: K): V | undefined;
19
- getAsync(key: K): Promise<V | undefined>;
20
- getValues(key: K): IterableIterator<V>;
21
- getValuesAsync(key: K): AsyncIterableIterator<V>;
22
- has(key: K): boolean;
23
- hasAsync(key: K): Promise<boolean>;
24
- set(key: K, val: V): Promise<void>;
25
- swap(key: K, fn: (val: V | undefined) => V): Promise<void>;
26
- setIfNotExists(key: K, val: V): Promise<boolean>;
27
- delete(key: K): Promise<void>;
28
- deleteValue(key: K, val: V): Promise<void>;
29
- entries(range?: Range<K>): IterableIterator<[K, V]>;
30
- entriesAsync(range?: Range<K> | undefined): AsyncIterableIterator<[K, V]>;
31
- values(range?: Range<K>): IterableIterator<V>;
32
- valuesAsync(range?: Range<K>): AsyncIterableIterator<V>;
33
- keys(range?: Range<K>): IterableIterator<K>;
34
- keysAsync(range?: Range<K>): AsyncIterableIterator<K>;
35
- protected slot(key: K): MapValueSlot<K>;
36
- clear(): Promise<void>;
37
- }
38
- export declare class LmdbAztecMapWithSize<K extends Key, V> extends LmdbAztecMap<K, V> implements AztecMapWithSize<K, V>, AztecAsyncMultiMap<K, V> {
39
- #private;
40
- constructor(rootDb: Database, mapName: string);
41
- set(key: K, val: V): Promise<void>;
42
- delete(key: K): Promise<void>;
43
- deleteValue(key: K, val: V): Promise<void>;
44
- /**
45
- * Gets the size of the map by counting entries.
46
- * @returns The number of entries in the map
47
- */
48
- size(): number;
49
- clearCache(): void;
50
- }
51
- export {};
52
- //# sourceMappingURL=map.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/lmdb/map.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,MAAM,CAAC;AAEnD,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEhG,uDAAuD;AACvD,KAAK,YAAY,CAAC,CAAC,SAAS,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAEvE;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC;IAClG,SAAS,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;IAEvB,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9C,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;gBAEhC,MAAM,EAAE,QA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CAAC,CAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC;IAM3C,WAAW,CAAC,KAAK,GAAE,KAAK,CAAC,CAAC,CAAM,GAAG,qBAAqB,CAAC,CAAC,CAAC;IAMjE,IAAI,CAAC,KAAK,GAAE,KAAK,CAAC,CAAC,CAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC;IAMzC,SAAS,CAAC,KAAK,GAAE,KAAK,CAAC,CAAC,CAAM,GAAG,qBAAqB,CAAC,CAAC,CAAC;IAMhE,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;IAIjC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAY7B;AAED,qBAAa,oBAAoB,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,CAChD,SAAQ,YAAY,CAAC,CAAC,EAAE,CAAC,CACzB,YAAW,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC;;gBAI/C,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM;IAI9B,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAYlC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7B,WAAW,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzD;;;OAGG;IACH,IAAI,IAAI,MAAM;IAWd,UAAU;CAGX"}
@@ -1,18 +0,0 @@
1
- import type { Database } from 'lmdb';
2
- import type { Key, Range } from '../interfaces/common.js';
3
- import type { AztecAsyncSet, AztecSet } from '../interfaces/set.js';
4
- /**
5
- * A set backed by LMDB.
6
- */
7
- export declare class LmdbAztecSet<K extends Key> implements AztecSet<K>, AztecAsyncSet<K> {
8
- private map;
9
- constructor(rootDb: Database, mapName: string);
10
- close(): Promise<void>;
11
- has(key: K): boolean;
12
- hasAsync(key: K): Promise<boolean>;
13
- add(key: K): Promise<void>;
14
- delete(key: K): Promise<void>;
15
- entries(range?: Range<K>): IterableIterator<K>;
16
- entriesAsync(range?: Range<K>): AsyncIterableIterator<K>;
17
- }
18
- //# sourceMappingURL=set.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../src/lmdb/set.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGpE;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,GAAG,CAAE,YAAW,QAAQ,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;IAC/E,OAAO,CAAC,GAAG,CAA2B;gBAC1B,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM;IAI7C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAIpB,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAIlC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1B,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7B,OAAO,CAAC,KAAK,GAAE,KAAK,CAAC,CAAC,CAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC;IAI3C,YAAY,CAAC,KAAK,GAAE,KAAK,CAAC,CAAC,CAAM,GAAG,qBAAqB,CAAC,CAAC,CAAC;CAKpE"}
@@ -1,14 +0,0 @@
1
- import type { Database, Key } from 'lmdb';
2
- import type { AztecAsyncSingleton, AztecSingleton } from '../interfaces/singleton.js';
3
- /**
4
- * Stores a single value in LMDB.
5
- */
6
- export declare class LmdbAztecSingleton<T> implements AztecSingleton<T>, AztecAsyncSingleton<T> {
7
- #private;
8
- constructor(db: Database<unknown, Key>, name: string);
9
- get(): T | undefined;
10
- getAsync(): Promise<T | undefined>;
11
- set(val: T): Promise<boolean>;
12
- delete(): Promise<boolean>;
13
- }
14
- //# sourceMappingURL=singleton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../../src/lmdb/singleton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAKtF;;GAEG;AACH,qBAAa,kBAAkB,CAAC,CAAC,CAAE,YAAW,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;;gBAIzE,EAAE,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM;IAKpD,GAAG,IAAI,CAAC,GAAG,SAAS;IAIpB,QAAQ,IAAI,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAIlC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7B,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;CAG3B"}
@@ -1,110 +0,0 @@
1
- import { type RootDatabase } from 'lmdb';
2
- import type { AztecArray, AztecAsyncArray } from '../interfaces/array.js';
3
- import type { Key, StoreSize } from '../interfaces/common.js';
4
- import type { AztecAsyncCounter, AztecCounter } from '../interfaces/counter.js';
5
- import type { AztecAsyncMap, AztecAsyncMultiMap, AztecMap, AztecMapWithSize, AztecMultiMap, AztecMultiMapWithSize } from '../interfaces/map.js';
6
- import type { AztecAsyncSet, AztecSet } from '../interfaces/set.js';
7
- import type { AztecAsyncSingleton, AztecSingleton } from '../interfaces/singleton.js';
8
- import type { AztecAsyncKVStore, AztecKVStore } from '../interfaces/store.js';
9
- /**
10
- * A key-value store backed by LMDB.
11
- */
12
- export declare class AztecLmdbStore implements AztecKVStore, AztecAsyncKVStore {
13
- #private;
14
- readonly isEphemeral: boolean;
15
- private path;
16
- syncGetters: true;
17
- constructor(rootDb: RootDatabase, isEphemeral: boolean, path: string);
18
- /**
19
- * Creates a new AztecKVStore backed by LMDB. The path to the database is optional. If not provided,
20
- * the database will be stored in a temporary location and be deleted when the process exists.
21
- *
22
- * The `rollupAddress` passed is checked against what is stored in the database. If they do not match,
23
- * the database is cleared before returning the store. This way data is not accidentally shared between
24
- * different rollup instances.
25
- *
26
- * @param path - A path on the disk to store the database. Optional
27
- * @param ephemeral - true if the store should only exist in memory and not automatically be flushed to disk. Optional
28
- * @param log - A logger to use. Optional
29
- * @returns The store
30
- */
31
- static open(path?: string, mapSizeKb?: number, // defaults to 1 GB map size
32
- ephemeral?: boolean, log?: import("@aztec/foundation/log").Logger): AztecLmdbStore;
33
- /**
34
- * Forks the current DB into a new DB by backing it up to a temporary location and opening a new lmdb db.
35
- * @returns A new AztecLmdbStore.
36
- */
37
- fork(): Promise<AztecLmdbStore>;
38
- /**
39
- * Creates a new AztecMap in the store.
40
- * @param name - Name of the map
41
- * @returns A new AztecMap
42
- */
43
- openMap<K extends Key, V>(name: string): AztecMap<K, V> & AztecAsyncMap<K, V>;
44
- /**
45
- * Creates a new AztecSet in the store.
46
- * @param name - Name of the set
47
- * @returns A new AztecSet
48
- */
49
- openSet<K extends Key>(name: string): AztecSet<K> & AztecAsyncSet<K>;
50
- /**
51
- * Creates a new AztecMultiMap in the store. A multi-map stores multiple values for a single key automatically.
52
- * @param name - Name of the map
53
- * @returns A new AztecMultiMap
54
- */
55
- openMultiMap<K extends Key, V>(name: string): AztecMultiMap<K, V> & AztecAsyncMultiMap<K, V>;
56
- openCounter<K extends Key>(name: string): AztecCounter<K> & AztecAsyncCounter<K>;
57
- /**
58
- * Creates a new AztecMultiMapWithSize in the store. A multi-map with size stores multiple values for a single key automatically.
59
- * @param name - Name of the map
60
- * @returns A new AztecMultiMapWithSize
61
- */
62
- openMultiMapWithSize<K extends Key, V>(name: string): AztecMultiMapWithSize<K, V>;
63
- /**
64
- * Creates a new AztecMapWithSize in the store.
65
- * @param name - Name of the map
66
- * @returns A new AztecMapWithSize
67
- */
68
- openMapWithSize<K extends Key, V>(name: string): AztecMapWithSize<K, V>;
69
- /**
70
- * Creates a new AztecArray in the store.
71
- * @param name - Name of the array
72
- * @returns A new AztecArray
73
- */
74
- openArray<T>(name: string): AztecArray<T> & AztecAsyncArray<T>;
75
- /**
76
- * Creates a new AztecSingleton in the store.
77
- * @param name - Name of the singleton
78
- * @returns A new AztecSingleton
79
- */
80
- openSingleton<T>(name: string): AztecSingleton<T> & AztecAsyncSingleton<T>;
81
- /**
82
- * Runs a callback in a transaction.
83
- * @param callback - Function to execute in a transaction
84
- * @returns A promise that resolves to the return value of the callback
85
- */
86
- transaction<T>(callback: () => T): Promise<T>;
87
- /**
88
- * Runs a callback in a transaction.
89
- * @param callback - Function to execute in a transaction
90
- * @returns A promise that resolves to the return value of the callback
91
- */
92
- transactionAsync<T>(callback: () => Promise<T>): Promise<T>;
93
- /**
94
- * Clears all entries in the store & sub DBs.
95
- */
96
- clear(): Promise<void>;
97
- /**
98
- * Drops the database & sub DBs.
99
- */
100
- drop(): Promise<void>;
101
- /**
102
- * Close the database. Note, once this is closed we can no longer interact with the DB.
103
- */
104
- close(): Promise<void>;
105
- /** Deletes this store and removes the database files from disk */
106
- delete(): Promise<void>;
107
- estimateSize(): Promise<StoreSize>;
108
- private estimateSubDBSize;
109
- }
110
- //# sourceMappingURL=store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/lmdb/store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,Y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C;IAiBlC,OAAO,CAAC,iBAAiB;CA2B1B"}
@@ -1,18 +0,0 @@
1
- import type { AztecAsyncArray } from '../interfaces/array.js';
2
- import { AztecLMDBStoreV2 } from './store.js';
3
- export declare class LMDBArray<T> implements AztecAsyncArray<T> {
4
- private store;
5
- private length;
6
- private encoder;
7
- private prefix;
8
- constructor(store: AztecLMDBStoreV2, name: string);
9
- pop(): Promise<T | undefined>;
10
- push(...vals: T[]): Promise<number>;
11
- setAt(index: number, val: T): Promise<boolean>;
12
- atAsync(index: number): Promise<T | undefined>;
13
- lengthAsync(): Promise<number>;
14
- entriesAsync(): AsyncIterableIterator<[number, T]>;
15
- valuesAsync(): AsyncIterableIterator<T>;
16
- [Symbol.asyncIterator](): AsyncIterableIterator<T>;
17
- }
18
- //# sourceMappingURL=array.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/lmdb-v2/array.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAA+B,MAAM,YAAY,CAAC;AAG3E,qBAAa,SAAS,CAAC,CAAC,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAKzC,OAAO,CAAC,KAAK;IAJzB,OAAO,CAAC,MAAM,CAA8B;IAC5C,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,MAAM,CAAS;gBAEH,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM;IAKzD,GAAG,IAAI,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAgB7B,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAWnC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAc9C,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAexC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAI7B,YAAY,IAAI,qBAAqB,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IA2BlD,WAAW,IAAI,qBAAqB,CAAC,CAAC,CAAC;IAM9C,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC;CAGnD"}
@@ -1,9 +0,0 @@
1
- import { type Logger } from '@aztec/foundation/log';
2
- import type { DataStoreConfig } from '../config.js';
3
- import { AztecLMDBStoreV2 } from './store.js';
4
- export declare function createStore(name: string, config: DataStoreConfig, log?: Logger): Promise<AztecLMDBStoreV2>;
5
- export declare function openTmpStore(name: string, ephemeral?: boolean, dbMapSizeKb?: number, // 10GB
6
- maxReaders?: number, log?: Logger): Promise<AztecLMDBStoreV2>;
7
- export declare function openStoreAt(dataDir: string, dbMapSizeKb?: number, // 10GB
8
- maxReaders?: number, log?: Logger): Promise<AztecLMDBStoreV2>;
9
- //# sourceMappingURL=factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/lmdb-v2/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAMlE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAK9C,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,eAAe,EACvB,GAAG,GAAE,MAAiD,GACrD,OAAO,CAAC,gBAAgB,CAAC,CAsC3B;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,OAAc,EACzB,WAAW,SAAqB,EAAE,OAAO;AACzC,UAAU,SAAc,EACxB,GAAG,GAAE,MAAiD,GACrD,OAAO,CAAC,gBAAgB,CAAC,CAmB3B;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,WAAW,SAAqB,EAAE,OAAO;AACzC,UAAU,SAAc,EACxB,GAAG,GAAE,MAAyC,GAC7C,OAAO,CAAC,gBAAgB,CAAC,CAG3B"}
@@ -1,3 +0,0 @@
1
- export * from './store.js';
2
- export * from './factory.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lmdb-v2/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}