walrus-sdk-js

Implements Walrus TypeScript SDK conventions for blob storage reads, writes, and uploads.

2|Updated May 16, 2026
One-click install
npx skills add https://github.com/avbel/ai-skills --skill walrus-sdk-js-avbel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: walrus-sdk-js
Source: https://github.com/avbel/ai-skills/tree/main/skills/walrus-sdk-js
Command: npx skills add https://github.com/avbel/ai-skills --skill walrus-sdk-js-avbel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @mysten/walrus, @mysten/sui, and includes scripts (resource) components.

What problem does it solve? Developers integrating the @mysten/walrus TypeScript SDK often struggle with the client extension setup, request-heavy storage-node operations, browser wallet popup constraints, and migration from the removed WalrusClient API. This Skill provides the correct patterns and conventions for working with Walrus decentralized storage in JavaScript and TypeScript projects. ## Core Features & Use Cases - Client Setup & Migration: Configures the Sui client with the $extend(walrus()) extension pattern and migrates legacy WalrusClient code to the v2 API. - Reads & Writes: Covers WalrusFile and WalrusBlob reads, writeFiles/writeBlob uploads, storage epochs, and quilt batching. - Browser & Production Flows: Handles writeFilesFlow for user-gesture wallet signing, resumable uploads with onStep/resume, upload relay configuration, and custom fetch for timeouts and retries. - Use Case: When building a browser dApp that stores user files on Walrus, use this Skill to split the upload into user-triggered signing steps, persist progress for crash recovery, and avoid blocked wallet popups. ## Quick Start Ask the agent to set up a Walrus client on testnet using the SuiGrpcClient extension pattern and write a text file stored for three epochs.

Frequently Asked Questions about walrus-sdk-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up the Walrus TypeScript SDK client?▼

Create a Sui client such as SuiGrpcClient, then call .$extend(walrus()) to add Walrus functionality. Install @mysten/walrus with @mysten/sui, and do not pass a network option to walrus() since it is inferred from the Sui client.

How do I upload files to Walrus from a browser app?▼

Use client.walrus.writeFilesFlow to split the upload into explicit user-triggered steps, since browsers block wallet popups not tied to user gestures. Call flow.encode(), then flow.register(), sign the transaction, and continue with upload and certify steps.

Does @mysten/walrus work with Vite and browser environments?▼

Yes, but the SDK includes WASM paths, so verify the current docs for loading the WASM module in Vite. The packages are ESM-only, requiring "type": "module" in package.json and a compatible TypeScript moduleResolution like NodeNext or Bundler.

How do I resume an interrupted Walrus upload?▼

Pass an onStep callback to writeBlob or writeFiles and persist each step. On restart, pass the saved step as the resume option; the flow skips completed steps, validates the blob ID, and uploads only missing slivers.

When should I use an upload relay instead of direct storage nodes?▼

Direct storage-node writes require roughly 2200 requests per blob, so an upload relay reduces client-side write complexity. Configure it via walrus({ uploadRelay: { host, sendTip } }) and validate the relay host, tip policy, and trust model before production use.

How do I migrate from WalrusClient to the v2 SDK?▼

Replace new WalrusClient({ suiRpcUrl, network }) with a Sui client plus $extend(walrus()), and remove the network option from walrus(). WalrusClient.experimental_asClientExtension() was removed, and method calls move from walrusClient.* to client.walrus.*.