Skip to main content
This guide walks you through creating an account, funding your wallet, and uploading your first file to the Walrus network using the Tusky SDK.

Prerequisites

  • A Sui-compatible wallet (such as Sui Wallet or Suiet) installed as a browser extension
  • SUI and WAL tokens for storage funding
  • Node.js 18+ and npm (or yarn/pnpm)
1

Create your account

Go to app.tusky.io and connect your Sui wallet. Tusky will create your account and provision a dedicated managed wallet for publishing to the Walrus network.
Your connected Sui wallet is used for authentication and encryption key derivation. Tusky never has access to your private keys.
2

Fund your prepaid wallet

Navigate to Account → Wallet in the dashboard. Deposit SUI and WAL tokens to your Tusky prepaid wallet. These funds cover Walrus storage costs and gas fees.Storage costs are based on current Walrus network rates. Tusky passes through costs directly with no infrastructure fee.
You need both SUI (for gas fees) and WAL (for Walrus storage epochs). Check the dashboard for current rate estimates.
3

Generate an API key

Go to app.tusky.io/account/api-keys and create a new API key. Copy the key — you will only see it once.
export TUSKY_API_KEY="your-api-key-here"
Keep your API key secret. Never commit it to version control or expose it in client-side code.
4

Install the SDK

Install the Tusky TypeScript SDK in your project:
npm install @tusky-io/ts-sdk
5

Upload your first file

Create a new file (for example, upload.ts) and add the following code:
upload.ts
import Tusky from "@tusky-io/ts-sdk";

async function main() {
  // Initialize the SDK with your API key
  const tusky = new Tusky({ apiKey: process.env.TUSKY_API_KEY });

  // Create an environment to organize your files
  const environment = await tusky.environments.create({
    name: "My First Environment",
  });
  console.log("Environment created:", environment.id);

  // Upload a file to the environment
  const file = await tusky.files.upload(environment.id, {
    data: Buffer.from("Hello, Walrus! Stored with Tusky."),
    name: "hello.txt",
    mimeType: "text/plain",
  });
  console.log("File uploaded:", file.id);

  // Retrieve the file
  const downloaded = await tusky.files.download(file.id);
  console.log("Downloaded content:", downloaded.toString());
}

main().catch(console.error);
Run it:
npx tsx upload.ts
You should see your environment ID, file ID, and the downloaded content printed to the console. Your file is now stored on the Walrus decentralized network.

What Just Happened?

Behind the scenes, Tusky:
  1. Encrypted your file using keys derived from your connected wallet
  2. Encoded the data into Walrus blob format using your dedicated publisher
  3. Stored the blob across Walrus storage nodes for the configured number of epochs
  4. Indexed the file metadata in your environment for easy retrieval
The file is now persistently stored on the decentralized Walrus network. You can access it through the SDK, REST API, or your private aggregator.

Next Steps