Create a restricted deposit
- 01Call offramp(walletClient, { amount, platform, currency, identifier, otcTaker }).
- 02The SDK creates the deposit, then attaches a whitelist hook for the otcTaker wallet.
- 03Read otcLink from the result and send it to the approved buyer.
- 04Any wallet other than otcTaker is rejected onchain before it can start a fill.
Manage restriction on existing deposits
| Helper | What it does |
|---|---|
| enableOtc(walletClient, depositId, taker) | Restrict an existing deposit to one buyer wallet |
| disableOtc(walletClient, depositId) | Remove the restriction and return the deposit to public |
| getOtcLink(depositId) | Build the shareable buyer link for a restricted deposit |
Why it takes more than one transaction
EscrowV2's createDeposit does not take a whitelist parameter, so the SDK attaches the hook in a follow-up transaction after the deposit exists. The restriction is enforced by the Base contract, not by the UI or the link, which is why a non-approved wallet is rejected onchain even if it has the link.