npm's personal messenger

    @aguycalled/electrum-client-js

    0.1.14 • Public • Published

    electrum-client-js

    JavaScript 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 methods described in Electrum Protocol methods documentation.

    Subscriptions and notifications are also supported, please see example.

    Continuous Integration

    Latest CircleCI build status:

    CircleCI

    Install

    npm install --save @keep-network/electrum-client-js
    

    Usage

    const ElectrumClient = require('@keep-network/electrum-client-js')
    
    async function main() {
      const client = new ElectrumClient(
        'fortress.qtornado.com',
        50002,
        'ssl'
      )
    
      try {
        await client.connect(
          'electrum-client-js', // optional client name
          '1.4.2' // optional protocol version
        )
    
        const header = await client.blockchain_headers_subscribe()
        console.log('Current header:', header)
    
        await client.close()
      } catch (err) {
        console.error(err)
      }
    }
    
    main()

    See more examples.

    Install

    npm i @aguycalled/electrum-client-js

    DownloadsWeekly Downloads

    140

    Version

    0.1.14

    License

    MIT

    Unpacked Size

    30 kB

    Total Files

    24

    Last publish

    Collaborators

    • aguycalled