NFT Metadata Storage

Store NFT images and metadata on Walrus Protocol via Tuskr for permanent, censorship-resistant content hosting.

Overview

NFTs require two types of permanent storage: the image/asset and the metadata JSON that describes it. Tuskr handles both through a single API, giving you stable URLs to embed in your Sui smart contracts.

1. Upload the Asset

const image = await tuskr.upload({
  file: imageBuffer,
  name: "nft-001.png",
  tag: "nft-image",
  epochs: 365,
})

console.log(image.url) // https://cdn.tuskr.dev/abc123

2. Upload the Metadata JSON

const metadata = {
  name: "Tuskr Genesis #001",
  description: "First NFT in the Tuskr Genesis collection",
  image: image.url,
  attributes: [
    { trait_type: "Rarity", value: "Legendary" },
  ],
}

const metaBlob = await tuskr.upload({
  file: Buffer.from(JSON.stringify(metadata)),
  name: "nft-001-metadata.json",
  tag: "nft-metadata",
  epochs: 365,
})

console.log(metaBlob.url) // embed in your Sui NFT

See Also