refund_htlc
Recover locked funds after HTLC timelock expires when the swap fails to complete. Only the original sender can refund with no counterparty risk.
Instructions
Trustless unwind — recover locked funds after the HTLC timelock expires. Non-custodial refund guarantee: if the swap does not complete, the original sender reclaims their asset with zero counterparty risk.
USE WHEN: the timelock deadline has passed AND the counterparty never locked their side (or the swap otherwise failed to complete). DO NOT USE WHEN: counterparty HAS locked and the swap can still complete — use withdraw_htlc instead. Only the original lock sender can call refund, and only after the deadline.
PARAM NOTES: txHash is the on-chain refund tx hash (0x-prefixed). No preimage needed — expiry alone unlocks the refund path. Set chainType to "bitcoin" or "sui" for non-EVM legs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tradeId | Yes | Trade ID | |
| txHash | Yes | On-chain refund transaction hash (0x-prefixed) | |
| chainType | No | Chain type: evm, bitcoin, or sui | |
| client_request_id | No | Idempotency key. Retrying the SAME write with the SAME id within this MCP session returns the first result instead of triggering a second on-chain/backend side effect. Best-effort: not durable across MCP restarts. |