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

