Solana 隐私环
getShieldedTransactionsByTags
检索与查看标签或特定环匹配的屏蔽交易事件。
POST
/
v1
/
spr
/
getShieldedTransactionsByTags
getShieldedTransactionsByTags
curl --request POST \
--url 'https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByTags?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getShieldedTransactionsByTags",
"params": {
"tags": [
"11111111111111111111111111111112"
],
"limit": 100
}
}
'import requests
url = "https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByTags?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getShieldedTransactionsByTags",
"params": {
"tags": ["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: 'getShieldedTransactionsByTags',
params: {tags: ['11111111111111111111111111111112'], limit: 100}
})
};
fetch('https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByTags?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/getShieldedTransactionsByTags?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' => 'getShieldedTransactionsByTags',
'params' => [
'tags' => [
'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/getShieldedTransactionsByTags?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByTags\",\n \"params\": {\n \"tags\": [\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/getShieldedTransactionsByTags?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByTags\",\n \"params\": {\n \"tags\": [\n \"11111111111111111111111111111112\"\n ],\n \"limit\": 100\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByTags?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\": \"getShieldedTransactionsByTags\",\n \"params\": {\n \"tags\": [\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 交易的所有事件;如果你提供 ringProgramId,则仅限该环中的事件。事件包括加密输出、消息、作废标识符和环元数据。在你的钱包中解密有效载荷,以恢复金额和资产。请参阅私密历史记录指南。
标签可匹配输出查看标签和消息查看标签。空的 tags 数组要求提供 ringProgramId,并选择该环的历史记录,包括没有接收方标签的交易。当两者都提供时,交易必须同时匹配标签和环。
有关页面限制、续传代币和增量读取,请参阅分页和数据新鲜度。
请求参数
object
时隙范围。若要恢复已追上最新数据且无上限的读取,请将
slot.gt 设置为最后一页的 context.slot。object
读取的时隙范围。提供的范围条件通过 AND 组合。
number
仅包含此时隙之后的交易。
number
仅包含此时隙或之后的交易。
number
仅包含此时隙之前的交易。
number
仅包含此时隙或之前的交易。
number
默认值:"1000"
每页最多包含的 Solana 交易数,取值范围为 1 到 1,000。
number
此次读取所需的索引器最低持久化时隙。如果索引器落后,则返回 JSON-RPC 错误 -32016。
string
上一个响应中的续传代币。使用相同的标签、环和时隙筛选条件,将其原样传回。
string
将结果限制为由此程序 ID 授权的环。当 tags 为空时,此项为必填项。
array
必填
经过 Base58 编码的 32 字节查看标签,最多 1,000 个。空数组要求提供 ringProgramId,并选择该环。
授权
你的 Helius API 密钥。
请求体
application/json
此页面对您有帮助吗?
⌘I
getShieldedTransactionsByTags
curl --request POST \
--url 'https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByTags?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getShieldedTransactionsByTags",
"params": {
"tags": [
"11111111111111111111111111111112"
],
"limit": 100
}
}
'import requests
url = "https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByTags?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getShieldedTransactionsByTags",
"params": {
"tags": ["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: 'getShieldedTransactionsByTags',
params: {tags: ['11111111111111111111111111111112'], limit: 100}
})
};
fetch('https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByTags?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/getShieldedTransactionsByTags?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' => 'getShieldedTransactionsByTags',
'params' => [
'tags' => [
'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/getShieldedTransactionsByTags?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByTags\",\n \"params\": {\n \"tags\": [\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/getShieldedTransactionsByTags?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getShieldedTransactionsByTags\",\n \"params\": {\n \"tags\": [\n \"11111111111111111111111111111112\"\n ],\n \"limit\": 100\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devnet.helius-rpc.com/v1/spr/getShieldedTransactionsByTags?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\": \"getShieldedTransactionsByTags\",\n \"params\": {\n \"tags\": [\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": {}
}
}