Quick Start
Get up and running with Untrace in minutes. This guide walks you through the core concepts and your first interaction with the Untrace privacy protocol.
Prerequisites
Before you begin, make sure you have:
- A compatible Web3 wallet (MetaMask, Phantom, or any EIP-1193 provider)
- Node.js v18+ installed
- Basic familiarity with blockchain concepts
Step 1 — Install the SDK
npm install @untrace/sdk
Or with yarn:
yarn add @untrace/sdk
Step 2 — Initialize a Client
import { UntraceClient } from "@untrace/sdk"
const client = new UntraceClient({
network: "testnet", // or "mainnet"
signer: yourWalletSigner,
})
await client.connect()
Step 3 — Store Data Privately
Untrace automatically handles sharding, encryption, and distribution across the decentralized node network. You never touch the raw fragments.
// Store a private document
const vaultId = await client.vault.store({
data: { name: "Alice", ssn: "123-45-6789" },
accessPolicy: {
owner: yourAddress,
zkGated: true,
},
})
console.log("Vault ID:", vaultId)
What happens under the hood:
- Your data is encrypted client-side
- Split into N fragments using Shamir's Secret Sharing
- Each fragment is distributed to independent nodes on the network
- A ZK commitment is anchored on-chain — no raw data ever touches the chain
Step 4 — Reconstruct Your Data
Only the verified owner can reconstruct data. Reconstruction requires a valid Zero-Knowledge Proof of identity.
// Reconstruct data — triggers ZK identity verification
const data = await client.vault.retrieve(vaultId)
console.log("Retrieved:", data)
The node network never sees your full data — it only validates your proof and returns the individual encrypted shards, which are reassembled locally.
Step 5 — Grant Access to Another Identity
await client.vault.grantAccess(vaultId, {
grantee: recipientAddress,
permissions: ["read"],
expiresAt: Date.now() + 7 * 24 * 60 * 60 * 1000, // 7 days
})
Access grants are enforced at the ZK proof layer — the grantee must produce a valid proof matching the policy before any shards are released.
Architecture at a Glance
[ Your Data ]
↓
[ Encrypted + Sharded (Shamir's Secret Sharing) ]
↓
[ Distributed across N independent nodes ]
↓
[ Reconstruction gated by ZK Proof + on-chain signature ]
↓
[ Owner retrieves data — no middlemen, not even the nodes ]
Next Steps
- ZK Data Vaults — Deep dive into vault architecture
- Shamir Secret Sharing — How data fragments are generated and secured
- Web3 Access Control — Fine-grained permissions and ZK-gated policies
- Whitepaper — Full technical specification