curl --request POST \
--url https://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"fromAddress": "<string>",
"publicKeyHex": "<string>",
"addressHex": "<string>",
"outputs": [
{
"address": "<string>",
"amount": "<string>",
"token": "<string>"
}
],
"ttlMs": 123,
"swapMode": true,
"swapAmount": "<string>"
}
'import requests
url = "https://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded"
payload = {
"fromAddress": "<string>",
"publicKeyHex": "<string>",
"addressHex": "<string>",
"outputs": [
{
"address": "<string>",
"amount": "<string>",
"token": "<string>"
}
],
"ttlMs": 123,
"swapMode": True,
"swapAmount": "<string>"
}
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({
fromAddress: '<string>',
publicKeyHex: '<string>',
addressHex: '<string>',
outputs: [{address: '<string>', amount: '<string>', token: '<string>'}],
ttlMs: 123,
swapMode: true,
swapAmount: '<string>'
})
};
fetch('https://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded', 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://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded",
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([
'fromAddress' => '<string>',
'publicKeyHex' => '<string>',
'addressHex' => '<string>',
'outputs' => [
[
'address' => '<string>',
'amount' => '<string>',
'token' => '<string>'
]
],
'ttlMs' => 123,
'swapMode' => true,
'swapAmount' => '<string>'
]),
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://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded"
payload := strings.NewReader("{\n \"fromAddress\": \"<string>\",\n \"publicKeyHex\": \"<string>\",\n \"addressHex\": \"<string>\",\n \"outputs\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"ttlMs\": 123,\n \"swapMode\": true,\n \"swapAmount\": \"<string>\"\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://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fromAddress\": \"<string>\",\n \"publicKeyHex\": \"<string>\",\n \"addressHex\": \"<string>\",\n \"outputs\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"ttlMs\": 123,\n \"swapMode\": true,\n \"swapAmount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded")
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 \"fromAddress\": \"<string>\",\n \"publicKeyHex\": \"<string>\",\n \"addressHex\": \"<string>\",\n \"outputs\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"ttlMs\": 123,\n \"swapMode\": true,\n \"swapAmount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"unprovenTxHex": "<string>",
"txHash": "<string>",
"segmentsToSign": [
{
"index": 123,
"dataHex": "<string>"
}
]
}Build an unshielded transfer
Builds an unshielded NIGHT transfer transaction (Phase 1: NIGHT-only). Returns the serialized unproven tx plus the per-segment hashes the wallet must sign. Set swapMode=true to build the UNSHIELDED HALF of a shield (public-to-private) conversion instead: outputs[] must then be empty (a shield has no payment output) and swapAmount carries the amount being shielded; only change (if any) returns to fromAddress. The wallet merges the result with a shielded-side offer client-side.
curl --request POST \
--url https://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"fromAddress": "<string>",
"publicKeyHex": "<string>",
"addressHex": "<string>",
"outputs": [
{
"address": "<string>",
"amount": "<string>",
"token": "<string>"
}
],
"ttlMs": 123,
"swapMode": true,
"swapAmount": "<string>"
}
'import requests
url = "https://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded"
payload = {
"fromAddress": "<string>",
"publicKeyHex": "<string>",
"addressHex": "<string>",
"outputs": [
{
"address": "<string>",
"amount": "<string>",
"token": "<string>"
}
],
"ttlMs": 123,
"swapMode": True,
"swapAmount": "<string>"
}
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({
fromAddress: '<string>',
publicKeyHex: '<string>',
addressHex: '<string>',
outputs: [{address: '<string>', amount: '<string>', token: '<string>'}],
ttlMs: 123,
swapMode: true,
swapAmount: '<string>'
})
};
fetch('https://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded', 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://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded",
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([
'fromAddress' => '<string>',
'publicKeyHex' => '<string>',
'addressHex' => '<string>',
'outputs' => [
[
'address' => '<string>',
'amount' => '<string>',
'token' => '<string>'
]
],
'ttlMs' => 123,
'swapMode' => true,
'swapAmount' => '<string>'
]),
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://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded"
payload := strings.NewReader("{\n \"fromAddress\": \"<string>\",\n \"publicKeyHex\": \"<string>\",\n \"addressHex\": \"<string>\",\n \"outputs\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"ttlMs\": 123,\n \"swapMode\": true,\n \"swapAmount\": \"<string>\"\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://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fromAddress\": \"<string>\",\n \"publicKeyHex\": \"<string>\",\n \"addressHex\": \"<string>\",\n \"outputs\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"ttlMs\": 123,\n \"swapMode\": true,\n \"swapAmount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nexus.gerowallet.io/api/midnight/{network}/tx/build-unshielded")
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 \"fromAddress\": \"<string>\",\n \"publicKeyHex\": \"<string>\",\n \"addressHex\": \"<string>\",\n \"outputs\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"token\": \"<string>\"\n }\n ],\n \"ttlMs\": 123,\n \"swapMode\": true,\n \"swapAmount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"unprovenTxHex": "<string>",
"txHash": "<string>",
"segmentsToSign": [
{
"index": 123,
"dataHex": "<string>"
}
]
}Authorizations
API key (programmatic access — recommended)
Send your API key in the X-Api-Key header. Keys start with nxs_ and are
created in the dashboard (or via POST /api/keys with a session JWT).
Each key is scoped to one chain and one network (for example
cardano-mainnet), fixed at creation time. It cannot query a different network
on the same chain, and it cannot query a different chain at all. A mismatched
network parameter returns 400 Network Mismatch. Create one key per chain
and network under the same account.
This is the credential most integrations should use.