API ДЛЯ РАЗРАБОТЧИКОВ
OpenAPIБыстрый старт
curl --fail --silent 'https://inkexplorer.xyz/api/explorer/blocks'const base = "https://inkexplorer.xyz/api";
const response = await fetch(base + '/explorer/blocks');
if (!response.ok) throw new Error('HTTP ' + response.status);
const page = await response.json();
console.log(page.items);
if (page.next_page_params) {
const cursor = new URLSearchParams(page.next_page_params);
const next = await fetch(base + '/explorer/blocks?' + cursor);
console.log(await next.json());
}JSON-RPC · Ink Mainnet
Читайте данные сети и моделируйте вызовы через Ink Explorer. Подпись и отправка транзакций не поддерживаются.
Запросы RPC используют HTTP POST. Откройте адрес, чтобы посмотреть доступные методы и ограничения. ID сети: 57073 (0xdef1).
curl --fail --silent 'https://inkexplorer.xyz/api/rpc' \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'const response = await fetch("https://inkexplorer.xyz/api/rpc", {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]})
});
const result = await response.json();
if (!response.ok || result.error) throw new Error(result.error?.message || 'HTTP ' + response.status);
console.log(BigInt(result.result));Доступные методы RPC (23)
eth_chainIdnet_versionweb3_clientVersioneth_blockNumbereth_syncingeth_gasPriceeth_maxPriorityFeePerGaseth_getBalanceeth_getCodeeth_getTransactionCounteth_getStorageAteth_getBlockByNumbereth_getBlockByHasheth_getBlockTransactionCountByNumbereth_getBlockTransactionCountByHasheth_getTransactionByHasheth_getTransactionReceipteth_getTransactionByBlockHashAndIndexeth_getTransactionByBlockNumberAndIndexeth_calleth_estimateGaseth_feeHistoryeth_getLogs
Ограничения RPC: 20 вызовов в пакете, 120 вызовов в минуту с IP и 2000 блоков в запросе журналов.
Для индексированных событий в реальном времени используйте WebSocket обозревателя ниже. Этот RPC использует только HTTP.
Эндпоинты
GET/overviewОбзор сети
URL: https://inkexplorer.xyz/api/overview
JSON: { ... }
GET/explorer/blocksБлоки
URL: https://inkexplorer.xyz/api/explorer/blocks
Параметры: type=block | reorg
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/blocks/{height-or-hash}блок
URL: https://inkexplorer.xyz/api/explorer/blocks/{height-or-hash}
JSON: { ... }
GET/explorer/blocks/{height-or-hash}/transactionsТранзакции
URL: https://inkexplorer.xyz/api/explorer/blocks/{height-or-hash}/transactions
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/transactionsТранзакции
URL: https://inkexplorer.xyz/api/explorer/transactions
JSON: { items: [...], next_page_params: { ... } | null }
GET/v1/transactionsОтфильтрованные транзакции
URL: https://inkexplorer.xyz/api/v1/transactions
Параметры: transaction_types, methods, age_from, age_to, from_address_hashes_to_include, to_address_hashes_to_include, address_relation, status, cursor
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/transactions/{hash}Хеш транзакции
URL: https://inkexplorer.xyz/api/explorer/transactions/{hash}
JSON: { ... }
GET/explorer/transactions/{hash}/token-transfersПереводы токенов
URL: https://inkexplorer.xyz/api/explorer/transactions/{hash}/token-transfers
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/transactions/{hash}/internal-transactionsВнутренние транзакции
URL: https://inkexplorer.xyz/api/explorer/transactions/{hash}/internal-transactions
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/transactions/{hash}/logsЖурналы событий
URL: https://inkexplorer.xyz/api/explorer/transactions/{hash}/logs
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/internal-transactionsВнутренние транзакции
URL: https://inkexplorer.xyz/api/explorer/internal-transactions
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/addressesКрупнейшие аккаунты
URL: https://inkexplorer.xyz/api/explorer/addresses
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/addresses/{address}Адрес
URL: https://inkexplorer.xyz/api/explorer/addresses/{address}
JSON: { ... }
GET/address-balance/{address}ETH баланс
URL: https://inkexplorer.xyz/api/address-balance/{address}
JSON: { schema: 1, chainId, address, balance: "wei", block: { number, hash, timestamp }, observedAt, source: "local" }
GET/explorer/addresses/{address}/countersСчётчики адреса
URL: https://inkexplorer.xyz/api/explorer/addresses/{address}/counters
JSON: { ... }
GET/explorer/addresses/{address}/transactionsТранзакции адреса
URL: https://inkexplorer.xyz/api/explorer/addresses/{address}/transactions
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/addresses/{address}/token-transfersПереводы токенов
URL: https://inkexplorer.xyz/api/explorer/addresses/{address}/token-transfers
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/addresses/{address}/internal-transactionsВнутренние транзакции
URL: https://inkexplorer.xyz/api/explorer/addresses/{address}/internal-transactions
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/tokensТокены
URL: https://inkexplorer.xyz/api/explorer/tokens
Параметры: type=ERC-20 | ERC-721 | ERC-1155
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/tokens/{address}Токен
URL: https://inkexplorer.xyz/api/explorer/tokens/{address}
JSON: { ... }
GET/explorer/tokens/{address}/transfersПереводы токенов
URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/transfers
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/tokens/{address}/holdersДержатели токена
URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/holders
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/tokens/{address}/instancesЭкземпляры NFT
URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/instances
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/tokens/{address}/instances/{token-id}Экземпляр NFT
URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/instances/{token-id}
JSON: { ... }
GET/explorer/tokens/{address}/instances/{token-id}/transfersПереводы NFT
URL: https://inkexplorer.xyz/api/explorer/tokens/{address}/instances/{token-id}/transfers
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/token-transfersПереводы токенов
URL: https://inkexplorer.xyz/api/explorer/token-transfers
Параметры: type=ERC-20 | ERC-721 | ERC-1155
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/optimism/depositsДепозиты L1 → L2
URL: https://inkexplorer.xyz/api/explorer/optimism/deposits
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/optimism/withdrawalsВыводы L2 → L1
URL: https://inkexplorer.xyz/api/explorer/optimism/withdrawals
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/optimism/batchesПакеты транзакций
URL: https://inkexplorer.xyz/api/explorer/optimism/batches
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/optimism/batches/countКоличество пакетов транзакций
URL: https://inkexplorer.xyz/api/explorer/optimism/batches/count
JSON: 12345
GET/explorer/optimism/batches/{number}Пакет транзакций
URL: https://inkexplorer.xyz/api/explorer/optimism/batches/{number}
JSON: { ... }
GET/explorer/optimism/gamesСпоры
URL: https://inkexplorer.xyz/api/explorer/optimism/games
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/optimism/games/countКоличество споров
URL: https://inkexplorer.xyz/api/explorer/optimism/games/count
JSON: 12345
GET/explorer/blocks/optimism-batch/{number}Блоки пакета
URL: https://inkexplorer.xyz/api/explorer/blocks/optimism-batch/{number}
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/transactions/optimism-batch/{number}Транзакции пакета
URL: https://inkexplorer.xyz/api/explorer/transactions/optimism-batch/{number}
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/proxy/account-abstraction/operationsПользовательские операции
URL: https://inkexplorer.xyz/api/explorer/proxy/account-abstraction/operations
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/proxy/account-abstraction/operations/{hash}Операция пользователя
URL: https://inkexplorer.xyz/api/explorer/proxy/account-abstraction/operations/{hash}
JSON: { ... }
GET/explorer/smart-contractsПроверенные контракты
URL: https://inkexplorer.xyz/api/explorer/smart-contracts
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/smart-contracts/{address}Смарт-контракт
URL: https://inkexplorer.xyz/api/explorer/smart-contracts/{address}
JSON: { ... }
GET/explorer/statsСтатистика сети
URL: https://inkexplorer.xyz/api/explorer/stats
JSON: { ... }
GET/contract-info/poolsПулы DEX
URL: https://inkexplorer.xyz/api/contract-info/pools
JSON: { items: [...], next_page_params: { ... } | null }
GET/contract-info/pools/{address-or-id}Пул DEX
URL: https://inkexplorer.xyz/api/contract-info/pools/{address-or-id}
JSON: { ... }
GET/dappsДецентрализованные приложения
URL: https://inkexplorer.xyz/api/dapps
JSON: [{ ... }, ...]
GET/stats/countersИтоги сети
URL: https://inkexplorer.xyz/api/stats/counters
JSON: { counters: [...] }
GET/stats/linesВся статистика
URL: https://inkexplorer.xyz/api/stats/lines
JSON: { sections: [...] }
GET/stats/lines/{metric}График
URL: https://inkexplorer.xyz/api/stats/lines/{metric}
Параметры: from=YYYY-MM-DD, to=YYYY-MM-DD, resolution=DAY | WEEK | MONTH | YEAR
JSON: { chart: [...] }
GET/searchПоиск
URL: https://inkexplorer.xyz/api/search
Параметры: q
JSON: { items: [...], next_page_params: { ... } | null }
GET/live/configНастройки WebSocket
URL: https://inkexplorer.xyz/api/live/config
JSON: { ... }
GET/live/statusСостояние WebSocket
URL: https://inkexplorer.xyz/api/live/status
JSON: { ... }
GET/live/snapshotПоследние блоки и транзакции
URL: https://inkexplorer.xyz/api/live/snapshot
JSON: { ... }
GET/networkСостояние сети
URL: https://inkexplorer.xyz/api/network
JSON: { ... }
Фильтры транзакций
Фильтры относятся к родительской транзакции. Переводы токенов и внутренние вызовы не создают отдельных строк.
curl --get --fail 'https://inkexplorer.xyz/api/v1/transactions' \
--data-urlencode 'transaction_types=CONTRACT_INTERACTION' \
--data-urlencode 'methods=0xa9059cbb' \
--data-urlencode 'age_from=2026-10-01T00:00:00Z'- transaction_types
- COIN_TRANSFER, CONTRACT_INTERACTION, CONTRACT_CREATION, ERC-20, ERC-721, ERC-1155
- methods
- Четырёхбайтовый селектор, например 0xa9059cbb.
- from_address_hashes_to_include / to_address_hashes_to_include
- Полный 0x-адрес. Условия объединяются через AND, кроме address_relation=or.
- age_from / age_to
- ISO 8601 · UTC
- status
- success | failed
- cursor
- Непрозрачный курсор из next_page_params. На всех страницах сохраняйте фильтры.
Неуспешные транзакции не создают событий передачи токенов. Чтобы найти неудачные вызовы токенов, выберите «Вызов контракта».
Пагинация
Передайте все ключи next_page_params в следующий запрос. null означает конец списка. Не вычисляйте смещения блоков и не используйте курсор с другими фильтрами.
Отфильтрованная страница может быть пустой при наличии следующего курсора. Продолжайте; дубликаты исключаются по хешу родителя.
Поиск токенов ERC проверяет до 25 родительских транзакций на страницу. Для следующих событий используйте курсор.
WebSocket
const socket = new WebSocket("wss://inkexplorer.xyz/api/live");
socket.onmessage = ({data}) => {
const event = JSON.parse(data);
if (event.protocol !== 'ink-observer.live.v1') return;
if (event.network?.chainId !== 57073) return;
console.log(event.block, event.transactions, event.utilization, event.rolling24h);
};
// Reconnect with backoff after a close.
// The welcome frame is a fresh snapshot.Блоки поступают по событиям узла. Транзакция может появиться раньше квитанции; успех подтверждает только status ok. При реорганизации заменяйте блоки по высоте и хешу.
ink-explorer.delta.v1
Укажите подпротокол WebSocket. reset заменяет состояние; далее объединяйте блоки по высоте, транзакции по хешу. Удаляйте транзакции заменённых блоков и вне окна. Загрузка охватывает 30 канонических блоков.
new WebSocket("wss://inkexplorer.xyz/api/live", 'ink-explorer.delta.v1')Лимиты и ошибки
Общий лимит поиска: 4 параллельных запроса и 60 в минуту на экземпляр. Запрос просматривает до 3 исходных страниц. Прочие маршруты следуют лимитам источника. При 429 учитывайте Retry-After и экспоненциальную задержку.
- 200
- Успешно
- 202
- BLOCK_INDEXING · Retry-After: 3 · Accept: application/vnd.ink.indexing+json, application/json
TRANSACTION_INDEXING · Retry-After: 1 · Accept: application/vnd.ink.transaction-indexing+json, application/json - 400
- Неверные параметры или курсор.
- 404
- Неизвестный эндпоинт.
- 405
- Только чтение. Используйте GET.
- 429
- Лимит запросов. Повторите позже.
- 502 / 503
- Источник или соединение недоступны. Увеличивайте интервал повторов.
Значения и актуальность
Суммы wei — десятичные строки. Используйте BigInt и точность токена, избегая округления float. У ETH 18 знаков. Единицы графиков указаны в каталоге метрик.
Блоки и квитанции — с локального узла, история и графики — из индекса Ink. Проверяйте X-Ink-Data-Status и X-Ink-Data-Fetched-At: сохранённые данные не являются новым наблюдением.
Отображаемое число блоков получено от локального узла. Счётчики индексатора не содержат время расчёта.
/live/snapshot → block.height + 1 · Канонические блоки локального узла, включая генезис-блок (блок 0).
/live/snapshot → rolling24h.transactions · Транзакции в канонических блоках за последние 24 часа, включая неудачные транзакции и депозиты L1/системы. Период заканчивается указанным блоком.
Агрегированные данные индексатора могут отставать от последнего блока, даже если время получения данных актуально.
Последний интервал может быть неполным. День UTC и скользящие 24 часа — разные периоды. Общая комиссия включает исполнение L2 и данные L1; сбор оператора проверяйте в квитанции.