recover_funds_of_swap
recover_funds_of_swap uuid
In certain cases, a swap can finish with an error wherein the user's funds are stuck on the swap-payment address. (This address is the P2SH address when executing on a utxo-based blockchain, or an etomic-swap smart contract when executing on an ETH/ERC20 blockchain.)
This error can occur when one side of the trade does not follow the protocol (for any reason). The error persists as attempts to refund the payment fail due to network connection issues between the Komodo DeFi Framework API node and the coin's RPC server.
In this scenario, the recover_funds_of_swap
method instructs the Komodo DeFi Framework API software to attempt to reclaim the user funds from the swap-payment address, if possible.
Structure | Type | Description |
---|---|---|
uuid | string | uuid of the swap to recover the funds |
Structure | Type | Description |
---|---|---|
action | string | the action executed to unlock the funds. Can be either SpentOtherPayment or RefundedMyPayment |
coin | string | the balance of this coin will be unstuck by the recovering transaction |
tx_hash | string | the hash of the recovering transaction |
tx_hex | string | raw bytes of the recovering transaction in hexadecimal representation |
POST
recover_funds_of_swap{
"userpass": "RPC_UserP@SSW0RD",
"method": "recover_funds_of_swap",
"params": {
"uuid": "6343b2b1-c896-47d4-b0f2-a11798f654ed"
}
}