@xyo-network/previous-hash-store-storage 4.0.3 → 4.1.0
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/build/neutral/StoragePreviousHashStore.d.ts +22 -0
- package/build/neutral/StoragePreviousHashStore.d.ts.map +1 -0
- package/build/neutral/index.d.ts +2 -0
- package/build/neutral/index.d.ts.map +1 -0
- package/build/node/StoragePreviousHashStore.d.ts +22 -0
- package/build/node/StoragePreviousHashStore.d.ts.map +1 -0
- package/build/node/index.d.ts +2 -0
- package/build/node/index.d.ts.map +1 -0
- package/dist/browser/index.d.ts +25 -0
- package/dist/neutral/index.d.ts +25 -0
- package/dist/node/index.d.ts +25 -0
- package/package.json +7 -7
- /package/{dist/types → build/browser}/StoragePreviousHashStore.d.ts +0 -0
- /package/{dist/types → build/browser}/StoragePreviousHashStore.d.ts.map +0 -0
- /package/{dist/types → build/browser}/index.d.ts +0 -0
- /package/{dist/types → build/browser}/index.d.ts.map +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Address, Hash } from '@xylabs/hex';
|
|
2
|
+
import type { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
|
|
3
|
+
export type Storage = 'local' | 'session' | 'page';
|
|
4
|
+
export type StoragePreviousHashOpts = {
|
|
5
|
+
namespace?: string;
|
|
6
|
+
type?: Storage;
|
|
7
|
+
};
|
|
8
|
+
export declare class StoragePreviousHashStore implements PreviousHashStore {
|
|
9
|
+
static readonly DefaultNamespace = "xyo-previous-hash-store";
|
|
10
|
+
static readonly DefaultStorageType: Storage;
|
|
11
|
+
private _namespace;
|
|
12
|
+
private _storage;
|
|
13
|
+
private _type;
|
|
14
|
+
constructor(opts?: StoragePreviousHashOpts);
|
|
15
|
+
get namespace(): string;
|
|
16
|
+
get type(): Storage;
|
|
17
|
+
private get storage();
|
|
18
|
+
getItem(address: Address): Promise<Hash | null>;
|
|
19
|
+
removeItem(address: Address): Promise<void>;
|
|
20
|
+
setItem(address: Address, previousHash: Hash): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=StoragePreviousHashStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoragePreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/StoragePreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAI/E,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,MAAM,CAAC,QAAQ,CAAC,gBAAgB,6BAA4B;IAC5D,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAU;IACrD,OAAO,CAAC,UAAU,CAA4C;IAC9D,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,KAAK,CAAuD;gBAExD,IAAI,CAAC,EAAE,uBAAuB;IAO1C,IAAI,SAAS,WAEZ;IAED,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,OAAO,KAAK,OAAO,GAIlB;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,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Address, Hash } from '@xylabs/hex';
|
|
2
|
+
import type { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
|
|
3
|
+
export type Storage = 'local' | 'session' | 'page';
|
|
4
|
+
export type StoragePreviousHashOpts = {
|
|
5
|
+
namespace?: string;
|
|
6
|
+
type?: Storage;
|
|
7
|
+
};
|
|
8
|
+
export declare class StoragePreviousHashStore implements PreviousHashStore {
|
|
9
|
+
static readonly DefaultNamespace = "xyo-previous-hash-store";
|
|
10
|
+
static readonly DefaultStorageType: Storage;
|
|
11
|
+
private _namespace;
|
|
12
|
+
private _storage;
|
|
13
|
+
private _type;
|
|
14
|
+
constructor(opts?: StoragePreviousHashOpts);
|
|
15
|
+
get namespace(): string;
|
|
16
|
+
get type(): Storage;
|
|
17
|
+
private get storage();
|
|
18
|
+
getItem(address: Address): Promise<Hash | null>;
|
|
19
|
+
removeItem(address: Address): Promise<void>;
|
|
20
|
+
setItem(address: Address, previousHash: Hash): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=StoragePreviousHashStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoragePreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/StoragePreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAI/E,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,MAAM,CAAC,QAAQ,CAAC,gBAAgB,6BAA4B;IAC5D,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAU;IACrD,OAAO,CAAC,UAAU,CAA4C;IAC9D,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,KAAK,CAAuD;gBAExD,IAAI,CAAC,EAAE,uBAAuB;IAO1C,IAAI,SAAS,WAEZ;IAED,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,OAAO,KAAK,OAAO,GAIlB;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,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Address, Hash } from '@xylabs/hex';
|
|
2
|
+
import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
|
|
3
|
+
|
|
4
|
+
type Storage = 'local' | 'session' | 'page';
|
|
5
|
+
type StoragePreviousHashOpts = {
|
|
6
|
+
namespace?: string;
|
|
7
|
+
type?: Storage;
|
|
8
|
+
};
|
|
9
|
+
declare class StoragePreviousHashStore implements PreviousHashStore {
|
|
10
|
+
static readonly DefaultNamespace = "xyo-previous-hash-store";
|
|
11
|
+
static readonly DefaultStorageType: Storage;
|
|
12
|
+
private _namespace;
|
|
13
|
+
private _storage;
|
|
14
|
+
private _type;
|
|
15
|
+
constructor(opts?: StoragePreviousHashOpts);
|
|
16
|
+
get namespace(): string;
|
|
17
|
+
get type(): Storage;
|
|
18
|
+
private get storage();
|
|
19
|
+
getItem(address: Address): Promise<Hash | null>;
|
|
20
|
+
removeItem(address: Address): Promise<void>;
|
|
21
|
+
setItem(address: Address, previousHash: Hash): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { StoragePreviousHashStore };
|
|
25
|
+
export type { Storage, StoragePreviousHashOpts };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Address, Hash } from '@xylabs/hex';
|
|
2
|
+
import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
|
|
3
|
+
|
|
4
|
+
type Storage = 'local' | 'session' | 'page';
|
|
5
|
+
type StoragePreviousHashOpts = {
|
|
6
|
+
namespace?: string;
|
|
7
|
+
type?: Storage;
|
|
8
|
+
};
|
|
9
|
+
declare class StoragePreviousHashStore implements PreviousHashStore {
|
|
10
|
+
static readonly DefaultNamespace = "xyo-previous-hash-store";
|
|
11
|
+
static readonly DefaultStorageType: Storage;
|
|
12
|
+
private _namespace;
|
|
13
|
+
private _storage;
|
|
14
|
+
private _type;
|
|
15
|
+
constructor(opts?: StoragePreviousHashOpts);
|
|
16
|
+
get namespace(): string;
|
|
17
|
+
get type(): Storage;
|
|
18
|
+
private get storage();
|
|
19
|
+
getItem(address: Address): Promise<Hash | null>;
|
|
20
|
+
removeItem(address: Address): Promise<void>;
|
|
21
|
+
setItem(address: Address, previousHash: Hash): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { StoragePreviousHashStore };
|
|
25
|
+
export type { Storage, StoragePreviousHashOpts };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Address, Hash } from '@xylabs/hex';
|
|
2
|
+
import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
|
|
3
|
+
|
|
4
|
+
type Storage = 'local' | 'session' | 'page';
|
|
5
|
+
type StoragePreviousHashOpts = {
|
|
6
|
+
namespace?: string;
|
|
7
|
+
type?: Storage;
|
|
8
|
+
};
|
|
9
|
+
declare class StoragePreviousHashStore implements PreviousHashStore {
|
|
10
|
+
static readonly DefaultNamespace = "xyo-previous-hash-store";
|
|
11
|
+
static readonly DefaultStorageType: Storage;
|
|
12
|
+
private _namespace;
|
|
13
|
+
private _storage;
|
|
14
|
+
private _type;
|
|
15
|
+
constructor(opts?: StoragePreviousHashOpts);
|
|
16
|
+
get namespace(): string;
|
|
17
|
+
get type(): Storage;
|
|
18
|
+
private get storage();
|
|
19
|
+
getItem(address: Address): Promise<Hash | null>;
|
|
20
|
+
removeItem(address: Address): Promise<void>;
|
|
21
|
+
setItem(address: Address, previousHash: Hash): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { StoragePreviousHashStore };
|
|
25
|
+
export type { Storage, StoragePreviousHashOpts };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/previous-hash-store-storage",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -21,23 +21,23 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/neutral/index.d.ts",
|
|
25
25
|
"default": "./dist/neutral/index.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
|
-
"types": "dist/
|
|
30
|
+
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/hex": "^4.13.
|
|
33
|
-
"@xyo-network/previous-hash-store-model": "^4.0
|
|
32
|
+
"@xylabs/hex": "^4.13.15",
|
|
33
|
+
"@xyo-network/previous-hash-store-model": "^4.1.0",
|
|
34
34
|
"store2": "^2.14.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^24.0.13",
|
|
38
38
|
"@types/uuid": "^10.0.0",
|
|
39
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
40
|
-
"@xylabs/tsconfig": "^
|
|
39
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
|
|
40
|
+
"@xylabs/tsconfig": "^7.0.0-rc.20",
|
|
41
41
|
"typescript": "^5.8.3",
|
|
42
42
|
"uuid": "^11.1.0",
|
|
43
43
|
"vitest": "^3.2.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|