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

@codewarriorr/btcv-api-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codewarriorr/btcv-api-client

BTCV Electrum protocol API client

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

BTCV api client

TypeScript implementation of Electrum Protocol Client.

This is a library that can communicate with the ElectrumX Server on tcp, ssl, ws and wss protocols.

Works in node.js and browser.

Implements BTCV methods described in Electrum Protocol methods documentation.

Install

npm install --save @codewarriorr/btcv-api-client

Usage

const { BtcvApiClient } = require('@codewarriorr/btcv-api-client');

async function main() {
  const config = {
    host: '127.0.0.1',
    port: 5002,
    protocol: 'ssl',
  };
  const client = new BtcvApiClient(config);

  try {
    await client.connect();

    const header = await client.getCurrentBlock();
    console.log('Current header:', header);
  } catch (err) {
    console.error(err);
  } finally {
    await client.close();
  }
}

main();

See more examples.

Keywords

FAQs

Package last updated on 18 Apr 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