Skip to main content
This page covers the release-specific and operational details that sit beyond basic setup. Start with Setup CDR Client first.

DKG Query Modes

The SDK supports two backends for reading DKG state:
ModeWhat it doesWhen to use it
evm-eventsScans DKG contract events via standard EVM RPCDefault, works anywhere
cosmos-abciQueries the x/dkg keeper via CometBFT abci_queryFaster when you have access to a Comet RPC
const client = new CDRClient({
  network: "testnet",
  publicClient,
  walletClient,
  dkgSource: "cosmos-abci",
  cometRpcUrl: "http://your-node:26657",
});
In cosmos-abci mode, the SDK does not re-verify partial decryption signatures locally. The x/dkg keeper verifies them before storage, so the trust model is equivalent to reading that state through RPC.

Choosing cosmos-abci

  • Use cosmos-abci when you control or trust a Comet RPC and want faster DKG reads than EVM event scanning.
  • Configure both dkgSource: "cosmos-abci" and cometRpcUrl.
  • When you call collectPartials() directly in this mode, pass the same requesterPubKey you used for the read request.
  • Signature validation happens before keeper storage rather than inside the SDK client, so your trust anchor is the Comet RPC’s view of x/dkg state.

Validation RPCs

If you want to defend against a single compromised RPC returning an incorrect DKG public key, configure additional validation RPCs. When set, observer.getGlobalPubKey() cross-checks them and throws if the nodes disagree.
const client = new CDRClient({
  network: "testnet",
  publicClient,
  walletClient,
  validationRpcUrls: [
    "https://your-rpc-provider-2.example.com",
    "https://your-rpc-provider-3.example.com",
  ],
});

Contract Addresses

The current Aeneid release uses the following core system addresses:
ContractAddress
DKG0xCcCcCC0000000000000000000000000000000004
CDR0xCcCcCC0000000000000000000000000000000005
The SDK already knows these addresses. For Story license-gated condition contracts, see How the Story License Read Pattern Works.

Release Posture and Availability

  • Aeneid is the current public testnet release for the SDK.
  • Confidentiality depends on the DKG threshold and validator / enclave trust assumptions described in the CDR overview.
  • Availability depends on enough validators responding before timeout. If reads fail to reach threshold, retry or increase timeoutMs.
  • validationRpcUrls hardens getGlobalPubKey() against a single bad EVM RPC. cosmos-abci similarly depends on your Comet RPC endpoint being correct.

Current Release Notes

  • The SDK is installable from source, not npm.
  • Story license-gated vaults still require manual condition encoding.
  • The CDR SDK does not auto-wrap IP to WIP or auto-approve WIP for license minting.
  • accessCDR() can auto-generate the ephemeral keypair and query threshold when those params are omitted.
  • createVault / readVault / createFileVault / readFileVault are available as high-level aliases.
  • getRegisteredValidators() can return an empty list in cosmos-abci mode for finalized rounds on the current Aeneid deployment.
  • timeoutMs: 120_000 is a good starting point for accessCDR() and downloadFile().