Appearance
Errors
Web SDK (@vrand.io/web)
Every non-outcome is a typed VrandWebError with a code — never a silent default:
| Code | Meaning | What to do |
|---|---|---|
WalletNotFound | no injected wallet, none configured | install Phantom/Solflare or pass { wallet } |
WalletNotConnected | connection refused / no public key | user action |
TermsDeclined | the user closed the Terms without agreeing | nothing was signed |
TermsUnavailable | the chain has no published terms | wrong cluster or uninitialized network |
TermsOutOfDate | bundled terms ≠ on-chain hash | update the package — the SDK never acknowledges unseen text |
InsufficientBalance | wallet cannot cover fee + rent | details carries the exact numbers |
NoProver | no default prover for this cluster | pass { prover } |
RequestTimeout | no outcome within timeoutMs | retry for a fresh draw; reclaim() recovers this one's rent |
RequestSlashed | the prover missed its window and was slashed | with coverage: you were paid; either way, retry |
VerificationFailed | the served outcome failed local proof verification | never use the value — the record is not your request's genuine result |
SendFailed | the wallet or the chain rejected the transaction | message carries the cause |
BadInput | invalid helper arguments | fix the call |
Consumer-program helpers (vrand-cpi)
Custom error codes (ProgramError::Custom):
| Code | Constant | Meaning |
|---|---|---|
0x76524e01 | ERR_WRONG_PROVER | the prover account isn't the one you pinned |
0x76524e02 | ERR_WRONG_PROGRAM | the vrand_program slot isn't the VRAND program — without this check a caller could route your CPI (and the payer's signature) anywhere |
0x76524e03 | ERR_WRONG_OWNER | a read helper was handed an account VRAND doesn't own |
0x76524e04 | ERR_REQUEST_PENDING | fulfilled_beta on a request with no outcome yet |
0x76524e05 | ERR_REQUEST_SLASHED | fulfilled_beta on a request that will never have one — your comp_dest was compensated; take your backstop path |
Program errors (most relevant to consumers)
| Error | When |
|---|---|
TermsNotAccepted | the payer's acknowledgment is missing or stale — send acknowledge_terms first |
TermsHashMismatch | acknowledge_terms echoed a hash that isn't the current terms |
Paused | new requests are paused (resolution paths never are) |
ProverNotActive | the pinned prover is unbonding or revoked |
ProverKeyChangedThisSlot | the prover rotated its key in the request's slot — retry next slot |
AtRiskExceedsSingleCap | one request may reserve at most max_single_at_risk_bps of a bond |
InsufficientBond | the prover's free bond can't cover your at-risk amount |
RequestNotPending | fulfill/slash on an already-terminal request |
SameSlotFulfill | a proof may never land in the request's own slot |
InvalidProof / MalformedProof / BadVrfKey | the verifier rejected the submission |
RequestStillPending | close attempted before a terminal state |
Unauthorized / WrongAccount | signer/account constraints violated |