@xyo-network/previous-hash-store-indexeddb 3.8.0 → 3.8.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.
- package/dist/browser/index.d.ts +22 -2
- package/dist/browser/index.mjs.map +1 -1
- package/dist/neutral/index.d.ts +22 -2
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/index.d.ts +22 -2
- package/dist/node/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/IndexedDbPreviousHashStore.ts +1 -0
- package/dist/browser/IndexedDbPreviousHashStore.d.ts +0 -26
- package/dist/browser/IndexedDbPreviousHashStore.d.ts.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/neutral/IndexedDbPreviousHashStore.d.ts +0 -26
- package/dist/neutral/IndexedDbPreviousHashStore.d.ts.map +0 -1
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/node/IndexedDbPreviousHashStore.d.ts +0 -26
- package/dist/node/IndexedDbPreviousHashStore.d.ts.map +0 -1
- package/dist/node/index.d.ts.map +0 -1
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["import type { Address, Hash } from '@xylabs/hex'\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: 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":";AAGA,SAAS,cAAc;AAShB,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;
|
|
1
|
+
{"version":3,"sources":["../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["import type { Address, Hash } from '@xylabs/hex'\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 // eslint-disable-next-line sonarjs/no-async-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: 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":";AAGA,SAAS,cAAc;AAShB,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AAEZ,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,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":[]}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["import type { Address, Hash } from '@xylabs/hex'\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: 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":";AAGA,SAAS,cAAc;AAShB,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;
|
|
1
|
+
{"version":3,"sources":["../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["import type { Address, Hash } from '@xylabs/hex'\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 // eslint-disable-next-line sonarjs/no-async-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: 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":";AAGA,SAAS,cAAc;AAShB,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AAEZ,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,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":[]}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["import type { Address, Hash } from '@xylabs/hex'\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: 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":";AAGA,SAAS,cAAc;AAShB,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;
|
|
1
|
+
{"version":3,"sources":["../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["import type { Address, Hash } from '@xylabs/hex'\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 // eslint-disable-next-line sonarjs/no-async-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: 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":";AAGA,SAAS,cAAc;AAShB,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AAEZ,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,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":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/previous-hash-store-indexeddb",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
"types": "dist/node/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@xylabs/hex": "^4.5.1",
|
|
33
|
-
"@xyo-network/previous-hash-store-model": "^3.8.
|
|
34
|
-
"idb": "^8.0.
|
|
33
|
+
"@xyo-network/previous-hash-store-model": "^3.8.1",
|
|
34
|
+
"idb": "^8.0.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "^22.
|
|
37
|
+
"@types/node": "^22.13.1",
|
|
38
38
|
"@types/uuid": "10.0.0",
|
|
39
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
40
|
-
"@xylabs/tsconfig": "^
|
|
39
|
+
"@xylabs/ts-scripts-yarn3": "^5.0.22",
|
|
40
|
+
"@xylabs/tsconfig": "^5.0.22",
|
|
41
41
|
"fake-indexeddb": "^6.0.0",
|
|
42
42
|
"typescript": "^5.7.3",
|
|
43
43
|
"uuid": "^11.0.5",
|
|
44
|
-
"vitest": "^3.0.
|
|
44
|
+
"vitest": "^3.0.5"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
@@ -15,6 +15,7 @@ export class IndexedDbPreviousHashStore implements PreviousHashStore {
|
|
|
15
15
|
private readonly db: Promise<IDBPDatabase<PreviousHashStoreSchemaV1>>
|
|
16
16
|
|
|
17
17
|
constructor() {
|
|
18
|
+
// eslint-disable-next-line sonarjs/no-async-constructor
|
|
18
19
|
this.db = openDB<PreviousHashStoreSchemaV1>(
|
|
19
20
|
this.dbName,
|
|
20
21
|
IndexedDbPreviousHashStore.CurrentSchemaVersion,
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;;IAUrE;;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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;;IAUrE;;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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;;IAUrE;;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"}
|
package/dist/node/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
|