Setup
Unified scan
Filter custom announcement rows
If you have indexer JSON instead of adapters:Cross-chain only
Balances
Per-output native balances (multichain):Sweep
Sweep on Starknet
Starknet sweeps don’t go throughsweep. Build the calls with buildStarknetSweep and let
the app’s Starknet wallet broadcast them — the counterfactual stealth account self-funds its
deploy_account fee, so there’s no gas drop or relayer step here.
Sweep tokens
Passtoken to sweep the full ERC-20 / SPL balance instead of the native asset. On
Ethereum the stealth address must hold native gas (see gasDrop on the send, or use the
gasless sweep below); on Solana set closeAccount to reclaim the token-account rent.
Gasless token sweep
When the stealth address holds a token but no native gas, build a relayer-submittable sweep. The stealth key authorizes it offline; a relayer pays the gas and takesfee in the
token (spec/relayer-market.md §9).
feePayer; the returned transaction is partially signed by
the stealth key, and the relayer co-signs as fee payer. The fee is split in the same
signed transaction: the destination receives amount - fee and the relayer’s token
account receives fee, so the relayer is reimbursed in-token for the gas it fronts
(sweep.fee / sweep.destinationAmount report the split):
Submitting to a relayer node
Anopaque-relayer node serves the sweep directly over HTTP — no job, bid, or payload
round. Discover its per-chain fee payer / forwarder with getSweepInfo, then POST the
built sweep with postGaslessSweep (both from @opaquecash/relayer-client):
fee, and returns the confirmed
transaction id. If it rejects the sweep (wrong forwarder, wrong fee payer, or an
under-priced fee), the error message says why — rebuild with the values from
/v1/sweep/info and retry.
Manual key reconstruction
When you need custom signing logic instead ofsweep:
PrivateKeyAccount from the bytes and sign a transfer from output.stealthAddress.
PSR trait discovery
Fetch native announcement rows for the chain and scan V2 attestation markers:DiscoveredTrait includes the shared fields (attestationId, stealthAddress, txHash,
blockNumber, discoveredAt, ephemeralPubkey) plus V2 fields (schemaId,
schemaName, issuer, attestationUid, dataHex, nonce, merkleLeafPreimage,
isValid, issuerAuthorized). getStealthSignerPrivateKeyForReputationTrait needs the
ephemeralPubkey field returned by the scanner.
Use discoverTraits(rows) or its alias getReputationTraitsFromAnnouncements(rows) only
for legacy V1 0xA7 markers. New attestations created by issueAttestation use V2.
Low-level witness JSON for custom prover flows: