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에 포함됩니다. 레코드를 읽은 슬롯에 소유자의 레지스트리 레코드가 없으면 해당 항목은 null입니다.
레코드에는 소유자의 base58 널리파이어 공개 키와 base64 뷰잉 공개 키가 포함됩니다. 뷰잉 공개 키는 33바이트의 태그가 지정된 X25519 키로, 0x04 뒤에 정규 32바이트 u 좌표가 옵니다. 병합이 비활성화된 경우 mergeEncryption은 0이고, PoseidonCtrV1의 경우 1입니다.
레코드는 context.slot보다 이전이 아닌 슬롯에서 Solana로부터 가져옵니다. 이는 공개 등록 키입니다. 지갑 키 처리에 대한 자세한 내용은 보호 키 쌍 및 암호화를 참조하세요.
요청 매개변수
array
필수
사용자 레지스트리에서 조회할 Solana 공개 키입니다. 최대 100개입니다.
인증
Helius API 키입니다.
본문
application/json
이 페이지가 도움이 되었나요?
⌘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": {}
}
}