Add USDC-to-fiat payouts in one function call.
Add cashout without becoming an exchange. One SDK call creates the Base deposit, delegates pricing, and returns the identifiers your app needs. Add Peerlytics later when you need route choice, explorer context, lifecycle reads, or agent-operated infrastructure.
Base mainnetimport { useOfframp } from "@usdctofiat/offramp/react";
import { CURRENCIES, PLATFORMS } from "@usdctofiat/offramp";
function SellButton({ walletClient }) {
const { offramp, isLoading } = useOfframp();
return (
<button
disabled={isLoading}
onClick={() =>
offramp(walletClient, {
amount: "100",
platform: PLATFORMS.VENMO,
currency: CURRENCIES.USD,
identifier: "alice",
})
}
>
Sell 100 USDC
</button>
);
}Build paths
Start with the deposit lifecycle, then add data and operations only when needed.
SDK surface
Keep product code close to the real actions: create, list, close, restrict, observe.
Developer questions
Does the SDK custody keys?
No. The SDK signs with the viem WalletClient you pass: your user's wallet, a server wallet, or a bot wallet. It never holds private keys.
Does the SDK move fiat?
No. Fiat moves directly between the buyer and seller on the chosen payment app. The SDK only handles the onchain USDC and deposit lifecycle.
Do I need an API key to create deposits?
No. Creating deposits is permissionless, since your wallet signs. An API key is only needed when you use the Peerlytics API.
How do I test an integration?
There is no public sandbox; the SDK targets Base mainnet, so a test deposit is real and discoverable on the open orderbook. Use the 1 USDC minimum, and either restrict it as an OTC deposit (pass otcTaker so only your own wallet can fill it) or accept that a buyer could take it before you call close(). Confirm it onchain and via deposits(), then close() it.