Observer
TheObserver sub-client is always available, even without a walletClient. It provides read-only access to on-chain CDR and DKG state.
Methods
- getVault
- getAllocateFee
- getWriteFee
- getReadFee
- getGlobalPubKey
- getOperationalThreshold
- getParticipantCount
- getThreshold
- getMaxEncryptedDataSize
- getRegisteredValidators
- getValidatorAttestations
getVault
Fetch a vault’s on-chain data by UUID.| Method | Type |
|---|---|
getVault | (uuid: number) => Promise<Vault> |
uuid: The vault’s unique identifier (uint32)
Example
Vault
getAllocateFee
Returns the current fee (in wei) required to allocate a new vault.| Method | Type |
|---|---|
getAllocateFee | () => Promise<bigint> |
Example
getWriteFee
Returns the current fee (in wei) required to write data to a vault.| Method | Type |
|---|---|
getWriteFee | () => Promise<bigint> |
Example
getReadFee
Returns the current fee (in wei) required to submit a read request.| Method | Type |
|---|---|
getReadFee | () => Promise<bigint> |
Example
getGlobalPubKey
Returns the DKG global public key used for TDH2 encryption. This is an Ed25519 key (34 bytes: 2-byte curve prefix + 32-byte key).| Method | Type |
|---|---|
getGlobalPubKey | (fromBlock?: bigint) => Promise<Uint8Array> |
fromBlock(optional): Block number to search from for DKGFinalizedevents. Defaults to searching recent blocks.
Example
If
validationRpcUrls are configured on the client, this method cross-checks
the key across those RPCs and throws if they disagree.getOperationalThreshold
Returns the operational threshold as basis points (e.g.,667 = 66.7%).
| Method | Type |
|---|---|
getOperationalThreshold | () => Promise<bigint> |
Example
getParticipantCount
Returns the number of active DKG validators in the latest round.| Method | Type |
|---|---|
getParticipantCount | (fromBlock?: bigint) => Promise<number> |
fromBlock(optional): Block number to search from for DKGFinalizedevents.
Example
getThreshold
Returns the calculated absolute threshold:ceil(participants * operationalThreshold / 1000). This is the minimum number of partial decryptions needed.
| Method | Type |
|---|---|
getThreshold | (fromBlock?: bigint) => Promise<number> |
fromBlock(optional): Block number to search from for DKGFinalizedevents.
Example
getMaxEncryptedDataSize
Returns the maximum encrypted payload size supported by the on-chain vault path.| Method | Type |
|---|---|
getMaxEncryptedDataSize | () => Promise<number> |
Example
getRegisteredValidators
Returns the validator registrations for the latest DKG round.| Method | Type |
|---|---|
getRegisteredValidators | () => Promise<unknown[]> |
Example
On the current Aeneid release, this can return an empty list in
cosmos-abci mode after a round has finalized.getValidatorAttestations
Returns the SGX attestation documents associated with the active validators.| Method | Type |
|---|---|
getValidatorAttestations | () => Promise<unknown[]> |
Example

