Skip to main content
OpaqueClient in @opaquecash/opaque is the single integration surface for stealth payments, PSR admin, reputation proofs, and cross-chain announcements.

Construction

Pass the connected wallet(s) in the unified signer shape. The client prompts for the one-time SETUP_MESSAGE signature (or reuses a cached one), derives the stealth keys, and wires each wallet as that chain’s write signer:
The FIRST wallet in the list signs SETUP_MESSAGE (key derivation) unless you pass a cached walletSignature, in which case no prompt happens at all:
See Unified signer below for the wallet shapes.

OpaqueClient.create(config) (manual)

Use create when you already hold the setup signature and want to wire signers yourself:
create is async: it optionally loads WASM and derives viewing/spending keys from walletSignature.

OpaqueClient.createViewOnly(config, keys)

Build a scan-only client from the viewing private key and spending public key (no walletSignature). It scans and reads balances but cannot spend — sweep and key reconstruction throw. This is the safe shape for a server-side scanner. See Server-side scanning.

OpaqueClientConfig

Unified signer

UnifiedSigner is one shape over every supported wallet type. Pass it to fromWallet, or use requestSetupSignature directly when you manage sessions yourself:

Static helpers

Method index

Stealth API

Registry, recipient resolution, send, scan, sweep, anonymity utilities

PSR API

Schemas, attestations, delegates

Reputation API

Traits, proofs, verifier

Cross-chain API

UAB relay and cross-chain scan

React hooks

OpaqueProvider, useScan, useStealthBalance

Utilities

Exported helpers, types, adapters

Instance getters

Signer requirements summary

Starknet (Sepolia, testnet preview). The chain-neutral keys and single meta-address span Ethereum, Solana, and Starknet, and scan({ chains: ["ethereum", "solana", "starknet"] }) covers all three once the starknet option is set. Starknet sends and sweeps do not go through sendStealthPayment/sweep (those accept only "ethereum"/"solana"): use buildStarknetStealthSend({ recipient, amount }) and buildStarknetSweep({ output, destination, amount }), which return unsigned calls for the app’s Starknet wallet to broadcast. See Starknet for the full flow and caveats.

Error: WASM not configured

If wasmModuleSpecifier is omitted and you call a WASM-backed method:
PSR admin methods work without WASM.