Documentation
Storage adapters
Where encrypted artifacts live, and how integrity and availability are checked.
Adapters
| Adapter | Locator | Status |
|---|---|---|
IpfsStorageAdapter | ipfs://<cid> | Tested live: checkpoints pinned on Filebase and restored from its gateway (testnet); also against a mock Kubo API |
ArweaveStorageAdapter | ar://<id> | Tested against a mock gateway; a live test is planned. The upload signer is supplied by you |
LocalStorageAdapter | epoch-local://<digest> | Development only; marked developmentOnly |
import { ReplicatedStorage, IpfsStorageAdapter, ArweaveStorageAdapter } from "./sdk/src/index.ts";
const storage = new ReplicatedStorage([
new IpfsStorageAdapter({ // Kubo RPC, server-side only
apiUrl: "https://rpc.filebase.io", // e.g. Filebase; any Kubo-compatible pinning API
authorization: "Bearer " + IPFS_TOKEN,
gatewayUrl: "https://ipfs.filebase.io",
}),
new ArweaveStorageAdapter({ gatewayUrl: "https://arweave.net", uploader }),
], 2); // both copies must succeedA content ID alone does not make data private or permanent. Artifacts are encrypted before upload, and availability is checked, not assumed.
Write sequence
- Serialize the state; compute its hash and the context hash.
- Encrypt, bound to agent, chain, contract, workflow, execution and sequence.
- Upload; read the object back and check its digest.
- Build and upload the canonical manifest.
- Submit the commitment; wait for the configured confirmations; check the stored values.
- Retrieve independently and verify; only then is it a verified recovery point.
Reads
Every read is checked against its committed digest. A missing object is PAYLOAD_UNAVAILABLE; bytes that do not match are PAYLOAD_INTEGRITY_FAILED. The SDK never falls back to a different payload. Uploads retry with bounded exponential backoff.
Encryption
LocalAesGcmProvider uses AES-256-GCM with the binding as associated data, so an artifact cannot be decrypted under another agent, execution or checkpoint. An access policy decides which principals may decrypt (by default only the agent named in the binding). Lit Protocol is planned behind the same interface.