@xyo-network/previous-hash-store-indexeddb 2.111.3 → 3.0.1

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 (43) hide show
  1. package/dist/browser/index.d.ts +22 -2
  2. package/dist/neutral/index.d.ts +22 -2
  3. package/dist/node/index.d.ts +22 -2
  4. package/package.json +9 -28
  5. package/dist/browser/IndexedDbPreviousHashStore.d.cts +0 -20
  6. package/dist/browser/IndexedDbPreviousHashStore.d.cts.map +0 -1
  7. package/dist/browser/IndexedDbPreviousHashStore.d.mts +0 -20
  8. package/dist/browser/IndexedDbPreviousHashStore.d.mts.map +0 -1
  9. package/dist/browser/IndexedDbPreviousHashStore.d.ts +0 -20
  10. package/dist/browser/IndexedDbPreviousHashStore.d.ts.map +0 -1
  11. package/dist/browser/index.cjs +0 -60
  12. package/dist/browser/index.cjs.map +0 -1
  13. package/dist/browser/index.d.cts +0 -2
  14. package/dist/browser/index.d.cts.map +0 -1
  15. package/dist/browser/index.d.mts +0 -2
  16. package/dist/browser/index.d.mts.map +0 -1
  17. package/dist/browser/index.d.ts.map +0 -1
  18. package/dist/neutral/IndexedDbPreviousHashStore.d.cts +0 -20
  19. package/dist/neutral/IndexedDbPreviousHashStore.d.cts.map +0 -1
  20. package/dist/neutral/IndexedDbPreviousHashStore.d.mts +0 -20
  21. package/dist/neutral/IndexedDbPreviousHashStore.d.mts.map +0 -1
  22. package/dist/neutral/IndexedDbPreviousHashStore.d.ts +0 -20
  23. package/dist/neutral/IndexedDbPreviousHashStore.d.ts.map +0 -1
  24. package/dist/neutral/index.cjs +0 -60
  25. package/dist/neutral/index.cjs.map +0 -1
  26. package/dist/neutral/index.d.cts +0 -2
  27. package/dist/neutral/index.d.cts.map +0 -1
  28. package/dist/neutral/index.d.mts +0 -2
  29. package/dist/neutral/index.d.mts.map +0 -1
  30. package/dist/neutral/index.d.ts.map +0 -1
  31. package/dist/node/IndexedDbPreviousHashStore.d.cts +0 -20
  32. package/dist/node/IndexedDbPreviousHashStore.d.cts.map +0 -1
  33. package/dist/node/IndexedDbPreviousHashStore.d.mts +0 -20
  34. package/dist/node/IndexedDbPreviousHashStore.d.mts.map +0 -1
  35. package/dist/node/IndexedDbPreviousHashStore.d.ts +0 -20
  36. package/dist/node/IndexedDbPreviousHashStore.d.ts.map +0 -1
  37. package/dist/node/index.cjs +0 -64
  38. package/dist/node/index.cjs.map +0 -1
  39. package/dist/node/index.d.cts +0 -2
  40. package/dist/node/index.d.cts.map +0 -1
  41. package/dist/node/index.d.mts +0 -2
  42. package/dist/node/index.d.mts.map +0 -1
  43. package/dist/node/index.d.ts.map +0 -1
