# Store a string for 1 storage epoch
curl -X PUT "https://walrus-mainnet-publisher.nami.cloud/${endpoint_key}/v1/blobs" \
  -d "some string"

# Store a file for 5 storage epochs
curl -X PUT "https://walrus-mainnet-publisher.nami.cloud/${endpoint_key}/v1/blobs?epochs=5" \
  --upload-file "some/file"

# Store a file and send the blob object to a specific address
curl -X PUT "https://walrus-mainnet-publisher.nami.cloud/${endpoint_key}/v1/blobs?send_object_to=${ADDRESS}" \
  --upload-file "some/file"

# Store a file as a deletable blob
curl -X PUT "https://walrus-mainnet-publisher.nami.cloud/${endpoint_key}/v1/blobs?deletable=true" \
  --upload-file "some/file"

The Walrus Publisher handles preparing data for storage, paying the storage fees, and managing the transaction with the Walrus network.

Store Blob

Adds a blob to the Walrus network. The blob data is sent in the request body. The Publisher will handle preparing the data for storage, paying the storage fees, and managing the transaction with the Walrus network.

Base URL

https://walrus-mainnet-publisher.nami.cloud/${endpoint_key}/

Where ${endpoint_key} is your specific endpoint key.

Query Parameters

epochs

Number of storage epochs to store the blob (default: 1)

send_object_to

Sui address to send the blob object to

deletable

Whether the blob should be stored as deletable (default: false)

Request Examples

# Store a string for 1 storage epoch
curl -X PUT "https://walrus-mainnet-publisher.nami.cloud/${endpoint_key}/v1/blobs" \
  -d "some string"

# Store a file for 5 storage epochs
curl -X PUT "https://walrus-mainnet-publisher.nami.cloud/${endpoint_key}/v1/blobs?epochs=5" \
  --upload-file "some/file"

# Store a file and send the blob object to a specific address
curl -X PUT "https://walrus-mainnet-publisher.nami.cloud/${endpoint_key}/v1/blobs?send_object_to=${ADDRESS}" \
  --upload-file "some/file"

# Store a file as a deletable blob
curl -X PUT "https://walrus-mainnet-publisher.nami.cloud/${endpoint_key}/v1/blobs?deletable=true" \
  --upload-file "some/file"

Response - Newly Created Blob

When a blob is stored for the first time, a newlyCreated field contains information about the new blob:

{
  "newlyCreated": {
    "blobObject": {
      "id": "0xe91eee8c5b6f35b9a250cfc29e30f0d9e5463a21fd8d1ddb0fc22d44db4eac50",
      "registeredEpoch": 34,
      "blobId": "M4hsZGQ1oCktdzegB6HnI6Mi28S2nqOPHxK-W7_4BUk",
      "size": 17,
      "encodingType": "RS2",
      "certifiedEpoch": 34,
      "storage": {
        "id": "0x4748cd83217b5ce7aa77e7f1ad6fc5f7f694e26a157381b9391ac65c47815faf",
        "startEpoch": 34,
        "endEpoch": 35,
        "storageSize": 66034000
      },
      "deletable": false
    },
    "resourceOperation": {
      "registerFromScratch": {
        "encodedLength": 66034000,
        "epochsAhead": 1
      }
    },
    "cost": 132300
  }
}

Response - Already Certified Blob

When the publisher finds a certified blob with the same blob ID and a sufficient validity period, it returns an alreadyCertified JSON structure:

{
  "alreadyCertified": {
    "blobId": "M4hsZGQ1oCktdzegB6HnI6Mi28S2nqOPHxK-W7_4BUk",
    "event": {
      "txDigest": "4XQHFa9S324wTzYHF3vsBSwpUZuLpmwTHYMFv9nsttSs",
      "eventSeq": "0"
    },
    "endEpoch": 35
  }
}

The field event returns the Sui event ID that can be used to find the transaction that created the Sui Blob object on the Sui explorer or using a Sui SDK.