How to use the bitcoind-rpc function in bitcoind-rpc

To help you get started, we’ve selected a few bitcoind-rpc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github synfonaut / hummingbird / index.js View on Github external
if (!MODE[this.mode]) { throw new Error(`unexpected mode ${this.mode}`) }

        this.reconnect = (this.config.reconnect === undefined ? true : false);

        const rpcconfig = Object.assign({}, {
            protocol: "http",
            host: "127.0.0.1",
            port: "8332",
        }, this.config.rpc);

        this.ready = function() {};
        this.blockreq = null;

        this.queue = new Queue(1, Infinity);

        this.rpc = new RPCClient(rpcconfig);

        this.currheight = 0;
        this.blockheight = 0;

        this.peer = new Peer({ host: this.config.peer.host, messages });

        this.peer.on("ready", () => {
            this.onconnect();
        });

        this.peer.on("disconnect", async () => {
            await this.ondisconnect();
        });

        this.peer.on("block", async (message) => {
            if (this.mode == MODE.MEMPOOL) {

bitcoind-rpc

Bitcoin Client Library to connect to Bitcoin Core via RPC

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis

Popular bitcoind-rpc functions