Histórico do domínio
Devolve o registo histórico das operações (como o registo e as alterações) realizadas sobre um nome ZCash específico.
Ponto de acesso
POST https://indexer.zcashnames.co/v1.0/history/richard.zcash
Parâmetros de caminho
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
domain_name | string | Sim | O domínio Zcash cujo histórico se pretende consultar (por exemplo, richard.zcash). |
Corpo do pedido
O corpo do pedido tem de ser um objeto JSON com os seguintes parâmetros:
| Parâmetro | Tipo | Predefinição | Descrição |
|---|---|---|---|
count | integer | Nenhum | Limita o número máximo de itens devolvidos numa única resposta. |
from_block_id | integer | Nenhum | Pede as entradas do histórico a partir desta altura de bloco. |
order | string | desc | Ordem de ordenação do histórico. Valores aceites: asc ou desc. |
Exemplos de código
- 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);
Exemplo de resposta
{
"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
}
]
}
| Campo | Tipo | Descrição |
|---|---|---|
domain_block_id | int | O block_id ZCash da operação |
target_address | string | Endereço ZCash para o qual é resolvido |
op | string | Operação realizada sobre o nome |
owner_pubkey | string | Chave pública do titular do nome |
domain_tx | string | O hash da transação Zcash do registo do nome |
nonce | int | Marca temporal crescente da operação |
price | int | Preço de venda do domínio (para LST ou BUY), caso contrário 0 |