@xyo-network/previous-hash-store-indexeddb 7.0.5 → 7.0.7

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/README.md CHANGED
@@ -1,49 +1,3 @@
1
- [![logo][]](https://xyo.network)
2
-
3
1
  # @xyo-network/previous-hash-store-indexeddb
4
2
 
5
- [![npm][npm-badge]][npm-link]
6
- [![license][license-badge]][license-link]
7
-
8
- > Primary SDK for using XYO Protocol 2.0
9
-
10
- ## Install
11
-
12
- Using npm:
13
-
14
- ```sh
15
- npm install {{name}}
16
- ```
17
-
18
- Using yarn:
19
-
20
- ```sh
21
- yarn add {{name}}
22
- ```
23
-
24
- Using pnpm:
25
-
26
- ```sh
27
- pnpm add {{name}}
28
- ```
29
-
30
- Using bun:
31
-
32
- ```sh
33
- bun add {{name}}
34
- ```
35
-
36
-
37
- ## License
38
-
39
- See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
40
-
41
- ## Credits
42
-
43
- [Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
44
-
45
- [npm-badge]: https://img.shields.io/npm/v/@xyo-network/previous-hash-store-indexeddb.svg
46
- [npm-link]: https://www.npmjs.com/package/@xyo-network/previous-hash-store-indexeddb
47
- [license-badge]: https://img.shields.io/npm/l/@xyo-network/previous-hash-store-indexeddb.svg
48
- [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
49
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
3
+ Deprecated compatibility stub. Use `@xyo-network/sdk-protocol/previous-hash-store-indexeddb` instead.
@@ -1,2 +1,6 @@
1
- export * from './IndexedDbPreviousHashStore.ts';
1
+ /**
2
+ * @deprecated Use `@xyo-network/sdk-protocol/previous-hash-store-indexeddb` instead.
3
+ * `@xyo-network/previous-hash-store-indexeddb` is a backward-compatibility re-export stub.
4
+ */
5
+ export * from '@xyo-network/sdk-protocol/previous-hash-store-indexeddb';
2
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,yDAAyD,CAAA"}
@@ -1,42 +1,3 @@
1
- // src/IndexedDbPreviousHashStore.ts
2
- import { openDB } from "idb";
3
- var IndexedDbPreviousHashStore = class _IndexedDbPreviousHashStore {
4
- static CurrentSchemaVersion = 1;
5
- db;
6
- constructor() {
7
- this.db = openDB(
8
- this.dbName,
9
- _IndexedDbPreviousHashStore.CurrentSchemaVersion,
10
- { upgrade: (db) => db.createObjectStore(this.storeName) }
11
- );
12
- }
13
- /**
14
- * The database name.
15
- */
16
- get dbName() {
17
- return "xyo";
18
- }
19
- /**
20
- * The name of the object store.
21
- */
22
- get storeName() {
23
- return "previous-hash";
24
- }
25
- async getItem(address) {
26
- const db = await this.db;
27
- const value = await db.get(this.storeName, address);
28
- return value ?? null;
29
- }
30
- async removeItem(address) {
31
- const db = await this.db;
32
- await db.delete(this.storeName, address);
33
- }
34
- async setItem(address, previousHash) {
35
- const db = await this.db;
36
- await db.put(this.storeName, previousHash, address);
37
- }
38
- };
39
- export {
40
- IndexedDbPreviousHashStore
41
- };
1
+ // src/index.ts
2
+ export * from "@xyo-network/sdk-protocol/previous-hash-store-indexeddb";
42
3
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/IndexedDbPreviousHashStore.ts"],
4
- "sourcesContent": ["import type { Hash } from '@xylabs/sdk'\nimport type { XyoAddress } from '@xyo-network/address'\nimport type { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport type { DBSchema, IDBPDatabase } from 'idb'\nimport { 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>(\n this.dbName,\n 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: XyoAddress): Promise<Hash | null> {\n const db = await this.db\n const value = (await db.get(this.storeName, address)) as Hash\n return value ?? null\n }\n\n async removeItem(address: XyoAddress): Promise<void> {\n const db = await this.db\n await db.delete(this.storeName, address)\n }\n\n async setItem(address: XyoAddress, previousHash: string): Promise<void> {\n const db = await this.db\n await db.put(this.storeName, previousHash, address)\n }\n}\n"],
5
- "mappings": ";AAIA,SAAS,cAAc;AAShB,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,KAAK;AAAA,MACR,KAAK;AAAA,MACL,4BAA2B;AAAA,MAC3B,EAAE,SAAS,QAAM,GAAG,kBAAkB,KAAK,SAAS,EAAE;AAAA,IACxD;AAAA,EACF;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,SAA2C;AACvD,UAAM,KAAK,MAAM,KAAK;AACtB,UAAM,QAAS,MAAM,GAAG,IAAI,KAAK,WAAW,OAAO;AACnD,WAAO,SAAS;AAAA,EAClB;AAAA,EAEA,MAAM,WAAW,SAAoC;AACnD,UAAM,KAAK,MAAM,KAAK;AACtB,UAAM,GAAG,OAAO,KAAK,WAAW,OAAO;AAAA,EACzC;AAAA,EAEA,MAAM,QAAQ,SAAqB,cAAqC;AACtE,UAAM,KAAK,MAAM,KAAK;AACtB,UAAM,GAAG,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACpD;AACF;",
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["/**\n * @deprecated Use `@xyo-network/sdk-protocol/previous-hash-store-indexeddb` instead.\n * `@xyo-network/previous-hash-store-indexeddb` is a backward-compatibility re-export stub.\n */\nexport * from '@xyo-network/sdk-protocol/previous-hash-store-indexeddb'\n"],
5
+ "mappings": ";AAIA,cAAc;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@xyo-network/previous-hash-store-indexeddb",
3
- "version": "7.0.5",
4
- "description": "Primary SDK for using XYO Protocol 2.0",
3
+ "version": "7.0.7",
4
+ "description": "DEPRECATED - use @xyo-network/sdk-protocol/previous-hash-store-indexeddb. Backward-compatibility re-export stub for @xyo-network/previous-hash-store-indexeddb.",
5
+ "deprecated": "Use @xyo-network/sdk-protocol/previous-hash-store-indexeddb instead. @xyo-network/previous-hash-store-indexeddb is a backward-compatibility re-export stub and will not receive further updates.",
5
6
  "homepage": "https://xyo.network",
6
7
  "bugs": {
7
8
  "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues",
@@ -34,34 +35,33 @@
34
35
  "README.md"
35
36
  ],
36
37
  "dependencies": {
37
- "@xyo-network/address": "~7.0.5",
38
- "@xyo-network/previous-hash-store-model": "~7.0.5"
38
+ "@xyo-network/sdk-protocol": "~7.0.7"
39
39
  },
40
40
  "devDependencies": {
41
- "@opentelemetry/api": "^1.9.1",
42
- "@opentelemetry/sdk-trace-base": "^2.8.0",
43
- "@scure/base": "~2.2.0",
44
- "@xylabs/sdk": "^7.0.1",
45
- "@xylabs/toolchain": "~8.5.3",
46
- "@xylabs/tsconfig": "~8.5.3",
47
- "async-mutex": "^0.5.0",
41
+ "@xylabs/toolchain": "~8.5.13",
42
+ "@xylabs/tsconfig": "~8.5.13",
48
43
  "browserslist": "4.28.4",
49
44
  "eslint": "^10.6.0",
50
45
  "eslint-import-resolver-typescript": "^4.4.5",
51
- "fake-indexeddb": "~6.2.5",
52
- "idb": "^8.0.3",
53
- "typescript": "~6.0.3",
54
- "vite": "^8.1.0",
55
- "vitest": "~4.1.9",
56
- "zod": "^4.4.3"
46
+ "typescript": "~6.0.3"
57
47
  },
58
48
  "peerDependencies": {
49
+ "@ariestools/sdk": "^7.0.4",
50
+ "@bitauth/libauth": "~3.0",
51
+ "@noble/post-quantum": "~0.6.1",
59
52
  "@opentelemetry/api": "^1.9",
60
53
  "@opentelemetry/sdk-trace-base": "^2.7",
61
54
  "@scure/base": "~2.2",
62
- "@xylabs/sdk": "^7.0",
55
+ "@scure/bip39": "~2.2",
56
+ "@xylabs/geo": "^7.0",
57
+ "@xylabs/threads": "^7.0",
58
+ "ajv": "^8.20",
63
59
  "async-mutex": "^0.5",
60
+ "debug": "^4.4",
61
+ "ethers": "^6.16",
62
+ "hash-wasm": "~4.12",
64
63
  "idb": "^8.0",
64
+ "observable-fns": "^0.6",
65
65
  "zod": "^4.4"
66
66
  },
67
67
  "engines": {
@@ -1,27 +0,0 @@
1
- import type { Hash } from '@xylabs/sdk';
2
- import type { XyoAddress } from '@xyo-network/address';
3
- import type { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
4
- import type { DBSchema } from 'idb';
5
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
6
- 'previous-hash': {
7
- key: string;
8
- value: string;
9
- };
10
- }
11
- export 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: XyoAddress): Promise<Hash | null>;
24
- removeItem(address: XyoAddress): Promise<void>;
25
- setItem(address: XyoAddress, previousHash: string): Promise<void>;
26
- }
27
- //# sourceMappingURL=IndexedDbPreviousHashStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IndexedDbPreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/IndexedDbPreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,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;;IAUrE;;OAEG;IACH,IAAI,MAAM,IACD,KAAK,CACb;IAED;;OAEG;IACH,IAAI,SAAS,IACJ,eAAe,CACvB;IAEK,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAMlD,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9C,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAIxE"}