ETH テストネット

開発者API

OpenAPI

クイックスタート

cURL
curl --fail --silent 'https://inkexplorer.xyz/testnet/api/explorer/blocks'
JavaScript
const base = "https://inkexplorer.xyz/testnet/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 Sepolia

Ink Explorer でチェーンデータを読み取り、呼び出しをシミュレーションできます。署名とトランザクション送信には対応していません。

RPC リクエストには HTTP POST を使用します。URL を開くと対応メソッドと制限を確認できます。 チェーンID: 763373 (0xba5ed).

cURL
curl --fail --silent 'https://inkexplorer.xyz/testnet/api/rpc' \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
JavaScript
const response = await fetch("https://inkexplorer.xyz/testnet/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_chainId
  • net_version
  • web3_clientVersion
  • eth_blockNumber
  • eth_syncing
  • eth_gasPrice
  • eth_maxPriorityFeePerGas
  • eth_getBalance
  • eth_getCode
  • eth_getTransactionCount
  • eth_getStorageAt
  • eth_getBlockByNumber
  • eth_getBlockByHash
  • eth_getBlockTransactionCountByNumber
  • eth_getBlockTransactionCountByHash
  • eth_getTransactionByHash
  • eth_getTransactionReceipt
  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex
  • eth_call
  • eth_estimateGas
  • eth_feeHistory
  • eth_getLogs

RPC 制限:1 バッチ 20 回、1 IP あたり毎分 120 回、ログ検索は 2000 ブロックまで。

インデックス済みのリアルタイムイベントには、以下のエクスプローラー WebSocket を使用してください。この RPC は HTTP のみ対応です。

エンドポイント

GET/overviewネットワーク概要

URL: https://inkexplorer.xyz/testnet/api/overview

JSON: { ... }

GET/explorer/blocksブロック

URL: https://inkexplorer.xyz/testnet/api/explorer/blocks

パラメーター: type=block | reorg

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/blocks/{height-or-hash}ブロック

URL: https://inkexplorer.xyz/testnet/api/explorer/blocks/{height-or-hash}

JSON: { ... }

GET/explorer/blocks/{height-or-hash}/transactionsトランザクション

URL: https://inkexplorer.xyz/testnet/api/explorer/blocks/{height-or-hash}/transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/transactionsトランザクション

URL: https://inkexplorer.xyz/testnet/api/explorer/transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/v1/transactions絞り込んだ取引

URL: https://inkexplorer.xyz/testnet/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/testnet/api/explorer/transactions/{hash}

JSON: { ... }

GET/explorer/transactions/{hash}/token-transfersトークン転送

URL: https://inkexplorer.xyz/testnet/api/explorer/transactions/{hash}/token-transfers

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/transactions/{hash}/internal-transactions内部トランザクション

URL: https://inkexplorer.xyz/testnet/api/explorer/transactions/{hash}/internal-transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/transactions/{hash}/logsイベントログ

URL: https://inkexplorer.xyz/testnet/api/explorer/transactions/{hash}/logs

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/internal-transactions内部トランザクション

URL: https://inkexplorer.xyz/testnet/api/explorer/internal-transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/addresses上位アカウント

URL: https://inkexplorer.xyz/testnet/api/explorer/addresses

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/addresses/{address}アドレス

URL: https://inkexplorer.xyz/testnet/api/explorer/addresses/{address}

JSON: { ... }

GET/address-balance/{address}ETH残高

URL: https://inkexplorer.xyz/testnet/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/testnet/api/explorer/addresses/{address}/counters

JSON: { ... }

GET/explorer/addresses/{address}/transactionsアドレスの取引

URL: https://inkexplorer.xyz/testnet/api/explorer/addresses/{address}/transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/addresses/{address}/token-transfersトークン転送

URL: https://inkexplorer.xyz/testnet/api/explorer/addresses/{address}/token-transfers

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/addresses/{address}/internal-transactions内部トランザクション

URL: https://inkexplorer.xyz/testnet/api/explorer/addresses/{address}/internal-transactions

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokensトークン

URL: https://inkexplorer.xyz/testnet/api/explorer/tokens

パラメーター: type=ERC-20 | ERC-721 | ERC-1155

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokens/{address}トークン

URL: https://inkexplorer.xyz/testnet/api/explorer/tokens/{address}

JSON: { ... }

GET/explorer/tokens/{address}/transfersトークン転送

URL: https://inkexplorer.xyz/testnet/api/explorer/tokens/{address}/transfers

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokens/{address}/holdersトークン保有者

URL: https://inkexplorer.xyz/testnet/api/explorer/tokens/{address}/holders

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokens/{address}/instancesNFTインスタンス

URL: https://inkexplorer.xyz/testnet/api/explorer/tokens/{address}/instances

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/tokens/{address}/instances/{token-id}NFTインスタンス

URL: https://inkexplorer.xyz/testnet/api/explorer/tokens/{address}/instances/{token-id}

JSON: { ... }

GET/explorer/tokens/{address}/instances/{token-id}/transfersNFTの転送

URL: https://inkexplorer.xyz/testnet/api/explorer/tokens/{address}/instances/{token-id}/transfers

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/token-transfersトークン転送

URL: https://inkexplorer.xyz/testnet/api/explorer/token-transfers

パラメーター: type=ERC-20 | ERC-721 | ERC-1155

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/depositsL1 → L2 入金

URL: https://inkexplorer.xyz/testnet/api/explorer/optimism/deposits

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/withdrawalsL2 → L1 出金

URL: https://inkexplorer.xyz/testnet/api/explorer/optimism/withdrawals

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/batchesトランザクションのバッチ

URL: https://inkexplorer.xyz/testnet/api/explorer/optimism/batches

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/batches/countトランザクションバッチ数

URL: https://inkexplorer.xyz/testnet/api/explorer/optimism/batches/count

JSON: 12345

GET/explorer/optimism/batches/{number}トランザクションバッチ

URL: https://inkexplorer.xyz/testnet/api/explorer/optimism/batches/{number}

JSON: { ... }

GET/explorer/optimism/games異議申し立て

URL: https://inkexplorer.xyz/testnet/api/explorer/optimism/games

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/optimism/games/count異議申し立て数

URL: https://inkexplorer.xyz/testnet/api/explorer/optimism/games/count

JSON: 12345

GET/explorer/blocks/optimism-batch/{number}バッチ内のブロック

URL: https://inkexplorer.xyz/testnet/api/explorer/blocks/optimism-batch/{number}

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/transactions/optimism-batch/{number}バッチ内の取引

URL: https://inkexplorer.xyz/testnet/api/explorer/transactions/optimism-batch/{number}

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/proxy/account-abstraction/operationsユーザー操作

URL: https://inkexplorer.xyz/testnet/api/explorer/proxy/account-abstraction/operations

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/proxy/account-abstraction/operations/{hash}ユーザー操作

URL: https://inkexplorer.xyz/testnet/api/explorer/proxy/account-abstraction/operations/{hash}

JSON: { ... }

GET/explorer/smart-contracts検証済みコントラクト

URL: https://inkexplorer.xyz/testnet/api/explorer/smart-contracts

JSON: { items: [...], next_page_params: { ... } | null }

GET/explorer/smart-contracts/{address}スマートコントラクト

URL: https://inkexplorer.xyz/testnet/api/explorer/smart-contracts/{address}

JSON: { ... }

GET/explorer/statsネットワーク統計

URL: https://inkexplorer.xyz/testnet/api/explorer/stats

JSON: { ... }

GET/contract-info/poolsDEXプール

URL: https://inkexplorer.xyz/testnet/api/contract-info/pools

JSON: { items: [...], next_page_params: { ... } | null }

GET/contract-info/pools/{address-or-id}DEXプール

URL: https://inkexplorer.xyz/testnet/api/contract-info/pools/{address-or-id}

JSON: { ... }

GET/dapps分散型アプリ

URL: https://inkexplorer.xyz/testnet/api/dapps

JSON: [{ ... }, ...]

GET/stats/countersネットワーク合計

URL: https://inkexplorer.xyz/testnet/api/stats/counters

JSON: { counters: [...] }

GET/stats/linesすべての統計

URL: https://inkexplorer.xyz/testnet/api/stats/lines

JSON: { sections: [...] }

GET/stats/lines/{metric}チャート

URL: https://inkexplorer.xyz/testnet/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/testnet/api/search

パラメーター: q

JSON: { items: [...], next_page_params: { ... } | null }

GET/live/configWebSocket設定

URL: https://inkexplorer.xyz/testnet/api/live/config

JSON: { ... }

GET/live/statusWebSocketの状態

URL: https://inkexplorer.xyz/testnet/api/live/status

JSON: { ... }

GET/live/snapshot最新のブロックと取引

URL: https://inkexplorer.xyz/testnet/api/live/snapshot

JSON: { ... }

GET/networkネットワークの状態

URL: https://inkexplorer.xyz/testnet/api/network

JSON: { ... }

取引フィルター

フィルターは親取引に適用されます。トークン転送や内部呼び出しは別行になりません。

cURL
curl --get --fail 'https://inkexplorer.xyz/testnet/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
4バイトセレクター。例:0xa9059cbb。
from_address_hashes_to_include / to_address_hashes_to_include
完全な0xアドレス。条件はANDで結合され、address_relation=orでORになります。
age_from / age_to
ISO 8601 · UTC
status
success | failed
cursor
next_page_paramsの不透明カーソルを使用し、ページ間で同じフィルターを保持してください。

失敗したトランザクションはトークン転送イベントを出しません。失敗したトークン呼び出しを探すには「コントラクト操作」を選択してください。

ページ分割

next_page_paramsの全キーを次のリクエストに渡します。nullは一覧の終端です。ブロックのオフセット計算や異なる条件でのカーソル再利用は避けてください。

フィルター後のページが空でも次のカーソルがあれば続行してください。結果は親取引ハッシュで重複除去されます。

ERC トークン検索では1ページあたり最大25件の親トランザクションを照合します。続きはカーソルで取得してください。

WebSocket

JavaScript
const socket = new WebSocket("wss://inkexplorer.xyz/testnet/api/live");
socket.onmessage = ({data}) => {
  const event = JSON.parse(data);
  if (event.protocol !== 'ink-observer.live.v1') return;
  if (event.network?.chainId !== 763373) 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ブロックが対象です。

JavaScript
new WebSocket("wss://inkexplorer.xyz/testnet/api/live", 'ink-explorer.delta.v1')

制限とエラー

このインスタンス全体で同時検索4件、毎分60件までです。1回で最大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金額は10進数文字列です。浮動小数点の丸めを避け、BigIntとトークンの桁数を使用します。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データ費用を含み、オペレーター費用はレシートで確認します。