Export Wallet
curl --request POST \
--url https://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"public_key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..."
}
'import requests
url = "https://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export"
payload = { "public_key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..." }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({public_key: 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...'})
};
fetch('https://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export', 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://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export",
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([
'public_key' => 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export"
payload := strings.NewReader("{\n \"public_key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"public_key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"public_key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"response": {
"ciphertext": "base64-encrypted-wallet-secret",
"encapsulated_key": "base64-hpke-encapsulated-key"
}
}{
"success": false,
"response": "Invalid public key format"
}{
"success": false,
"response": "Wallet not found"
}Wallets
Export Wallet
Export an encrypted wallet secret for a specific chain. Send public_key as a non-empty base64-encoded DER/SPKI P-256 public key. The wallet secret is encrypted with HPKE before it leaves the API. For POL, the underlying plaintext is the wallet private key as a 0x-prefixed hex string. For SOL, the underlying plaintext is the wallet keypair encoded as a base58 string. The response returns only the HPKE ciphertext and encapsulated_key needed for client-side decryption.
Export Wallet
curl --request POST \
--url https://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"public_key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..."
}
'import requests
url = "https://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export"
payload = { "public_key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..." }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({public_key: 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...'})
};
fetch('https://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export', 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://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export",
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([
'public_key' => 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export"
payload := strings.NewReader("{\n \"public_key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"public_key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://synthesis.trade/api/v1/wallet/{chain_id}/{wallet_id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"public_key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE...\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"response": {
"ciphertext": "base64-encrypted-wallet-secret",
"encapsulated_key": "base64-hpke-encapsulated-key"
}
}{
"success": false,
"response": "Invalid public key format"
}{
"success": false,
"response": "Wallet not found"
}Authorizations
AccountApiKeyAccountSession
Account secret API key.
Body
application/json
Recipient HPKE public key as a base64-encoded DER/SPKI P-256 public key. Empty strings and non-base64 payloads are rejected.
Example:
"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..."
Response
Wallet exported
⌘I