이름 해석
이름 해석하기
PIVX 이름을 해석해 연결된 PIVX 주소, 증명 세부 정보, 동기화 체크포인트, 등록 데이터를 가져옵니다.
엔드포인트
GET https://indexer.pivx.name/v1.0/resolve/{name}(이름 해석만)
POST https://indexer.pivx.name/v1.0/resolve/{name}(추가 매개변수가 필요한 경우)
경로 매개변수
| 매개변수 | 타입 | 필수 | 설명 |
|---|---|---|---|
{name} | string | 예 | 해석할 PIVX 이름(예: richard.pivx). |
요청 본문
요청 본문은 다음 매개변수를 담은 JSON 객체여야 합니다:
| 매개변수 | 타입 | 기본값 | 설명 |
|---|---|---|---|
extended | boolean | false | true이면 domain_tx(도메인 등록의 트랜잭션 해시)도 함께 반환합니다. |
with_checkpoint | boolean | false | true이면 인덱서가 동기화해 둔 현재 체크포인트를 반환합니다. |
코드 예시
- cURL
- JavaScript
- Python
- PHP
curl -X POST https://indexer.pivx.name/v1.0/resolve/richard.pivx \
-H "Content-Type: application/json" \
-d '{
"extended": true,
"with_checkpoint": true
}'
const url = 'https://indexer.pivx.name/v1.0/resolve/richard.pivx';
const data = {
extended: true,
with_checkpoint: true
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
import requests
url = "https://indexer.pivx.name/v1.0/resolve/richard.pivx"
payload = {
"extended": True,
"with_checkpoint": True
}
headers = {
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
php
<?php
$url = 'https://indexer.pivx.name/v1.0/resolve/richard.pivx';
$data = [
'extended' => true,
'with_checkpoint' => true
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
?>
응답 예시
{
"response": {
"domain_name": "bob.pivx",
"target_address": "ps12qtzaw6x3dh35xuukrqgk06e9ffx8szg2n2huqncwjsnj3ajczmklqgcx97kn63vwlge6gj2cmn",
"owner_pubkey": "1111111111111111111111111111111111111111111111111111111111111111",
"price": 250000000,
"nonce": 1780000002,
"smt_root": "5892c31e50ad3a4cf0407b91b3012a196d60c4e4f53e37261ac6747dea180eea",
"merkle_proof": [
"29bc98ae3a939618e50ba72e11a25ba30b37bb53a168a17463b9ef3fe90495d8",
"0000000000000000000000000000000000000000000000000000000000000000"
],
"proof_depth": 2,
"proof_terminal": "Occupied"
}
}
| 필드 | 타입 | 설명 |
|---|---|---|
domain_name | string | 등록된 이름 |
target_address | string | 대상 PIVX 주소 |
owner_pubkey | string | 이름 소유자의 공개 키 |
price | int | 가격표(마켓플레이스에서 사용) |
nonce | int | 증가하는 nonce |
smt_root | string | 현재 머클 트리 루트(16진수) |
| (with_checkpoint:false인 경우. 그 외에는 "checkpoint"의 SMT 루트 참조) | ||
merkle_proof | string[] | 16진수 형제 해시들. [0]이 가장 깊음. 길이는 proof_depth와 같음 |
proof_depth | int | 형제 노드 수 — merkle_proof.length와 같은지 확인하세요 |
proof_terminal | string | object | "Occupied", "Vacant" 또는 {"Blocked":{…}} — 아래 참조 |
| extended: | ||
created_block_id | int | 도메인이 생성된 PIVX block_id |
updated_block_id | int | 도메인이 마지막으로 갱신된 PIVX block_id |
domain_tx | string | 해당 이름 등록의 PIVX 트랜잭션 해시 |
| with_checkpoint: | "checkpoint" 내부의 필드: | |
idx | int | 앵커 컨트랙트 rootChain 배열에서의 위치. 체크포인트 탐색의 재개 커서 |
block_id | int | 마지막으로 생성된 SMT 증명의 PIVX block_id |
smt_root | string | 현재 머클 트리 루트(16진수) |
proof_terminal
증명 경로의 끝에 무엇이 있는지 설명합니다. 부재를 단순한 주장이 아니라 증명 가능한 것으로 만들어 주는 것이 바로 이것입니다:
| 값 | 의미 |
|---|---|
"Occupied" | 그곳에 그 이름 자신의 잎이 있음 — 성공적인 해석. 터미널이 이것이 아닌 해석 결과는 모두 거부하세요. |
"Vacant" | 그곳에 빈 서브트리가 있음 — 이름이 등록되어 있지 않음 |
{"Blocked": {"record": {…}}} | 그 자리를 다른 이름의 잎이 차지하고 있으므로 조회한 이름은 등록되어 있지 않습니다. 차단 레코드가 통째로 포함되어 있어, 그 주장을 신뢰하는 대신 검증할 수 있습니다. |
이 모든 것에 대한 Python, PHP, JavaScript 검증 코드는 증명 검증에 있습니다.
역방향 이름 조회
역방향 해석을 하려면 PIVX 주소를 지정하세요:
GET/POST https://indexer.pivx.name/v1.0/resolve/reverse/{address}
POST 매개변수는 위에 설명되어 있습니다.
소유자별 이름
주어진 Ed25519 공개 키가 소유한 모든 이름.
GET/POST https://indexer.pivx.name/v1.0/resolve/owner/{Ed25519_public_key}
POST 매개변수는 위에 설명되어 있습니다.