On this page

latest contributor to this doc

Last Edit:

@smk762

Recover Funds Of Swap

API-v1recover_funds_of_swap

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.

ParameterTypeRequiredDescription
uuidstringUUID of the swap to recover the funds

ParameterTypeDescription
actionstringThe action executed to unlock the funds. Can be either SpentOtherPayment or RefundedMyPayment
coinstringThe balance of this coin will be unstuck by the recovering transaction
tx_hashstringThe hash of the recovering transaction
tx_hexstringRaw bytes of the recovering transaction in hexadecimal representation

recover_funds_of_swap

POST
recover_funds_of_swap
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "recover_funds_of_swap",
  "params": {
    "uuid": "6343b2b1-c896-47d4-b0f2-a11798f654ed"
  }
}