@xyo-network/previous-hash-store-indexeddb 7.0.14 → 7.0.15
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/dist/neutral/index.d.ts +1 -1
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +2 -41
- package/dist/neutral/index.mjs.map +3 -3
- package/package.json +28 -9
- package/dist/neutral/IndexedDbPreviousHashStore.d.ts +0 -27
- package/dist/neutral/IndexedDbPreviousHashStore.d.ts.map +0 -1
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '@xyo-network/sdk-protocol/previous-hash-store-indexeddb';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,yDAAyD,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,42 +1,3 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
|
|
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/
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["// Compatibility shim: this package re-exports from @xyo-network/sdk-protocol.\nexport * from '@xyo-network/sdk-protocol/previous-hash-store-indexeddb'\n"],
|
|
5
|
+
"mappings": ";AACA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/previous-hash-store-indexeddb",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.15",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -34,33 +34,51 @@
|
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xyo-network/
|
|
38
|
-
"@xyo-network/address": "~7.0.14"
|
|
37
|
+
"@xyo-network/sdk-protocol": "~7.0.15"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
40
|
"@ariestools/sdk": "~8.0.2",
|
|
41
|
+
"@ariestools/threads": "~8.0.2",
|
|
42
|
+
"@bitauth/libauth": "~3.0.0",
|
|
43
|
+
"@metamask/providers": "~22.1.1",
|
|
44
|
+
"@noble/post-quantum": "~0.6.1",
|
|
42
45
|
"@opentelemetry/api": "~1.9.1",
|
|
43
46
|
"@opentelemetry/sdk-trace-base": "~2.9.0",
|
|
44
47
|
"@scure/base": "~2.2.0",
|
|
45
|
-
"@
|
|
46
|
-
"@xylabs/
|
|
48
|
+
"@scure/bip39": "~2.2.0",
|
|
49
|
+
"@xylabs/toolchain": "~8.6.7",
|
|
50
|
+
"@xylabs/tsconfig": "~8.6.7",
|
|
51
|
+
"ajv": "~8.20.0",
|
|
47
52
|
"async-mutex": "~0.5.0",
|
|
53
|
+
"debug": "~4.4.3",
|
|
48
54
|
"eslint": "~10.6.0",
|
|
49
55
|
"eslint-import-resolver-typescript": "~4.4.5",
|
|
50
|
-
"
|
|
56
|
+
"ethers": "~6.17.0",
|
|
57
|
+
"hash-wasm": "~4.12.0",
|
|
51
58
|
"idb": "~8.0.3",
|
|
59
|
+
"observable-fns": "~0.6.1",
|
|
52
60
|
"typescript": "~6.0.3",
|
|
53
|
-
"
|
|
54
|
-
"vitest": "~4.1.9",
|
|
61
|
+
"webextension-polyfill": "~0.12.0",
|
|
55
62
|
"zod": "~4.4.3"
|
|
56
63
|
},
|
|
57
64
|
"peerDependencies": {
|
|
58
65
|
"@ariestools/sdk": "^8.0.2",
|
|
66
|
+
"@ariestools/threads": "^8.0.2",
|
|
67
|
+
"@bitauth/libauth": "^3.0.0",
|
|
68
|
+
"@metamask/providers": "^22.1.1",
|
|
69
|
+
"@noble/post-quantum": "^0.6.1",
|
|
59
70
|
"@opentelemetry/api": "^1.9.1",
|
|
60
71
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
61
72
|
"@scure/base": "^2.2.0",
|
|
73
|
+
"@scure/bip39": "^2.2.0",
|
|
74
|
+
"ajv": "^8.20.0",
|
|
62
75
|
"async-mutex": "^0.5.0",
|
|
76
|
+
"debug": "^4.4.3",
|
|
77
|
+
"ethers": "^6.17.0",
|
|
78
|
+
"hash-wasm": "^4.12.0",
|
|
63
79
|
"idb": "^8.0.3",
|
|
80
|
+
"observable-fns": "^0.6.1",
|
|
81
|
+
"webextension-polyfill": "^0.12.0",
|
|
64
82
|
"zod": "^4.4.3"
|
|
65
83
|
},
|
|
66
84
|
"engines": {
|
|
@@ -68,5 +86,6 @@
|
|
|
68
86
|
},
|
|
69
87
|
"publishConfig": {
|
|
70
88
|
"access": "public"
|
|
71
|
-
}
|
|
89
|
+
},
|
|
90
|
+
"deprecated": "Use @xyo-network/sdk-protocol/previous-hash-store-indexeddb instead. Replace @xyo-network/previous-hash-store-indexeddb with @xyo-network/sdk-protocol/previous-hash-store-indexeddb. This package is a compatibility shim only and will not receive further updates."
|
|
72
91
|
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Hash } from '@ariestools/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,iBAAiB,CAAA;AAC3C,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"}
|