curl --request POST \
--url https://mpc.hex-api.app/withdraw/sign \
--header 'Content-Type: application/json' \
--data '
{
"nonce": "1792107257000001836156"
}
'import requests
url = "https://mpc.hex-api.app/withdraw/sign"
payload = { "nonce": "1792107257000001836156" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({nonce: '1792107257000001836156'})
};
fetch('https://mpc.hex-api.app/withdraw/sign', 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://mpc.hex-api.app/withdraw/sign",
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([
'nonce' => '1792107257000001836156'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://mpc.hex-api.app/withdraw/sign"
payload := strings.NewReader("{\n \"nonce\": \"1792107257000001836156\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://mpc.hex-api.app/withdraw/sign")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": \"1792107257000001836156\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mpc.hex-api.app/withdraw/sign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"nonce\": \"1792107257000001836156\"\n}"
response = http.request(request)
puts response.read_body{
"signature": "DMStgVeGnFjpsYP8wPtWogP2feeHpsFYDjgP2jU1CpscSUQgfQWgffzdjMKppVqrtG6fGiUr6GjvX6NkrFxCu8KCf",
"autopilot_hash": null
}Sign a withdrawal's payout
The withdraw wallet signs omni’s transfer hash of the withdrawal nonce, for the target chain’s bridge withdraw. The signature is base58 of 65 bytes, laid out as the chain’s bridge takes it: r ‖ s ‖ v with v 27/28 on EVM; v ‖ r ‖ s (v 0/1) on TON (1117); r ‖ s ‖ v (v 0/1) on Stellar, Gonka and Juno.
On EVM it signs only when the chain’s bridge verifyAddress() is the MPC address (else 404 Cant sign by HOT Verify). Withdrawals to Solana (1001) and TON v1 (1111) are not signed here. A signature is kept for a day, across the service: a retry (or anyone asking for the same one) answers the same one, and the nodes sign it once (see Load protection). A withdrawal no payout can land (to the token contract itself, to the zero address, or a Stellar nonce past the bridge’s 60 days) is refused with a 400: it can only be refunded.
curl --request POST \
--url https://mpc.hex-api.app/withdraw/sign \
--header 'Content-Type: application/json' \
--data '
{
"nonce": "1792107257000001836156"
}
'import requests
url = "https://mpc.hex-api.app/withdraw/sign"
payload = { "nonce": "1792107257000001836156" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({nonce: '1792107257000001836156'})
};
fetch('https://mpc.hex-api.app/withdraw/sign', 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://mpc.hex-api.app/withdraw/sign",
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([
'nonce' => '1792107257000001836156'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://mpc.hex-api.app/withdraw/sign"
payload := strings.NewReader("{\n \"nonce\": \"1792107257000001836156\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://mpc.hex-api.app/withdraw/sign")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": \"1792107257000001836156\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mpc.hex-api.app/withdraw/sign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"nonce\": \"1792107257000001836156\"\n}"
response = http.request(request)
puts response.read_body{
"signature": "DMStgVeGnFjpsYP8wPtWogP2feeHpsFYDjgP2jU1CpscSUQgfQWgffzdjMKppVqrtG6fGiUr6GjvX6NkrFxCu8KCf",
"autopilot_hash": null
}