RPC Browser


Command: refundswap


Help Content for refundswap
refundswap "hexscript" "hextransaction"

The refundswap command is used to create and send a refund of a contract transaction. While the refund transaction is created and displayed during contract creation in the initiate and participate steps, the refund can also be created after the fact in case there was any issue sending the transaction (e.g. the contract transaction was malleated or the refund fee is now too low).

Argumets:
1. "hexscript"       (string, required) The hex-encoded contract
2. "hextransaction"  (string, required) The hex-encoded contract transaction

Result:
{
  "txid"             (string) The redemption transaction id encoded in little-endian hexadecimal
  "hex"              (string) The hex-encoded refund transaction with signature(s)
  "fee"              (numeric) The amount of the refund transaction fee in BTC
}

Examples:
> bitcoin-cli refundswap "6382012088a82043098e913574fd73052dc4916c14641d2a7d3dc51de533e7ceb1ece447cd53018876a914bf5d762453cadfaa953ddbb334d2e9179c00c4e167041765d85ab17576a914c3c1bac44ebf6394cfc9dbaf22b13967193c2fdd6888ac" "02000000017d6299fc712683b1c383b15e98459561a2c1d1e554eda5ca0b6849ca96030185000000006b483045022100dfdd309af06493ae16b5f8b44bb1407639d964e4df1b7b3520b845b95731ef50022066305f28dcde0f9a28c961016408f603ce9d0d0ee1bc0ffcd250cd58baa867e141210310e244d5f11d7b6199c2e2b1099c864ec27556ff966c895612124c454c378e7ffeffffff0200b4c4040000000017a91449e1ee8259d8fe2f5fd733e0e1c7fa45cb0c8e9b87cce22607000000001976a914afbbf807011cc924043fdfc0f40ab8557f12a8dc88acdf2d1400"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "refundswap", "params": ["6382012088a82043098e913574fd73052dc4916c14641d2a7d3dc51de533e7ceb1ece447cd53018876a914bf5d762453cadfaa953ddbb334d2e9179c00c4e167041765d85ab17576a914c3c1bac44ebf6394cfc9dbaf22b13967193c2fdd6888ac" "02000000017d6299fc712683b1c383b15e98459561a2c1d1e554eda5ca0b6849ca96030185000000006b483045022100dfdd309af06493ae16b5f8b44bb1407639d964e4df1b7b3520b845b95731ef50022066305f28dcde0f9a28c961016408f603ce9d0d0ee1bc0ffcd250cd58baa867e141210310e244d5f11d7b6199c2e2b1099c864ec27556ff966c895612124c454c378e7ffeffffff0200b4c4040000000017a91449e1ee8259d8fe2f5fd733e0e1c7fa45cb0c8e9b87cce22607000000001976a914afbbf807011cc924043fdfc0f40ab8557f12a8dc88acdf2d1400"] }' -H 'content-type: text/plain;' http://127.0.0.1:7332/
Execute Command: refundswap

Atomicswaps (6)


Blockchain (22)


Control (6)


Generating (2)


Mining (5)


Minting (1)


Network (12)


Rawtransactions (8)


Util (6)


Wallet (48)