@xyo-network/previous-hash-store 5.3.24 → 5.3.26
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/README.md +465 -10
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -1,23 +1,478 @@
|
|
|
1
|
+
[![logo][]](https://xyo.network)
|
|
2
|
+
|
|
1
3
|
# @xyo-network/previous-hash-store
|
|
2
4
|
|
|
3
|
-
[![
|
|
5
|
+
[![npm][npm-badge]][npm-link]
|
|
6
|
+
[![license][license-badge]][license-link]
|
|
7
|
+
|
|
8
|
+
> Primary SDK for using XYO Protocol 2.0
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
Using npm:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npm install {{name}}
|
|
16
|
+
```
|
|
4
17
|
|
|
5
|
-
|
|
18
|
+
Using yarn:
|
|
6
19
|
|
|
7
|
-
|
|
20
|
+
```sh
|
|
21
|
+
yarn add {{name}}
|
|
22
|
+
```
|
|
8
23
|
|
|
9
|
-
|
|
24
|
+
Using pnpm:
|
|
10
25
|
|
|
11
|
-
|
|
26
|
+
```sh
|
|
27
|
+
pnpm add {{name}}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Using bun:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
bun add {{name}}
|
|
34
|
+
```
|
|
12
35
|
|
|
13
|
-
Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js)
|
|
14
36
|
|
|
15
37
|
## License
|
|
16
38
|
|
|
17
|
-
|
|
39
|
+
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
40
|
+
|
|
41
|
+
## Reference
|
|
42
|
+
|
|
43
|
+
### packages
|
|
44
|
+
|
|
45
|
+
### protocol
|
|
46
|
+
|
|
47
|
+
### packages
|
|
48
|
+
|
|
49
|
+
### crypto
|
|
50
|
+
|
|
51
|
+
### packages
|
|
52
|
+
|
|
53
|
+
### previous-hash-store
|
|
54
|
+
|
|
55
|
+
### .temp-typedoc
|
|
56
|
+
|
|
57
|
+
### classes
|
|
58
|
+
|
|
59
|
+
### <a id="IndexedDbPreviousHashStore"></a>IndexedDbPreviousHashStore
|
|
60
|
+
|
|
61
|
+
[**@xyo-network/previous-hash-store**](#../README)
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
## Implements
|
|
66
|
+
|
|
67
|
+
- [`PreviousHashStore`](#../interfaces/PreviousHashStore)
|
|
68
|
+
|
|
69
|
+
## Constructors
|
|
70
|
+
|
|
71
|
+
### Constructor
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
new IndexedDbPreviousHashStore(): IndexedDbPreviousHashStore;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Returns
|
|
78
|
+
|
|
79
|
+
`IndexedDbPreviousHashStore`
|
|
80
|
+
|
|
81
|
+
## Properties
|
|
82
|
+
|
|
83
|
+
### CurrentSchemaVersion
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
readonly static CurrentSchemaVersion: 1 = 1;
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Accessors
|
|
90
|
+
|
|
91
|
+
### dbName
|
|
92
|
+
|
|
93
|
+
### Get Signature
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
get dbName(): "xyo";
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The database name.
|
|
100
|
+
|
|
101
|
+
#### Returns
|
|
102
|
+
|
|
103
|
+
`"xyo"`
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
107
|
+
### storeName
|
|
108
|
+
|
|
109
|
+
### Get Signature
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
get storeName(): "previous-hash";
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The name of the object store.
|
|
116
|
+
|
|
117
|
+
#### Returns
|
|
118
|
+
|
|
119
|
+
`"previous-hash"`
|
|
120
|
+
|
|
121
|
+
## Methods
|
|
122
|
+
|
|
123
|
+
### getItem()
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
getItem(address): Promise<BrandedHash | null>;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Parameters
|
|
130
|
+
|
|
131
|
+
#### address
|
|
132
|
+
|
|
133
|
+
`BrandedAddress`
|
|
134
|
+
|
|
135
|
+
### Returns
|
|
136
|
+
|
|
137
|
+
`Promise`\<`BrandedHash` \| `null`\>
|
|
138
|
+
|
|
139
|
+
### Implementation of
|
|
140
|
+
|
|
141
|
+
[`PreviousHashStore`](#../interfaces/PreviousHashStore).[`getItem`](../interfaces/PreviousHashStore.md#getitem)
|
|
142
|
+
|
|
143
|
+
***
|
|
144
|
+
|
|
145
|
+
### removeItem()
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
removeItem(address): Promise<void>;
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Parameters
|
|
152
|
+
|
|
153
|
+
#### address
|
|
154
|
+
|
|
155
|
+
`BrandedAddress`
|
|
156
|
+
|
|
157
|
+
### Returns
|
|
158
|
+
|
|
159
|
+
`Promise`\<`void`\>
|
|
160
|
+
|
|
161
|
+
### Implementation of
|
|
162
|
+
|
|
163
|
+
[`PreviousHashStore`](#../interfaces/PreviousHashStore).[`removeItem`](../interfaces/PreviousHashStore.md#removeitem)
|
|
164
|
+
|
|
165
|
+
***
|
|
166
|
+
|
|
167
|
+
### setItem()
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
setItem(address, previousHash): Promise<void>;
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Parameters
|
|
174
|
+
|
|
175
|
+
#### address
|
|
176
|
+
|
|
177
|
+
`BrandedAddress`
|
|
178
|
+
|
|
179
|
+
#### previousHash
|
|
180
|
+
|
|
181
|
+
`string`
|
|
182
|
+
|
|
183
|
+
### Returns
|
|
184
|
+
|
|
185
|
+
`Promise`\<`void`\>
|
|
186
|
+
|
|
187
|
+
### Implementation of
|
|
188
|
+
|
|
189
|
+
[`PreviousHashStore`](#../interfaces/PreviousHashStore).[`setItem`](../interfaces/PreviousHashStore.md#setitem)
|
|
190
|
+
|
|
191
|
+
### <a id="StoragePreviousHashStore"></a>StoragePreviousHashStore
|
|
192
|
+
|
|
193
|
+
[**@xyo-network/previous-hash-store**](#../README)
|
|
194
|
+
|
|
195
|
+
***
|
|
196
|
+
|
|
197
|
+
## Implements
|
|
198
|
+
|
|
199
|
+
- [`PreviousHashStore`](#../interfaces/PreviousHashStore)
|
|
200
|
+
|
|
201
|
+
## Constructors
|
|
202
|
+
|
|
203
|
+
### Constructor
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
new StoragePreviousHashStore(opts?): StoragePreviousHashStore;
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Parameters
|
|
210
|
+
|
|
211
|
+
#### opts?
|
|
212
|
+
|
|
213
|
+
[`StoragePreviousHashOpts`](#../type-aliases/StoragePreviousHashOpts)
|
|
214
|
+
|
|
215
|
+
### Returns
|
|
216
|
+
|
|
217
|
+
`StoragePreviousHashStore`
|
|
218
|
+
|
|
219
|
+
## Properties
|
|
220
|
+
|
|
221
|
+
### DefaultNamespace
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
readonly static DefaultNamespace: "xyo-previous-hash-store" = "xyo-previous-hash-store";
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
***
|
|
228
|
+
|
|
229
|
+
### DefaultStorageType
|
|
230
|
+
|
|
231
|
+
```ts
|
|
232
|
+
readonly static DefaultStorageType: Storage;
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Accessors
|
|
236
|
+
|
|
237
|
+
### namespace
|
|
238
|
+
|
|
239
|
+
### Get Signature
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
get namespace(): string;
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
#### Returns
|
|
246
|
+
|
|
247
|
+
`string`
|
|
248
|
+
|
|
249
|
+
***
|
|
250
|
+
|
|
251
|
+
### type
|
|
252
|
+
|
|
253
|
+
### Get Signature
|
|
254
|
+
|
|
255
|
+
```ts
|
|
256
|
+
get type(): Storage;
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
#### Returns
|
|
260
|
+
|
|
261
|
+
[`Storage`](#../type-aliases/Storage)
|
|
262
|
+
|
|
263
|
+
## Methods
|
|
264
|
+
|
|
265
|
+
### getItem()
|
|
266
|
+
|
|
267
|
+
```ts
|
|
268
|
+
getItem(address): Promise<BrandedHash | null>;
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Parameters
|
|
272
|
+
|
|
273
|
+
#### address
|
|
274
|
+
|
|
275
|
+
`BrandedAddress`
|
|
276
|
+
|
|
277
|
+
### Returns
|
|
278
|
+
|
|
279
|
+
`Promise`\<`BrandedHash` \| `null`\>
|
|
280
|
+
|
|
281
|
+
### Implementation of
|
|
282
|
+
|
|
283
|
+
[`PreviousHashStore`](#../interfaces/PreviousHashStore).[`getItem`](../interfaces/PreviousHashStore.md#getitem)
|
|
284
|
+
|
|
285
|
+
***
|
|
286
|
+
|
|
287
|
+
### removeItem()
|
|
288
|
+
|
|
289
|
+
```ts
|
|
290
|
+
removeItem(address): Promise<void>;
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Parameters
|
|
294
|
+
|
|
295
|
+
#### address
|
|
296
|
+
|
|
297
|
+
`BrandedAddress`
|
|
298
|
+
|
|
299
|
+
### Returns
|
|
300
|
+
|
|
301
|
+
`Promise`\<`void`\>
|
|
302
|
+
|
|
303
|
+
### Implementation of
|
|
304
|
+
|
|
305
|
+
[`PreviousHashStore`](#../interfaces/PreviousHashStore).[`removeItem`](../interfaces/PreviousHashStore.md#removeitem)
|
|
306
|
+
|
|
307
|
+
***
|
|
308
|
+
|
|
309
|
+
### setItem()
|
|
310
|
+
|
|
311
|
+
```ts
|
|
312
|
+
setItem(address, previousHash): Promise<void>;
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Parameters
|
|
316
|
+
|
|
317
|
+
#### address
|
|
318
|
+
|
|
319
|
+
`BrandedAddress`
|
|
320
|
+
|
|
321
|
+
#### previousHash
|
|
322
|
+
|
|
323
|
+
`BrandedHash`
|
|
324
|
+
|
|
325
|
+
### Returns
|
|
326
|
+
|
|
327
|
+
`Promise`\<`void`\>
|
|
328
|
+
|
|
329
|
+
### Implementation of
|
|
330
|
+
|
|
331
|
+
[`PreviousHashStore`](#../interfaces/PreviousHashStore).[`setItem`](../interfaces/PreviousHashStore.md#setitem)
|
|
332
|
+
|
|
333
|
+
### interfaces
|
|
334
|
+
|
|
335
|
+
### <a id="PreviousHashStore"></a>PreviousHashStore
|
|
336
|
+
|
|
337
|
+
[**@xyo-network/previous-hash-store**](#../README)
|
|
338
|
+
|
|
339
|
+
***
|
|
340
|
+
|
|
341
|
+
## Methods
|
|
342
|
+
|
|
343
|
+
### getItem()
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
getItem(address): BrandedHash | Promise<BrandedHash | null> | null;
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### Parameters
|
|
350
|
+
|
|
351
|
+
#### address
|
|
352
|
+
|
|
353
|
+
`BrandedAddress`
|
|
354
|
+
|
|
355
|
+
### Returns
|
|
356
|
+
|
|
357
|
+
`BrandedHash` \| `Promise`\<`BrandedHash` \| `null`\> \| `null`
|
|
358
|
+
|
|
359
|
+
***
|
|
360
|
+
|
|
361
|
+
### removeItem()
|
|
362
|
+
|
|
363
|
+
```ts
|
|
364
|
+
removeItem(address): void | Promise<void>;
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Parameters
|
|
368
|
+
|
|
369
|
+
#### address
|
|
370
|
+
|
|
371
|
+
`BrandedAddress`
|
|
372
|
+
|
|
373
|
+
### Returns
|
|
374
|
+
|
|
375
|
+
`void` \| `Promise`\<`void`\>
|
|
376
|
+
|
|
377
|
+
***
|
|
378
|
+
|
|
379
|
+
### setItem()
|
|
380
|
+
|
|
381
|
+
```ts
|
|
382
|
+
setItem(address, previousHash): void | Promise<void>;
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Parameters
|
|
386
|
+
|
|
387
|
+
#### address
|
|
388
|
+
|
|
389
|
+
`BrandedAddress`
|
|
390
|
+
|
|
391
|
+
#### previousHash
|
|
392
|
+
|
|
393
|
+
`BrandedHash`
|
|
394
|
+
|
|
395
|
+
### Returns
|
|
396
|
+
|
|
397
|
+
`void` \| `Promise`\<`void`\>
|
|
398
|
+
|
|
399
|
+
### <a id="PreviousHashStoreSchemaV1"></a>PreviousHashStoreSchemaV1
|
|
400
|
+
|
|
401
|
+
[**@xyo-network/previous-hash-store**](#../README)
|
|
402
|
+
|
|
403
|
+
***
|
|
404
|
+
|
|
405
|
+
## Extends
|
|
406
|
+
|
|
407
|
+
- `DBSchema`
|
|
408
|
+
|
|
409
|
+
## Indexable
|
|
410
|
+
|
|
411
|
+
```ts
|
|
412
|
+
[s: string]: DBSchemaValue
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
## Properties
|
|
416
|
+
|
|
417
|
+
### previous-hash
|
|
418
|
+
|
|
419
|
+
```ts
|
|
420
|
+
previous-hash: object;
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### key
|
|
424
|
+
|
|
425
|
+
```ts
|
|
426
|
+
key: string;
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
### value
|
|
430
|
+
|
|
431
|
+
```ts
|
|
432
|
+
value: string;
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### type-aliases
|
|
436
|
+
|
|
437
|
+
### <a id="Storage"></a>Storage
|
|
438
|
+
|
|
439
|
+
[**@xyo-network/previous-hash-store**](#../README)
|
|
440
|
+
|
|
441
|
+
***
|
|
442
|
+
|
|
443
|
+
```ts
|
|
444
|
+
type Storage = "local" | "session" | "page";
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### <a id="StoragePreviousHashOpts"></a>StoragePreviousHashOpts
|
|
448
|
+
|
|
449
|
+
[**@xyo-network/previous-hash-store**](#../README)
|
|
450
|
+
|
|
451
|
+
***
|
|
452
|
+
|
|
453
|
+
```ts
|
|
454
|
+
type StoragePreviousHashOpts = object;
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
## Properties
|
|
458
|
+
|
|
459
|
+
### namespace?
|
|
460
|
+
|
|
461
|
+
```ts
|
|
462
|
+
optional namespace?: string;
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
***
|
|
466
|
+
|
|
467
|
+
### type?
|
|
18
468
|
|
|
19
|
-
|
|
469
|
+
```ts
|
|
470
|
+
optional type?: Storage;
|
|
471
|
+
```
|
|
20
472
|
|
|
21
|
-
[Made with 🔥 and ❄️ by XYO](https://xyo.network)
|
|
22
473
|
|
|
23
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
474
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
475
|
+
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/previous-hash-store.svg
|
|
476
|
+
[npm-link]: https://www.npmjs.com/package/@xyo-network/previous-hash-store
|
|
477
|
+
[license-badge]: https://img.shields.io/npm/l/@xyo-network/previous-hash-store.svg
|
|
478
|
+
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/previous-hash-store",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.26",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./dist/neutral/index.d.ts",
|
|
25
|
+
"import": "./dist/neutral/index.mjs",
|
|
25
26
|
"default": "./dist/neutral/index.mjs"
|
|
26
27
|
},
|
|
27
28
|
"./package.json": "./package.json"
|
|
28
29
|
},
|
|
29
|
-
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"README.md"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xyo-network/previous-hash-store-indexeddb": "~5.3.
|
|
40
|
-
"@xyo-network/previous-hash-store-model": "~5.3.
|
|
41
|
-
"@xyo-network/previous-hash-store-storage": "~5.3.
|
|
39
|
+
"@xyo-network/previous-hash-store-indexeddb": "~5.3.26",
|
|
40
|
+
"@xyo-network/previous-hash-store-model": "~5.3.26",
|
|
41
|
+
"@xyo-network/previous-hash-store-storage": "~5.3.26"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@opentelemetry/api": "^1.9.1",
|
|
45
|
-
"@types/node": "^25.5.
|
|
46
|
-
"@xylabs/sdk-js": "^5.0.
|
|
47
|
-
"@xylabs/ts-scripts-common": "~7.
|
|
48
|
-
"@xylabs/ts-scripts-pnpm": "~7.
|
|
49
|
-
"@xylabs/tsconfig": "~7.
|
|
45
|
+
"@types/node": "^25.5.2",
|
|
46
|
+
"@xylabs/sdk-js": "^5.0.94",
|
|
47
|
+
"@xylabs/ts-scripts-common": "~7.7.5",
|
|
48
|
+
"@xylabs/ts-scripts-pnpm": "~7.7.5",
|
|
49
|
+
"@xylabs/tsconfig": "~7.7.5",
|
|
50
50
|
"acorn": "^8.16.0",
|
|
51
51
|
"axios": "^1.14.0",
|
|
52
52
|
"esbuild": "^0.28.0",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"vite": "^8.0.3",
|
|
59
59
|
"vitest": "~4.1.2",
|
|
60
60
|
"zod": "^4.3.6",
|
|
61
|
-
"@xyo-network/previous-hash-store-
|
|
62
|
-
"@xyo-network/previous-hash-store-
|
|
63
|
-
"@xyo-network/previous-hash-store-storage": "~5.3.
|
|
61
|
+
"@xyo-network/previous-hash-store-indexeddb": "~5.3.26",
|
|
62
|
+
"@xyo-network/previous-hash-store-model": "~5.3.26",
|
|
63
|
+
"@xyo-network/previous-hash-store-storage": "~5.3.26"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@xylabs/sdk-js": "^5",
|