Solana 隐私环
getShieldedTransactionsByNullifiers
检索花费所提供无效符对应输入的隐私交易事件。
POST
/
v1
/
spr
/
getShieldedTransactionsByNullifiers
getShieldedTransactionsByNullifiers
curl --request POST \
--url 'https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getShieldedTransactionsByNullifiers",
"params": {
"nullifiers": [
"11111111111111111111111111111112"
],
"limit": 100
}
}
'import requests
url = "https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getShieldedTransactionsByNullifiers",
"params": {
"nullifiers": ["11111111111111111111111111111112"],
"limit": 100
}
}
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({
jsonrpc: '2.0',
id: '1',
method: 'getShieldedTransactionsByNullifiers',
params: {nullifiers: ['11111111111111111111111111111112'], limit: 100}
})
};
fetch('https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=', 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://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=",
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([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'getShieldedTransactionsByNullifiers',
'params' => [
'nullifiers' => [
'11111111111111111111111111111112'
],
'limit' => 100
]
]),
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://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByNullifiers\",\n \"params\": {\n \"nullifiers\": [\n \"11111111111111111111111111111112\"\n ],\n \"limit\": 100\n }\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://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByNullifiers\",\n \"params\": {\n \"nullifiers\": [\n \"11111111111111111111111111111112\"\n ],\n \"limit\": 100\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=")
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 \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByNullifiers\",\n \"params\": {\n \"nullifiers\": [\n \"11111111111111111111111111111112\"\n ],\n \"limit\": 100\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": "1",
"result": {
"context": {
"slot": 4242,
"blockTime": 1730000000
},
"data": [],
"paginationToken": null
}
}{
"jsonrpc": "2.0",
"id": "<string>",
"error": {
"code": 123,
"message": "<string>",
"data": {}
}
}{
"jsonrpc": "2.0",
"id": "<string>",
"error": {
"code": 123,
"message": "<string>",
"data": {}
}
}{
"jsonrpc": "2.0",
"id": "<string>",
"error": {
"code": 123,
"message": "<string>",
"data": {}
}
}查找支出交易
使用钱包派生的无效符查找花费其输入的交易。无效符用于选择交易。result.data 中的每个条目都包含一笔所选 Solana 交易的所有事件,以及该交易的 slot 和 signature。
提供 1 到 1,000 个无效符。有关页面限制、续传令牌和增量读取的信息,请参阅分页和数据新鲜度。
请求参数
object
时隙范围。要恢复已追平且不设上限的读取,请将
slot.gt 设置为上一页的 context.slot。object
读取的时隙范围。提供的范围条件以 AND 组合。
number
仅包含此时隙之后的交易。
number
仅包含此时隙或之后的交易。
number
仅包含此时隙之前的交易。
number
仅包含此时隙或之前的交易。
number
默认值:"1000"
每页最多包含的 Solana 交易数,范围为 1 到 1,000。
number
此次读取要求索引器至少已持久化到的时隙。如果索引器进度落后,则返回 JSON-RPC 错误 -32016。
array
必填
用于匹配已花费输入的 Base58 编码 32 字节无效符。
string
上一个响应返回的续传令牌。使用相同的无效符和时隙筛选条件将其原样传回。
授权
你的 Helius API 密钥。
请求体
application/json
用于标识请求的 ID。
JSON-RPC 协议版本。
可用选项:
2.0 要调用的方法。必须与 URL 的最后一个路径段匹配。
可用选项:
getShieldedTransactionsByNullifiers Show child attributes
Show child attributes
示例:
{
"nullifiers": ["11111111111111111111111111111112"],
"limit": 100
}
此页面对您有帮助吗?
⌘I
getShieldedTransactionsByNullifiers
curl --request POST \
--url 'https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getShieldedTransactionsByNullifiers",
"params": {
"nullifiers": [
"11111111111111111111111111111112"
],
"limit": 100
}
}
'import requests
url = "https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getShieldedTransactionsByNullifiers",
"params": {
"nullifiers": ["11111111111111111111111111111112"],
"limit": 100
}
}
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({
jsonrpc: '2.0',
id: '1',
method: 'getShieldedTransactionsByNullifiers',
params: {nullifiers: ['11111111111111111111111111111112'], limit: 100}
})
};
fetch('https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=', 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://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=",
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([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'getShieldedTransactionsByNullifiers',
'params' => [
'nullifiers' => [
'11111111111111111111111111111112'
],
'limit' => 100
]
]),
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://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByNullifiers\",\n \"params\": {\n \"nullifiers\": [\n \"11111111111111111111111111111112\"\n ],\n \"limit\": 100\n }\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://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByNullifiers\",\n \"params\": {\n \"nullifiers\": [\n \"11111111111111111111111111111112\"\n ],\n \"limit\": 100\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByNullifiers?api-key=")
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 \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByNullifiers\",\n \"params\": {\n \"nullifiers\": [\n \"11111111111111111111111111111112\"\n ],\n \"limit\": 100\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": "1",
"result": {
"context": {
"slot": 4242,
"blockTime": 1730000000
},
"data": [],
"paginationToken": null
}
}{
"jsonrpc": "2.0",
"id": "<string>",
"error": {
"code": 123,
"message": "<string>",
"data": {}
}
}{
"jsonrpc": "2.0",
"id": "<string>",
"error": {
"code": 123,
"message": "<string>",
"data": {}
}
}{
"jsonrpc": "2.0",
"id": "<string>",
"error": {
"code": 123,
"message": "<string>",
"data": {}
}
}