Blockstream Esplora OpenAPI Spec & Clients
Built using OpenAPI. Requires openapi-generator-cli.
make rust-client
make ts-client
yarn install @interlay/esplora-btc-api
cd ts-client
yarn install
yarn build
import * as esplora from '@interlay/esplora-btc-api';
async function main() {
let result = await new esplora.BlockApi().getLastBlockHeight();
console.log(result.data);
}
main();
import * as esplora from '@interlay/esplora-btc-api';
async function main() {
const api = new esplora.BlockApi();
const result = await api.getBlockRaw("$HASH", {responseType: 'arraybuffer'});
console.log(result.data.slice(0, 80).toString('hex'));
}
main();