Client side library for interacting with the Blocktank LSP server
yarn add @synonymdev/blocktank-client
#or
npm i -s @synonymdev/blocktank-client
import bt from '@synonymdev/blocktank-client';
//Get all node info and available services
const info = await bt.getInfo();
const service = info.services[0];
//Place order
const buy = await bt.buyChannel({
product_id: service.product_id,
channel_expiry: 4,
remote_balance: 0,
local_balance: 20000,
});
//Then pay for the order onchain using btc_address or via lightning with lnurl
//Check order status and details
const order = await bt.getOrder(buy.order_id);