@mysten/walrus 0.7.3 → 0.7.4
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/CHANGELOG.md +10 -0
- package/dist/cjs/client.d.ts +28 -28
- package/dist/cjs/client.js +32 -32
- package/dist/cjs/client.js.map +3 -3
- package/dist/cjs/files/readers/quilt.js +1 -1
- package/dist/cjs/files/readers/quilt.js.map +2 -2
- package/dist/cjs/storage-node/client.js +2 -1
- package/dist/cjs/storage-node/client.js.map +2 -2
- package/dist/cjs/upload-relay/client.js +2 -1
- package/dist/cjs/upload-relay/client.js.map +2 -2
- package/dist/esm/client.d.ts +28 -28
- package/dist/esm/client.js +32 -32
- package/dist/esm/client.js.map +3 -3
- package/dist/esm/files/readers/quilt.js +1 -1
- package/dist/esm/files/readers/quilt.js.map +2 -2
- package/dist/esm/storage-node/client.js +2 -1
- package/dist/esm/storage-node/client.js.map +2 -2
- package/dist/esm/upload-relay/client.js +2 -1
- package/dist/esm/upload-relay/client.js.map +2 -2
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/dist/cjs/client.d.ts
CHANGED
|
@@ -225,7 +225,7 @@ export declare class WalrusClient {
|
|
|
225
225
|
/**
|
|
226
226
|
* A utility for creating a storage object in a transaction.
|
|
227
227
|
*
|
|
228
|
-
* @
|
|
228
|
+
* @example
|
|
229
229
|
* ```ts
|
|
230
230
|
* tx.transferObjects([client.createStorage({ size: 1000, epochs: 3 })], owner);
|
|
231
231
|
* ```
|
|
@@ -234,7 +234,7 @@ export declare class WalrusClient {
|
|
|
234
234
|
/**
|
|
235
235
|
* Create a transaction that creates a storage object
|
|
236
236
|
*
|
|
237
|
-
* @
|
|
237
|
+
* @example
|
|
238
238
|
* ```ts
|
|
239
239
|
* const tx = client.createStorageTransaction({ size: 1000, epochs: 3, owner: signer.toSuiAddress() });
|
|
240
240
|
* ```
|
|
@@ -247,7 +247,7 @@ export declare class WalrusClient {
|
|
|
247
247
|
/**
|
|
248
248
|
* Execute a transaction that creates a storage object
|
|
249
249
|
*
|
|
250
|
-
* @
|
|
250
|
+
* @example
|
|
251
251
|
* ```ts
|
|
252
252
|
* const { digest, storage } = await client.executeCreateStorageTransaction({ size: 1000, epochs: 3, signer });
|
|
253
253
|
* ```
|
|
@@ -269,7 +269,7 @@ export declare class WalrusClient {
|
|
|
269
269
|
/**
|
|
270
270
|
* Register a blob in a transaction
|
|
271
271
|
*
|
|
272
|
-
* @
|
|
272
|
+
* @example
|
|
273
273
|
* ```ts
|
|
274
274
|
* tx.transferObjects([client.registerBlob({ size: 1000, epochs: 3, blobId, rootHash, deletable: true })], owner);
|
|
275
275
|
* ```
|
|
@@ -291,7 +291,7 @@ export declare class WalrusClient {
|
|
|
291
291
|
/**
|
|
292
292
|
* Create a transaction that registers a blob
|
|
293
293
|
*
|
|
294
|
-
* @
|
|
294
|
+
* @example
|
|
295
295
|
* ```ts
|
|
296
296
|
* const tx = client.registerBlobTransaction({ size: 1000, epochs: 3, blobId, rootHash, deletable: true });
|
|
297
297
|
* ```
|
|
@@ -304,7 +304,7 @@ export declare class WalrusClient {
|
|
|
304
304
|
/**
|
|
305
305
|
* Execute a transaction that registers a blob
|
|
306
306
|
*
|
|
307
|
-
* @
|
|
307
|
+
* @example
|
|
308
308
|
* ```ts
|
|
309
309
|
* const { digest, blob } = await client.executeRegisterBlobTransaction({ size: 1000, epochs: 3, signer });
|
|
310
310
|
* ```
|
|
@@ -324,7 +324,7 @@ export declare class WalrusClient {
|
|
|
324
324
|
/**
|
|
325
325
|
* Certify a blob in a transaction
|
|
326
326
|
*
|
|
327
|
-
* @
|
|
327
|
+
* @example
|
|
328
328
|
* ```ts
|
|
329
329
|
* tx.add(client.certifyBlob({ blobId, blobObjectId, confirmations }));
|
|
330
330
|
* ```
|
|
@@ -333,7 +333,7 @@ export declare class WalrusClient {
|
|
|
333
333
|
/**
|
|
334
334
|
* Create a transaction that certifies a blob
|
|
335
335
|
*
|
|
336
|
-
* @
|
|
336
|
+
* @example
|
|
337
337
|
* ```ts
|
|
338
338
|
* const tx = client.certifyBlobTransaction({ blobId, blobObjectId, confirmations });
|
|
339
339
|
* ```
|
|
@@ -344,7 +344,7 @@ export declare class WalrusClient {
|
|
|
344
344
|
/**
|
|
345
345
|
* Execute a transaction that certifies a blob
|
|
346
346
|
*
|
|
347
|
-
* @
|
|
347
|
+
* @example
|
|
348
348
|
* ```ts
|
|
349
349
|
* const { digest } = await client.executeCertifyBlobTransaction({ blobId, blobObjectId, confirmations, signer });
|
|
350
350
|
* ```
|
|
@@ -358,7 +358,7 @@ export declare class WalrusClient {
|
|
|
358
358
|
/**
|
|
359
359
|
* Delete a blob in a transaction
|
|
360
360
|
*
|
|
361
|
-
* @
|
|
361
|
+
* @example
|
|
362
362
|
* ```ts
|
|
363
363
|
* const storage = await client.deleteBlob({ blobObjectId });
|
|
364
364
|
* tx.transferObjects([storage], owner);
|
|
@@ -368,7 +368,7 @@ export declare class WalrusClient {
|
|
|
368
368
|
/**
|
|
369
369
|
* Create a transaction that deletes a blob
|
|
370
370
|
*
|
|
371
|
-
* @
|
|
371
|
+
* @example
|
|
372
372
|
* ```ts
|
|
373
373
|
* const tx = client.deleteBlobTransaction({ blobObjectId, owner });
|
|
374
374
|
* ```
|
|
@@ -381,7 +381,7 @@ export declare class WalrusClient {
|
|
|
381
381
|
/**
|
|
382
382
|
* Execute a transaction that deletes a blob
|
|
383
383
|
*
|
|
384
|
-
* @
|
|
384
|
+
* @example
|
|
385
385
|
* ```ts
|
|
386
386
|
* const { digest } = await client.executeDeleteBlobTransaction({ blobObjectId, signer });
|
|
387
387
|
* ```
|
|
@@ -395,7 +395,7 @@ export declare class WalrusClient {
|
|
|
395
395
|
/**
|
|
396
396
|
* Extend a blob in a transaction
|
|
397
397
|
*
|
|
398
|
-
* @
|
|
398
|
+
* @example
|
|
399
399
|
* ```ts
|
|
400
400
|
* const tx = client.extendBlobTransaction({ blobObjectId, epochs });
|
|
401
401
|
* ```
|
|
@@ -404,7 +404,7 @@ export declare class WalrusClient {
|
|
|
404
404
|
/**
|
|
405
405
|
* Create a transaction that extends a blob
|
|
406
406
|
*
|
|
407
|
-
* @
|
|
407
|
+
* @example
|
|
408
408
|
* ```ts
|
|
409
409
|
* const tx = client.extendBlobTransaction({ blobObjectId, epochs });
|
|
410
410
|
* ```
|
|
@@ -415,7 +415,7 @@ export declare class WalrusClient {
|
|
|
415
415
|
/**
|
|
416
416
|
* Execute a transaction that extends a blob
|
|
417
417
|
*
|
|
418
|
-
* @
|
|
418
|
+
* @example
|
|
419
419
|
* ```ts
|
|
420
420
|
* const { digest } = await client.executeExtendBlobTransaction({ blobObjectId, signer });
|
|
421
421
|
* ```
|
|
@@ -435,7 +435,7 @@ export declare class WalrusClient {
|
|
|
435
435
|
* If attributes already exists, their previous values will be overwritten
|
|
436
436
|
* If an attribute is set to `null`, it will be removed from the blob
|
|
437
437
|
*
|
|
438
|
-
* @
|
|
438
|
+
* @example
|
|
439
439
|
* ```ts
|
|
440
440
|
* tx.add(client.writeBlobAttributes({ blobObjectId, attributes: { key: 'value', keyToRemove: null } }));
|
|
441
441
|
* ```
|
|
@@ -447,7 +447,7 @@ export declare class WalrusClient {
|
|
|
447
447
|
* If attributes already exists, their previous values will be overwritten
|
|
448
448
|
* If an attribute is set to `null`, it will be removed from the blob
|
|
449
449
|
*
|
|
450
|
-
* @
|
|
450
|
+
* @example
|
|
451
451
|
* ```ts
|
|
452
452
|
* const tx = client.writeBlobAttributesTransaction({ blobObjectId, attributes: { key: 'value', keyToRemove: null } });
|
|
453
453
|
* ```
|
|
@@ -461,7 +461,7 @@ export declare class WalrusClient {
|
|
|
461
461
|
* If attributes already exists, their previous values will be overwritten
|
|
462
462
|
* If an attribute is set to `null`, it will be removed from the blob
|
|
463
463
|
*
|
|
464
|
-
* @
|
|
464
|
+
* @example
|
|
465
465
|
* ```ts
|
|
466
466
|
* const { digest } = await client.executeWriteBlobAttributesTransaction({ blobObjectId, signer });
|
|
467
467
|
* ```
|
|
@@ -475,7 +475,7 @@ export declare class WalrusClient {
|
|
|
475
475
|
/**
|
|
476
476
|
* Write a sliver to a storage node
|
|
477
477
|
*
|
|
478
|
-
* @
|
|
478
|
+
* @example
|
|
479
479
|
* ```ts
|
|
480
480
|
* const res = await client.writeSliver({ blobId, sliverPairIndex, sliverType, sliver });
|
|
481
481
|
* ```
|
|
@@ -484,7 +484,7 @@ export declare class WalrusClient {
|
|
|
484
484
|
/**
|
|
485
485
|
* Write metadata to a storage node
|
|
486
486
|
*
|
|
487
|
-
* @
|
|
487
|
+
* @example
|
|
488
488
|
* ```ts
|
|
489
489
|
* const res = await client.writeMetadataToNode({ nodeIndex, blobId, metadata });
|
|
490
490
|
* ```
|
|
@@ -493,7 +493,7 @@ export declare class WalrusClient {
|
|
|
493
493
|
/**
|
|
494
494
|
* Get a storage confirmation from a storage node
|
|
495
495
|
*
|
|
496
|
-
* @
|
|
496
|
+
* @example
|
|
497
497
|
* ```ts
|
|
498
498
|
* const confirmation = await client.getStorageConfirmationFromNode({ nodeIndex, blobId, deletable, objectId });
|
|
499
499
|
* ```
|
|
@@ -502,7 +502,7 @@ export declare class WalrusClient {
|
|
|
502
502
|
/**
|
|
503
503
|
* Encode a blob into slivers for each node
|
|
504
504
|
*
|
|
505
|
-
* @
|
|
505
|
+
* @example
|
|
506
506
|
* ```ts
|
|
507
507
|
* const { blobId, metadata, sliversByNode, rootHash } = await client.encodeBlob(blob);
|
|
508
508
|
* ```
|
|
@@ -537,7 +537,7 @@ export declare class WalrusClient {
|
|
|
537
537
|
/**
|
|
538
538
|
* Write slivers to a storage node
|
|
539
539
|
*
|
|
540
|
-
* @
|
|
540
|
+
* @example
|
|
541
541
|
* ```ts
|
|
542
542
|
* await client.writeSliversToNode({ blobId, slivers, signal });
|
|
543
543
|
* ```
|
|
@@ -546,7 +546,7 @@ export declare class WalrusClient {
|
|
|
546
546
|
/**
|
|
547
547
|
* Write a blob to all storage nodes
|
|
548
548
|
*
|
|
549
|
-
* @
|
|
549
|
+
* @example
|
|
550
550
|
* ```ts
|
|
551
551
|
* await client.writeEncodedBlobToNodes({ blob, deletable, epochs, signer });
|
|
552
552
|
* ```
|
|
@@ -555,7 +555,7 @@ export declare class WalrusClient {
|
|
|
555
555
|
/**
|
|
556
556
|
* Writes a blob to to an upload relay
|
|
557
557
|
*
|
|
558
|
-
* @
|
|
558
|
+
* @example
|
|
559
559
|
* ```ts
|
|
560
560
|
* await client.writeBlobToUploadRelay({ blob, deletable, epochs, signer });
|
|
561
561
|
* ```
|
|
@@ -567,7 +567,7 @@ export declare class WalrusClient {
|
|
|
567
567
|
/**
|
|
568
568
|
* Write encoded blob to a storage node
|
|
569
569
|
*
|
|
570
|
-
* @
|
|
570
|
+
* @example
|
|
571
571
|
* ```ts
|
|
572
572
|
* const res = await client.writeEncodedBlobToNode({ nodeIndex, blobId, metadata, slivers });
|
|
573
573
|
* ```
|
|
@@ -576,7 +576,7 @@ export declare class WalrusClient {
|
|
|
576
576
|
/**
|
|
577
577
|
* Write a blob to all storage nodes
|
|
578
578
|
*
|
|
579
|
-
* @
|
|
579
|
+
* @example
|
|
580
580
|
* ```ts
|
|
581
581
|
* const { blobId, blobObject } = await client.writeBlob({ blob, deletable, epochs, signer });
|
|
582
582
|
* ```
|
|
@@ -655,7 +655,7 @@ export declare class WalrusClient {
|
|
|
655
655
|
/**
|
|
656
656
|
* Reset cached data in the client
|
|
657
657
|
*
|
|
658
|
-
* @
|
|
658
|
+
* @example
|
|
659
659
|
* ```ts
|
|
660
660
|
* client.reset();
|
|
661
661
|
* ```
|
package/dist/cjs/client.js
CHANGED
|
@@ -236,7 +236,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
236
236
|
try {
|
|
237
237
|
const attemptGetMetadata = metadataExecutors.shift();
|
|
238
238
|
return await attemptGetMetadata();
|
|
239
|
-
} catch
|
|
239
|
+
} catch {
|
|
240
240
|
const chunkSize = Math.floor(metadataExecutors.length / __privateGet(this, _blobMetadataConcurrencyLimit));
|
|
241
241
|
const chunkedExecutors = (0, import_utils3.chunk)(metadataExecutors, chunkSize);
|
|
242
242
|
return await new Promise((resolve, reject) => {
|
|
@@ -246,9 +246,9 @@ const _WalrusClient = class _WalrusClient {
|
|
|
246
246
|
const result = await executor();
|
|
247
247
|
controller.abort("Blob metadata successfully retrieved.");
|
|
248
248
|
resolve(result);
|
|
249
|
-
} catch (
|
|
250
|
-
if (
|
|
251
|
-
reject(
|
|
249
|
+
} catch (error) {
|
|
250
|
+
if (error instanceof import_error2.UserAbortError) {
|
|
251
|
+
reject(error);
|
|
252
252
|
return;
|
|
253
253
|
} else if ((0, import_utils2.isQuorum)(numBlockedWeight + numNotFoundWeight, numShards)) {
|
|
254
254
|
const abortError = numNotFoundWeight > numBlockedWeight ? new import_error.BlobNotCertifiedError(`The specified blob ${blobId} is not certified.`) : new import_error.BlobBlockedError(`The specified blob ${blobId} is blocked.`);
|
|
@@ -460,7 +460,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
460
460
|
/**
|
|
461
461
|
* A utility for creating a storage object in a transaction.
|
|
462
462
|
*
|
|
463
|
-
* @
|
|
463
|
+
* @example
|
|
464
464
|
* ```ts
|
|
465
465
|
* tx.transferObjects([client.createStorage({ size: 1000, epochs: 3 })], owner);
|
|
466
466
|
* ```
|
|
@@ -494,7 +494,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
494
494
|
/**
|
|
495
495
|
* Create a transaction that creates a storage object
|
|
496
496
|
*
|
|
497
|
-
* @
|
|
497
|
+
* @example
|
|
498
498
|
* ```ts
|
|
499
499
|
* const tx = client.createStorageTransaction({ size: 1000, epochs: 3, owner: signer.toSuiAddress() });
|
|
500
500
|
* ```
|
|
@@ -511,7 +511,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
511
511
|
/**
|
|
512
512
|
* Execute a transaction that creates a storage object
|
|
513
513
|
*
|
|
514
|
-
* @
|
|
514
|
+
* @example
|
|
515
515
|
* ```ts
|
|
516
516
|
* const { digest, storage } = await client.executeCreateStorageTransaction({ size: 1000, epochs: 3, signer });
|
|
517
517
|
* ```
|
|
@@ -546,7 +546,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
546
546
|
/**
|
|
547
547
|
* Register a blob in a transaction
|
|
548
548
|
*
|
|
549
|
-
* @
|
|
549
|
+
* @example
|
|
550
550
|
* ```ts
|
|
551
551
|
* tx.transferObjects([client.registerBlob({ size: 1000, epochs: 3, blobId, rootHash, deletable: true })], owner);
|
|
552
552
|
* ```
|
|
@@ -653,7 +653,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
653
653
|
/**
|
|
654
654
|
* Create a transaction that registers a blob
|
|
655
655
|
*
|
|
656
|
-
* @
|
|
656
|
+
* @example
|
|
657
657
|
* ```ts
|
|
658
658
|
* const tx = client.registerBlobTransaction({ size: 1000, epochs: 3, blobId, rootHash, deletable: true });
|
|
659
659
|
* ```
|
|
@@ -669,7 +669,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
669
669
|
/**
|
|
670
670
|
* Execute a transaction that registers a blob
|
|
671
671
|
*
|
|
672
|
-
* @
|
|
672
|
+
* @example
|
|
673
673
|
* ```ts
|
|
674
674
|
* const { digest, blob } = await client.executeRegisterBlobTransaction({ size: 1000, epochs: 3, signer });
|
|
675
675
|
* ```
|
|
@@ -753,7 +753,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
753
753
|
/**
|
|
754
754
|
* Certify a blob in a transaction
|
|
755
755
|
*
|
|
756
|
-
* @
|
|
756
|
+
* @example
|
|
757
757
|
* ```ts
|
|
758
758
|
* tx.add(client.certifyBlob({ blobId, blobObjectId, confirmations }));
|
|
759
759
|
* ```
|
|
@@ -788,7 +788,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
788
788
|
/**
|
|
789
789
|
* Create a transaction that certifies a blob
|
|
790
790
|
*
|
|
791
|
-
* @
|
|
791
|
+
* @example
|
|
792
792
|
* ```ts
|
|
793
793
|
* const tx = client.certifyBlobTransaction({ blobId, blobObjectId, confirmations });
|
|
794
794
|
* ```
|
|
@@ -803,7 +803,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
803
803
|
/**
|
|
804
804
|
* Execute a transaction that certifies a blob
|
|
805
805
|
*
|
|
806
|
-
* @
|
|
806
|
+
* @example
|
|
807
807
|
* ```ts
|
|
808
808
|
* const { digest } = await client.executeCertifyBlobTransaction({ blobId, blobObjectId, confirmations, signer });
|
|
809
809
|
* ```
|
|
@@ -819,7 +819,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
819
819
|
/**
|
|
820
820
|
* Delete a blob in a transaction
|
|
821
821
|
*
|
|
822
|
-
* @
|
|
822
|
+
* @example
|
|
823
823
|
* ```ts
|
|
824
824
|
* const storage = await client.deleteBlob({ blobObjectId });
|
|
825
825
|
* tx.transferObjects([storage], owner);
|
|
@@ -843,7 +843,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
843
843
|
/**
|
|
844
844
|
* Create a transaction that deletes a blob
|
|
845
845
|
*
|
|
846
|
-
* @
|
|
846
|
+
* @example
|
|
847
847
|
* ```ts
|
|
848
848
|
* const tx = client.deleteBlobTransaction({ blobObjectId, owner });
|
|
849
849
|
* ```
|
|
@@ -860,7 +860,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
860
860
|
/**
|
|
861
861
|
* Execute a transaction that deletes a blob
|
|
862
862
|
*
|
|
863
|
-
* @
|
|
863
|
+
* @example
|
|
864
864
|
* ```ts
|
|
865
865
|
* const { digest } = await client.executeDeleteBlobTransaction({ blobObjectId, signer });
|
|
866
866
|
* ```
|
|
@@ -880,7 +880,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
880
880
|
/**
|
|
881
881
|
* Extend a blob in a transaction
|
|
882
882
|
*
|
|
883
|
-
* @
|
|
883
|
+
* @example
|
|
884
884
|
* ```ts
|
|
885
885
|
* const tx = client.extendBlobTransaction({ blobObjectId, epochs });
|
|
886
886
|
* ```
|
|
@@ -914,7 +914,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
914
914
|
/**
|
|
915
915
|
* Create a transaction that extends a blob
|
|
916
916
|
*
|
|
917
|
-
* @
|
|
917
|
+
* @example
|
|
918
918
|
* ```ts
|
|
919
919
|
* const tx = client.extendBlobTransaction({ blobObjectId, epochs });
|
|
920
920
|
* ```
|
|
@@ -929,7 +929,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
929
929
|
/**
|
|
930
930
|
* Execute a transaction that extends a blob
|
|
931
931
|
*
|
|
932
|
-
* @
|
|
932
|
+
* @example
|
|
933
933
|
* ```ts
|
|
934
934
|
* const { digest } = await client.executeExtendBlobTransaction({ blobObjectId, signer });
|
|
935
935
|
* ```
|
|
@@ -962,7 +962,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
962
962
|
* If attributes already exists, their previous values will be overwritten
|
|
963
963
|
* If an attribute is set to `null`, it will be removed from the blob
|
|
964
964
|
*
|
|
965
|
-
* @
|
|
965
|
+
* @example
|
|
966
966
|
* ```ts
|
|
967
967
|
* tx.add(client.writeBlobAttributes({ blobObjectId, attributes: { key: 'value', keyToRemove: null } }));
|
|
968
968
|
* ```
|
|
@@ -986,7 +986,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
986
986
|
* If attributes already exists, their previous values will be overwritten
|
|
987
987
|
* If an attribute is set to `null`, it will be removed from the blob
|
|
988
988
|
*
|
|
989
|
-
* @
|
|
989
|
+
* @example
|
|
990
990
|
* ```ts
|
|
991
991
|
* const tx = client.writeBlobAttributesTransaction({ blobObjectId, attributes: { key: 'value', keyToRemove: null } });
|
|
992
992
|
* ```
|
|
@@ -1004,7 +1004,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1004
1004
|
* If attributes already exists, their previous values will be overwritten
|
|
1005
1005
|
* If an attribute is set to `null`, it will be removed from the blob
|
|
1006
1006
|
*
|
|
1007
|
-
* @
|
|
1007
|
+
* @example
|
|
1008
1008
|
* ```ts
|
|
1009
1009
|
* const { digest } = await client.executeWriteBlobAttributesTransaction({ blobObjectId, signer });
|
|
1010
1010
|
* ```
|
|
@@ -1019,7 +1019,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Write a sliver to a storage node
|
|
1021
1021
|
*
|
|
1022
|
-
* @
|
|
1022
|
+
* @example
|
|
1023
1023
|
* ```ts
|
|
1024
1024
|
* const res = await client.writeSliver({ blobId, sliverPairIndex, sliverType, sliver });
|
|
1025
1025
|
* ```
|
|
@@ -1037,7 +1037,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1037
1037
|
/**
|
|
1038
1038
|
* Write metadata to a storage node
|
|
1039
1039
|
*
|
|
1040
|
-
* @
|
|
1040
|
+
* @example
|
|
1041
1041
|
* ```ts
|
|
1042
1042
|
* const res = await client.writeMetadataToNode({ nodeIndex, blobId, metadata });
|
|
1043
1043
|
* ```
|
|
@@ -1060,7 +1060,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1060
1060
|
/**
|
|
1061
1061
|
* Get a storage confirmation from a storage node
|
|
1062
1062
|
*
|
|
1063
|
-
* @
|
|
1063
|
+
* @example
|
|
1064
1064
|
* ```ts
|
|
1065
1065
|
* const confirmation = await client.getStorageConfirmationFromNode({ nodeIndex, blobId, deletable, objectId });
|
|
1066
1066
|
* ```
|
|
@@ -1086,7 +1086,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1086
1086
|
/**
|
|
1087
1087
|
* Encode a blob into slivers for each node
|
|
1088
1088
|
*
|
|
1089
|
-
* @
|
|
1089
|
+
* @example
|
|
1090
1090
|
* ```ts
|
|
1091
1091
|
* const { blobId, metadata, sliversByNode, rootHash } = await client.encodeBlob(blob);
|
|
1092
1092
|
* ```
|
|
@@ -1128,7 +1128,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1128
1128
|
/**
|
|
1129
1129
|
* Write slivers to a storage node
|
|
1130
1130
|
*
|
|
1131
|
-
* @
|
|
1131
|
+
* @example
|
|
1132
1132
|
* ```ts
|
|
1133
1133
|
* await client.writeSliversToNode({ blobId, slivers, signal });
|
|
1134
1134
|
* ```
|
|
@@ -1162,7 +1162,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1162
1162
|
/**
|
|
1163
1163
|
* Write a blob to all storage nodes
|
|
1164
1164
|
*
|
|
1165
|
-
* @
|
|
1165
|
+
* @example
|
|
1166
1166
|
* ```ts
|
|
1167
1167
|
* await client.writeEncodedBlobToNodes({ blob, deletable, epochs, signer });
|
|
1168
1168
|
* ```
|
|
@@ -1205,7 +1205,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1205
1205
|
/**
|
|
1206
1206
|
* Writes a blob to to an upload relay
|
|
1207
1207
|
*
|
|
1208
|
-
* @
|
|
1208
|
+
* @example
|
|
1209
1209
|
* ```ts
|
|
1210
1210
|
* await client.writeBlobToUploadRelay({ blob, deletable, epochs, signer });
|
|
1211
1211
|
* ```
|
|
@@ -1222,7 +1222,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1222
1222
|
/**
|
|
1223
1223
|
* Write encoded blob to a storage node
|
|
1224
1224
|
*
|
|
1225
|
-
* @
|
|
1225
|
+
* @example
|
|
1226
1226
|
* ```ts
|
|
1227
1227
|
* const res = await client.writeEncodedBlobToNode({ nodeIndex, blobId, metadata, slivers });
|
|
1228
1228
|
* ```
|
|
@@ -1251,7 +1251,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1251
1251
|
/**
|
|
1252
1252
|
* Write a blob to all storage nodes
|
|
1253
1253
|
*
|
|
1254
|
-
* @
|
|
1254
|
+
* @example
|
|
1255
1255
|
* ```ts
|
|
1256
1256
|
* const { blobId, blobObject } = await client.writeBlob({ blob, deletable, epochs, signer });
|
|
1257
1257
|
* ```
|
|
@@ -1388,7 +1388,7 @@ const _WalrusClient = class _WalrusClient {
|
|
|
1388
1388
|
/**
|
|
1389
1389
|
* Reset cached data in the client
|
|
1390
1390
|
*
|
|
1391
|
-
* @
|
|
1391
|
+
* @example
|
|
1392
1392
|
* ```ts
|
|
1393
1393
|
* client.reset();
|
|
1394
1394
|
* ```
|