Waldrop SDK · API Reference

WaldropClient

The top-level entry point. Composes four sub-domain APIs (blob, crypto, cost, subscription) under one client instance, sharing a single Sui gRPC connection and network config.

Constructor

new WaldropClient(options?: WaldropClientOptions)

All options are optional. Zero-config defaults to testnet with the public Walrus endpoints.

import { WaldropClient } from "@waldrop/sdk";

const client = new WaldropClient({ network: "testnet" });
// equivalent to:
const client = new WaldropClient();

Options

OptionTypeDefaultDescription
network"testnet""testnet"Network selector. Mainnet support lands when Waldrop deploys there.
suiGrpcUrlstringper-networkCustom Sui fullnode endpoint.
walrusAggregatorUrlstringper-networkWalrus aggregator base URL (read side).
walrusPublisherUrlstringper-networkWalrus publisher base URL (write side).
packageIdstringPACKAGE_ID constantOverride the Waldrop Move package id.
suiClientSuiGrpcClientconstructedReuse a pre-built @mysten/sui client (dapp-kit).
fetchTimeoutMsnumber30_000Default per-call timeout for aggregator fetches.

Sub-domains

client.blob UPLOAD · READ

Upload, download, list, fetch, and per-blob sharing.

client.crypto SEAL

SEAL threshold encrypt / decrypt. Lazy-loads @mysten/seal.

client.cost RPC

Live Walrus pricing forecast in FROST / WAL.

client.subscription RPC

Read-side checks for plan tier, expiry, and active status.

Properties

client.suiClient            // The underlying SuiGrpcClient
client.walrusAggregatorUrl  // Aggregator base URL
client.walrusPublisherUrl   // Publisher base URL
client.packageId            // Active Waldrop package id
client.blobStoreType        // Fully-qualified `…::storage::BlobStore` Move type
client.fetchTimeoutMs       // Default fetch timeout

Type guard

isWaldropClient(value) returns true when value is a WaldropClient instance, even across realm boundaries (multiple npm copies, iframes, web workers).

import { isWaldropClient } from "@waldrop/sdk";

function takesAnyClient(x: unknown) {
  if (isWaldropClient(x)) {
    return x.blob.list({ owner: "..." });
  }
}
Embedding in a dapp

When you already have a SuiGrpcClient from dapp-kit's useCurrentClient(), pass it via suiClient to share one network connection across the whole app instead of opening a second one.

Edit this page on GitHub ↗
Waldrop · 2026cryptokarigar