ডেভেলপার 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 কল, প্রতি 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 --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 ঠিকানা। address_relation=or ছাড়া দুটি ফিল্টার AND ব্যবহার করে।
- age_from / age_to
- ISO 8601 · UTC
- status
- success | failed
- cursor
- next_page_params-এর অস্বচ্ছ কার্সর। সব পৃষ্ঠায় একই ফিল্টার রাখুন।
ব্যর্থ লেনদেনে টোকেন স্থানান্তরের ইভেন্ট তৈরি হয় না। ব্যর্থ টোকেন কল দেখতে চুক্তির সাথে কার্যকলাপ বেছে নিন।
পৃষ্ঠাবিন্যাস
next_page_params-এর সব কী পরের অনুরোধে দিন। null মানে তালিকা শেষ। ব্লকের অফসেট হিসাব বা ভিন্ন ফিল্টারে একই কার্সর ব্যবহার করবেন না।
ফিল্টার করা পৃষ্ঠা খালি হলেও পরের কার্সর থাকতে পারে। সেটি দিয়ে চালিয়ে যান; মূল হ্যাশ অনুযায়ী পুনরাবৃত্তি বাদ যায়।
ERC টোকেন অনুসন্ধানে প্রতি পৃষ্ঠায় সর্বোচ্চ ২৫টি মূল লেনদেন যাচাই করা হয়। পরের ইভেন্টের জন্য কার্সর ব্যবহার করুন।
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 স্থানীয় অবস্থা বদলায়; পরে উচ্চতায় ব্লক ও হ্যাশে লেনদেন মেলান। বদলে যাওয়া ব্লক ও উইন্ডোর বাইরের লেনদেন সরান। ব্যবহার ৩০টি স্বীকৃত ব্লকের।
new WebSocket("wss://inkexplorer.xyz/testnet/api/live", 'ink-explorer.delta.v1')সীমা ও ত্রুটি
ইনস্ট্যান্সে ভাগ করা সীমা একসঙ্গে ৪টি ও মিনিটে ৬০টি অনুসন্ধান। এক অনুরোধে সর্বোচ্চ ৩টি উৎস পৃষ্ঠা দেখা হয়। অন্য রুট উৎসের সীমা মানে। 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-এর ১৮ দশমিক। চার্টের একক মেট্রিক তালিকায় দেওয়া।
ব্লক ও রসিদ স্থানীয় নোড থেকে, ইতিহাস ও চার্ট বর্তমানে Ink ইনডেক্স থেকে আসে। X-Ink-Data-Status ও X-Ink-Data-Fetched-At দেখুন; রাখা পুরনো ডেটা নতুন পর্যবেক্ষণ নয়।
প্রদর্শিত মোট ব্লক স্থানীয় নোড থেকে আসে। ইনডেক্সারের কাউন্টারে গণনার সময় দেওয়া থাকে না।
/live/snapshot → block.height + 1 · স্থানীয় নোডের ক্যানোনিক্যাল ব্লক, জেনেসিস (ব্লক 0) সহ।
/live/snapshot → rolling24h.transactions · গত ২৪ ঘণ্টার ক্যানোনিক্যাল ব্লকে অন্তর্ভুক্ত লেনদেন, ব্যর্থ লেনদেন ও L1/সিস্টেম জমাসহ। সময়সীমা দেখানো ব্লকে শেষ হয়।
তথ্য আনার সময় সাম্প্রতিক হলেও ইনডেক্সারের সমষ্টিগত পরিসংখ্যান সর্বশেষ ব্লকের চেয়ে পিছিয়ে থাকতে পারে।
শেষ পর্ব অসম্পূর্ণ হতে পারে। UTC দিন ও গত ২৪ ঘণ্টা ভিন্ন সময়সীমা। মোট ফিতে L2 সম্পাদন ও L1 ডেটা অন্তর্ভুক্ত; অপারেটর ফি রসিদে দেখুন।