Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@synonymdev/blocktank-client

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synonymdev/blocktank-client

LSP client library

  • 0.0.9
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Blocktank Client library

Description

Client side library for interacting with the Blocktank LSP server

Getting started

yarn add @synonymdev/blocktank-client
#or
npm i -s @synonymdev/blocktank-client

Usage

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 cr.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 cr.getOrder(buy.order_id);

Keywords

FAQs

Package last updated on 09 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc