Історія домену
Отримує історичний журнал операцій (таких як реєстрація та оновлення), виконаних на певному ZCash name.
Кінцева точка
POST https://indexer.zcashnames.co/v1.0/history/richard.zcash
Параметри шляху
| Параметр | Тип | Необхідно | Опис |
|---|---|---|---|
domain_name | string | Так | Домен Zcash для запитів історії (наприклад, richard.zcash). |
Тіло запиту
Тіло запиту має бути об’єктом JSON із такими параметрами:
| Параметр | Тип | За замовчуванням | Опис |
|---|---|---|---|
count | integer | Жодного | Обмежте максимальну кількість елементів, що повертаються в одній відповіді. |
from_block_id | integer | Жодного | Запитувати журнали історії, починаючи з цієї конкретної висоти блоку. |
order | string | desc | Порядок сортування журналу історії. Прийнятні значення: asc або desc. |
Приклади коду
- cURL
- JavaScript
- Python
- PHP
curl -X POST https://indexer.zcashnames.co/v1.0/history/richard.zcash \
-H "Content-Type: application/json" \
-d '{
"count": 10,
"from_block_id": 5332579,
"order": "asc"
}'
const url = 'https://indexer.zcashnames.co/v1.0/history/richard.zcash';
const data = {
count: 10,
from_block_id: 5332579,
order: 'asc'
};
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.zcashnames.co/v1.0/history/richard.zcash"
payload = {
"count": 10,
"from_block_id": 5332579,
"order": "asc"
}
headers = {
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
<?php
$url = 'https://indexer.zcashnames.co/v1.0/history/richard.zcash';
$data = [
'count' => 10,
'from_block_id' => 5332579,
'order' => 'asc'
];
$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_block_id": 3422326,
"target_address": "u1497pm907qr0mnde0pusv4fy8eg0tagur9yrcwkj28qjpqp42qdeght6kwlkeu5np522h5v7473533za8w9ne36yqr42dfa6jlveeg5ya",
"owner_pubkey": "3757ee1a8b3f10353ca6edd47b66920392b02e323dca3f3edddb5de142079a53",
"domain_tx": "388241ffc5bf8ba3d7633d132298d157e26d6ac127ff8d162f26e7203084df08",
"op": "REG",
"nonce": 1784808228,
"price": 0
},
{
"domain_block_id": 3422369,
"target_address": "u1497pm907qr0mnde0pusv4fy8eg0tagur9yrcwkj28qjpqp42qdeght6kwlkeu5np522h5v7473533za8w9ne36yqr42dfa6jlveeg5ya",
"owner_pubkey": "3757ee1a8b3f10353ca6edd47b66920392b02e323dca3f3edddb5de142079a53",
"domain_tx": "4d5419af400966616ba9325f78bb3cac2ff1229fd4d39ed022a9fc113ee4b67e",
"op": "LST",
"nonce": 1784812534,
"price": 200000
},
{
"domain_block_id": 3422421,
"target_address": "u157q45z9fwy7349t5r7w4d0tpmdzhw6xvuwm4ucqq80ysftk9wxryrru0l7puxpdlujnkmj5d9ewzaxz5x6slfg3xys4egayx7vry57wd",
"owner_pubkey": "66a998241f62b4c8e4340f6e840b4570ac1d2d9840e2e42f62e713a34244f098",
"domain_tx": "3834eb36ca816f1bd9074c546ec64b3a361aca67e88c35b1586fe4ec1ae60095",
"op": "BUY",
"nonce": 1784815586,
"price": 0
},
{
"domain_block_id": 3423248,
"target_address": "u157q45z9fwy7349t5r7w4d0tpmdzhw6xvuwm4ucqq80ysftk9wxryrru0l7puxpdlujnkmj5d9ewzaxz5x6slfg3xys4egayx7vry57wd",
"owner_pubkey": "66a998241f62b4c8e4340f6e840b4570ac1d2d9840e2e42f62e713a34244f098",
"domain_tx": "3c08640ed394b1a270abddcc3ca873c13793629c6a148ad0b5585003ca9e632a",
"op": "LST",
"nonce": 1784878114,
"price": 10012345678
},
{
"domain_block_id": 3423248,
"target_address": "u157q45z9fwy7349t5r7w4d0tpmdzhw6xvuwm4ucqq80ysftk9wxryrru0l7puxpdlujnkmj5d9ewzaxz5x6slfg3xys4egayx7vry57wd",
"owner_pubkey": "66a998241f62b4c8e4340f6e840b4570ac1d2d9840e2e42f62e713a34244f098",
"domain_tx": "9ad75f893c002f21e9bbc3c6cdf4e151477293d64a013aa773db26598c1d5d11",
"op": "ULT",
"nonce": 1784878293,
"price": 0
}
]
}
| Поле | Тип | Опис |
|---|---|---|
domain_block_id | int | ZCash block_id операції |
target_address | рядок | Вирішення адреси ZCash |
op | рядок | Операція виконана на ім'я |
owner_pubkey | рядок | Відкритий ключ імені власника |
domain_tx | рядок | Хеш транзакції Zcash реєстрації імені |
nonce | int | Збільшення мітки часу операції |
price | int | Ціна продажу домену (для LST або BUY), інакше 0 |