The official JavaScript/TypeScript API client for chainseeker.info.
$ npm install chainseeker
Then, you can require (Node.js) or import (TypeScript) the library.
import { Chainseeker } from 'chainseeker';
const cs = new Chainseeker();
The default API endpoint is set to https://btc-v3.chainseeker.info/api
.
If you want to use other servers, you can change the endpoint by passing endpoint URL to the Chainseeker
constructor.
// Testnet
const cs = new Chainseeker('https://tbtc-v3.chainseeker.info/api');
// Signet
const cs = new Chainseeker('https://sbtc-v3.chainseeker.info/api');
// Monacoin
const cs = new Chainseeker('https://mona-v3.chainseeker.info/api');
The object type returned by the client is defined in ./src/types.ts.
Get the synchronization status.
Get a block data without any transaction information.
Get a block data with transaction IDs included in the block.
Get a block data with transactions included in the block.
Warning: this API may return a huge (~10MiB) data.
If you want a small chunk of transactions in a block, call getBlockWithTxids()
and fetch transactions with getTransaction()
.
Get a transaction data.
Get the array of transaction ids related to an address.
Get UTXOs for the given address.
Broadcast a raw transaction data. On success, return the transaction ID.
Get a block summary data, including nonces, sizes of a block and the number of transactions.
The number of addresses in the rich list.
Get the (offset + 1)
-th to (offets + limit + 1)-th
richest addresses.
The offset
starts from zero.
Get the rich list rank of a given address. The rank starts with one.