@xyo-network/previous-hash-store-indexeddb 5.3.22 → 5.3.25

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/previous-hash-store-indexeddb",
3
- "version": "5.3.22",
3
+ "version": "5.3.25",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,36 +30,33 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
- "src",
34
33
  "!**/*.bench.*",
35
34
  "!**/*.spec.*",
36
35
  "!**/*.test.*",
37
36
  "README.md"
38
37
  ],
39
38
  "dependencies": {
40
- "@xyo-network/previous-hash-store-model": "~5.3.22"
39
+ "@xyo-network/previous-hash-store-model": "~5.3.25"
41
40
  },
42
41
  "devDependencies": {
43
42
  "@opentelemetry/api": "^1.9.1",
44
43
  "@types/node": "^25.5.0",
45
44
  "@types/uuid": "11.0.0",
46
- "@xylabs/sdk-js": "^5.0.91",
47
- "@xylabs/ts-scripts-common": "~7.6.8",
48
- "@xylabs/ts-scripts-yarn3": "~7.6.8",
49
- "@xylabs/tsconfig": "~7.6.8",
45
+ "@xylabs/sdk-js": "^5.0.93",
46
+ "@xylabs/ts-scripts-common": "~7.6.16",
47
+ "@xylabs/ts-scripts-pnpm": "~7.6.16",
48
+ "@xylabs/tsconfig": "~7.6.16",
50
49
  "acorn": "^8.16.0",
51
50
  "axios": "^1.14.0",
52
- "cosmiconfig": "^9.0.1",
53
- "esbuild": "^0.27.4",
54
- "eslint": "^10.1.0",
51
+ "esbuild": "^0.28.0",
55
52
  "fake-indexeddb": "~6.2.5",
56
53
  "idb": "^8.0.3",
57
- "rollup": "^4.60.1",
58
54
  "typescript": "~5.9.3",
59
55
  "uuid": "~13.0.0",
60
56
  "vite": "^8.0.3",
61
57
  "vitest": "~4.1.2",
62
- "zod": "^4.3.6"
58
+ "zod": "^4.3.6",
59
+ "@xyo-network/previous-hash-store-model": "~5.3.25"
63
60
  },
64
61
  "peerDependencies": {
65
62
  "@xylabs/sdk-js": "^5",
@@ -69,4 +66,4 @@
69
66
  "publishConfig": {
70
67
  "access": "public"
71
68
  }
72
- }
69
+ }
@@ -1,51 +0,0 @@
1
- import type { Address, Hash } from '@xylabs/sdk-js'
2
- import type { PreviousHashStore } from '@xyo-network/previous-hash-store-model'
3
- import type { DBSchema, IDBPDatabase } from 'idb'
4
- import { openDB } from 'idb'
5
-
6
- export interface PreviousHashStoreSchemaV1 extends DBSchema {
7
- 'previous-hash': {
8
- key: string
9
- value: string
10
- }
11
- }
12
-
13
- export class IndexedDbPreviousHashStore implements PreviousHashStore {
14
- static readonly CurrentSchemaVersion = 1
15
- private readonly db: Promise<IDBPDatabase<PreviousHashStoreSchemaV1>>
16
-
17
- constructor() {
18
- this.db = openDB<PreviousHashStoreSchemaV1>(
19
- this.dbName,
20
- IndexedDbPreviousHashStore.CurrentSchemaVersion,
21
- { upgrade: db => db.createObjectStore(this.storeName) },
22
- )
23
- }
24
-
25
- /**
26
- * The database name.
27
- */
28
- get dbName() {
29
- return 'xyo' as const
30
- }
31
-
32
- /**
33
- * The name of the object store.
34
- */
35
- get storeName() {
36
- return 'previous-hash' as const
37
- }
38
-
39
- async getItem(address: Address): Promise<Hash | null> {
40
- const value = (await (await this.db).get(this.storeName, address)) as Hash
41
- return value ?? null
42
- }
43
-
44
- async removeItem(address: Address): Promise<void> {
45
- await (await this.db).delete(this.storeName, address)
46
- }
47
-
48
- async setItem(address: Address, previousHash: string): Promise<void> {
49
- await (await this.db).put(this.storeName, previousHash, address)
50
- }
51
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './IndexedDbPreviousHashStore.ts'