@@ -1,2 +1,22 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
2
- //# sourceMappingURL=index.d.ts.map
1
+ import { Address, Hash } from '@xylabs/hex';
2
+ import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
+ import { DBSchema } from 'idb';
4
+
5
+ interface PreviousHashStoreSchemaV1 extends DBSchema {
6
+ 'previous-hash': {
7
+ key: string;
8
+ value: string;
9
+ };
10
+ }
11
+ declare class IndexedDbPreviousHashStore implements PreviousHashStore {
12
+ static readonly CurrentSchemaVersion = 1;
13
+ private readonly db;
14
+ constructor();
15
+ get dbName(): "xyo";
16
+ get storeName(): "previous-hash";
17
+ getItem(address: Address): Promise<Hash | null>;
18
+ removeItem(address: Address): Promise<void>;
19
+ setItem(address: Address, previousHash: string): Promise<void>;
20
+ }
21
+
22
+ export { IndexedDbPreviousHashStore, type PreviousHashStoreSchemaV1 };
@@ -1,2 +1,22 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
2
- //# sourceMappingURL=index.d.ts.map
1
+ import { Address, Hash } from '@xylabs/hex';
2
+ import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
+ import { DBSchema } from 'idb';
4
+
5
+ interface PreviousHashStoreSchemaV1 extends DBSchema {
6
+ 'previous-hash': {
7
+ key: string;
8
+ value: string;
9
+ };
10
+ }
11
+ declare class IndexedDbPreviousHashStore implements PreviousHashStore {
12
+ static readonly CurrentSchemaVersion = 1;
13
+ private readonly db;
14
+ constructor();
15
+ get dbName(): "xyo";
16
+ get storeName(): "previous-hash";
17
+ getItem(address: Address): Promise<Hash | null>;
18
+ removeItem(address: Address): Promise<void>;
19
+ setItem(address: Address, previousHash: string): Promise<void>;
20
+ }
21
+
22
+ export { IndexedDbPreviousHashStore, type PreviousHashStoreSchemaV1 };
@@ -1,2 +1,22 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
2
- //# sourceMappingURL=index.d.ts.map
1
+ import { Address, Hash } from '@xylabs/hex';
2
+ import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
+ import { DBSchema } from 'idb';
4
+
5
+ interface PreviousHashStoreSchemaV1 extends DBSchema {
6
+ 'previous-hash': {
7
+ key: string;
8
+ value: string;
9
+ };
10
+ }
11
+ declare class IndexedDbPreviousHashStore implements PreviousHashStore {
12
+ static readonly CurrentSchemaVersion = 1;
13
+ private readonly db;
14
+ constructor();
15
+ get dbName(): "xyo";
16
+ get storeName(): "previous-hash";
17
+ getItem(address: Address): Promise<Hash | null>;
18
+ removeItem(address: Address): Promise<void>;
19
+ setItem(address: Address, previousHash: string): Promise<void>;
20
+ }
21
+
22
+ export { IndexedDbPreviousHashStore, type PreviousHashStoreSchemaV1 };
package/package.json CHANGED
@@ -11,47 +11,28 @@
11
11
  },
12
12
  "description": "Primary SDK for using XYO Protocol 2.0",
13
13
  "dependencies": {
14
- "@xylabs/hex": "^3.6.12",
15
- "@xyo-network/previous-hash-store-model": "^2.111.3",
14
+ "@xylabs/hex": "^4.0.0",
15
+ "@xyo-network/previous-hash-store-model": "^3.0.1",
16
16
  "idb": "^8.0.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "^22.1.0",
19
+ "@types/node": "^22.2.0",
20
20
  "@types/uuid": "10.0.0",
21
- "@xylabs/ts-scripts-yarn3": "^3.15.14",
22
- "@xylabs/tsconfig": "^3.15.14",
21
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
22
+ "@xylabs/tsconfig": "^4.0.0-rc.15",
23
23
  "fake-indexeddb": "^6.0.0",
24
24
  "typescript": "^5.5.4",
25
25
  "uuid": "^10.0.0"
26
26
  },
27
27
  "exports": {
28
28
  ".": {
29
- "browser": {
30
- "require": {
31
- "types": "./dist/browser/index.d.cts",
32
- "default": "./dist/browser/index.cjs"
33
- },
34
- "import": {
35
- "types": "./dist/browser/index.d.mts",
36
- "default": "./dist/browser/index.mjs"
37
- }
38
- },
39
- "node": {
40
- "require": {
41
- "types": "./dist/node/index.d.cts",
42
- "default": "./dist/node/index.cjs"
43
- },
44
- "import": {
45
- "types": "./dist/node/index.d.mts",
46
- "default": "./dist/node/index.mjs"
47
- }
48
- }
29
+ "types": "./dist/neutral/index.d.ts",
30
+ "default": "./dist/neutral/index.mjs"
49
31
  },
50
32
  "./package.json": "./package.json"
51
33
  },
