curl --request POST \
--url https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund \
--header 'Content-Type: application/json' \
--header 'X-Swap-Auth: <api-key>' \
--data '
{
"pubNonce": "<string>",
"index": 1,
"protocol": "<string>",
"psbt": "<string>",
"sessionId": "<string>",
"signatureHash": "<string>",
"transaction": "<string>"
}
'import requests
url = "https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund"
payload = {
"pubNonce": "<string>",
"index": 1,
"protocol": "<string>",
"psbt": "<string>",
"sessionId": "<string>",
"signatureHash": "<string>",
"transaction": "<string>"
}
headers = {
"X-Swap-Auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Swap-Auth': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pubNonce: '<string>',
index: 1,
protocol: '<string>',
psbt: '<string>',
sessionId: '<string>',
signatureHash: '<string>',
transaction: '<string>'
})
};
fetch('https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pubNonce' => '<string>',
'index' => 1,
'protocol' => '<string>',
'psbt' => '<string>',
'sessionId' => '<string>',
'signatureHash' => '<string>',
'transaction' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Swap-Auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund"
payload := strings.NewReader("{\n \"pubNonce\": \"<string>\",\n \"index\": 1,\n \"protocol\": \"<string>\",\n \"psbt\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"signatureHash\": \"<string>\",\n \"transaction\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Swap-Auth", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund")
.header("X-Swap-Auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pubNonce\": \"<string>\",\n \"index\": 1,\n \"protocol\": \"<string>\",\n \"psbt\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"signatureHash\": \"<string>\",\n \"transaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Swap-Auth"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pubNonce\": \"<string>\",\n \"index\": 1,\n \"protocol\": \"<string>\",\n \"psbt\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"signatureHash\": \"<string>\",\n \"transaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"partialSignature": "<string>",
"pubNonce": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Cooperative refund (submarine)
Ask the maker to co-sign a refund of your lockup before the timeout, when the swap has failed. Send your MuSig2 public nonce and the transaction to sign; the maker returns its nonce and partial signature. Requires X-Swap-Auth. After the timeout you can refund through the script path without the maker.
curl --request POST \
--url https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund \
--header 'Content-Type: application/json' \
--header 'X-Swap-Auth: <api-key>' \
--data '
{
"pubNonce": "<string>",
"index": 1,
"protocol": "<string>",
"psbt": "<string>",
"sessionId": "<string>",
"signatureHash": "<string>",
"transaction": "<string>"
}
'import requests
url = "https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund"
payload = {
"pubNonce": "<string>",
"index": 1,
"protocol": "<string>",
"psbt": "<string>",
"sessionId": "<string>",
"signatureHash": "<string>",
"transaction": "<string>"
}
headers = {
"X-Swap-Auth": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Swap-Auth': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pubNonce: '<string>',
index: 1,
protocol: '<string>',
psbt: '<string>',
sessionId: '<string>',
signatureHash: '<string>',
transaction: '<string>'
})
};
fetch('https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pubNonce' => '<string>',
'index' => 1,
'protocol' => '<string>',
'psbt' => '<string>',
'sessionId' => '<string>',
'signatureHash' => '<string>',
'transaction' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Swap-Auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund"
payload := strings.NewReader("{\n \"pubNonce\": \"<string>\",\n \"index\": 1,\n \"protocol\": \"<string>\",\n \"psbt\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"signatureHash\": \"<string>\",\n \"transaction\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Swap-Auth", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund")
.header("X-Swap-Auth", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pubNonce\": \"<string>\",\n \"index\": 1,\n \"protocol\": \"<string>\",\n \"psbt\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"signatureHash\": \"<string>\",\n \"transaction\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://maker.signet.kaleidoswap.com/v2/swap/submarine/{id}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Swap-Auth"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pubNonce\": \"<string>\",\n \"index\": 1,\n \"protocol\": \"<string>\",\n \"psbt\": \"<string>\",\n \"sessionId\": \"<string>\",\n \"signatureHash\": \"<string>\",\n \"transaction\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"partialSignature": "<string>",
"pubNonce": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Authorizations
Per-swap credential returned as swapAuth when the swap is created. Required on the routes that decide a live swap's outcome (re-quotes, cooperative refunds), so knowing the swap ID is not enough.
Path Parameters
Swap id (ULID).
Body
Body of POST /v2/swap/submarine/{id}/refund — Boltz-shaped. The taker submits their pubNonce and the complete unsigned Bitcoin
refund transaction, or the versioned RGB PSBT request. Refunds do not
reveal a preimage. Bitcoin hash-only requests are no longer accepted.
The taker's MuSig2 pub nonce, 66 bytes hex.
Refund tx input index (defaults to 0).
x >= 0Deprecated for refunds. Hash-only requests return transaction_required; ignored when a full transaction is provided.
Hex-encoded unsigned refund transaction, required for Bitcoin refunds. The server computes the sighash from actual funding outputs via the Bitcoin chain backend, validating that every input spends this swap's lockup.
Response
Maker's pub nonce + partial signature; refund authorization persisted.
Was this page helpful?