Install
WASM module
Scanning, sweeping, trait discovery, key reconstruction, and Groth16 witness generation run in a Rust→WASM module (opaque-scanner). Pass the JS glue URL as wasmModuleSpecifier:
Self-hosting (recommended for production)
Build from the scanner crate:pkg/cryptography.js and pkg/cryptography_bg.wasm from your app’s public/ directory. The glue file loads the .wasm sibling automatically.
PSR admin without WASM
Schema and attestation management uses pure-JS DKSAP. You can omitwasmModuleSpecifier for issuer backends:
scan, sweep, or generateReputationProof without WASM throws a clear error.
Signer matrix
Starknet writes don’t go through the generic facade.
sendStealthPayment and registerMetaAddress accept only ethereum and solana. On Starknet, buildStarknetStealthSend, buildStarknetSweep, and SNIP-12 on-behalf registration (via @opaquecash/stealth-chain-starknet) return unsigned calls your app’s Starknet wallet broadcasts — sweeps go out through a starknet.js EthSigner (v10+) and the stealth account self-funds its deploy fee. PSR schema/attestation issuance stays on Ethereum and Solana; Starknet does proof verification and gating only. Addresses come from getStarknetDeployment("sepolia") (packages @opaquecash/stealth-chain-starknet and @opaquecash/psr-chain-starknet). Starknet is at testnet-preview maturity — see the Starknet flow.Backend issuer (Ethereum)
Backend issuer (Solana)
Monorepo / workspace
Link the local package during development:cd sdk && npm install && npm run build.
Runnable examples
sdk/examples/ ships one
runnable script per flow: