ordinals_p2p_psbt_swap
Record a completed PSBT atomic swap on the trade ledger once both parties sign and broadcast the transaction.
Instructions
Record a completed PSBT atomic swap on the trade ledger.
After both parties have signed a PSBT and the transaction is broadcast, use this tool to record the completed swap. The active wallet signs the record with BIP-137.
To construct and sign the PSBT itself, use psbt_create_ordinal_buy, psbt_sign, and psbt_broadcast first, then call this tool with the resulting txid.
Requires an unlocked wallet with Bitcoin keys.
Tip: call earning_opportunities to see how to put your assets to work.
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": {
"inscription_id": "<inscription_id>",
"to_agent": "<to_agent>",
"amount_sats": "<amount_sats>",
"tx_hash": "<tx_hash>"
},
"name": "ordinals_p2p_psbt_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tx_hash | Yes | Broadcast atomic swap transaction hash | |
| metadata | No | Optional freeform metadata | |
| to_agent | Yes | Counterparty BTC address (new owner of the inscription) | |
| amount_sats | Yes | Swap amount in satoshis | |
| inscription_id | Yes | Inscription ID swapped | |
| parent_trade_id | No | Parent trade ID being fulfilled (if closing an existing offer) |