52
34
  "types": "dist/node/index.d.ts",
53
- "main": "dist/node/index.cjs",
54
- "module": "dist/node/index.mjs",
35
+ "module": "dist/neutral/index.mjs",
55
36
  "homepage": "https://xyo.network",
56
37
  "license": "LGPL-3.0-only",
57
38
  "publishConfig": {
@@ -62,6 +43,6 @@
62
43
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
63
44
  },
64
45
  "sideEffects": false,
65
- "version": "2.111.3",
46
+ "version": "3.0.1",
66
47
  "type": "module"
67
48
  }
@@ -1,20 +0,0 @@
1
- import { Address, Hash } from '@xylabs/hex';
2
- import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
- import { DBSchema } from 'idb';
4
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
5
- 'previous-hash': {
6
- key: string;
7
- value: string;
8
- };
9
- }
10
- export declare class IndexedDbPreviousHashStore implements PreviousHashStore {
11
- static readonly CurrentSchemaVersion = 1;
12
- private readonly db;
13
- constructor();
14
- get dbName(): "xyo";
15
- get storeName(): "previous-hash";
16
- getItem(address: Address): Promise<Hash | null>;
17
- removeItem(address: Address): Promise<void>;
18
- setItem(address: Address, previousHash: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,KAAI;IACxC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkD;;IAWrE,IAAI,MAAM,UAET;IAKD,IAAI,SAAS,oBAEZ;IAEK,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK/C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -1,20 +0,0 @@
1
- import { Address, Hash } from '@xylabs/hex';
2
- import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
- import { DBSchema } from 'idb';
4
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
5
- 'previous-hash': {
6
- key: string;
7
- value: string;
8
- };
9
- }
10
- export declare class IndexedDbPreviousHashStore implements PreviousHashStore {
11
- static readonly CurrentSchemaVersion = 1;
12
- private readonly db;
13
- constructor();
14
- get dbName(): "xyo";
15
- get storeName(): "previous-hash";
16
- getItem(address: Address): Promise<Hash | null>;
17
- removeItem(address: Address): Promise<void>;
18
- setItem(address: Address, previousHash: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,KAAI;IACxC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkD;;IAWrE,IAAI,MAAM,UAET;IAKD,IAAI,SAAS,oBAEZ;IAEK,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK/C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -1,20 +0,0 @@
1
- import { Address, Hash } from '@xylabs/hex';
2
- import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
- import { DBSchema } from 'idb';
4
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
5
- 'previous-hash': {
6
- key: string;
7
- value: string;
8
- };
9
- }
10
- export declare class IndexedDbPreviousHashStore implements PreviousHashStore {
11
- static readonly CurrentSchemaVersion = 1;
12
- private readonly db;
13
- constructor();
14
- get dbName(): "xyo";
15
- get storeName(): "previous-hash";
16
- getItem(address: Address): Promise<Hash | null>;
17
- removeItem(address: Address): Promise<void>;
18
- setItem(address: Address, previousHash: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,KAAI;IACxC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkD;;IAWrE,IAAI,MAAM,UAET;IAKD,IAAI,SAAS,oBAEZ;IAEK,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK/C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -1,60 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- IndexedDbPreviousHashStore: () => IndexedDbPreviousHashStore
24
- });
25
- module.exports = __toCommonJS(src_exports);
26
-
27
- // src/IndexedDbPreviousHashStore.ts
28
- var import_idb = require("idb");
29
- var IndexedDbPreviousHashStore = class _IndexedDbPreviousHashStore {
30
- static CurrentSchemaVersion = 1;
31
- db;
32
- constructor() {
33
- this.db = (0, import_idb.openDB)(this.dbName, _IndexedDbPreviousHashStore.CurrentSchemaVersion, {
34
- upgrade: (db) => db.createObjectStore(this.storeName)
35
- });
36
- }
37
- /**
38
- * The database name.
39
- */
40
- get dbName() {
41
- return "xyo";
42
- }
43
- /**
44
- * The name of the object store.
45
- */
46
- get storeName() {
47
- return "previous-hash";
48
- }
49
- async getItem(address) {
50
- const value = await (await this.db).get(this.storeName, address);
51
- return value ?? null;
52
- }
53
- async removeItem(address) {
54
- await (await this.db).delete(this.storeName, address);
55
- }
56
- async setItem(address, previousHash) {
57
- await (await this.db).put(this.storeName, previousHash, address);
58
- }
59
- };
60
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["export * from './IndexedDbPreviousHashStore.ts'\n","import { Address, Hash } from '@xylabs/hex'\nimport { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport { DBSchema, IDBPDatabase, openDB } from 'idb'\n\nexport interface PreviousHashStoreSchemaV1 extends DBSchema {\n 'previous-hash': {\n key: string\n value: string\n }\n}\n\nexport class IndexedDbPreviousHashStore implements PreviousHashStore {\n static readonly CurrentSchemaVersion = 1\n private readonly db: Promise<IDBPDatabase<PreviousHashStoreSchemaV1>>\n\n constructor() {\n this.db = openDB<PreviousHashStoreSchemaV1>(this.dbName, IndexedDbPreviousHashStore.CurrentSchemaVersion, {\n upgrade: db => db.createObjectStore(this.storeName),\n })\n }\n\n /**\n * The database name.\n */\n get dbName() {\n return 'xyo' as const\n }\n\n /**\n * The name of the object store.\n */\n get storeName() {\n return 'previous-hash' as const\n }\n\n async getItem(address: Address): Promise<Hash | null> {\n const value = (await (await this.db).get(this.storeName, address)) as Hash\n return value ?? null\n }\n\n async removeItem(address: Address): Promise<void> {\n await (await this.db).delete(this.storeName, address)\n }\n\n async setItem(address: Address, previousHash: string): Promise<void> {\n await (await this.db).put(this.storeName, previousHash, address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,iBAA+C;AASxC,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,SAAK,mBAAkC,KAAK,QAAQ,4BAA2B,sBAAsB;AAAA,MACxG,SAAS,QAAM,GAAG,kBAAkB,KAAK,SAAS;AAAA,IACpD,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,SAAS;AACX,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,YAAY;AACd,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,QAAQ,SAAwC;AACpD,UAAM,QAAS,OAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,OAAO;AAChE,WAAO,SAAS;AAAA,EAClB;AAAA,EAEA,MAAM,WAAW,SAAiC;AAChD,WAAO,MAAM,KAAK,IAAI,OAAO,KAAK,WAAW,OAAO;AAAA,EACtD;AAAA,EAEA,MAAM,QAAQ,SAAkB,cAAqC;AACnE,WAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACjE;AACF;","names":[]}
@@ -1,2 +0,0 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -1,20 +0,0 @@
1
- import { Address, Hash } from '@xylabs/hex';
2
- import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
- import { DBSchema } from 'idb';
4
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
5
- 'previous-hash': {
6
- key: string;
7
- value: string;
8
- };
9
- }
10
- export declare class IndexedDbPreviousHashStore implements PreviousHashStore {
11
- static readonly CurrentSchemaVersion = 1;
12
- private readonly db;
13
- constructor();
14
- get dbName(): "xyo";
15
- get storeName(): "previous-hash";
16
- getItem(address: Address): Promise<Hash | null>;
17
- removeItem(address: Address): Promise<void>;
18
- setItem(address: Address, previousHash: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,KAAI;IACxC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkD;;IAWrE,IAAI,MAAM,UAET;IAKD,IAAI,SAAS,oBAEZ;IAEK,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK/C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -1,20 +0,0 @@
1
- import { Address, Hash } from '@xylabs/hex';
2
- import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
- import { DBSchema } from 'idb';
4
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
5
- 'previous-hash': {
6
- key: string;
7
- value: string;
8
- };
9
- }
10
- export declare class IndexedDbPreviousHashStore implements PreviousHashStore {
11
- static readonly CurrentSchemaVersion = 1;
12
- private readonly db;
13
- constructor();
14
- get dbName(): "xyo";
15
- get storeName(): "previous-hash";
16
- getItem(address: Address): Promise<Hash | null>;
17
- removeItem(address: Address): Promise<void>;
18
- setItem(address: Address, previousHash: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,KAAI;IACxC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkD;;IAWrE,IAAI,MAAM,UAET;IAKD,IAAI,SAAS,oBAEZ;IAEK,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK/C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -1,20 +0,0 @@
1
- import { Address, Hash } from '@xylabs/hex';
2
- import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
- import { DBSchema } from 'idb';
4
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
5
- 'previous-hash': {
6
- key: string;
7
- value: string;
8
- };
9
- }
10
- export declare class IndexedDbPreviousHashStore implements PreviousHashStore {
11
- static readonly CurrentSchemaVersion = 1;
12
- private readonly db;
13
- constructor();
14
- get dbName(): "xyo";
15
- get storeName(): "previous-hash";
16
- getItem(address: Address): Promise<Hash | null>;
17
- removeItem(address: Address): Promise<void>;
18
- setItem(address: Address, previousHash: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,KAAI;IACxC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkD;;IAWrE,IAAI,MAAM,UAET;IAKD,IAAI,SAAS,oBAEZ;IAEK,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK/C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -1,60 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- IndexedDbPreviousHashStore: () => IndexedDbPreviousHashStore
24
- });
25
- module.exports = __toCommonJS(src_exports);
26
-
27
- // src/IndexedDbPreviousHashStore.ts
28
- var import_idb = require("idb");
29
- var IndexedDbPreviousHashStore = class _IndexedDbPreviousHashStore {
30
- static CurrentSchemaVersion = 1;
31
- db;
32
- constructor() {
33
- this.db = (0, import_idb.openDB)(this.dbName, _IndexedDbPreviousHashStore.CurrentSchemaVersion, {
34
- upgrade: (db) => db.createObjectStore(this.storeName)
35
- });
36
- }
37
- /**
38
- * The database name.
39
- */
40
- get dbName() {
41
- return "xyo";
42
- }
43
- /**
44
- * The name of the object store.
45
- */
46
- get storeName() {
47
- return "previous-hash";
48
- }
49
- async getItem(address) {
50
- const value = await (await this.db).get(this.storeName, address);
51
- return value ?? null;
52
- }
53
- async removeItem(address) {
54
- await (await this.db).delete(this.storeName, address);
55
- }
56
- async setItem(address, previousHash) {
57
- await (await this.db).put(this.storeName, previousHash, address);
58
- }
59
- };
60
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["export * from './IndexedDbPreviousHashStore.ts'\n","import { Address, Hash } from '@xylabs/hex'\nimport { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport { DBSchema, IDBPDatabase, openDB } from 'idb'\n\nexport interface PreviousHashStoreSchemaV1 extends DBSchema {\n 'previous-hash': {\n key: string\n value: string\n }\n}\n\nexport class IndexedDbPreviousHashStore implements PreviousHashStore {\n static readonly CurrentSchemaVersion = 1\n private readonly db: Promise<IDBPDatabase<PreviousHashStoreSchemaV1>>\n\n constructor() {\n this.db = openDB<PreviousHashStoreSchemaV1>(this.dbName, IndexedDbPreviousHashStore.CurrentSchemaVersion, {\n upgrade: db => db.createObjectStore(this.storeName),\n })\n }\n\n /**\n * The database name.\n */\n get dbName() {\n return 'xyo' as const\n }\n\n /**\n * The name of the object store.\n */\n get storeName() {\n return 'previous-hash' as const\n }\n\n async getItem(address: Address): Promise<Hash | null> {\n const value = (await (await this.db).get(this.storeName, address)) as Hash\n return value ?? null\n }\n\n async removeItem(address: Address): Promise<void> {\n await (await this.db).delete(this.storeName, address)\n }\n\n async setItem(address: Address, previousHash: string): Promise<void> {\n await (await this.db).put(this.storeName, previousHash, address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,iBAA+C;AASxC,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,SAAK,mBAAkC,KAAK,QAAQ,4BAA2B,sBAAsB;AAAA,MACxG,SAAS,QAAM,GAAG,kBAAkB,KAAK,SAAS;AAAA,IACpD,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,SAAS;AACX,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,YAAY;AACd,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,QAAQ,SAAwC;AACpD,UAAM,QAAS,OAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,OAAO;AAChE,WAAO,SAAS;AAAA,EAClB;AAAA,EAEA,MAAM,WAAW,SAAiC;AAChD,WAAO,MAAM,KAAK,IAAI,OAAO,KAAK,WAAW,OAAO;AAAA,EACtD;AAAA,EAEA,MAAM,QAAQ,SAAkB,cAAqC;AACnE,WAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACjE;AACF;","names":[]}
@@ -1,2 +0,0 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -1,20 +0,0 @@
1
- import { Address, Hash } from '@xylabs/hex';
2
- import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
- import { DBSchema } from 'idb';
4
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
5
- 'previous-hash': {
6
- key: string;
7
- value: string;
8
- };
9
- }
10
- export declare class IndexedDbPreviousHashStore implements PreviousHashStore {
11
- static readonly CurrentSchemaVersion = 1;
12
- private readonly db;
13
- constructor();
14
- get dbName(): "xyo";
15
- get storeName(): "previous-hash";
16
- getItem(address: Address): Promise<Hash | null>;
17
- removeItem(address: Address): Promise<void>;
18
- setItem(address: Address, previousHash: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,KAAI;IACxC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkD;;IAWrE,IAAI,MAAM,UAET;IAKD,IAAI,SAAS,oBAEZ;IAEK,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK/C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -1,20 +0,0 @@
1
- import { Address, Hash } from '@xylabs/hex';
2
- import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
- import { DBSchema } from 'idb';
4
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
5
- 'previous-hash': {
6
- key: string;
7
- value: string;
8
- };
9
- }
10
- export declare class IndexedDbPreviousHashStore implements PreviousHashStore {
11
- static readonly CurrentSchemaVersion = 1;
12
- private readonly db;
13
- constructor();
14
- get dbName(): "xyo";
15
- get storeName(): "previous-hash";
16
- getItem(address: Address): Promise<Hash | null>;
17
- removeItem(address: Address): Promise<void>;
18
- setItem(address: Address, previousHash: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,KAAI;IACxC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkD;;IAWrE,IAAI,MAAM,UAET;IAKD,IAAI,SAAS,oBAEZ;IAEK,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK/C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -1,20 +0,0 @@
1
- import { Address, Hash } from '@xylabs/hex';
2
- import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
- import { DBSchema } from 'idb';
4
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
5
- 'previous-hash': {
6
- key: string;
7
- value: string;
8
- };
9
- }
10
- export declare class IndexedDbPreviousHashStore implements PreviousHashStore {
11
- static readonly CurrentSchemaVersion = 1;
12
- private readonly db;
13
- constructor();
14
- get dbName(): "xyo";
15
- get storeName(): "previous-hash";
16
- getItem(address: Address): Promise<Hash | null>;
17
- removeItem(address: Address): Promise<void>;
18
- setItem(address: Address, previousHash: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAwB,MAAM,KAAK,CAAA;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ;IACzD,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,KAAI;IACxC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAkD;;IAWrE,IAAI,MAAM,UAET;IAKD,IAAI,SAAS,oBAEZ;IAEK,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK/C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE"}
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- IndexedDbPreviousHashStore: () => IndexedDbPreviousHashStore
24
- });
25
- module.exports = __toCommonJS(src_exports);
26
-
27
- // src/IndexedDbPreviousHashStore.ts
28
- var import_idb = require("idb");
29
- var IndexedDbPreviousHashStore = class _IndexedDbPreviousHashStore {
30
- static CurrentSchemaVersion = 1;
31
- db;
32
- constructor() {
33
- this.db = (0, import_idb.openDB)(this.dbName, _IndexedDbPreviousHashStore.CurrentSchemaVersion, {
34
- upgrade: (db) => db.createObjectStore(this.storeName)
35
- });
36
- }
37
- /**
38
- * The database name.
39
- */
40
- get dbName() {
41
- return "xyo";
42
- }
43
- /**
44
- * The name of the object store.
45
- */
46
- get storeName() {
47
- return "previous-hash";
48
- }
49
- async getItem(address) {
50
- const value = await (await this.db).get(this.storeName, address);
51
- return value ?? null;
52
- }
53
- async removeItem(address) {
54
- await (await this.db).delete(this.storeName, address);
55
- }
56
- async setItem(address, previousHash) {
57
- await (await this.db).put(this.storeName, previousHash, address);
58
- }
59
- };
60
- // Annotate the CommonJS export names for ESM import in node:
61
- 0 && (module.exports = {
62
- IndexedDbPreviousHashStore
63
- });
64
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["export * from './IndexedDbPreviousHashStore.ts'\n","import { Address, Hash } from '@xylabs/hex'\nimport { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport { DBSchema, IDBPDatabase, openDB } from 'idb'\n\nexport interface PreviousHashStoreSchemaV1 extends DBSchema {\n 'previous-hash': {\n key: string\n value: string\n }\n}\n\nexport class IndexedDbPreviousHashStore implements PreviousHashStore {\n static readonly CurrentSchemaVersion = 1\n private readonly db: Promise<IDBPDatabase<PreviousHashStoreSchemaV1>>\n\n constructor() {\n this.db = openDB<PreviousHashStoreSchemaV1>(this.dbName, IndexedDbPreviousHashStore.CurrentSchemaVersion, {\n upgrade: db => db.createObjectStore(this.storeName),\n })\n }\n\n /**\n * The database name.\n */\n get dbName() {\n return 'xyo' as const\n }\n\n /**\n * The name of the object store.\n */\n get storeName() {\n return 'previous-hash' as const\n }\n\n async getItem(address: Address): Promise<Hash | null> {\n const value = (await (await this.db).get(this.storeName, address)) as Hash\n return value ?? null\n }\n\n async removeItem(address: Address): Promise<void> {\n await (await this.db).delete(this.storeName, address)\n }\n\n async setItem(address: Address, previousHash: string): Promise<void> {\n await (await this.db).put(this.storeName, previousHash, address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,iBAA+C;AASxC,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,SAAK,mBAAkC,KAAK,QAAQ,4BAA2B,sBAAsB;AAAA,MACxG,SAAS,QAAM,GAAG,kBAAkB,KAAK,SAAS;AAAA,IACpD,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,SAAS;AACX,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,YAAY;AACd,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,QAAQ,SAAwC;AACpD,UAAM,QAAS,OAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,OAAO;AAChE,WAAO,SAAS;AAAA,EAClB;AAAA,EAEA,MAAM,WAAW,SAAiC;AAChD,WAAO,MAAM,KAAK,IAAI,OAAO,KAAK,WAAW,OAAO;AAAA,EACtD;AAAA,EAEA,MAAM,QAAQ,SAAkB,cAAqC;AACnE,WAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACjE;AACF;","names":[]}
@@ -1,2 +0,0 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}