SDK
Preview. Not yet released. The SDK is Phase 8 on the roadmap. The packages below are not published, and the commands on this page will not work today. This page documents the intended interface so teams can plan integrations. The supported way to use Untrace right now is the dashboard. To be notified when the beta opens, request early access.
The SDK is the developer surface for Untrace Cloud. It wraps the client-side pipeline, encryption, threshold key splitting, shard upload, wallet-signed retrieval, and local reconstruction, behind a stable API so an application never handles shards directly.
It is distinct from the operator CLI, which is for running nodes and networks rather than for building on them.
Planned packages
| Package | Purpose |
|---|---|
@untrace/core | Framework-agnostic client. Encryption, sharding, retrieval, reconstruction. |
@untrace/react | React hooks and components. |
@untrace/vue | Vue composables. |
@untrace/next | Next.js helpers, including server-side route handlers. |
Package names are provisional until first publish.
Intended installation
npm install @untrace/core
Intended usage
Initialize a client
Authentication uses a DID passkey wallet rather than an API key, so the signing authority stays on the user's device. See DID Passkey Wallet.
import { UntraceClient } from "@untrace/core"
const untrace = new UntraceClient({
network: "cloud",
// The wallet signs retrieval requests. It is never transmitted.
wallet: await connectPasskeyWallet(),
})
Create a vault
A vault is the container that holds sharded objects and carries the access policy. Threshold configuration is set at creation time and applies to everything stored in it.
const vault = await untrace.createVault({
name: "kyc-documents",
// Cloud Drive default. Any 2 of 4 shards reconstruct.
// Enterprise deployments set their own. See /docs/sharding.
threshold: { k: 2, n: 4 },
})
Store a file
Encryption and sharding happen in the browser. What leaves the device is a set of individually useless encrypted fragments.
const object = await untrace.put(vault.id, file, {
metadata: { type: "passport", subjectDid: user.did },
})
console.log(object.id)
Retrieve a file
Retrieval builds a nonce-scoped request, collects a wallet signature, fetches shards from nodes that each verify authorization independently, then reconstructs and decrypts locally.
const file = await untrace.get(vault.id, object.id)
Share access
Access is granted to a Decentralized Identifier, not to an email address or a link. Nodes check the on-chain access policy before releasing any shard.
await untrace.share(vault.id, {
did: "did:key:z6Mk...",
permissions: ["read"],
expiresAt: "2027-01-01T00:00:00Z",
})
await untrace.revoke(vault.id, { did: "did:key:z6Mk..." })
React bindings
import { useVault } from "@untrace/react"
function VaultView({ vaultId }: { vaultId: string }) {
const { objects, put, isLoading } = useVault(vaultId)
if (isLoading) return <p>Loading</p>
return (
<ul>
{objects.map((object) => (
<li key={object.id}>{object.metadata.name}</li>
))}
</ul>
)
}
Design constraints
These hold regardless of how the final API shakes out.
- Encryption is client-side and non-optional. There is no code path that uploads plaintext.
- Keys are never transmitted. The symmetric key is split locally and only shares leave the device.
- Every retrieval is signed. Nodes verify a nonce-scoped wallet signature against the access policy before releasing a shard, so a leaked object identifier is not sufficient to read anything.
- Reconstruction is local. Shards are assembled and decrypted on the client, not on a server.
One question remains open: whether the SDK exposes raw crypto primitives or only higher-level vault operations. The examples above assume the latter.
Next
- MCP Server for the agent-facing equivalent.
- Sharding Data Layer for what the client actually does.
- Security and Zero Knowledge (ZK) for the authorization model.