[BREAKGLASS] Append-only mirror of github.com/mempool/electrum-client
Go to file
Yuki Akiyama 41f93d827d
Merge pull request #4 from colatkinson/scripthash
Add stratum 1.1 scripthash methods
2018-02-09 18:17:05 +09:00
example Add address and scripthash subscribe methods 2018-01-12 05:40:36 -05:00
lib Don't send deprecated height in blockchainTransaction_get 2018-02-08 18:32:09 -05:00
.gitignore Initial commit 2017-06-22 15:40:36 +09:00
index.js mod 2017-07-10 19:15:10 +09:00
LICENSE Initial commit 2017-06-22 15:40:36 +09:00
package.json mod 2017-10-30 21:15:29 +09:00
README.md add riaa client sample 2017-10-30 15:11:20 +09:00

node-electrum-client

Electrum Protocol Client for Node.js

what is this

https://electrum.org/

electrum is bitcoin wallet service.
This is a library of Node.js that can communicate with the electrum(x) server.

install

npm i electrum-client

spec

usage

const ElectrumCli = require('electrum-client')
const main = async () => {
    const ecl = new ElectrumCli(995, 'btc.smsys.me', 'tls') // tcp or tls
    await ecl.connect() // connect(promise)
    ecl.subscribe.on('blockchain.headers.subscribe', (v) => console.log(v)) // subscribe message(EventEmitter)
    try{
        const ver = await ecl.server_version("2.7.11", "1.0") // json-rpc(promise)
        console.log(ver)
    }catch(e){
        console.log(e)
    }
    await ecl.close() // disconnect(promise)
}
main()