Ordinal обозреватель
The ord
binary includes a block explorer. We host an instance of the block explorer on mainnet at ordinals.com, on signet at signet.ordinals.com, and on testnet at testnet.ordinals.com. As of version 0.16.0 the wallet needs ord server
running in the background. This is analogous to how bitcoin-cli
needs bitcoind
running in the background.
Запуск обозревателя
Сервер может быть запущен локально с помощью команды:
ord server
Для указания порта добавьте --http-port
flag:
ord server --http-port 8080
The JSON-API endpoints are enabled by default, to disable them add the --disable-json-api
flag (see here for more info):
ord server --disable-json-api
Поиск
Поле поиска принимает различные представления объектов.
Блоки
Блоки можно искать по хэшу, например, блок genesis:
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
Транзакции
Транзакции можно искать по хэшу, например, транзакция coinbase на блоке genesis:
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
Выходы
Transaction outputs can be searched by outpoint, for example, the only output of the genesis block coinbase transaction:
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:0
Sats
Sats можно искать по целому числу, по их положению во всем запасе Биткоинов:
По десятичному числу - по блоку и смещению внутри блока:
По степени, их циклу, блокам с момента последнего халвинга, блокам с момента последней корректировки сложности и смещению внутри их блока:
По названию, их базовое представление 26 с использованием букв от "a" до "z":
Или по процентному соотношению - процент от количества Биткоинов, которые были или будут выпущены при их майнинге:
JSON-API
By default the ord server
gives access to endpoints that return JSON instead of HTML if you set the HTTP Accept: application/json
header. The structure of these objects closely follows what is shown in the HTML. These endpoints are:
/inscription/<INSCRIPTION_ID>
/inscriptions
/inscriptions/block/<BLOCK_HEIGHT>
/inscriptions/block/<BLOCK_HEIGHT>/<PAGE_INDEX>
/inscriptions/<FROM>
/inscriptions/<FROM>/<N>
/output/<OUTPOINT>
/sat/<SAT>
To get a list of the latest 100 inscriptions you would do:
curl -s -H "Accept: application/json" 'http://0.0.0.0:80/inscriptions'
To see information about a UTXO, which includes inscriptions inside it, do:
curl -s -H "Accept: application/json" 'http://0.0.0.0:80/output/bc4c30829a9564c0d58e6287195622b53ced54a25711d1b86be7cd3a70ef61ed:0'
Which returns:
{
"value": 10000,
"script_pubkey": "OP_PUSHNUM_1 OP_PUSHBYTES_32 156cc4878306157720607cdcb4b32afa4cc6853868458d7258b907112e5a434b",
"address": "bc1pz4kvfpurqc2hwgrq0nwtfve2lfxvdpfcdpzc6ujchyr3ztj6gd9sfr6ayf",
"transaction": "bc4c30829a9564c0d58e6287195622b53ced54a25711d1b86be7cd3a70ef61ed",
"sat_ranges": null,
"inscriptions": [
"6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0"
]
}