Comment on page
With refund files, users reclaim funds of a failed Normal Submarine Swap. They are the last layer of defense against loss of funds, in case refund info stored by the client is lost.
The concept of refunds currently only exists for failed Normal Submarine Swaps. In case of a failed Reverse Submarine Swaps, Lightning funds automatically bounce back to the user, no active refunding is needed. All clients that offer the option for users to save refund files should format them in a standardized way. This is necessary for refunds to not only work in a client, but also but also with the Boltz Web App.
The refund files Boltz Web App generates are
JSONon Desktop and
PNGQR codes on mobile because iOS browsers don't allow any other files than images to be downloaded. Boltz parses files with other extension than
.pngand treats them as raw
The data that should be in the file or encoded in the QR code is a
JSONobject with the following values:
id: the ID of the swap
currency: symbol of the chain on which bitcoin were locked up
redeemScript: the redeem script of the lockup address
privateKey: the private key of the refund key pair
timeoutBlockHeight: block height at which the swap times out
The values of
timeoutBlockHeightare returned by the Boltz API when the Swap is created.
privateKeyare known by the client already.