@xyo-network/previous-hash-store-indexeddb 2.110.16 → 2.110.18

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["export * from './IndexedDbPreviousHashStore.js'\n","import { Address, Hash } from '@xylabs/hex'\nimport { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport { DBSchema, IDBPDatabase, 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>(this.dbName, 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 async removeItem(address: Address): Promise<void> {\n await (await this.db).delete(this.storeName, address)\n }\n async setItem(address: Address, previousHash: string): Promise<void> {\n await (await this.db).put(this.storeName, previousHash, address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,iBAA+C;AASxC,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,SAAK,mBAAkC,KAAK,QAAQ,4BAA2B,sBAAsB;AAAA,MACxG,SAAS,CAAC,OAAO,GAAG,kBAAkB,KAAK,SAAS;AAAA,IACtD,CAAC;AAAA,EACH;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,EACA,MAAM,WAAW,SAAiC;AAChD,WAAO,MAAM,KAAK,IAAI,OAAO,KAAK,WAAW,OAAO;AAAA,EACtD;AAAA,EACA,MAAM,QAAQ,SAAkB,cAAqC;AACnE,WAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACjE;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["export * from './IndexedDbPreviousHashStore.ts'\n","import { Address, Hash } from '@xylabs/hex'\nimport { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport { DBSchema, IDBPDatabase, 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>(this.dbName, 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 async removeItem(address: Address): Promise<void> {\n await (await this.db).delete(this.storeName, address)\n }\n async setItem(address: Address, previousHash: string): Promise<void> {\n await (await this.db).put(this.storeName, previousHash, address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,iBAA+C;AASxC,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,SAAK,mBAAkC,KAAK,QAAQ,4BAA2B,sBAAsB;AAAA,MACxG,SAAS,CAAC,OAAO,GAAG,kBAAkB,KAAK,SAAS;AAAA,IACtD,CAAC;AAAA,EACH;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,EACA,MAAM,WAAW,SAAiC;AAChD,WAAO,MAAM,KAAK,IAAI,OAAO,KAAK,WAAW,OAAO;AAAA,EACtD;AAAA,EACA,MAAM,QAAQ,SAAkB,cAAqC;AACnE,WAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACjE;AACF;","names":[]}
@@ -1,2 +1,2 @@
1
- export * from './IndexedDbPreviousHashStore.js';
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './IndexedDbPreviousHashStore.js';
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './IndexedDbPreviousHashStore.js';
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["export * from './IndexedDbPreviousHashStore.js'\n","import { Address, Hash } from '@xylabs/hex'\nimport { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport { DBSchema, IDBPDatabase, 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>(this.dbName, 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 async removeItem(address: Address): Promise<void> {\n await (await this.db).delete(this.storeName, address)\n }\n async setItem(address: Address, previousHash: string): Promise<void> {\n await (await this.db).put(this.storeName, previousHash, address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,iBAA+C;AASxC,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,SAAK,mBAAkC,KAAK,QAAQ,4BAA2B,sBAAsB;AAAA,MACxG,SAAS,CAAC,OAAO,GAAG,kBAAkB,KAAK,SAAS;AAAA,IACtD,CAAC;AAAA,EACH;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,EACA,MAAM,WAAW,SAAiC;AAChD,WAAO,MAAM,KAAK,IAAI,OAAO,KAAK,WAAW,OAAO;AAAA,EACtD;AAAA,EACA,MAAM,QAAQ,SAAkB,cAAqC;AACnE,WAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACjE;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["export * from './IndexedDbPreviousHashStore.ts'\n","import { Address, Hash } from '@xylabs/hex'\nimport { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport { DBSchema, IDBPDatabase, 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>(this.dbName, 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 async removeItem(address: Address): Promise<void> {\n await (await this.db).delete(this.storeName, address)\n }\n async setItem(address: Address, previousHash: string): Promise<void> {\n await (await this.db).put(this.storeName, previousHash, address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,iBAA+C;AASxC,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,SAAK,mBAAkC,KAAK,QAAQ,4BAA2B,sBAAsB;AAAA,MACxG,SAAS,CAAC,OAAO,GAAG,kBAAkB,KAAK,SAAS;AAAA,IACtD,CAAC;AAAA,EACH;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,EACA,MAAM,WAAW,SAAiC;AAChD,WAAO,MAAM,KAAK,IAAI,OAAO,KAAK,WAAW,OAAO;AAAA,EACtD;AAAA,EACA,MAAM,QAAQ,SAAkB,cAAqC;AACnE,WAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACjE;AACF;","names":[]}
@@ -1,2 +1,2 @@
1
- export * from './IndexedDbPreviousHashStore.js';
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './IndexedDbPreviousHashStore.js';
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './IndexedDbPreviousHashStore.js';
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["export * from './IndexedDbPreviousHashStore.js'\n","import { Address, Hash } from '@xylabs/hex'\nimport { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport { DBSchema, IDBPDatabase, 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>(this.dbName, 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 async removeItem(address: Address): Promise<void> {\n await (await this.db).delete(this.storeName, address)\n }\n async setItem(address: Address, previousHash: string): Promise<void> {\n await (await this.db).put(this.storeName, previousHash, address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,iBAA+C;AASxC,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,SAAK,mBAAkC,KAAK,QAAQ,4BAA2B,sBAAsB;AAAA,MACxG,SAAS,CAAC,OAAO,GAAG,kBAAkB,KAAK,SAAS;AAAA,IACtD,CAAC;AAAA,EACH;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,EACA,MAAM,WAAW,SAAiC;AAChD,WAAO,MAAM,KAAK,IAAI,OAAO,KAAK,WAAW,OAAO;AAAA,EACtD;AAAA,EACA,MAAM,QAAQ,SAAkB,cAAqC;AACnE,WAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACjE;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/IndexedDbPreviousHashStore.ts"],"sourcesContent":["export * from './IndexedDbPreviousHashStore.ts'\n","import { Address, Hash } from '@xylabs/hex'\nimport { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport { DBSchema, IDBPDatabase, 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>(this.dbName, 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 async removeItem(address: Address): Promise<void> {\n await (await this.db).delete(this.storeName, address)\n }\n async setItem(address: Address, previousHash: string): Promise<void> {\n await (await this.db).put(this.storeName, previousHash, address)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,iBAA+C;AASxC,IAAM,6BAAN,MAAM,4BAAwD;AAAA,EACnE,OAAgB,uBAAuB;AAAA,EACtB;AAAA,EAEjB,cAAc;AACZ,SAAK,SAAK,mBAAkC,KAAK,QAAQ,4BAA2B,sBAAsB;AAAA,MACxG,SAAS,CAAC,OAAO,GAAG,kBAAkB,KAAK,SAAS;AAAA,IACtD,CAAC;AAAA,EACH;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,EACA,MAAM,WAAW,SAAiC;AAChD,WAAO,MAAM,KAAK,IAAI,OAAO,KAAK,WAAW,OAAO;AAAA,EACtD;AAAA,EACA,MAAM,QAAQ,SAAkB,cAAqC;AACnE,WAAO,MAAM,KAAK,IAAI,IAAI,KAAK,WAAW,cAAc,OAAO;AAAA,EACjE;AACF;","names":[]}
@@ -1,2 +1,2 @@
1
- export * from './IndexedDbPreviousHashStore.js';
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './IndexedDbPreviousHashStore.js';
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './IndexedDbPreviousHashStore.js';
1
+ export * from './IndexedDbPreviousHashStore.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "description": "Primary SDK for using XYO Protocol 2.0",
13
13
  "dependencies": {
14
14
  "@xylabs/hex": "^3.6.6",
15
- "@xyo-network/previous-hash-store-model": "^2.110.16",
15
+ "@xyo-network/previous-hash-store-model": "^2.110.18",
16
16
  "idb": "^8.0.0"
17
17
  },
18
18
  "devDependencies": {
@@ -62,6 +62,6 @@
62
62
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
63
63
  },
64
64
  "sideEffects": false,
65
- "version": "2.110.16",
65
+ "version": "2.110.18",
66
66
  "type": "module"
67
67
  }
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './IndexedDbPreviousHashStore.js'
1
+ export * from './IndexedDbPreviousHashStore.ts'