walrus-sdk-js
Installation
SKILL.md
Walrus TypeScript SDK
Use this skill for JavaScript and TypeScript projects that interact with Walrus through @mysten/walrus.
Primary source: Mysten Labs Walrus SDK docs at https://sdk.mystenlabs.com/walrus.
Current Defaults
- Install
@mysten/walruswith@mysten/sui. - Use the current Sui client extension pattern: create a Sui client, then call
$extend(walrus()). - The Mysten SDK packages are ESM-only. Ensure
package.jsonhas"type": "module"and TypeScript usesmoduleResolutioncompatible with ESM, such asNodeNext,Node16, orBundler. - For new code, prefer
SuiGrpcClientunless the surrounding project already uses GraphQL or JSON-RPC. - The Walrus extension infers network from the Sui client. Do not pass
networktowalrus(). - The SDK includes the package/object IDs needed for Testnet. Configure IDs manually only when targeting another Walrus deployment or updated contracts.
Operational Fit
The Walrus TypeScript SDK can talk directly to Walrus storage nodes or use a Walrus upload relay. Direct storage-node reads and writes are request-heavy: the docs cite about 2200 requests to write a blob and about 335 requests to read a blob. The upload relay reduces write complexity, but SDK reads still require many requests.