Skip to main content
This walks the full round trip: set up clients on Arc Testnet, run the poisoning firewall and refuse on a block, send a code-gated protected transfer, and let the recipient claim it. If the recipient looks like a poisoning lookalike or has baited you with a zero-value transfer, the send is refused before any funds move.
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.
sendProtected re-runs the firewall itself and throws RiskBlockedError on a block before it submits, so no funds move on a block even if you skip step 2.Deliver secret.secret, the grouped string (A4K7-9QMX-2PR6-TH8D), to the recipient as a person, over a channel the recipient controls. It carries all 80 bits; the salt is derived from it, so there is no second half to send. A wrong or poisoned recipient cannot claim without it, and you can cancel to reclaim.
4

Recipient claims with the code

The recipient, using their own ClientPair, redeems the transfer with the code and salt you delivered.
A wrong code does not revert on-chain (the attempt counter must survive the 5-guess lockout), so 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