sendProtected already runs the firewall for you by default. Step 2 below runs
check explicitly so you can show the verdict in your UI and decide before you
build the transfer. Both paths are fail-closed.1
Set up viem clients on arcTestnet
A
ClientPair is a viem public client for reads and a wallet client for writes,
both on arcTestnet. See Installation for the
peer dependency and RPC details.2
Run the firewall and refuse on a block
check(sender, target) returns a RiskReport with a level of safe,
warning, or block. Pass the public client so it can also read your verified
recipients from the contract. Stop on a block: a lookalike is beaten only by not
sending.3
Send a code-gated protected transfer
Register an integrator config once (it is content-addressed, so calling it on every
boot is free), mint a claim secret, then
sendProtected. The recipient will need
the short code to claim.4
Recipient claims with the code
The recipient, using their own A wrong code does not revert on-chain (the attempt counter must survive the 5-guess
lockout), so
ClientPair, redeems the transfer with the code and
salt you delivered.claim inspects the receipt and throws a typed error on a wrong code
or a lockout rather than silently “succeeding.”What just happened
Layer 1 - firewall
The scan refused a lookalike or bait recipient before any funds moved.
Layer 2 - escrow
Funds were held by the contract, claimable only with the code, refundable to
you.
Payer privacy
To pay from a disposable address that stores no payer identity, use Private Pay.
Next
- Pay a merchant privately: Private Pay.
- Every function and return shape: SDK reference.