@enc-protocol/personal-cli — PersonalSdk
The Personal identity-anchor app: public posts, owner-only encrypted private documents, a KV profile, and a notice inbox for cross-enclave addressed messages (e.g. group invitations).
Extends AppSdk. Enclaves:
Personal, Group. Encrypted
data_type: private (identity-aead).
Install
npm config set @enc-protocol:registry https://npm-registry.ocrybit.workers.dev/
npm install @enc-protocol/personal-cliConstruct
import { PersonalSdk } from '@enc-protocol/personal-cli'
const sdk = new PersonalSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL, identity })
await sdk.init()Options are the standard AppSdk constructor.
Data types
| data_type | shape | encryption | routes to |
|---|---|---|---|
public | { draft: string } | — | Personal.public |
private | { draft: string } | identity-aead | Personal.private |
Methods
submitPublic(args)
await sdk.submitPublic({ draft: 'gm' }) // → Personal.publicWrites a public post to the owner's Personal enclave.
submitPrivate(args)
await sdk.submitPrivate({ draft: 'note to self' }) // → Personal.privateEncrypts args with identity-aead (owner-only, derived from the identity key — no key
exchange) before writing.
queryPublic() / queryPrivate()
Read the owner's public posts / private documents. Row fields: body, from, trailing.
queryProfiles()
Cross-enclave dataview read of Personal.Shared(profile) — the latest profile per identity.
queryNotices()
Cross-enclave dataview read of Group.notice — addressed notices (e.g. group invitations)
delivered to this identity's inbox.
Example
import { PersonalSdk } from '@enc-protocol/personal-cli'
const sdk = new PersonalSdk({ mode: 'cf', nodeUrl: process.env.NODE_URL, identity })
await sdk.init()
await sdk.submitPublic({ draft: 'gm' })
await sdk.submitPrivate({ draft: 'remember the milk' }) // encrypted (identity-aead)
const posts = await sdk.queryPublic() // public feed
const docs = await sdk.queryPrivate() // owner-only, decrypted
const me = await sdk.queryProfiles() // cross-enclave profile rowsSee also
- Enclave profiles: Personal, Group
- Confidentiality plugin: identity-aead
- App SDK pattern ·
cli-sdk-base