@mysten/walrus 0.0.19 → 0.0.21
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 +19 -0
- package/README.md +1 -1
- package/dist/cjs/client.d.ts +22 -21
- package/dist/cjs/client.js +175 -156
- package/dist/cjs/client.js.map +2 -2
- package/dist/esm/client.d.ts +22 -21
- package/dist/esm/client.js +175 -156
- package/dist/esm/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
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @mysten/walrus
|
|
2
2
|
|
|
3
|
+
## 0.0.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [7e1c525]
|
|
8
|
+
- @mysten/bcs@1.6.1
|
|
9
|
+
- @mysten/sui@1.29.1
|
|
10
|
+
|
|
11
|
+
## 0.0.20
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 90033a0: Add tx digest to error messages
|
|
16
|
+
- 7d66a32: Use async thunks to improve transaction construction
|
|
17
|
+
- Updated dependencies [7d66a32]
|
|
18
|
+
- Updated dependencies [eb91fba]
|
|
19
|
+
- Updated dependencies [19a8045]
|
|
20
|
+
- @mysten/sui@1.29.0
|
|
21
|
+
|
|
3
22
|
## 0.0.19
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -118,7 +118,7 @@ walrus SDK
|
|
|
118
118
|
|
|
119
119
|
The SDK exports all the error classes for different types of errors that can be thrown. Walrus is a
|
|
120
120
|
fault tolerant distributed system, where many types of errors can be recovered from. During epoch
|
|
121
|
-
changes there may be times when the data
|
|
121
|
+
changes there may be times when the data cached in the `WalrusClient` can become invalid. Errors
|
|
122
122
|
that result from this situation will extend the `RetryableWalrusClientError` class.
|
|
123
123
|
|
|
124
124
|
You can check for these errors, and reset the client before retrying:
|
package/dist/cjs/client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SuiClient } from '@mysten/sui/client';
|
|
2
2
|
import type { Signer } from '@mysten/sui/cryptography';
|
|
3
3
|
import type { ClientWithExtensions } from '@mysten/sui/experimental';
|
|
4
|
+
import type { TransactionResult } from '@mysten/sui/transactions';
|
|
4
5
|
import { Transaction } from '@mysten/sui/transactions';
|
|
5
6
|
import { Blob } from './contracts/blob.js';
|
|
6
7
|
import type { BlobStatus } from './storage-node/types.js';
|
|
@@ -192,21 +193,21 @@ export declare class WalrusClient {
|
|
|
192
193
|
*
|
|
193
194
|
* @usage
|
|
194
195
|
* ```ts
|
|
195
|
-
* tx.transferObjects([
|
|
196
|
+
* tx.transferObjects([client.createStorage({ size: 1000, epochs: 3 })], owner);
|
|
196
197
|
* ```
|
|
197
198
|
*/
|
|
198
|
-
createStorage({ size, epochs, walCoin, owner }: StorageWithSizeOptions):
|
|
199
|
+
createStorage({ size, epochs, walCoin, owner }: StorageWithSizeOptions): (tx: Transaction) => Promise<TransactionResult>;
|
|
199
200
|
/**
|
|
200
201
|
* Create a transaction that creates a storage object
|
|
201
202
|
*
|
|
202
203
|
* @usage
|
|
203
204
|
* ```ts
|
|
204
|
-
* const tx =
|
|
205
|
+
* const tx = client.createStorageTransaction({ size: 1000, epochs: 3, owner: signer.toSuiAddress() });
|
|
205
206
|
* ```
|
|
206
207
|
*/
|
|
207
208
|
createStorageTransaction({ transaction, size, epochs, owner, }: StorageWithSizeOptions & {
|
|
208
209
|
transaction?: Transaction;
|
|
209
|
-
}):
|
|
210
|
+
}): Transaction;
|
|
210
211
|
/**
|
|
211
212
|
* Execute a transaction that creates a storage object
|
|
212
213
|
*
|
|
@@ -234,21 +235,21 @@ export declare class WalrusClient {
|
|
|
234
235
|
*
|
|
235
236
|
* @usage
|
|
236
237
|
* ```ts
|
|
237
|
-
* tx.transferObjects([
|
|
238
|
+
* tx.transferObjects([client.registerBlob({ size: 1000, epochs: 3, blobId, rootHash, deletable: true })], owner);
|
|
238
239
|
* ```
|
|
239
240
|
*/
|
|
240
|
-
registerBlob({ size, epochs, blobId, rootHash, deletable, walCoin, owner, attributes, }: RegisterBlobOptions):
|
|
241
|
+
registerBlob({ size, epochs, blobId, rootHash, deletable, walCoin, owner, attributes, }: RegisterBlobOptions): (tx: Transaction) => Promise<TransactionResult>;
|
|
241
242
|
/**
|
|
242
243
|
* Create a transaction that registers a blob
|
|
243
244
|
*
|
|
244
245
|
* @usage
|
|
245
246
|
* ```ts
|
|
246
|
-
* const tx =
|
|
247
|
+
* const tx = client.registerBlobTransaction({ size: 1000, epochs: 3, blobId, rootHash, deletable: true });
|
|
247
248
|
* ```
|
|
248
249
|
*/
|
|
249
250
|
registerBlobTransaction({ transaction, ...options }: RegisterBlobOptions & {
|
|
250
251
|
transaction?: Transaction;
|
|
251
|
-
}):
|
|
252
|
+
}): Transaction;
|
|
252
253
|
/**
|
|
253
254
|
* Execute a transaction that registers a blob
|
|
254
255
|
*
|
|
@@ -269,21 +270,21 @@ export declare class WalrusClient {
|
|
|
269
270
|
*
|
|
270
271
|
* @usage
|
|
271
272
|
* ```ts
|
|
272
|
-
* tx.add(
|
|
273
|
+
* tx.add(client.certifyBlob({ blobId, blobObjectId, confirmations }));
|
|
273
274
|
* ```
|
|
274
275
|
*/
|
|
275
|
-
certifyBlob({ blobId, blobObjectId, confirmations, deletable }: CertifyBlobOptions):
|
|
276
|
+
certifyBlob({ blobId, blobObjectId, confirmations, deletable }: CertifyBlobOptions): (tx: Transaction) => Promise<void>;
|
|
276
277
|
/**
|
|
277
278
|
* Create a transaction that certifies a blob
|
|
278
279
|
*
|
|
279
280
|
* @usage
|
|
280
281
|
* ```ts
|
|
281
|
-
* const tx =
|
|
282
|
+
* const tx = client.certifyBlobTransaction({ blobId, blobObjectId, confirmations });
|
|
282
283
|
* ```
|
|
283
284
|
*/
|
|
284
285
|
certifyBlobTransaction({ transaction, blobId, blobObjectId, confirmations, deletable, }: CertifyBlobOptions & {
|
|
285
286
|
transaction?: Transaction;
|
|
286
|
-
}):
|
|
287
|
+
}): Transaction;
|
|
287
288
|
/**
|
|
288
289
|
* Execute a transaction that certifies a blob
|
|
289
290
|
*
|
|
@@ -307,19 +308,19 @@ export declare class WalrusClient {
|
|
|
307
308
|
* tx.transferObjects([storage], owner);
|
|
308
309
|
* ```
|
|
309
310
|
*/
|
|
310
|
-
deleteBlob({ blobObjectId }: DeleteBlobOptions):
|
|
311
|
+
deleteBlob({ blobObjectId }: DeleteBlobOptions): (tx: Transaction) => Promise<TransactionResult>;
|
|
311
312
|
/**
|
|
312
313
|
* Create a transaction that deletes a blob
|
|
313
314
|
*
|
|
314
315
|
* @usage
|
|
315
316
|
* ```ts
|
|
316
|
-
* const tx =
|
|
317
|
+
* const tx = client.deleteBlobTransaction({ blobObjectId, owner });
|
|
317
318
|
* ```
|
|
318
319
|
*/
|
|
319
320
|
deleteBlobTransaction({ owner, blobObjectId, transaction, }: DeleteBlobOptions & {
|
|
320
321
|
transaction?: Transaction;
|
|
321
322
|
owner: string;
|
|
322
|
-
}):
|
|
323
|
+
}): Transaction;
|
|
323
324
|
/**
|
|
324
325
|
* Execute a transaction that deletes a blob
|
|
325
326
|
*
|
|
@@ -339,16 +340,16 @@ export declare class WalrusClient {
|
|
|
339
340
|
*
|
|
340
341
|
* @usage
|
|
341
342
|
* ```ts
|
|
342
|
-
* const tx =
|
|
343
|
+
* const tx = client.extendBlobTransaction({ blobObjectId, epochs });
|
|
343
344
|
* ```
|
|
344
345
|
*/
|
|
345
|
-
extendBlob({ blobObjectId, epochs, endEpoch, walCoin, owner }: ExtendBlobOptions):
|
|
346
|
+
extendBlob({ blobObjectId, epochs, endEpoch, walCoin, owner }: ExtendBlobOptions): (tx: Transaction) => Promise<void>;
|
|
346
347
|
/**
|
|
347
348
|
* Create a transaction that extends a blob
|
|
348
349
|
*
|
|
349
350
|
* @usage
|
|
350
351
|
* ```ts
|
|
351
|
-
* const tx =
|
|
352
|
+
* const tx = client.extendBlobTransaction({ blobObjectId, epochs });
|
|
352
353
|
* ```
|
|
353
354
|
*/
|
|
354
355
|
extendBlobTransaction({ transaction, ...options }: ExtendBlobOptions & {
|
|
@@ -379,10 +380,10 @@ export declare class WalrusClient {
|
|
|
379
380
|
*
|
|
380
381
|
* @usage
|
|
381
382
|
* ```ts
|
|
382
|
-
* tx.add(
|
|
383
|
+
* tx.add(client.writeBlobAttributes({ blobObjectId, attributes: { key: 'value', keyToRemove: null } }));
|
|
383
384
|
* ```
|
|
384
385
|
*/
|
|
385
|
-
writeBlobAttributes({ blobObject, blobObjectId, attributes }: WriteBlobAttributesOptions):
|
|
386
|
+
writeBlobAttributes({ blobObject, blobObjectId, attributes }: WriteBlobAttributesOptions): (tx: Transaction) => Promise<void>;
|
|
386
387
|
/**
|
|
387
388
|
* Create a transaction that writes attributes to a blob
|
|
388
389
|
*
|
|
@@ -391,7 +392,7 @@ export declare class WalrusClient {
|
|
|
391
392
|
*
|
|
392
393
|
* @usage
|
|
393
394
|
* ```ts
|
|
394
|
-
* const tx =
|
|
395
|
+
* const tx = client.writeBlobAttributesTransaction({ blobObjectId, attributes: { key: 'value', keyToRemove: null } });
|
|
395
396
|
* ```
|
|
396
397
|
*/
|
|
397
398
|
writeBlobAttributesTransaction({ transaction, ...options }: WriteBlobAttributesOptions & {
|