Solanaプライバシーリング
getUserRecords
Solana ウォレット所有者が登録した公開シールドアドレスレコードを検索します。
POST
/
v1
/
spr
/
getUserRecords
getUserRecords
curl --request POST \
--url 'https://devnet.helius-rpc.com/v1/spr/getUserRecords?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getUserRecords",
"params": {
"owners": [
"11111111111111111111111111111111"
]
}
}
'import requests
url = "https://devnet.helius-rpc.com/v1/spr/getUserRecords?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getUserRecords",
"params": { "owners": ["11111111111111111111111111111111"] }
}
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: 'getUserRecords',
params: {owners: ['11111111111111111111111111111111']}
})
};
fetch('https://devnet.helius-rpc.com/v1/spr/getUserRecords?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/getUserRecords?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' => 'getUserRecords',
'params' => [
'owners' => [
'11111111111111111111111111111111'
]
]
]),
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/getUserRecords?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getUserRecords\",\n \"params\": {\n \"owners\": [\n \"11111111111111111111111111111111\"\n ]\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/getUserRecords?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getUserRecords\",\n \"params\": {\n \"owners\": [\n \"11111111111111111111111111111111\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devnet.helius-rpc.com/v1/spr/getUserRecords?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\": \"getUserRecords\",\n \"params\": {\n \"owners\": [\n \"11111111111111111111111111111111\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": "1",
"result": {
"context": {
"slot": 4242,
"blockTime": 1730000000
},
"records": [
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": {}
}
}レジストリレコード
Solana 所有者の公開鍵を 1~100 個指定します。レスポンスには、リクエスト順に所有者ごとのエントリがresult.records に 1 件ずつ含まれます。レコードを読み取ったスロットで所有者のレジストリレコードが存在しない場合、エントリは null になります。
レコードには、所有者の base58 ヌリファイア公開鍵と base64 閲覧公開鍵が含まれます。閲覧公開鍵は、33 バイトのタグ付き X25519 鍵です。0x04 の後に、正規形式の 32 バイト u 座標が続きます。マージが無効な場合、mergeEncryption は 0 になり、PoseidonCtrV1 の場合は 1 になります。
レコードは、context.slot 以降のスロットで Solana から取得されます。これらは公開登録鍵です。ウォレットの鍵の取り扱いについては、シールド鍵ペアと暗号化を参照してください。
リクエストパラメータ
array
必須
ユーザーレジストリで検索する Solana 公開鍵です。最大 100 個です。
承認
Helius API キーです。
ボディ
application/json
リクエストを識別するための ID です。
JSON-RPC プロトコルのバージョンです。
利用可能なオプション:
2.0 呼び出すメソッドです。URL パスの最後のセグメントと一致する必要があります。
利用可能なオプション:
getUserRecords Show child attributes
Show child attributes
例:
{
"owners": ["11111111111111111111111111111111"]
}
このページは役に立ちましたか?
⌘I
getUserRecords
curl --request POST \
--url 'https://devnet.helius-rpc.com/v1/spr/getUserRecords?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getUserRecords",
"params": {
"owners": [
"11111111111111111111111111111111"
]
}
}
'import requests
url = "https://devnet.helius-rpc.com/v1/spr/getUserRecords?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getUserRecords",
"params": { "owners": ["11111111111111111111111111111111"] }
}
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: 'getUserRecords',
params: {owners: ['11111111111111111111111111111111']}
})
};
fetch('https://devnet.helius-rpc.com/v1/spr/getUserRecords?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/getUserRecords?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' => 'getUserRecords',
'params' => [
'owners' => [
'11111111111111111111111111111111'
]
]
]),
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/getUserRecords?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getUserRecords\",\n \"params\": {\n \"owners\": [\n \"11111111111111111111111111111111\"\n ]\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/getUserRecords?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getUserRecords\",\n \"params\": {\n \"owners\": [\n \"11111111111111111111111111111111\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devnet.helius-rpc.com/v1/spr/getUserRecords?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\": \"getUserRecords\",\n \"params\": {\n \"owners\": [\n \"11111111111111111111111111111111\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": "1",
"result": {
"context": {
"slot": 4242,
"blockTime": 1730000000
},
"records": [
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": {}
}
}