Get EIP-712 parameters for collaborative EVM HTLC refund.
curl --request GET \
--url https://api.satora.io/api/swap/{id}/collab-refund-evm/paramsimport requests
url = "https://api.satora.io/api/swap/{id}/collab-refund-evm/params"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.satora.io/api/swap/{id}/collab-refund-evm/params', 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://api.satora.io/api/swap/{id}/collab-refund-evm/params",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.satora.io/api/swap/{id}/collab-refund-evm/params"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.satora.io/api/swap/{id}/collab-refund-evm/params")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.satora.io/api/swap/{id}/collab-refund-evm/params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"amount": "<string>",
"calls_hash": "<string>",
"chain_id": 1,
"claim_address": "<string>",
"coordinator_address": "<string>",
"coordinator_version": 1,
"htlc_address": "<string>",
"htlc_kind": "<string>",
"htlc_version": 1,
"min_amount_out": "<string>",
"preimage_hash": "<string>",
"refund_path": "<string>",
"server_signer_address": "<string>",
"sweep_token": "<string>",
"timelock": 1,
"token": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Refunds
Get EIP-712 parameters for collaborative EVM HTLC refund.
Returns the addresses, amounts, and struct fields the client needs to
construct and sign the CollabRefund EIP-712 typed data. The client signs
this, then POSTs the signature to the collab-refund-evm endpoint.
The refund always sweeps the BTC-pegged HTLC token (tBTC/WBTC) to the
depositor: sweepToken = tBTC/WBTC, minAmountOut = 0.
GET
/
api
/
swap
/
{id}
/
collab-refund-evm
/
params
Get EIP-712 parameters for collaborative EVM HTLC refund.
curl --request GET \
--url https://api.satora.io/api/swap/{id}/collab-refund-evm/paramsimport requests
url = "https://api.satora.io/api/swap/{id}/collab-refund-evm/params"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.satora.io/api/swap/{id}/collab-refund-evm/params', 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://api.satora.io/api/swap/{id}/collab-refund-evm/params",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.satora.io/api/swap/{id}/collab-refund-evm/params"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.satora.io/api/swap/{id}/collab-refund-evm/params")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.satora.io/api/swap/{id}/collab-refund-evm/params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"amount": "<string>",
"calls_hash": "<string>",
"chain_id": 1,
"claim_address": "<string>",
"coordinator_address": "<string>",
"coordinator_version": 1,
"htlc_address": "<string>",
"htlc_kind": "<string>",
"htlc_version": 1,
"min_amount_out": "<string>",
"preimage_hash": "<string>",
"refund_path": "<string>",
"server_signer_address": "<string>",
"sweep_token": "<string>",
"timelock": 1,
"token": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Response
EIP-712 CollabRefund parameters
EIP-712 parameters the client needs to sign for collaborative refund.
Which collab refund flow this swap uses: direct (HTLCErc20 v7+ /
HTLCNative v2+; fetch the server's signature from POST /signature and
submit refundBySig on the HTLC yourself) or coordinator (sign the
CollabRefund struct above and POST /). unavailable when neither
applies and the swap must wait for its timelock.