SDK error surfaces
@cloak.ag/sdk exposes two main layers:
CloakError(runtime SDK operations)parseError/parseTransactionError(user-facing normalization)
CloakError
retryable === true as backoff-eligible.
Stale Merkle root (0x1001)
Use helpers for RootNotFound detection:
On-chain error message mapping
ShieldPoolErrors maps known custom program codes:
User-facing normalization
Practical retry strategy
- Retry network and service failures with exponential backoff.
- Avoid retrying deterministic validation failures.
- On stale-root errors, rebuild proof data before retrying.