OpaqueClient from a connected wallet, register your meta-address, and run a stealth send.
Prerequisites
- Node.js 20.17+
- An Ethereum wallet (Sepolia testnet ETH for writes)
- Optional: Solana wallet on devnet for multichain flows
- For scan/sweep/prove: host or load the cryptography WASM module
1. Install
2. Create the client from a wallet
OpaqueClient.fromWallet does the whole session setup in one call: it prompts the
wallet once for a signature over the canonical SETUP_MESSAGE, derives the viewing and
spending keys from it (your private key is never touched), and wires the wallet as the
chain’s transaction signer.
The signature is HKDF entropy only and is never sent on-chain. Cache it (the
walletSignature from requestSetupSignature) and pass it back to fromWallet to
rebuild the client without prompting again. PSR schema/attestation admin does not
require WASM; scanning, sweeping, and proof generation do.SETUP_MESSAGE manually and use
OpaqueClient.create.
3. Share your meta-address
4. Send a stealth payment
sendStealthPayment resolves the recipient, derives a one-time stealth destination,
transfers the native asset, and publishes the discovery announcement:
recipient can be an EVM address, a 66-byte meta-address, a Solana pubkey, an
ipfs:// DID document, or a *.eth name with a com.opaque.meta record. To resolve
without sending (for example to show a confirmation screen):
5. Receive: scan and sweep
@opaquecash/react packages the read side as hooks; see
React hooks.
Runnable examples
The SDK repo ships a runnable example per flow insdk/examples/: from-wallet,
scan, send (including a delayed announcement), psr-prove, and uab-readonly.
Next steps
Issue an attestation
Full issuer flow: schema, attest, announce.
Generate a reputation proof
Discover traits and submit a Groth16 proof on-chain.
Cross-chain inbox
UAB announcements over Wormhole.
API reference
Every
OpaqueClient method documented with examples.