واجهة API للمطورين
OpenAPIالبدء السريع
curl --fail --silent 'https://inkexplorer.xyz/testnet/api/explorer/blocks'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. افتح العنوان للاطلاع على الطرق والحدود المتاحة. معرّف السلسلة: 763373 (0xba5ed).
curl --fail --silent 'https://inkexplorer.xyz/testnet/api/rpc' \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'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_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/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}/instancesنسخ NFT
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}/transfersتحويلات NFT
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/depositsإيداعات L1 → L2
URL: https://inkexplorer.xyz/testnet/api/explorer/optimism/deposits
JSON: { items: [...], next_page_params: { ... } | null }
GET/explorer/optimism/withdrawalsعمليات سحب L2 → 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/poolsمجمعات DEX
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/configإعدادات WebSocket
URL: https://inkexplorer.xyz/testnet/api/live/config
JSON: { ... }
GET/live/statusحالة WebSocket
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 --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
- محدد من أربعة بايتات، مثل 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/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 كتلة معتمدة.
new WebSocket("wss://inkexplorer.xyz/testnet/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 ودقة الرمز لتجنب تقريب الأعداد العائمة. 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؛ راجع الإيصال لرسوم المشغّل.