A simple BlockCypher API client made using Axios
Some parts of this library are completely untested, primarily the assets & metadata APIs. Feel free to make an issue or send a PR and I'll get to it ASAP
npm i blockcypher-apis
#yarn add blockcypher-apis
import { Client } from 'blockcypher-apis';
const client = new Client({
coin: 'btc',
chain: 'main',
//token: ...
});
// ...
const utxs = await client.apis.bitcoin.transaction.getUnconfirmedTransactions();
For batching:
import { Client } from 'blockcypher-apis';
import type { bitcoin } from 'blockcypher-apis';
// ...
const blocks = (await client.apis.bitcoin.blockchain.getBlockByHash(
'1;2;3',
)) as bitcoin.Block[];
Check this directory for some neat tools and integrations with other popular libraries such as bitcoinjs-lib
- Implement ETH interface