Start USDC to BSV swap
swap_asset_to_bsvBuys BSV with USDC on Base through a non-custodial atomic swap, locking USDC until settlement or refund. Use it to convert Base USDC to BSV while keeping keys local.
Instructions
Buy BSV with this kit's USDC on Base through a non-custodial atomic swap with the counterparty. This moves funds: it locks USDC on Base, so get a quote with get_quote first and confirm it with the person directing you. Pass quote_id (or the quote object) to use that quote's terms, or min_bsv_out as a floor; if the quote has expired, the kit gets a new one and goes ahead only if it pays at least min_bsv_out, or 99% of the old quote. Returns at once with swap_id, stage, expected_minutes and the settlement mode; then call wait_for_swap until done is true. Refused while another swap is in progress or spending is stopped. If a swap cannot finish, the USDC comes back to the kit. speed is the buyer’s explicit choice; standard is the default. Fast mode makes the kit reveal its secret against an unconfirmed BSV lock. If the counterparty double-spends that lock, you can lose the swap amount. It is available only when both sides agree and the amount is at most $25; otherwise the swap waits for one BSV confirmation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from_asset": "<from_asset>",
"amount_in": "<amount_in>"
},
"name": "swap_asset_to_bsv"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quote | No | Optional: the whole quote object from get_quote, instead of quote_id. Its route, pair and amount_in must match this request. | |
| speed | No | Optional buyer choice. standard (default) waits for one BSV confirmation. fast reveals the secret against an unconfirmed BSV lock, and applies only when both sides agree and the amount is at most $25. | |
| quote_id | No | Optional quote_id from get_quote. Uses that quote's terms while it is valid. | |
| amount_in | Yes | USDC to spend, in atomic units as a decimal string ("25000000" = 25 USDC). Must equal the amount_in of the quote you pass. | |
| deliver_to | No | Optional BSV mainnet address (P2PKH, starting with 1) to receive the BSV. Without it the BSV stays in this kit (see wallet_info; withdraw_bsv moves it later). With it, the kit sends the claimed BSV there automatically, for one more small fee (about 400 sats). | |
| from_asset | Yes | Asset you pay with. Must be "USDC" (USDC on Base). | |
| min_bsv_out | No | Optional floor for the BSV received, in satoshis as a decimal string ("100000000" = 1 BSV). Required when neither quote_id nor quote is given. |