@mysten/walrus 1.0.3 → 1.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/docs/index.md ADDED
@@ -0,0 +1,573 @@
1
+ # Walrus SDK
2
+
3
+ > Store and retrieve blobs on Walrus decentralized storage
4
+
5
+ ## Installation
6
+
7
+ ```bash npm2yarn
8
+ npm install --save @mysten/walrus @mysten/sui
9
+ ```
10
+
11
+ ## Setup
12
+
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.
15
+
16
+ ```ts
17
+ const client = new SuiGrpcClient({
18
+ network: 'testnet',
19
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
20
+ }).$extend(walrus());
21
+ ```
22
+
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.
26
+
27
+ ```ts
28
+ const client = new SuiGrpcClient({
29
+ network: 'testnet',
30
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
31
+ }).$extend(
32
+ walrus({
33
+ packageConfig: {
34
+ systemObjectId: '0x98ebc47370603fe81d9e15491b2f1443d619d1dab720d586e429ed233e1255c1',
35
+ stakingPoolId: '0x20266a17b4f1a216727f3eef5772f8d486a9e3b5e319af80a5b75809c035561d',
36
+ },
37
+ }),
38
+ );
39
+ ```
40
+
41
+ For some environments you may need to customize how data is fetched:
42
+
43
+ ```ts
44
+ const client = new SuiGrpcClient({
45
+ network: 'testnet',
46
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
47
+ }).$extend(
48
+ walrus({
49
+ storageNodeClientOptions: {
50
+ fetch: (url, options) => {
51
+ console.log('fetching', url);
52
+ return fetch(url, options);
53
+ },
54
+ timeout: 60_000,
55
+ },
56
+ }),
57
+ );
58
+ ```
59
+
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.
77
+
78
+ ## WalrusFiles
79
+
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.
83
+
84
+ ### Reading files
85
+
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`.
88
+
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.
91
+
92
+ ```ts
93
+ const [file1, file2] = await client.walrus.getFiles({ ids: [anyBlobId, orQuiltId] });
94
+ ```
95
+
96
+ A `WalrusFile` works like a `Response` object from the `fetch` API:
97
+
98
+ ```ts
99
+ // get contents as a Uint8Array
100
+ const bytes = await file1.bytes();
101
+ // Parse the contents as a `utf-8` string
102
+ const text = await file1.text();
103
+ // Parse the contents as JSON
104
+ const json = await file2.json();
105
+ ```
106
+
107
+ A `WalrusFile` may also have and `identifier` and `tags` properties if the file was stored in a
108
+ quilt.
109
+
110
+ ```ts
111
+ const identifier: string | null = await file1.getIdentifier();
112
+ const tags: Record<string, string> = await file1.getTags();
113
+ ```
114
+
115
+ ### WalrusBlobs
116
+
117
+ You can also get a `WalrusBlob` instead of a `WalrusFile` if you have the blobId:
118
+
119
+ ```ts
120
+ const blob = await client.walrus.getBlob({ blobId });
121
+ ```
122
+
123
+ If the blob is a quilt, you can read the files in the quilt:
124
+
125
+ ```ts
126
+ // Get all files:
127
+ const files = await blob.files();
128
+ // Get files by identifier
129
+ const [readme] = await blob.files({ identifiers: ['README.md'] });
130
+ // Get files by tag
131
+ const textFiles = await blob.files({ tags: [{ 'content-type': 'text/plain' }] });
132
+ // Get files by quilt id
133
+ const filesById = await blob.files({ ids: [quiltID] });
134
+ ```
135
+
136
+ ### Writing files
137
+
138
+ You can also construct a `WalrusFile` from a `Uint8Array`, `Blob`, or a `string` which can then be
139
+ stored on walrus:
140
+
141
+ ```ts
142
+ const file1 = WalrusFile.from({
143
+ contents: new Uint8Array([1, 2, 3]),
144
+ identifier: 'file1.bin',
145
+ });
146
+ const file2 = WalrusFile.from({
147
+ contents: new Blob([new Uint8Array([1, 2, 3])]),
148
+ identifier: 'file2.bin',
149
+ });
150
+ const file3 = WalrusFile.from({
151
+ contents: new TextEncoder().encode('Hello from the TS SDK!!!\n'),
152
+ identifier: 'README.md',
153
+ tags: {
154
+ 'content-type': 'text/plain',
155
+ },
156
+ });
157
+ ```
158
+
159
+ Once you have your files you can use the `writeFiles` method to write them to walrus.
160
+
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.
166
+
167
+ The exact costs will depend on the size of the blobs, as well as the current gas and storage prices.
168
+
169
+ ```ts
170
+ const results: {
171
+ id: string;
172
+ blobId: string;
173
+ blobObject: Blob.$inferType;
174
+ }[] = await client.walrus.writeFiles({
175
+ files: [file1, file2, file3],
176
+ epochs: 3,
177
+ deletable: true,
178
+ signer: keypair,
179
+ });
180
+ ```
181
+
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.
184
+
185
+ The current quilt encoding is less efficient for single files, so writing multiple files together is
186
+ recommended when possible. Writing raw blobs directly is also possible using the `writeBlob` API
187
+ (described below)
188
+
189
+ ### Writing files in browser environments
190
+
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.
194
+
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.
197
+
198
+ The `client.writeFilesFlow` method returns an object with a set of methods that break the write flow
199
+ into several smaller steps:
200
+
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
206
+
207
+ Here's a simplified example showing the core API usage with separate user interactions:
208
+
209
+ ```tsx
210
+ // Step 1: Create and encode the flow (can be done immediately when file is selected)
211
+ const flow = client.walrus.writeFilesFlow({
212
+ files: [
213
+ WalrusFile.from({
214
+ contents: new Uint8Array(fileData),
215
+ identifier: 'my-file.txt',
216
+ }),
217
+ ],
218
+ });
219
+
220
+ await flow.encode();
221
+
222
+ // Step 2: Register the blob (triggered by user clicking a register button after the encode step)
223
+ async function handleRegister() {
224
+ const registerTx = flow.register({
225
+ epochs: 3,
226
+ owner: currentAccount.address,
227
+ deletable: true,
228
+ });
229
+ const result = await signAndExecuteTransaction({ transaction: registerTx });
230
+
231
+ // Check transaction status
232
+ if (result.$kind === 'FailedTransaction') {
233
+ throw new Error(`Registration failed: ${result.FailedTransaction.status.error?.message}`);
234
+ }
235
+
236
+ // Step 3: Upload the data to storage nodes
237
+ // This can be done immediately after the register step, or as a separate step the user initiates
238
+ await flow.upload({ digest: result.Transaction.digest });
239
+ }
240
+
241
+ // Step 4: Certify the blob (triggered by user clicking a certify button after the blob is uploaded)
242
+ async function handleCertify() {
243
+ const certifyTx = flow.certify();
244
+
245
+ const result = await signAndExecuteTransaction({ transaction: certifyTx });
246
+
247
+ // Check transaction status
248
+ if (result.$kind === 'FailedTransaction') {
249
+ throw new Error(`Certification failed: ${result.FailedTransaction.status.error?.message}`);
250
+ }
251
+
252
+ // Step 5: Get the new files
253
+ const files = await flow.listFiles();
254
+ console.log('Uploaded files', files);
255
+ }
256
+ ```
257
+
258
+ This approach ensures that each transaction signing step is separated into different user
259
+ interactions, allowing wallet popups to work properly without being blocked by the browser.
260
+
261
+ ### Running the full flow
262
+
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:
266
+
267
+ ```ts
268
+ const flow = client.walrus.writeBlobFlow({ blob });
269
+
270
+ for await (const step of flow.run({ signer, epochs: 3, deletable: true })) {
271
+ await db.save(fileId, step); // persist for crash recovery
272
+ }
273
+ ```
274
+
275
+ The flow also provides `executeRegister` and `executeCertify` methods that handle signing and return
276
+ typed step results:
277
+
278
+ ```ts
279
+ const flow = client.walrus.writeBlobFlow({ blob });
280
+ const enc = await flow.encode();
281
+ const reg = await flow.executeRegister({ signer, epochs: 3, deletable: true, owner: address });
282
+ const up = await flow.upload({ digest: reg.txDigest });
283
+ const cert = await flow.executeCertify({ signer });
284
+ ```
285
+
286
+ ### Resuming uploads
287
+
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:
290
+
291
+ ```ts
292
+ const saved = await db.load(fileId);
293
+ const flow = client.walrus.writeBlobFlow({ blob, resume: saved });
294
+
295
+ for await (const step of flow.run({ signer, epochs: 3, deletable: true })) {
296
+ await db.save(fileId, step);
297
+ }
298
+ ```
299
+
300
+ ## Writing blobs with an upload relay
301
+
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.
305
+
306
+ To use an upload relay, you can add the `uploadRelay` option when adding the walrus extension:
307
+
308
+ ```ts
309
+ const client = new SuiGrpcClient({
310
+ network: 'testnet',
311
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
312
+ }).$extend(
313
+ walrus({
314
+ uploadRelay: {
315
+ host: 'https://upload-relay.testnet.walrus.space',
316
+ sendTip: {
317
+ max: 1_000,
318
+ },
319
+ },
320
+ }),
321
+ );
322
+ ```
323
+
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.
328
+
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.
332
+
333
+ ### `const` tip
334
+
335
+ A `const` will send a fixed amount for each blob written to the upload relay.
336
+
337
+ ```ts
338
+ const client = new SuiGrpcClient({
339
+ network: 'testnet',
340
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
341
+ }).$extend(
342
+ walrus({
343
+ uploadRelay: {
344
+ host: 'https://upload-relay.testnet.walrus.space',
345
+ sendTip: {
346
+ address: '0x123...',
347
+ kind: {
348
+ const: 105,
349
+ },
350
+ },
351
+ },
352
+ }),
353
+ );
354
+ ```
355
+
356
+ ### `linear` tip
357
+
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.
360
+
361
+ ```ts
362
+ const client = new SuiGrpcClient({
363
+ network: 'testnet',
364
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
365
+ }).$extend(
366
+ walrus({
367
+ uploadRelay: {
368
+ host: 'https://upload-relay.testnet.walrus.space',
369
+ sendTip: {
370
+ address: '0x123...',
371
+ kind: {
372
+ linear: {
373
+ base: 105,
374
+ perEncodedKib: 10,
375
+ },
376
+ },
377
+ },
378
+ },
379
+ }),
380
+ );
381
+ ```
382
+
383
+ ## Interacting with blobs directly
384
+
385
+ In case you do not want to use the `WalrusFile` abstractions, you can use the `readBlob` and
386
+ `writeBlob` APIs directly
387
+
388
+ ### Reading blobs
389
+
390
+ The `readBlob` method will read a blob given the blobId and return Uint8Array containing the blobs
391
+ content:
392
+
393
+ ```ts
394
+ const blob = await client.walrus.readBlob({ blobId });
395
+ ```
396
+
397
+ ### Writing Blobs
398
+
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.
401
+
402
+ ```ts
403
+ const file = new TextEncoder().encode('Hello from the TS SDK!!!\n');
404
+
405
+ const { blobId } = await client.walrus.writeBlob({
406
+ blob: file,
407
+ deletable: false,
408
+ epochs: 3,
409
+ signer: keypair,
410
+ });
411
+ ```
412
+
413
+ `writeBlob` and `writeFiles` also support `onStep` and `resume` for crash-recoverable uploads:
414
+
415
+ ```ts
416
+ const { blobId } = await client.walrus.writeBlob({
417
+ blob: file,
418
+ deletable: true,
419
+ epochs: 3,
420
+ signer: keypair,
421
+ onStep: (step) => db.save(fileId, step),
422
+ resume: await db.load(fileId), // pass a previously saved step to resume
423
+ });
424
+ ```
425
+
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
+ ## Error handling
439
+
440
+ 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.
444
+
445
+ You can check for these errors, and reset the client before retrying:
446
+
447
+ ```ts
448
+ if (error instanceof RetryableWalrusClientError) {
449
+ client.walrus.reset();
450
+
451
+ /* retry your operation */
452
+ }
453
+ ```
454
+
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.
457
+
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
460
+ successfully to read or publish a blob.
461
+
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.
465
+
466
+ ### Network errors
467
+
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.
471
+
472
+ You can pass an `onError` option in the storageNodeClientOptions to get the individual errors from
473
+ failed requests:
474
+
475
+ ```ts
476
+ const client = new SuiGrpcClient({
477
+ network: 'testnet',
478
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
479
+ }).$extend(
480
+ walrus({
481
+ storageNodeClientOptions: {
482
+ onError: (error) => console.log(error),
483
+ },
484
+ }),
485
+ );
486
+ ```
487
+
488
+ ## Configuring network requests
489
+
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.
493
+
494
+ By default, all requests are issued using the global `fetch` for whatever runtime the SDK is running
495
+ in.
496
+
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:
500
+
501
+ ```ts
502
+ const client = new SuiGrpcClient({
503
+ network: 'testnet',
504
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
505
+ }).$extend(
506
+ walrus({
507
+ storageNodeClientOptions: {
508
+ timeout: 60_000,
509
+ fetch: (url, init) => {
510
+ // Some casting may be required because undici types may not exactly match the @node/types types
511
+ return fetch(url as RequestInfo, {
512
+ ...(init as RequestInit),
513
+ dispatcher: new Agent({
514
+ connectTimeout: 60_000,
515
+ }),
516
+ }) as unknown as Promise<Response>;
517
+ },
518
+ },
519
+ }),
520
+ );
521
+ ```
522
+
523
+ ## Loading the wasm module in vite or client side apps
524
+
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.
527
+
528
+ In some cases you may need to manually specify where the SDK loads the wasm bindings from.
529
+
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:
532
+
533
+ ```ts
534
+ const client = new SuiGrpcClient({
535
+ network: 'testnet',
536
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
537
+ }).$extend(
538
+ walrus({
539
+ wasmUrl: walrusWasmUrl,
540
+ }),
541
+ );
542
+ ```
543
+
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:
546
+
547
+ ```ts
548
+ const client = new SuiGrpcClient({
549
+ network: 'testnet',
550
+ baseUrl: 'https://fullnode.testnet.sui.io:443',
551
+ }).$extend(
552
+ walrus({
553
+ wasmUrl: 'https://unpkg.com/@mysten/walrus-wasm@latest/web/walrus_wasm_bg.wasm',
554
+ }),
555
+ );
556
+ ```
557
+
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:
560
+
561
+ ```ts
562
+ // next.config.ts
563
+ const nextConfig: NextConfig = {
564
+ serverExternalPackages: ['@mysten/walrus', '@mysten/walrus-wasm'],
565
+ };
566
+ ```
567
+
568
+ ## Known fetch limitations you might run into
569
+
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
@@ -0,0 +1,5 @@
1
+ # Walrus
2
+
3
+ > Publish and Read blobs directly from walrus storage nodes
4
+
5
+ - [Walrus SDK](./index.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.0.3",
3
+ "version": "1.1.0",
4
4
  "private": false,
5
5
  "description": "Walrus SDK",
6
6
  "license": "Apache-2.0",
@@ -18,7 +18,8 @@
18
18
  "sideEffects": false,
19
19
  "files": [
20
20
  "CHANGELOG.md",
21
- "dist"
21
+ "dist",
22
+ "docs"
22
23
  ],
23
24
  "repository": {
24
25
  "type": "git",
@@ -29,36 +30,37 @@
29
30
  },
30
31
  "homepage": "https://sdk.mystenlabs.com/walrus",
31
32
  "devDependencies": {
32
- "@hono/node-server": "^1.19.8",
33
+ "@hono/node-server": "^1.19.11",
33
34
  "@tanstack/react-query": "^5.90.16",
34
35
  "@types/node": "^25.0.8",
35
36
  "@types/react": "^19.2.8",
36
37
  "@types/react-dom": "^19.2.3",
37
38
  "@vitejs/plugin-react": "^5.1.2",
38
- "hono": "^4.11.7",
39
+ "hono": "^4.12.8",
39
40
  "react": "^19.2.3",
40
41
  "react-dom": "^19.2.3",
41
42
  "typescript": "^5.9.3",
42
- "undici": "^7.18.2",
43
+ "undici": "^7.24.4",
43
44
  "vite": "^7.3.1",
44
45
  "vitest": "^4.0.17",
45
- "@mysten/codegen": "^0.8.2",
46
- "@mysten/dapp-kit-core": "^1.0.4",
47
- "@mysten/dapp-kit-react": "^1.0.2",
48
- "@mysten/sui": "^2.3.2"
46
+ "@mysten/codegen": "^0.8.3",
47
+ "@mysten/dapp-kit-react": "^2.0.1",
48
+ "@mysten/dapp-kit-core": "^1.2.0",
49
+ "@mysten/sui": "^2.9.1"
49
50
  },
50
51
  "dependencies": {
51
52
  "dataloader": "^2.2.3",
52
- "@mysten/bcs": "^2.0.2",
53
53
  "@mysten/utils": "^0.3.1",
54
+ "@mysten/bcs": "^2.0.3",
54
55
  "@mysten/walrus-wasm": "^0.2.0"
55
56
  },
56
57
  "peerDependencies": {
57
- "@mysten/sui": "^2.3.2"
58
+ "@mysten/sui": "^2.9.1"
58
59
  },
59
60
  "scripts": {
60
61
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",
61
62
  "build": "rm -rf dist && tsc --noEmit && tsdown",
63
+ "build:docs": "tsx ../docs/scripts/build-docs.ts",
62
64
  "test": "pnpm test:examples && NODE_OPTIONS='--expose-gc' vitest run",
63
65
  "test:examples": "tsc --project examples/tsconfig.json --noEmit",
64
66
  "codegen": "sui-ts-codegen generate && pnpm lint:fix",