@xyo-network/previous-hash-store-indexeddb 4.0.2 → 4.1.0

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.
@@ -0,0 +1,26 @@
1
+ import type { Address, Hash } from '@xylabs/hex';
2
+ import type { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
+ import type { 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
+ /**
15
+ * The database name.
16
+ */
17
+ get dbName(): "xyo";
18
+ /**
19
+ * The name of the object store.
20
+ */
21
+ get storeName(): "previous-hash";
22
+ getItem(address: Address): Promise<Hash | null>;
23
+ removeItem(address: Address): Promise<void>;
24
+ setItem(address: Address, previousHash: string): Promise<void>;
25
+ }
26
+ //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,KAAK,CAAA;AAGjD,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;;OAEG;IACH,IAAI,MAAM,IACD,KAAK,CACb;IAED;;OAEG;IACH,IAAI,SAAS,IACJ,eAAe,CACvB;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"}
@@ -0,0 +1,2 @@
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -0,0 +1,26 @@
1
+ import type { Address, Hash } from '@xylabs/hex';
2
+ import type { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
3
+ import type { 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
+ /**
15
+ * The database name.
16
+ */
17
+ get dbName(): "xyo";
18
+ /**
19
+ * The name of the object store.
20
+ */
21
+ get storeName(): "previous-hash";
22
+ getItem(address: Address): Promise<Hash | null>;
23
+ removeItem(address: Address): Promise<void>;
24
+ setItem(address: Address, previousHash: string): Promise<void>;
25
+ }
26
+ //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,KAAK,CAAA;AAGjD,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;;OAEG;IACH,IAAI,MAAM,IACD,KAAK,CACb;IAED;;OAEG;IACH,IAAI,SAAS,IACJ,eAAe,CACvB;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"}
@@ -0,0 +1,2 @@
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
@@ -0,0 +1,29 @@
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
+ /**
16
+ * The database name.
17
+ */
18
+ get dbName(): "xyo";
19
+ /**
20
+ * The name of the object store.
21
+ */
22
+ get storeName(): "previous-hash";
23
+ getItem(address: Address): Promise<Hash | null>;
24
+ removeItem(address: Address): Promise<void>;
25
+ setItem(address: Address, previousHash: string): Promise<void>;
26
+ }
27
+
28
+ export { IndexedDbPreviousHashStore };
29
+ export type { PreviousHashStoreSchemaV1 };
@@ -0,0 +1,29 @@
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
+ /**
16
+ * The database name.
17
+ */
18
+ get dbName(): "xyo";
19
+ /**
20
+ * The name of the object store.
21
+ */
22
+ get storeName(): "previous-hash";
23
+ getItem(address: Address): Promise<Hash | null>;
24
+ removeItem(address: Address): Promise<void>;
25
+ setItem(address: Address, previousHash: string): Promise<void>;
26
+ }
27
+
28
+ export { IndexedDbPreviousHashStore };
29
+ export type { PreviousHashStoreSchemaV1 };
@@ -0,0 +1,29 @@
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
+ /**
16
+ * The database name.
17
+ */
18
+ get dbName(): "xyo";
19
+ /**
20
+ * The name of the object store.
21
+ */
22
+ get storeName(): "previous-hash";
23
+ getItem(address: Address): Promise<Hash | null>;
24
+ removeItem(address: Address): Promise<void>;
25
+ setItem(address: Address, previousHash: string): Promise<void>;
26
+ }
27
+
28
+ export { IndexedDbPreviousHashStore };
29
+ export type { PreviousHashStoreSchemaV1 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/previous-hash-store-indexeddb",
3
- "version": "4.0.2",
3
+ "version": "4.1.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,23 +21,23 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/types/index.d.ts",
24
+ "types": "./dist/neutral/index.d.ts",
25
25
  "default": "./dist/neutral/index.mjs"
26
26
  },
27
27
  "./package.json": "./package.json"
28
28
  },
29
29
  "module": "dist/neutral/index.mjs",
30
- "types": "dist/types/index.d.ts",
30
+ "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/hex": "^4.12.33",
33
- "@xyo-network/previous-hash-store-model": "^4.0.2",
32
+ "@xylabs/hex": "^4.13.15",
33
+ "@xyo-network/previous-hash-store-model": "^4.1.0",
34
34
  "idb": "^8.0.3"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/node": "^24.0.10",
37
+ "@types/node": "^24.0.13",
38
38
  "@types/uuid": "10.0.0",
39
- "@xylabs/ts-scripts-yarn3": "^6.5.12",
40
- "@xylabs/tsconfig": "^6.5.12",
39
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
40
+ "@xylabs/tsconfig": "^7.0.0-rc.20",
41
41
  "fake-indexeddb": "^6.0.1",
42
42
  "typescript": "^5.8.3",
43
43
  "uuid": "^11.1.0",
File without changes
File without changes