> ## Documentation Index
> Fetch the complete documentation index at: https://docs.story.foundation/llms.txt
> Use this file to discover all available pages before exploring further.

# Runtime Configuration

> DKG backends, validation RPCs, system addresses, and Aeneid runtime notes for the CDR SDK.

<Note>
  This page covers the release-specific and operational details that sit beyond
  basic setup. Start with [Setup CDR Client](/developers/cdr-sdk/setup) first.
</Note>

## DKG Query Modes

The SDK supports two backends for reading DKG state:

| Mode          | What it does                                         | When to use it                             |
| ------------- | ---------------------------------------------------- | ------------------------------------------ |
| `evm-events`  | Scans DKG contract events via standard EVM RPC       | Default, works anywhere                    |
| `cosmos-abci` | Queries the `x/dkg` keeper via CometBFT `abci_query` | Faster when you have access to a Comet RPC |

```typescript theme={null}
const client = new CDRClient({
  network: "testnet",
  publicClient,
  walletClient,
  dkgSource: "cosmos-abci",
  cometRpcUrl: "http://your-node:26657",
});
```

<Note>
  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.
</Note>

### 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.

```typescript theme={null}
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:

| Contract | Address                                      |
| -------- | -------------------------------------------- |
| DKG      | `0xCcCcCC0000000000000000000000000000000004` |
| CDR      | `0xCcCcCC0000000000000000000000000000000005` |

The SDK already knows these addresses. For Story license-gated condition
contracts, see
[How the Story License Read Pattern Works](/developers/cdr-sdk/ip-asset-vaults#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()`.
