Store Data on the Network

Use antd to store a small public payload on the Autonomi Network and read it back again so you can see how the daemon-backed SDK workflow handles writes.

Prerequisites

  • antd installed and running on http://localhost:8082 (see Start the Local Daemon)

  • A write-enabled daemon. On the default network, restart antd with wallet configuration before you continue. On a local devnet, ant dev start provisions the upload settings for you. See Prepare a Wallet for Uploads for the default-network setup.

  • Optional: the runtime or toolchain for the SDK examples you want to run, such as Python, Node.js, or Rust

If you would rather use shell commands or direct Rust instead, see Use the CLI and Build Directly in Rust. If your application should keep the signing key outside antd, start with Use External Signers for Upload Payments instead of this guide.

If you only need retrieval and do not need uploads yet, start with Retrieve Data from the Network.

Featured examples on this page use cURL, Python, Node.js / TypeScript, and Rust. Other SDK languages are available in the Language Bindings section.

Steps

1. Check the daemon is healthy

curl http://localhost:8082/health

Expected REST response:

{
  "status": "ok",
  "network": "default"
}

2. Store a public payload

Public uploads are still paid writes. If antd is running on the default network, make sure you restarted it with wallet configuration before you continue. If antd is running on a local devnet, ant dev start already provisioned the payment settings.

The REST API expects binary data as base64 inside JSON.

Expected REST response shape:

Save the returned address.

3. Retrieve the payload

Expected REST response shape:

The REST data field is base64-encoded. The Python, Node.js / TypeScript, and Rust SDKs decode it for you.

4. Verify the round-trip

What happened

antd accepted your payload, self-encrypted it into chunks, stored those chunks on the network, and returned the public address used to fetch it again. That address is content-addressed: if you uploaded different bytes, you would get a different address. The REST API represents binary payloads as base64 inside JSON, while the Python, Node.js / TypeScript, and Rust SDKs decode those values back into bytes for you.

Next steps

Last updated