@enc-protocol/registry-cli — RegistrySdk
The discovery app: a public index of identities, enclaves, and nodes that lets clients resolve who/where without a central server.
Extends AppSdk. Enclave: Registry.
No encryption — the registry is a public index.
Install
npm config set @enc-protocol:registry https://npm-registry.ocrybit.workers.dev/
npm install @enc-protocol/registry-cliConstruct
import { RegistrySdk } from '@enc-protocol/registry-cli'
const sdk = new RegistrySdk({ mode: 'cf', nodeUrl: process.env.NODE_URL, identity })
await sdk.init()Options are the standard AppSdk constructor.
Read-only at the app level
RegistrySdk exposes no generated submit* methods — registration is written at the
enclave level through the Registry enclave's customs (reg_identity, reg_enclave,
reg_node), and read back through the registry's dataview snapshots. The dataview keeps one
UPSERT-keyed row per entity:
| view (data_type) | source event | keyed by |
|---|---|---|
reg_identities | reg_identity | id_pub |
reg_enclaves | reg_enclave | enclave_id |
reg_nodes | reg_node | seq_pub |
Read them with the generic AppSdk surface, or drop to the lower-level adapter:
const identities = await sdk.query('reg_identities')
const client = sdk.raw() // underlying AppClient for enclave-level accessFor typed lookups (resolve an enclave to its hosting node, list nodes/identities), the
RegistryClient in @enc-protocol/client is usually the better surface.
See also
- Enclave profile: Registry
RegistryClient— typed registry lookups- App SDK pattern ·
cli-sdk-base