Allowance Voucher
Allowance vouchers (session keys) let a ciphertext owner delegate decrypt/compute access to an ephemeral key for a limited time, entirely off-chain.Vouchers are revocable by bumping the sharer’s session nonce.
Security model
A session voucher grants the holder access to all of the sharer’s encrypted handles, it is not scoped to a specific program or dApp. Coval checks:- The session key signed the decrypt/compute request
- The sharer signed the voucher (exact warning text, expiry, nonce, decrypter)
- The sharer has an on-chain allowance PDA for the handle
- Use the shortest expiry that makes sense (minutes rather than hours or days)
- Call
updateActiveVouchersSessionNonce()when the session ends - Never log, persist, or forward the signed voucher beyond the narrowest needed scope
Wallet signing prompt
The voucher message puts this warning first so wallets show it before opaque fields: Do not alter this text, Coval rejects vouchers with a different warning. Canonical signed message (UTF-8, newline-separated):Getting Started
Attested Decrypt with Voucher
Bob can decrypt any handle Alice is allowed on, using the session key (no Alice wallet popup per request):Attested Compute with Voucher
Attested Reveal with Voucher
Reveal is the samedecryptWithVoucher call, use result.plaintexts for UI display without building an on-chain verification transaction. See Attested Reveal.
Revoking a Voucher
Selective revoke (per-session-key) is not supported with the default verifier.
Re-issue new vouchers to keys that should keep access.
How it differs from EVM
For the EVM guide, see Allowance Voucher (EVM).
API Reference
grantSessionKeyAllowanceVoucher(options, decrypter, expiresAt)
Parameters:
options.address: sharer’s wallet public keyoptions.signMessage: sharer’s message signerdecrypter: session key public key (PublicKeyor base58)expiresAt:Dateor unix seconds
Promise<AllowanceVoucherWithSig>
decryptWithVoucher(handles, options)
Same return type as Attested Decrypt decrypt(), authenticated with a session key + voucher.
attestedComputeWithVoucher(args, options)
Same return type as Attested Compute attestedCompute().