Install the SDK
The vault SDK is the isomorphic client for identity, scoped access, and events. The CLI handles keys, builds, and publishing.
npm i @cef-ai/vault-sdk npm i -g @cef-ai/cli
Your wallet is your identity
Generate a key pair. The wallet owns the vault; agents only ever hold permissions derived from it.
cef keypair generate # prints your public key · keep the seed safe
Claim a vault
Idempotent: one vault per wallet, bound to your public key on first contact with a conformant cluster.
import { VaultSDK, KeypairWallet } from "@cef-ai/vault-sdk" const sdk = new VaultSDK({ wallet: new KeypairWallet(seed) }) await sdk.vault.ensure() // claim the vault, bound to your key
Request a grant, publish an event
A grant is a signed agreement: which scopes, for how long. The consent registry (GAR) verifies every access against it.
await sdk.vault.scope("calendar").publish(event) // → accepted: signed by your wallet, verified against GAR
Inspect the receipt
Your operation now exists as a signed activity record: data scope, compute burned, result hash. Attested records are what settlement pays on.
// what the record looks like → see "See a receipt" on the protocol page