@mysten/walrus 1.1.0 → 1.1.2

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/client.d.mts +4 -8
  3. package/dist/client.d.mts.map +1 -1
  4. package/dist/constants.d.mts.map +1 -1
  5. package/dist/contracts/utils/index.d.mts.map +1 -1
  6. package/dist/contracts/utils/index.mjs +2 -1
  7. package/dist/contracts/utils/index.mjs.map +1 -1
  8. package/dist/contracts/walrus/blob.d.mts.map +1 -1
  9. package/dist/contracts/walrus/blob.mjs.map +1 -1
  10. package/dist/contracts/walrus/committee.mjs.map +1 -1
  11. package/dist/contracts/walrus/metadata.mjs.map +1 -1
  12. package/dist/contracts/walrus/staking.mjs.map +1 -1
  13. package/dist/contracts/walrus/staking_pool.mjs +4 -0
  14. package/dist/contracts/walrus/staking_pool.mjs.map +1 -1
  15. package/dist/contracts/walrus/storage_accounting.mjs.map +1 -1
  16. package/dist/contracts/walrus/storage_node.d.mts.map +1 -1
  17. package/dist/contracts/walrus/storage_node.mjs.map +1 -1
  18. package/dist/contracts/walrus/system.mjs.map +1 -1
  19. package/dist/error.d.mts.map +1 -1
  20. package/dist/files/blob.d.mts.map +1 -1
  21. package/dist/files/file.d.mts.map +1 -1
  22. package/dist/files/readers/blob.d.mts.map +1 -1
  23. package/dist/files/readers/quilt-file.d.mts +0 -1
  24. package/dist/files/readers/quilt-file.d.mts.map +1 -1
  25. package/dist/files/readers/quilt.d.mts.map +1 -1
  26. package/dist/storage-node/client.d.mts.map +1 -1
  27. package/dist/storage-node/error.d.mts.map +1 -1
  28. package/dist/storage-node/types.d.mts.map +1 -1
  29. package/dist/storage-node/utils.d.mts.map +1 -1
  30. package/dist/types.d.mts +4 -9
  31. package/dist/types.d.mts.map +1 -1
  32. package/dist/upload-relay/client.d.mts.map +1 -1
  33. package/dist/utils/bcs.d.mts +0 -1
  34. package/dist/utils/bcs.d.mts.map +1 -1
  35. package/dist/utils/quilts.d.mts +0 -1
  36. package/dist/utils/quilts.d.mts.map +1 -1
  37. package/dist/utils/quilts.mjs +1 -1
  38. package/dist/utils/quilts.mjs.map +1 -1
  39. package/docs/index.md +130 -137
  40. package/docs/llms-index.md +1 -1
  41. package/package.json +9 -9
package/docs/index.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  > Store and retrieve blobs on Walrus decentralized storage
4
4
 
5
+ The Walrus TypeScript SDK works directly with Walrus storage nodes or with the Walrus upload relay.
6
+ When you use the Walrus SDK without an upload relay, reading and writing Walrus blobs requires many
7
+ requests (approximately 2200 to write a blob and approximately 335 to read a blob). The upload relay
8
+ reduces the number of requests needed to write a blob, but reads through the Walrus SDK still
9
+ require many requests. For many applications, using publishers and aggregators is recommended, but
10
+ the TypeScript SDK is useful when building applications where the application needs to directly
11
+ interact with Walrus, or when users need to pay for their own storage directly.
12
+
13
+ The Walrus SDK exposes high-level methods for reading and writing blobs, as well as lower-level
14
+ methods for the individual steps in the process. You can use the lower-level methods to implement
15
+ more complex flows when you want more control over optimization.
16
+
5
17
  ## Installation
6
18
 
7
19
  ```bash npm2yarn
@@ -10,8 +22,8 @@ npm install --save @mysten/walrus @mysten/sui
10
22
 
11
23
  ## Setup
12
24
 
13
- To use the walrus SDK you will need to create a Client from the typescript SDK, and extend it with
14
- the walrus SDK.
25
+ To use the Walrus SDK, you need to create a client from the TypeScript SDK and extend it with the
26
+ Walrus SDK.
15
27
 
16
28
  ```ts
