wallet/createspendauthsig
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig \
--header 'Content-Type: application/json' \
--data '
{
"ask": "0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005",
"alpha": "d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907",
"tx_hash": "7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig"
payload = {
"ask": "0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005",
"alpha": "d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907",
"tx_hash": "7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337"
}
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({
ask: '0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005',
alpha: 'd0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907',
tx_hash: '7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337'
})
};
fetch('https://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig', 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://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig",
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([
'ask' => '0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005',
'alpha' => 'd0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907',
'tx_hash' => '7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337'
]),
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://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig"
payload := strings.NewReader("{\n \"ask\": \"0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005\",\n \"alpha\": \"d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907\",\n \"tx_hash\": \"7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337\"\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://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig")
.header("Content-Type", "application/json")
.body("{\n \"ask\": \"0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005\",\n \"alpha\": \"d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907\",\n \"tx_hash\": \"7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig")
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 \"ask\": \"0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005\",\n \"alpha\": \"d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907\",\n \"tx_hash\": \"7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337\"\n}"
response = http.request(request)
puts response.read_body{
"value": "66c806bc592a7599e65833bf25c3c7005c8b21b7895dd835a84c97d7bec49d0f1493d2c73a68eeb9b9699b92cae42406f9e44ebe19acaea3d5febfe28de57109"
}TRON node API
wallet/createspendauthsig | TRON
TRON API method that creates a spending authorization signature for shielded TRC20 transactions. Available on TRON via Chainstack.
POST
/
mt_c524ad9781ae5dccd9ac6f5b0370e
/
wallet
/
createspendauthsig
wallet/createspendauthsig
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig \
--header 'Content-Type: application/json' \
--data '
{
"ask": "0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005",
"alpha": "d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907",
"tx_hash": "7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337"
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig"
payload = {
"ask": "0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005",
"alpha": "d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907",
"tx_hash": "7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337"
}
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({
ask: '0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005',
alpha: 'd0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907',
tx_hash: '7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337'
})
};
fetch('https://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig', 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://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig",
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([
'ask' => '0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005',
'alpha' => 'd0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907',
'tx_hash' => '7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337'
]),
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://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig"
payload := strings.NewReader("{\n \"ask\": \"0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005\",\n \"alpha\": \"d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907\",\n \"tx_hash\": \"7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337\"\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://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig")
.header("Content-Type", "application/json")
.body("{\n \"ask\": \"0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005\",\n \"alpha\": \"d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907\",\n \"tx_hash\": \"7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e/wallet/createspendauthsig")
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 \"ask\": \"0f63eabdfe2bbfe08012f6bb2db024e6809c16e8ed055aa41a6095424f192005\",\n \"alpha\": \"d0f0768664f5c807f9e70d05993f029c71da529afaa5c037b44c63d6e13bc907\",\n \"tx_hash\": \"7fb99e66df052f430d50e80a3f197c319a4e35184ed48a433d6219e025741337\"\n}"
response = http.request(request)
puts response.read_body{
"value": "66c806bc592a7599e65833bf25c3c7005c8b21b7895dd835a84c97d7bec49d0f1493d2c73a68eeb9b9699b92cae42406f9e44ebe19acaea3d5febfe28de57109"
}TRON API method that creates a spending authorization signature for shielded TRC20 transactions. This signature authorizes the spending of shielded notes and is a critical component of the privacy-preserving transaction protocol.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
All cryptographic parameters (
ask, alpha, tx_hash) must be exactly 32 bytes (64 hexadecimal characters) provided as raw hex strings without the 0x prefix. Values that are shorter, longer, or include the 0x prefix will result in a “param length must be 32” error.Parameters
ask— the authentication secret key used for signing (32 bytes, hex without 0x prefix)alpha— the alpha parameter for randomization (32 bytes, hex without 0x prefix)tx_hash— the transaction hash being authorized (32 bytes, hex without 0x prefix)
Response
value— the generated spending authorization signature (hex string without 0x prefix)
Use case
Thewallet/createspendauthsig method is used for:
- Authorizing the spending of shielded notes in privacy transactions
- Creating cryptographic signatures that prove spending authority without revealing identity
- Supporting the zero-knowledge proof system in shielded transactions
- Enabling secure authorization of shielded TRC20 transfers
Body
application/json
Response
200 - application/json
Successfully created spending authorization signature
Last modified on November 6, 2026
Was this page helpful?