@xyo-network/previous-hash-store-indexeddb
Advanced tools
Comparing version 3.0.7 to 3.0.8
@@ -1,22 +0,2 @@ | ||
import { Address, Hash } from '@xylabs/hex'; | ||
import { PreviousHashStore } from '@xyo-network/previous-hash-store-model'; | ||
import { DBSchema } from 'idb'; | ||
interface PreviousHashStoreSchemaV1 extends DBSchema { | ||
'previous-hash': { | ||
key: string; | ||
value: string; | ||
}; | ||
} | ||
declare class IndexedDbPreviousHashStore implements PreviousHashStore { | ||
static readonly CurrentSchemaVersion = 1; | ||
private readonly db; | ||
constructor(); | ||
get dbName(): "xyo"; | ||
get storeName(): "previous-hash"; | ||
getItem(address: Address): Promise<Hash | null>; | ||
removeItem(address: Address): Promise<void>; | ||
setItem(address: Address, previousHash: string): Promise<void>; | ||
} | ||
export { IndexedDbPreviousHashStore, type PreviousHashStoreSchemaV1 }; | ||
export * from './IndexedDbPreviousHashStore.ts'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,22 +0,2 @@ | ||
import { Address, Hash } from '@xylabs/hex'; | ||
import { PreviousHashStore } from '@xyo-network/previous-hash-store-model'; | ||
import { DBSchema } from 'idb'; | ||
interface PreviousHashStoreSchemaV1 extends DBSchema { | ||
'previous-hash': { | ||
key: string; | ||
value: string; | ||
}; | ||
} | ||
declare class IndexedDbPreviousHashStore implements PreviousHashStore { | ||
static readonly CurrentSchemaVersion = 1; | ||
private readonly db; | ||
constructor(); | ||
get dbName(): "xyo"; | ||
get storeName(): "previous-hash"; | ||
getItem(address: Address): Promise<Hash | null>; | ||
removeItem(address: Address): Promise<void>; | ||
setItem(address: Address, previousHash: string): Promise<void>; | ||
} | ||
export { IndexedDbPreviousHashStore, type PreviousHashStoreSchemaV1 }; | ||
export * from './IndexedDbPreviousHashStore.ts'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,22 +0,2 @@ | ||
import { Address, Hash } from '@xylabs/hex'; | ||
import { PreviousHashStore } from '@xyo-network/previous-hash-store-model'; | ||
import { DBSchema } from 'idb'; | ||
interface PreviousHashStoreSchemaV1 extends DBSchema { | ||
'previous-hash': { | ||
key: string; | ||
value: string; | ||
}; | ||
} | ||
declare class IndexedDbPreviousHashStore implements PreviousHashStore { | ||
static readonly CurrentSchemaVersion = 1; | ||
private readonly db; | ||
constructor(); | ||
get dbName(): "xyo"; | ||
get storeName(): "previous-hash"; | ||
getItem(address: Address): Promise<Hash | null>; | ||
removeItem(address: Address): Promise<void>; | ||
setItem(address: Address, previousHash: string): Promise<void>; | ||
} | ||
export { IndexedDbPreviousHashStore, type PreviousHashStoreSchemaV1 }; | ||
export * from './IndexedDbPreviousHashStore.ts'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@xyo-network/previous-hash-store-indexeddb", | ||
"version": "3.0.7", | ||
"version": "3.0.8", | ||
"description": "Primary SDK for using XYO Protocol 2.0", | ||
@@ -32,4 +32,4 @@ "homepage": "https://xyo.network", | ||
"dependencies": { | ||
"@xylabs/hex": "^4.0.2", | ||
"@xyo-network/previous-hash-store-model": "^3.0.7", | ||
"@xylabs/hex": "^4.0.3", | ||
"@xyo-network/previous-hash-store-model": "^3.0.8", | ||
"idb": "^8.0.0" | ||
@@ -40,4 +40,4 @@ }, | ||
"@types/uuid": "10.0.0", | ||
"@xylabs/ts-scripts-yarn3": "^4.0.0", | ||
"@xylabs/tsconfig": "^4.0.0", | ||
"@xylabs/ts-scripts-yarn3": "^4.0.7", | ||
"@xylabs/tsconfig": "^4.0.7", | ||
"fake-indexeddb": "^6.0.0", | ||
@@ -44,0 +44,0 @@ "typescript": "^5.5.4", |
@@ -18,5 +18,7 @@ import type { Address, Hash } from '@xylabs/hex' | ||
constructor() { | ||
this.db = openDB<PreviousHashStoreSchemaV1>(this.dbName, IndexedDbPreviousHashStore.CurrentSchemaVersion, { | ||
upgrade: db => db.createObjectStore(this.storeName), | ||
}) | ||
this.db = openDB<PreviousHashStoreSchemaV1>( | ||
this.dbName, | ||
IndexedDbPreviousHashStore.CurrentSchemaVersion, | ||
{ upgrade: db => db.createObjectStore(this.storeName) }, | ||
) | ||
} | ||
@@ -23,0 +25,0 @@ |
import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3' | ||
const config: XyTsupConfig = { | ||
compile: { | ||
browser: { | ||
src: true, | ||
}, | ||
node: { | ||
src: true, | ||
}, | ||
browser: { src: true }, | ||
node: { src: true }, | ||
}, | ||
@@ -11,0 +7,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25496
25
230