17
29
  const client = new SuiGrpcClient({
@@ -20,9 +32,9 @@ const client = new SuiGrpcClient({
20
32
  }).$extend(walrus());
21
33
  ```
22
34
 
23
- The walrus SDK currently includes all the relevant package and object IDs needed for connecting to
24
- testnet. You can also manually configure the walrus sdk to use a different set of ids, allowing you
25
- to connect to a different network or updated deployment of the walrus contracts.
35
+ The Walrus SDK includes all the relevant package and object IDs needed for connecting to Testnet.
36
+ You can also manually configure the Walrus SDK to use a different set of IDs, allowing you to
37
+ connect to a different network or updated deployment of the Walrus contracts.
26
38
 
27
39
  ```ts
28
40
  const client = new SuiGrpcClient({
@@ -38,7 +50,7 @@ const client = new SuiGrpcClient({
38
50
  );
39
51
  ```
40
52
 
41
- For some environments you may need to customize how data is fetched:
53
+ Some environments require you to customize how data is fetched:
42
54
 
43
55
  ```ts
44
56
  const client = new SuiGrpcClient({
@@ -57,37 +69,22 @@ const client = new SuiGrpcClient({
57
69
  );
58
70
  ```
59
71
 
60
- This can be used to implement a fetch function with custom timeouts, rate limits, retry logic, or
61
- any other desired behavior.
62
-
63
- ## SDK Overview
64
-
65
- The Walrus TS SDK is designed to work directly with walrus storage nodes, or with the walrus upload
66
- relay. When using the walrus SDK without an upload relay, it is important to understand that reading
67
- and writing walrus blobs requires a lot of requests (~2200 to write a blob, ~335 to read a blob).
68
- The upload relay will reduce the number of requests needed to write a blob, but reads through the
69
- walrus SDK will still require a lot of requests. For many applications, using publishers and
70
- aggregators is recommended, but the TS SDK can be useful when building applications where the
71
- application needs to directly interact with walrus or users need to pay for their own storage
72
- directly.
73
-
74
- The walrus sdk exposes high level methods for reading and writing blobs, as well as lower level
75
- methods for the individual steps in the process that can be used to implement more complex flows
76
- when you want more control to implement more optimized implementations.
72
+ You can use this approach to implement a fetch function with custom timeouts, rate limits, retry
73
+ logic, or any other desired behavior.
77
74
 
78
- ## WalrusFiles
75
+ ## `WalrusFile` API
79
76
 
80
- The `WalrusFile` API provides a higher level abstraction so that applications don't need to worry
81
- about how data is stored in walrus. Today it handles data stored directly in blobs, and data stored
82
- in Quilts, but may be expanded to cover other storage patterns in the future.
77
+ The `WalrusFile` API provides a higher-level abstraction so that applications do not need to worry
78
+ about how data is stored in Walrus. It handles data stored directly in blobs and data stored in
79
+ quilts, but might expand to cover other storage patterns in the future.
83
80
 
84
81
  ### Reading files
85
82
 
86
- To read files, you can use the `getFiles` method. This method accepts both Blob IDs and Quilt IDs,
87
- and will return a `WalrusFile`.
83
+ To read files, use the `getFiles` method. This method accepts both blob IDs and quilt IDs, and
84
+ returns a `WalrusFile`.
88
85
 
89
- It is encouraged to always read files in batches when possible, which will allow the client to be
90
- more efficient when loading multiple files from the same quilt.
86
+ Read files in batches when possible, which allows the client to be more efficient when loading
87
+ multiple files from the same quilt.
91
88
 
92
89
  ```ts
93
90
  const [file1, file2] = await client.walrus.getFiles({ ids: [anyBlobId, orQuiltId] });
@@ -104,17 +101,16 @@ const text = await file1.text();
104
101
  const json = await file2.json();
105
102
  ```
106
103
 
107
- A `WalrusFile` may also have and `identifier` and `tags` properties if the file was stored in a
108
- quilt.
104
+ A `WalrusFile` might also have `identifier` and `tags` properties if the file was stored in a quilt.
109
105
 
110
106
  ```ts
111
107
  const identifier: string | null = await file1.getIdentifier();
112
108
  const tags: Record<string, string> = await file1.getTags();
113
109
  ```
114
110
 
115
- ### WalrusBlobs
111
+ #### `WalrusBlob`
116
112
 
117
- You can also get a `WalrusBlob` instead of a `WalrusFile` if you have the blobId:
113
+ You can also get a `WalrusBlob` instead of a `WalrusFile` if you have the `blobId`:
118
114
 
119
115
  ```ts
120
116
  const blob = await client.walrus.getBlob({ blobId });
@@ -135,8 +131,8 @@ const filesById = await blob.files({ ids: [quiltID] });
135
131
 
136
132
  ### Writing files
137
133
 
138
- You can also construct a `WalrusFile` from a `Uint8Array`, `Blob`, or a `string` which can then be
139
- stored on walrus:
134
+ You can also construct a `WalrusFile` from a `Uint8Array`, `Blob`, or a `string`, which you can then
135
+ store on Walrus:
140
136
 
141
137
  ```ts
142
138
  const file1 = WalrusFile.from({
@@ -156,15 +152,15 @@ const file3 = WalrusFile.from({
156
152
  });
157
153
  ```
158
154
 
159
- Once you have your files you can use the `writeFiles` method to write them to walrus.
155
+ After you have your files, use the `writeFiles` method to write them to Walrus.
160
156
 
161
- Along with the files, you will also need to provide a `Signer` instance that signs and pays for the
162
- transaction/storage fees. The signer's address will need to have sufficient `SUI` to cover the
163
- transactions that register the blob, and certify its availability after it's been uploaded. The
164
- Signer must own sufficient `WAL` to pay to store the blob for the specified number of epochs, as
165
- well as the write fee for writing the blob.
157
+ Along with the files, you also need to provide a `Signer` instance that signs and pays for the
158
+ transaction and storage fees. The signer's address needs sufficient SUI to cover the transactions
159
+ that register the blob and certify its availability after upload. The signer must own sufficient WAL
160
+ to pay to store the blob for the specified number of epochs, as well as the write fee for writing
161
+ the blob.
166
162
 
167
- The exact costs will depend on the size of the blobs, as well as the current gas and storage prices.
163
+ The exact costs depend on the size of the blobs, as well as the current gas and storage prices.
168
164
 
169
165
  ```ts
170
166
  const results: {
@@ -179,32 +175,32 @@ const results: {
179
175
  });
180
176
  ```
181
177
 
182
- Currently, the provided files will all be written into a single quilt. Future versions of the SDK
183
- may optimize how files are stored to be more efficient by splitting files into multiple quilts.
178
+ The provided files are all written into a single quilt. Future versions of the SDK might optimize
179
+ how files are stored to be more efficient by splitting files into multiple quilts.
184
180
 
185
181
  The current quilt encoding is less efficient for single files, so writing multiple files together is
186
182
  recommended when possible. Writing raw blobs directly is also possible using the `writeBlob` API
187
- (described below)
183
+ described below.
188
184
 
189
- ### Writing files in browser environments
185
+ #### Writing files in browser environments
190
186
 
191
- When the transactions to upload a blob are signed by a wallet in a browser, some wallets will use
192
- popups to prompt the user for a signature. If the popups are not opened in direct response to a user
193
- interaction, they may be blocked by the browser.
187
+ When the transactions to upload a blob are signed by a wallet in a browser, some wallets use popups
188
+ to prompt you for a signature. If the popups are not opened in direct response to a user
189
+ interaction, the browser might block them.
194
190
 
195
- To avoid this, we need to ensure that we execute the transactions that register and certify the blob
196
- in separate events handlers by creating separate buttons for the user to click for each step.
191
+ To avoid this, execute the transactions that register and certify the blob in separate event
192
+ handlers by creating separate buttons for each step.
197
193
 
198
194
  The `client.writeFilesFlow` method returns an object with a set of methods that break the write flow
199
195
  into several smaller steps:
200
196
 
201
- 1. `encode` - Encodes the files and generates a blobId
202
- 2. `register` - returns a transaction that will register the blob on-chain
203
- 3. `upload` - Uploads the data to storage nodes
204
- 4. `certify` - returns a transaction that will certify the blob on-chain
205
- 5. `listFiles` - returns a list of the created files
197
+ 1. `encode`: Encodes the files and generates a `blobId`.
198
+ 2. `register`: Returns a transaction that registers the blob onchain.
199
+ 3. `upload`: Uploads the data to storage nodes.
200
+ 4. `certify`: Returns a transaction that certifies the blob onchain.
201
+ 5. `listFiles`: Returns a list of the created files.
206
202
 
207
- Here's a simplified example showing the core API usage with separate user interactions:
203
+ The following simplified example shows the core API usage with separate user interactions:
208
204
 
209
205
  ```tsx
210
206
  // Step 1: Create and encode the flow (can be done immediately when file is selected)
@@ -260,9 +256,8 @@ interactions, allowing wallet popups to work properly without being blocked by t
260
256
 
261
257
  ### Running the full flow
262
258
 
263
- If you don't need separate user interactions for each step, you can use `run()` to execute the full
264
- pipeline as an async iterator. Each step yields a `WriteBlobStep` that you can persist for crash
265
- recovery:
259
+ If you do not need separate user interactions for each step, use `run()` to execute the full
260
+ pipeline as an async iterator.
266
261
 
267
262
  ```ts
268
263
  const flow = client.walrus.writeBlobFlow({ blob });
@@ -283,10 +278,11 @@ const up = await flow.upload({ digest: reg.txDigest });
283
278
  const cert = await flow.executeCertify({ signer });
284
279
  ```
285
280
 
286
- ### Resuming uploads
281
+ #### Resuming uploads
287
282
 
288
- To resume an upload after a crash, pass a saved `WriteBlobStep` as `resume`. The flow will skip
289
- completed steps, validate the blobId, and only upload slivers that aren't already stored:
283
+ Each step executed by `run()` produces a `WriteBlobStep` that you can persist for crash recovery. To
284
+ resume an upload after a crash, pass a saved `WriteBlobStep` as `resume`. The flow skips completed
285
+ steps, validates the `blobId`, and only uploads slivers that are not already stored:
290
286
 
291
287
  ```ts
292
288
  const saved = await db.load(fileId);
@@ -297,13 +293,12 @@ for await (const step of flow.run({ signer, epochs: 3, deletable: true })) {
297
293
  }
298
294
  ```
299
295
 
300
- ## Writing blobs with an upload relay
296
+ ## Using an upload relay
301
297
 
302
- Writing blobs directly from a client requires a lot of requests to write data to all the storage
303
- nodes. An upload relay can be used to offload the work of these writes to a server, reducing
304
- complexity for the client.
298
+ Writing blobs directly from a client requires many requests to write data to all the storage nodes.
299
+ An upload relay offloads the work of these writes to a server, reducing complexity for the client.
305
300
 
306
- To use an upload relay, you can add the `uploadRelay` option when adding the walrus extension:
301
+ To use an upload relay, add the `uploadRelay` option when adding the Walrus extension:
307
302
 
308
303
  ```ts
309
304
  const client = new SuiGrpcClient({
@@ -321,18 +316,18 @@ const client = new SuiGrpcClient({
321
316
  );
322
317
  ```
323
318
 
324
- The `host` option is required, and indicates the url for your upload relay. Upload relays may
325
- require a tip to be included to cover the cost of writing the blob. You can configure a maximum tip
326
- (paid in MIST) and the `WalrusClient` will automatically determine the required tip for your upload
327
- relay, or you can manually configure the tip configuration as shown below.
319
+ The `host` option is required and indicates the URL for your upload relay. Upload relays might
320
+ require a tip to cover the cost of writing the blob. You can configure a maximum tip (paid in MIST)
321
+ and the `WalrusClient` automatically determines the required tip for your upload relay. You can also
322
+ manually configure the tip as shown below.
328
323
 
329
- The tip required by an upload relay can be found using the `tip-config` endpoint: (e.g.
330
- `https://upload-relay.testnet.walrus.space/v1/tip-config`) and may either be a `const` or a `linear`
331
- tip.
324
+ Find the tip required by an upload relay using the `tip-config` endpoint (for example,
325
+ `https://upload-relay.testnet.walrus.space/v1/tip-config`). The tip is either a `const` or a
326
+ `linear` type.
332
327
 
333
328
  ### `const` tip
334
329
 
335
- A `const` will send a fixed amount for each blob written to the upload relay.
330
+ A `const` tip sends a fixed amount for each blob written to the upload relay.
336
331
 
337
332
  ```ts
338
333
  const client = new SuiGrpcClient({
@@ -355,8 +350,8 @@ const client = new SuiGrpcClient({
355
350
 
356
351
  ### `linear` tip
357
352
 
358
- A `linear` tip will send a fixed amount for each blob written to the fan out proxy, plus a
359
- multiplier based on the size of the blob.
353
+ A `linear` tip sends a fixed amount for each blob written to the upload relay, plus a multiplier
354
+ based on the size of the blob.
360
355
 
361
356
  ```ts
362
357
  const client = new SuiGrpcClient({
@@ -382,22 +377,22 @@ const client = new SuiGrpcClient({
382
377
 
383
378
  ## Interacting with blobs directly
384
379
 
385
- In case you do not want to use the `WalrusFile` abstractions, you can use the `readBlob` and
386
- `writeBlob` APIs directly
380
+ If you do not want to use the `WalrusFile` abstractions, use the `readBlob` and `writeBlob` APIs
381
+ directly.
387
382
 
388
383
  ### Reading blobs
389
384
 
390
- The `readBlob` method will read a blob given the blobId and return Uint8Array containing the blobs
385
+ The `readBlob` method reads a blob given the `blobId` and returns a `Uint8Array` containing the blob
391
386
  content:
392
387
 
393
388
  ```ts
394
389
  const blob = await client.walrus.readBlob({ blobId });
395
390
  ```
396
391
 
397
- ### Writing Blobs
392
+ ### Writing blobs
398
393
 
399
- The writeBlob method can be used to write a blob (as a `Uint8Array`) to walrus. You will need to
400
- specify how long the blob should be stored for, and if the blob should be deletable.
394
+ The `writeBlob` method writes a blob (as a `Uint8Array`) to Walrus. You need to specify how long the
395
+ blob should be stored for and whether the blob should be deletable.
401
396
 
402
397
  ```ts
403
398
  const file = new TextEncoder().encode('Hello from the TS SDK!!!\n');
@@ -423,26 +418,14 @@ const { blobId } = await client.walrus.writeBlob({
423
418
  });
424
419
  ```
425
420
 
426
- ## Full API
427
-
428
- For a complete overview of the available methods on the `WalrusClient` you can reference type
429
- [TypeDocs](/typedoc/classes/_mysten_walrus.WalrusClient.html)
430
-
431
- ## Examples
432
-
433
- There are a number of simple
434
- [examples you can reference](https://github.com/MystenLabs/ts-sdks/tree/main/packages/walrus/examples)
435
- in the `ts-sdks` repo that show things like building simple aggregators and publishers with the
436
- walrus SDK
437
-
438
421
  ## Error handling
439
422
 
440
423
  The SDK exports all the error classes for different types of errors that can be thrown. Walrus is a
441
- fault-tolerant distributed system, where many types of errors can be recovered from. During epoch
442
- changes there may be times when the data cached in the `WalrusClient` can become invalid. Errors
443
- that result from this situation will extend the `RetryableWalrusClientError` class.
424
+ fault-tolerant distributed system where many types of errors can be recovered from. During epoch
425
+ changes, the data cached in the `WalrusClient` can become invalid. Errors that result from this
426
+ situation extend the `RetryableWalrusClientError` class.
444
427
 
445
- You can check for these errors, and reset the client before retrying:
428
+ You can check for these errors and reset the client before retrying:
446
429
 
447
430
  ```ts
448
431
  if (error instanceof RetryableWalrusClientError) {
@@ -452,25 +435,25 @@ if (error instanceof RetryableWalrusClientError) {
452
435
  }
453
436
  ```
454
437
 
455
- `RetryableWalrusClientError` are not guaranteed to succeed after resetting the client and retrying,
456
- but this pattern can be used to handle some edge cases.
438
+ `RetryableWalrusClientError` errors are not guaranteed to succeed after resetting the client and
439
+ retrying, but this pattern handles some edge cases.
457
440
 
458
- High level methods like `readBlob` already handle various error cases and will automatically retry
459
- when hitting these methods, as well as handling cases where only a subset of nodes need to respond
441
+ High-level methods like `readBlob` already handle various error cases and automatically retry when
442
+ encountering these errors, as well as handling cases where only a subset of nodes need to respond
460
443
  successfully to read or publish a blob.
461
444
 
462
- When using the lower level methods to build your own read or publish flows, it is recommended to
463
- understand the number of shards/sliver that need to be successfully written or read for you
464
- operation to succeed, and gracefully handle cases where some nodes may be in a bad state.
445
+ When using the lower-level methods to build your own read or publish flows, understand the number of
446
+ shards and slivers that need to be successfully written or read for your operation to succeed.
447
+ Gracefully handle cases where some nodes might be in a bad state.
465
448
 
466
449
  ### Network errors
467
450
 
468
- Walrus is designed to handle some nodes being down, and the SDK will only throw errors when it can't
469
- read from or write to enough storage nodes. When trying to troubleshoot problems, it can be
470
- challenging to figure out what's going wrong when you don't see all the individual network errors.
451
+ Walrus handles some nodes being down, and the SDK only throws errors when it cannot read from or
452
+ write to enough storage nodes. When troubleshooting problems, figuring out what went wrong can be
453
+ challenging because you do not see all the individual network errors.
471
454
 
472
- You can pass an `onError` option in the storageNodeClientOptions to get the individual errors from
473
- failed requests:
455
+ Pass an `onError` option in the `storageNodeClientOptions` to get the individual errors from failed
456
+ requests:
474
457
 
475
458
  ```ts
476
459
  const client = new SuiGrpcClient({
@@ -487,16 +470,14 @@ const client = new SuiGrpcClient({
487
470
 
488
471
  ## Configuring network requests
489
472
 
490
- Reading and writing blobs directly from storage nodes requires a lot of requests. The walrus SDK
491
- will issue all requests needed to complete these operations, but does not handling all the
492
- complexities a robust aggregator or publisher might encounter.
473
+ Reading and writing blobs directly from storage nodes requires many requests. The Walrus SDK issues
474
+ all requests needed to complete these operations, but does not handle all the complexities a robust
475
+ aggregator or publisher might encounter.
493
476
 
494
- By default, all requests are issued using the global `fetch` for whatever runtime the SDK is running
495
- in.
477
+ By default, all requests use the global `fetch` for whatever runtime the SDK runs in.
496
478
 
497
- This will not impose any limitations on concurrency, and will be subject to default timeouts and
498
- behavior defined by your runtime. To customize how requests are made, you can provide a custom
499
- `fetch` method:
479
+ This does not impose any limitations on concurrency, and is subject to default timeouts and behavior
480
+ defined by your runtime. To customize how requests are made, provide a custom `fetch` method:
500
481
 
501
482
  ```ts
502
483
  const client = new SuiGrpcClient({
@@ -520,15 +501,15 @@ const client = new SuiGrpcClient({
520
501
  );
521
502
  ```
522
503
 
523
- ## Loading the wasm module in vite or client side apps
504
+ ## Loading the WASM module in Vite or client-side apps
524
505
 
525
- The walrus SDK requires wasm bindings to encode and decode blobs. When running in node or bun and
526
- some bundlers this will work without any additional configuration.
506
+ The Walrus SDK requires WASM bindings to encode and decode blobs. When running in Node.js or Bun,
507
+ and with some bundlers, this works without any additional configuration.
527
508
 
528
- In some cases you may need to manually specify where the SDK loads the wasm bindings from.
509
+ In some cases, you might need to manually specify where the SDK loads the WASM bindings from.
529
510
 
530
- In vite you can get the url for the wasm bindings by importing the wasm file with a `?url` suffix,
531
- and then passed into the walrus client:
511
+ In Vite, get the URL for the WASM bindings by importing the WASM file with a `?url` suffix, then
512
+ pass it into the Walrus client:
532
513
 
533
514
  ```ts
534
515
  const client = new SuiGrpcClient({
@@ -541,8 +522,8 @@ const client = new SuiGrpcClient({
541
522
  );
542
523
  ```
543
524
 
544
- If you are unable to get a url for the wasm file in your bundler or build system, you can self host
545
- the wasm bindings, or load them from a CDN:
525
+ If you are unable to get a URL for the WASM file in your bundler or build system, you can self-host
526
+ the WASM bindings or load them from a CDN:
546
527
 
547
528
  ```ts
548
529
  const client = new SuiGrpcClient({
@@ -555,8 +536,8 @@ const client = new SuiGrpcClient({
555
536
  );
556
537
  ```
557
538
 
558
- In next.js when using walrus in API routes, you may need to tell next.js to skip bundling for the
559
- walrus packages:
539
+ In Next.js, when using Walrus in API routes, you might need to tell Next.js to skip bundling for the
540
+ Walrus packages:
560
541
 
561
542
  ```ts
562
543
  // next.config.ts
@@ -565,9 +546,21 @@ const nextConfig: NextConfig = {
565
546
  };
566
547
  ```
567
548
 
568
- ## Known fetch limitations you might run into
549
+ ## Known fetch limitations
550
+
551
+ - Some nodes can be slow to respond. When running in Node.js, the default `connectTimeout` is 10
552
+ seconds and can cause request timeouts.
553
+ - In Bun, the `abort` signal stops requests from responding, but the requests still wait for
554
+ completion before their promises reject.
555
+
556
+ ## Full API
557
+
558
+ For a complete overview of the available methods on the `WalrusClient`, reference the
559
+ [TypeDocs](/typedoc/classes/_mysten_walrus.WalrusClient.html).
569
560
 
570
- - Some nodes can be slow to respond. When running in node, the default connectTimeout is 10 seconds
571
- and can cause request timeouts
572
- - In `bun` the `abort` signal will stop requests from responding, but they still wait for completion
573
- before their promises reject
561
+ ## Examples
562
+
563
+ There are a number of
564
+ [examples you can reference](https://github.com/MystenLabs/ts-sdks/tree/main/packages/walrus/examples)
565
+ in the `ts-sdks` repository that show things like building aggregators and publishers with the
566
+ Walrus SDK.
@@ -2,4 +2,4 @@
2
2
 
3
3
  > Publish and Read blobs directly from walrus storage nodes
4
4
 
5
- - [Walrus SDK](./index.md): Store and retrieve blobs on Walrus decentralized storage
5
+ - [Walrus SDK](..md): Store and retrieve blobs on Walrus decentralized storage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/walrus",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "private": false,
5
5
  "description": "Walrus SDK",
6
6
  "license": "Apache-2.0",
@@ -30,32 +30,32 @@
30
30
  },
31
31
  "homepage": "https://sdk.mystenlabs.com/walrus",
32
32
  "devDependencies": {
33
- "@hono/node-server": "^1.19.11",
33
+ "@hono/node-server": "^1.19.13",
34
34
  "@tanstack/react-query": "^5.90.16",
35
35
  "@types/node": "^25.0.8",
36
36
  "@types/react": "^19.2.8",
37
37
  "@types/react-dom": "^19.2.3",
38
38
  "@vitejs/plugin-react": "^5.1.2",
39
- "hono": "^4.12.8",
39
+ "hono": "^4.12.12",
40
40
  "react": "^19.2.3",
41
41
  "react-dom": "^19.2.3",
42
42
  "typescript": "^5.9.3",
43
43
  "undici": "^7.24.4",
44
- "vite": "^7.3.1",
44
+ "vite": "^8.0.5",
45
45
  "vitest": "^4.0.17",
46
- "@mysten/codegen": "^0.8.3",
46
+ "@mysten/codegen": "^0.9.0",
47
+ "@mysten/dapp-kit-core": "^1.3.0",
47
48
  "@mysten/dapp-kit-react": "^2.0.1",
48
- "@mysten/dapp-kit-core": "^1.2.0",
49
- "@mysten/sui": "^2.9.1"
49
+ "@mysten/sui": "^2.16.0"
50
50
  },
51
51
  "dependencies": {
52
52
  "dataloader": "^2.2.3",
53
- "@mysten/utils": "^0.3.1",
54
53
  "@mysten/bcs": "^2.0.3",
54
+ "@mysten/utils": "^0.3.1",
55
55
  "@mysten/walrus-wasm": "^0.2.0"
56
56
  },
57
57
  "peerDependencies": {
58
- "@mysten/sui": "^2.9.1"
58
+ "@mysten/sui": "^2.16.0"
59
59
  },
60
60
  "scripts": {
61
61
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",