From f90301f8355f50bcdb31fb6499136a23e4f0934f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0ev=C4=8D=C3=ADk?= Date: Sat, 15 May 2021 04:02:14 +0200 Subject: [PATCH] Transition from bitcoind-rpc-client to rpc-bitcoin --- accounts/index.js | 6 +- accounts/xpub-rest-api.js | 7 +- lib/bitcoind-rpc/fees.js | 6 +- lib/bitcoind-rpc/headers.js | 12 +- lib/bitcoind-rpc/latest-block.js | 8 +- lib/bitcoind-rpc/rpc-client.js | 100 +-- lib/bitcoind-rpc/transactions.js | 15 +- lib/remote-importer/bitcoind-wrapper.js | 6 +- package-lock.json | 956 +++++++++++++++++++++--- package.json | 3 +- pushtx/index-orchestrator.js | 4 +- pushtx/index.js | 4 +- pushtx/orchestrator.js | 10 +- pushtx/pushtx-processor.js | 6 +- pushtx/status.js | 10 +- pushtx/transactions-scheduler.js | 6 +- scripts/create-first-blocks.js | 8 +- tracker/block-worker.js | 6 +- tracker/blockchain-processor.js | 16 +- tracker/index.js | 4 +- tracker/mempool-processor.js | 6 +- 21 files changed, 964 insertions(+), 235 deletions(-) diff --git a/accounts/index.js b/accounts/index.js index 8b3f65a..8f205ab 100644 --- a/accounts/index.js +++ b/accounts/index.js @@ -7,7 +7,7 @@ 'use strict' const Logger = require('../lib/logger') - const RpcClient = require('../lib/bitcoind-rpc/rpc-client') + const { waitForBitcoindRpcApi } = require('../lib/bitcoind-rpc/rpc-client') const network = require('../lib/bitcoin/network') const keys = require('../keys')[network.key] const db = require('../lib/db/mysql-db-wrapper') @@ -31,10 +31,10 @@ */ Logger.info('API : Process ID: ' + process.pid) Logger.info('API : Preparing the REST API') - + // Wait for Bitcoind RPC API // being ready to process requests - await RpcClient.waitForBitcoindRpcApi() + await waitForBitcoindRpcApi() // Initialize the db wrapper const dbConfig = { diff --git a/accounts/xpub-rest-api.js b/accounts/xpub-rest-api.js index 7b68c13..18ace2d 100644 --- a/accounts/xpub-rest-api.js +++ b/accounts/xpub-rest-api.js @@ -9,16 +9,14 @@ const bodyParser = require('body-parser') const errors = require('../lib/errors') const network = require('../lib/bitcoin/network') const Logger = require('../lib/logger') -const db = require('../lib/db/mysql-db-wrapper') const hdaHelper = require('../lib/bitcoin/hd-accounts-helper') const hdaService = require('../lib/bitcoin/hd-accounts-service') -const RpcClient = require('../lib/bitcoind-rpc/rpc-client') const HdAccountInfo = require('../lib/wallet/hd-account-info') const authMgr = require('../lib/auth/authorizations-manager') const HttpServer = require('../lib/http-server/http-server') const remoteImporter = require('../lib/remote-importer/remote-importer') -const debugApi = !!(process.argv.indexOf('api-debug') > -1) +const debugApi = process.argv.indexOf('api-debug') > -1 const gap = require('../keys/')[network.key].gap @@ -34,9 +32,6 @@ class XPubRestApi { constructor(httpServer) { this.httpServer = httpServer - // Initialize the rpc client - this.rpcClient = new RpcClient() - // Establish routes const urlencodedParser = bodyParser.urlencoded({ extended: true }) diff --git a/lib/bitcoind-rpc/fees.js b/lib/bitcoind-rpc/fees.js index ce167b0..ccd7c20 100644 --- a/lib/bitcoind-rpc/fees.js +++ b/lib/bitcoind-rpc/fees.js @@ -9,7 +9,7 @@ const errors = require('../errors') const Logger = require('../logger') const network = require('../bitcoin/network') const keys = require('../../keys')[network.key] -const RpcClient = require('./rpc-client') +const { createRpcClient } = require('./rpc-client') const latestBlock = require('./latest-block') @@ -27,7 +27,7 @@ class Fees { this.fees = {} this.feeType = keys.bitcoind.feeType - this.rpcClient = new RpcClient() + this.rpcClient = createRpcClient() this.refresh() } @@ -55,7 +55,7 @@ class Fees { async refresh() { await util.parallelCall(this.targets, async tgt => { try { - const level = await this.rpcClient.cmd('estimatesmartfee', tgt, this.feeType) + const level = await this.rpcClient.estimatesmartfee({ conf_target: tgt, estimate_mode: this.feeType }) this.fees[tgt] = (level.errors && level.errors.length > 0) ? 0 : Math.round(level.feerate * 1e5) } catch(e) { Logger.error(e, 'Bitcoind RPC : Fees.refresh()') diff --git a/lib/bitcoind-rpc/headers.js b/lib/bitcoind-rpc/headers.js index 0464aec..eb6b965 100644 --- a/lib/bitcoind-rpc/headers.js +++ b/lib/bitcoind-rpc/headers.js @@ -6,11 +6,11 @@ const LRU = require('lru-cache') const errors = require('../errors') -const RpcClient = require('./rpc-client') +const { createRpcClient } = require('./rpc-client') /** - * A singleton providing information about block headers + * A singleton providing information about block headers */ class Headers { @@ -29,7 +29,7 @@ class Headers { }) // Initialize the rpc client - this.rpcClient = new RpcClient() + this.rpcClient = createRpcClient() } /** @@ -40,9 +40,9 @@ class Headers { async getHeader(hash) { if (this.headers.has(hash)) return this.headers.get(hash) - + try { - const header = await this.rpcClient.getblockheader(hash, true) + const header = await this.rpcClient.getblockheader({ blockhash: hash, verbose: true }) const fmtHeader = JSON.stringify(header, null, 2) this.headers.set(hash, fmtHeader) return fmtHeader @@ -50,7 +50,7 @@ class Headers { return Promise.reject(errors.generic.GEN) } } - + } module.exports = new Headers() diff --git a/lib/bitcoind-rpc/latest-block.js b/lib/bitcoind-rpc/latest-block.js index 4a000cd..dfe659d 100644 --- a/lib/bitcoind-rpc/latest-block.js +++ b/lib/bitcoind-rpc/latest-block.js @@ -9,7 +9,7 @@ const Logger = require('../logger') const util = require('../util') const network = require('../bitcoin/network') const keys = require('../../keys')[network.key] -const RpcClient = require('./rpc-client') +const { createRpcClient } = require('./rpc-client') /** @@ -27,8 +27,8 @@ class LatestBlock { this.diff = null // Initialize the rpc client - this.rpcClient = new RpcClient() - + this.rpcClient = createRpcClient() + // Gets the latest block from bitcoind this.rpcClient.getbestblockhash().then(hash => this.onBlockHash(hash)) @@ -54,7 +54,7 @@ class LatestBlock { * @returns {Promise} */ async onBlockHash(hash) { - const header = await this.rpcClient.getblockheader(hash) + const header = await this.rpcClient.getblockheader({ blockhash: hash }) this.height = header.height this.hash = hash diff --git a/lib/bitcoind-rpc/rpc-client.js b/lib/bitcoind-rpc/rpc-client.js index f402d8d..2393bd5 100644 --- a/lib/bitcoind-rpc/rpc-client.js +++ b/lib/bitcoind-rpc/rpc-client.js @@ -4,7 +4,7 @@ */ 'use strict' -const rpc = require('bitcoind-rpc-client') +const {RPCClient} = require('rpc-bitcoin'); const network = require('../bitcoin/network') const keys = require('../../keys')[network.key] const util = require('../util') @@ -14,77 +14,51 @@ const Logger = require('../logger') /** * Wrapper for bitcoind rpc client */ -class RpcClient { - - /** - * Constructor - */ - constructor() { - // Initiliaze the rpc client - this.client = new rpc({ - host: keys.bitcoind.rpc.host, - port: keys.bitcoind.rpc.port - }) - - this.client.set('user', keys.bitcoind.rpc.user) - this.client.set('pass', keys.bitcoind.rpc.pass) - - // Initialize a proxy postprocessing api calls - return new Proxy(this, { - get: function(target, name, receiver) { - const origMethod = target.client[name] - - return async function(...args) { - const result = await origMethod.apply(target.client, args) - - if (Array.isArray(result)) { - return result - } else if (result.result) { - return result.result - } else if (result.error) { - throw result.error - } else { - throw 'A problem was met with a request sent to bitcoind RPC API' - } - } - } +const createRpcClient = () => { + return new RPCClient({ + url: `http://${keys.bitcoind.rpc.host}`, + port: keys.bitcoind.rpc.port, + user: keys.bitcoind.rpc.user, + pass: keys.bitcoind.rpc.pass }) - } +} - /** - * Check if an error returned by bitcoin-rpc-client - * is a connection error. - * @param {string} err - error message - * @returns {boolean} returns true if message related to a connection error - */ - static isConnectionError(err) { +/** + * Check if an error returned by bitcoin-rpc-client + * is a connection error. + * @param {string} err - error message + * @returns {boolean} returns true if message related to a connection error + */ +const isConnectionError = (err) => { if (typeof err != 'string') - return false + return false - const isTimeoutError = (err.indexOf('connect ETIMEDOUT') != -1) - const isConnRejected = (err.indexOf('Connection Rejected') != -1) + const isTimeoutError = (err.indexOf('connect ETIMEDOUT') !== -1) + const isConnRejected = (err.indexOf('Connection Rejected') !== -1) return (isTimeoutError || isConnRejected) - } +} - /** - * Check if the rpc api is ready to process requests - * @returns {Promise} - */ - static async waitForBitcoindRpcApi() { - let client = new RpcClient() +/** + * Check if the rpc api is ready to process requests + * @returns {Promise} + */ +const waitForBitcoindRpcApi = async () => { + let client = createRpcClient() try { - await client.getblockchaininfo() - } catch(e) { - client = null - Logger.info('Bitcoind RPC : API is still unreachable. New attempt in 20s.') - return util.delay(20000).then(() => { - return RpcClient.waitForBitcoindRpcApi() - }) + await client.getblockchaininfo() + } catch (e) { + client = null + Logger.info('Bitcoind RPC : API is still unreachable. New attempt in 20s.') + return util.delay(20000).then(() => { + return waitForBitcoindRpcApi() + }) } - } - } -module.exports = RpcClient +module.exports = { + createRpcClient, + isConnectionError, + waitForBitcoindRpcApi +} diff --git a/lib/bitcoind-rpc/transactions.js b/lib/bitcoind-rpc/transactions.js index f2985be..f55d363 100644 --- a/lib/bitcoind-rpc/transactions.js +++ b/lib/bitcoind-rpc/transactions.js @@ -9,7 +9,7 @@ const LRU = require('lru-cache') const errors = require('../errors') const Logger = require('../logger') const util = require('../util') -const RpcClient = require('./rpc-client') +const { createRpcClient } = require('./rpc-client') const rpcLatestBlock = require('./latest-block') @@ -34,7 +34,7 @@ class Transactions { // Initialize the rpc client - this.rpcClient = new RpcClient() + this.rpcClient = createRpcClient() } /** @@ -47,8 +47,11 @@ class Transactions { try { const rpcCalls = txids.map(txid => { return { - 'method': 'getrawtransaction', - 'params': [txid, true] + method: 'getrawtransaction', + params: { + txid, + verbose: true + } } }) @@ -77,7 +80,7 @@ class Transactions { */ async getTransaction(txid, fees) { try { - const tx = await this.rpcClient.getrawtransaction(txid, true) + const tx = await this.rpcClient.getrawtransaction({ txid, verbose: true }) return this._prepareTxResult(tx, fees) } catch(e) { Logger.error(e, 'Bitcoind RPC : Transaction.getTransaction()') @@ -177,7 +180,7 @@ class Transactions { if (this.prevCache.has(inTxid)) { ptx = this.prevCache.get(inTxid) } else { - ptx = await this.rpcClient.getrawtransaction(inTxid, true) + ptx = await this.rpcClient.getrawtransaction({ txid: inTxid, verbose: true }) this.prevCache.set(inTxid, ptx) } diff --git a/lib/remote-importer/bitcoind-wrapper.js b/lib/remote-importer/bitcoind-wrapper.js index 2450dca..e3667b3 100644 --- a/lib/remote-importer/bitcoind-wrapper.js +++ b/lib/remote-importer/bitcoind-wrapper.js @@ -5,7 +5,7 @@ 'use strict' const bitcoin = require('bitcoinjs-lib') -const RpcClient = require('../bitcoind-rpc/rpc-client') +const { createRpcClient } = require('../bitcoind-rpc/rpc-client') const rpcLatestBlock = require('../bitcoind-rpc/latest-block') const Logger = require('../logger') const addrHelper = require('../bitcoin/addresses-helper') @@ -25,7 +25,7 @@ class BitcoindWrapper extends Wrapper { constructor() { super(null, null) // RPC client - this.client = new RpcClient() + this.client = createRpcClient() } /** @@ -35,7 +35,7 @@ class BitcoindWrapper extends Wrapper { * @returns {Promise} */ async _get(descriptors) { - return this.client.cmd('scantxoutset', 'start', descriptors) + return await this.client.scantxoutset({ action: 'start', scanobjects: descriptors }) } /** diff --git a/package-lock.json b/package-lock.json index 685da20..23d066f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "async-sema": "2.1.2", "axios": "0.21.1", "bip39": "2.4.0", - "bitcoind-rpc-client": "0.3.1", "bitcoinjs-lib": "5.2.0", "bitcoinjs-message": "1.0.1", "body-parser": "1.19.0", @@ -20,10 +19,12 @@ "jsonwebtoken": "8.5.1", "lodash": "4.17.21", "lru-cache": "4.0.2", + "make-concurrent": "5.3.0", "minimist": "1.2.5", "mysql": "2.18.1", "passport": "0.4.1", "passport-localapikey-update": "0.6.0", + "rpc-bitcoin": "2.0.0", "sirv": "1.0.11", "socks-proxy-agent": "4.0.1", "validator": "10.8.0", @@ -219,11 +220,40 @@ "node": ">=12.4.0" } }, + "node_modules/@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==" + }, "node_modules/@types/node": { "version": "10.12.18", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" }, + "node_modules/@types/request": { + "version": "2.48.5", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", + "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", + "dependencies": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + } + }, + "node_modules/@types/request-promise-native": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@types/request-promise-native/-/request-promise-native-1.0.17.tgz", + "integrity": "sha512-05/d0WbmuwjtGMYEdHIBZ0tqMJJQ2AD9LG2F6rKNBGX1SSFR27XveajH//2N/XYtual8T9Axwl+4v7oBtPUZqg==", + "dependencies": { + "@types/request": "*" + } + }, + "node_modules/@types/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==" + }, "node_modules/agent-base": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", @@ -235,6 +265,21 @@ "node": ">= 4.0.0" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-colors": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", @@ -327,6 +372,22 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "engines": { + "node": ">=0.8" + } + }, "node_modules/async-sema": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/async-sema/-/async-sema-2.1.2.tgz", @@ -335,6 +396,24 @@ "double-ended-queue": "2.1.0-0" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, "node_modules/axios": { "version": "0.21.1", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", @@ -343,14 +422,6 @@ "follow-redirects": "^1.10.0" } }, - "node_modules/babel-runtime": { - "version": "5.8.38", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.38.tgz", - "integrity": "sha1-HAsC62MxL18If/IEUIJ7QlydTBk=", - "dependencies": { - "core-js": "^1.0.0" - } - }, "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -365,6 +436,14 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, "node_modules/bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", @@ -445,19 +524,6 @@ "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz", "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==" }, - "node_modules/bitcoind-rpc-client": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/bitcoind-rpc-client/-/bitcoind-rpc-client-0.3.1.tgz", - "integrity": "sha1-bKiVn5H/f+O9I7f7XTAqnAKu/o0=", - "dependencies": { - "babel-runtime": "^5.8.20", - "make-concurrent": "^1.2.0", - "promise-useful-utils": "^0.2.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/bitcoinjs-lib": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz", @@ -756,6 +822,11 @@ "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -892,6 +963,17 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -919,11 +1001,6 @@ "node": ">= 0.6" } }, - "node_modules/core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" - }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -963,6 +1040,17 @@ "type": "^1.0.1" } }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/dasherize": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz", @@ -1016,6 +1104,14 @@ "node": ">= 0.4" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -1075,6 +1171,15 @@ "node": ">=0.10" } }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -1116,17 +1221,6 @@ "once": "^1.4.0" } }, - "node_modules/error-system": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/error-system/-/error-system-1.0.1.tgz", - "integrity": "sha1-BxU79HecB5Dnpg7QXvn0fRMYagI=", - "dependencies": { - "inherits": "^2.0.1" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/es-abstract": { "version": "1.17.6", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", @@ -1294,6 +1388,29 @@ "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, "node_modules/feature-policy": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz", @@ -1351,6 +1468,27 @@ "node": ">=4.0" } }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -1392,6 +1530,14 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", @@ -1435,6 +1581,27 @@ "node": ">=4.x" } }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -1594,6 +1761,20 @@ "node": ">= 0.8" } }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -1758,6 +1939,11 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, "node_modules/js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -1771,6 +1957,26 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "node_modules/json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, "node_modules/jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -1797,6 +2003,20 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, "node_modules/jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", @@ -1891,14 +2111,11 @@ } }, "node_modules/make-concurrent": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/make-concurrent/-/make-concurrent-1.2.0.tgz", - "integrity": "sha1-2XfixWy4hXfCyDlONAzZ7rJc80Y=", - "dependencies": { - "babel-runtime": "^5.8.20" - }, + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/make-concurrent/-/make-concurrent-5.3.0.tgz", + "integrity": "sha512-8si1KzXm7DiUXSbeOPliY9MrNVFGaEEgKZNctxz9FM3Ztx/cb5qiUazD/8WurKCJL05/zizZHBXYdjXRNAvtFA==", "engines": { - "node": ">=0.10" + "node": ">=7.6.0" } }, "node_modules/md5.js": { @@ -2187,6 +2404,14 @@ "node": ">=0.10.0" } }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -2368,6 +2593,11 @@ "node": ">=0.12" } }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, "node_modules/picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", @@ -2415,20 +2645,16 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, - "node_modules/promise-useful-utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/promise-useful-utils/-/promise-useful-utils-0.2.1.tgz", - "integrity": "sha1-pDgNGJnia/2kNB1hD4LKCOQmLqw=", - "dependencies": { - "babel-runtime": "^5.8.20", - "error-system": "^1.0.0" - } - }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, "node_modules/pump": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", @@ -2438,6 +2664,14 @@ "once": "^1.3.1" } }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, "node_modules/pushdata-bitcoin": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz", @@ -2580,6 +2814,89 @@ "node": ">=6" } }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dependencies": { + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", + "dependencies": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "engines": { + "node": ">=0.12.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request/node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "engines": { + "node": ">=0.6" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2604,6 +2921,38 @@ "inherits": "^2.0.1" } }, + "node_modules/rpc-bitcoin": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/rpc-bitcoin/-/rpc-bitcoin-2.0.0.tgz", + "integrity": "sha512-o+DJHCuuuTJIJgWD1De3fGWd/ulpHb/Nn87qSh0Zn6+ur1pvyJU6TzvIlYAW6EWtCCyZdwbEXL3+Jpmh3/7EvQ==", + "dependencies": { + "rpc-request": "^4.0.9" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "type": "Coinbase Commerce", + "url": "https://commerce.coinbase.com/checkout/89a70363-3d1f-4aa0-8d2a-1424ed9e87ee" + } + }, + "node_modules/rpc-request": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/rpc-request/-/rpc-request-4.0.10.tgz", + "integrity": "sha512-VQIogs0wYpRBxmliXxOK6sDj+BCS/AFwPjroffwg7l5Dxur0l1YkljtB/pdYj0p31U0seEiwKeYr0j7xTY0Clg==", + "dependencies": { + "@types/request-promise-native": "^1.0.17", + "request": "^2.88.2", + "request-promise-native": "^1.0.9" + }, + "engines": { + "node": ">=10.18.1" + }, + "funding": { + "type": "Coinbase Commerce", + "url": "https://commerce.coinbase.com/checkout/32948818-f4bb-4087-ae5e-1d29ecb86e64" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -2738,6 +3087,38 @@ "node": ">= 0.6" } }, + "node_modules/sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -2922,6 +3303,18 @@ "node": ">=6" } }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -2933,6 +3326,11 @@ "node": "*" } }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, "node_modules/type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -2979,6 +3377,14 @@ "node": ">= 0.8" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/utf-8-validate": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz", @@ -2993,6 +3399,14 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/validator": { "version": "10.8.0", "resolved": "https://registry.npmjs.org/validator/-/validator-10.8.0.tgz", @@ -3009,6 +3423,19 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, "node_modules/websocket": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", @@ -3390,11 +3817,40 @@ "resolved": "https://registry.npmjs.org/@tinyhttp/url/-/url-1.3.0.tgz", "integrity": "sha512-GgdKez5AaQRIm0kFNp7BZnxFQ2F7LZ7g3rOQ/v11oYZR3jhH7JPGM+7hZQjYqFXD/5TK/of7hepu418K2fghvg==" }, + "@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==" + }, "@types/node": { "version": "10.12.18", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" }, + "@types/request": { + "version": "2.48.5", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", + "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", + "requires": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + } + }, + "@types/request-promise-native": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@types/request-promise-native/-/request-promise-native-1.0.17.tgz", + "integrity": "sha512-05/d0WbmuwjtGMYEdHIBZ0tqMJJQ2AD9LG2F6rKNBGX1SSFR27XveajH//2N/XYtual8T9Axwl+4v7oBtPUZqg==", + "requires": { + "@types/request": "*" + } + }, + "@types/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==" + }, "agent-base": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", @@ -3403,6 +3859,17 @@ "es6-promisify": "^5.0.0" } }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-colors": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", @@ -3485,6 +3952,19 @@ "sprintf-js": "~1.0.2" } }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, "async-sema": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/async-sema/-/async-sema-2.1.2.tgz", @@ -3493,6 +3973,21 @@ "double-ended-queue": "2.1.0-0" } }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, "axios": { "version": "0.21.1", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", @@ -3501,14 +3996,6 @@ "follow-redirects": "^1.10.0" } }, - "babel-runtime": { - "version": "5.8.38", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.38.tgz", - "integrity": "sha1-HAsC62MxL18If/IEUIJ7QlydTBk=", - "requires": { - "core-js": "^1.0.0" - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -3523,6 +4010,14 @@ "safe-buffer": "^5.0.1" } }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, "bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", @@ -3591,16 +4086,6 @@ "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz", "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==" }, - "bitcoind-rpc-client": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/bitcoind-rpc-client/-/bitcoind-rpc-client-0.3.1.tgz", - "integrity": "sha1-bKiVn5H/f+O9I7f7XTAqnAKu/o0=", - "requires": { - "babel-runtime": "^5.8.20", - "make-concurrent": "^1.2.0", - "promise-useful-utils": "^0.2.0" - } - }, "bitcoinjs-lib": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz", @@ -3881,6 +4366,11 @@ "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -3997,6 +4487,14 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4018,11 +4516,6 @@ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, - "core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -4062,6 +4555,14 @@ "type": "^1.0.1" } }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, "dasherize": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz", @@ -4103,6 +4604,11 @@ "object-keys": "^1.0.12" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -4144,6 +4650,15 @@ "create-hmac": "^1.1.4" } }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, "ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -4185,14 +4700,6 @@ "once": "^1.4.0" } }, - "error-system": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/error-system/-/error-system-1.0.1.tgz", - "integrity": "sha1-BxU79HecB5Dnpg7QXvn0fRMYagI=", - "requires": { - "inherits": "^2.0.1" - } - }, "es-abstract": { "version": "1.17.6", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", @@ -4334,6 +4841,26 @@ } } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, "feature-policy": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz", @@ -4376,6 +4903,21 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==" }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -4414,6 +4956,14 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, "github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", @@ -4448,6 +4998,20 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4575,6 +5139,16 @@ } } }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -4703,6 +5277,11 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -4713,6 +5292,26 @@ "esprima": "^4.0.0" } }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, "jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -4737,6 +5336,17 @@ } } }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, "jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", @@ -4825,12 +5435,9 @@ } }, "make-concurrent": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/make-concurrent/-/make-concurrent-1.2.0.tgz", - "integrity": "sha1-2XfixWy4hXfCyDlONAzZ7rJc80Y=", - "requires": { - "babel-runtime": "^5.8.20" - } + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/make-concurrent/-/make-concurrent-5.3.0.tgz", + "integrity": "sha512-8si1KzXm7DiUXSbeOPliY9MrNVFGaEEgKZNctxz9FM3Ztx/cb5qiUazD/8WurKCJL05/zizZHBXYdjXRNAvtFA==" }, "md5.js": { "version": "1.3.5", @@ -5071,6 +5678,11 @@ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -5207,6 +5819,11 @@ "sha.js": "^2.4.8" } }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", @@ -5245,20 +5862,16 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, - "promise-useful-utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/promise-useful-utils/-/promise-useful-utils-0.2.1.tgz", - "integrity": "sha1-pDgNGJnia/2kNB1hD4LKCOQmLqw=", - "requires": { - "babel-runtime": "^5.8.20", - "error-system": "^1.0.0" - } - }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, "pump": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", @@ -5268,6 +5881,11 @@ "once": "^1.3.1" } }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, "pushdata-bitcoin": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz", @@ -5379,6 +5997,68 @@ "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-1.3.0.tgz", "integrity": "sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g==" }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + } + } + }, + "request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "requires": { + "lodash": "^4.17.19" + } + }, + "request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "requires": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5400,6 +6080,24 @@ "inherits": "^2.0.1" } }, + "rpc-bitcoin": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/rpc-bitcoin/-/rpc-bitcoin-2.0.0.tgz", + "integrity": "sha512-o+DJHCuuuTJIJgWD1De3fGWd/ulpHb/Nn87qSh0Zn6+ur1pvyJU6TzvIlYAW6EWtCCyZdwbEXL3+Jpmh3/7EvQ==", + "requires": { + "rpc-request": "^4.0.9" + } + }, + "rpc-request": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/rpc-request/-/rpc-request-4.0.10.tgz", + "integrity": "sha512-VQIogs0wYpRBxmliXxOK6sDj+BCS/AFwPjroffwg7l5Dxur0l1YkljtB/pdYj0p31U0seEiwKeYr0j7xTY0Clg==", + "requires": { + "@types/request-promise-native": "^1.0.17", + "request": "^2.88.2", + "request-promise-native": "^1.0.9" + } + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -5508,6 +6206,27 @@ "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=" }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -5669,6 +6388,15 @@ "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==" }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -5677,6 +6405,11 @@ "safe-buffer": "^5.0.1" } }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, "type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -5714,6 +6447,14 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, "utf-8-validate": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz", @@ -5727,6 +6468,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, "validator": { "version": "10.8.0", "resolved": "https://registry.npmjs.org/validator/-/validator-10.8.0.tgz", @@ -5740,6 +6486,16 @@ "safe-buffer": "^5.1.1" } }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, "websocket": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", diff --git a/package.json b/package.json index af18924..9ece7a7 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "async-sema": "2.1.2", "axios": "0.21.1", "bip39": "2.4.0", - "bitcoind-rpc-client": "0.3.1", "bitcoinjs-lib": "5.2.0", "bitcoinjs-message": "1.0.1", "body-parser": "1.19.0", @@ -26,10 +25,12 @@ "jsonwebtoken": "8.5.1", "lodash": "4.17.21", "lru-cache": "4.0.2", + "make-concurrent": "5.3.0", "minimist": "1.2.5", "mysql": "2.18.1", "passport": "0.4.1", "passport-localapikey-update": "0.6.0", + "rpc-bitcoin": "2.0.0", "sirv": "1.0.11", "socks-proxy-agent": "4.0.1", "validator": "10.8.0", diff --git a/pushtx/index-orchestrator.js b/pushtx/index-orchestrator.js index 15b0f85..ef581f7 100644 --- a/pushtx/index-orchestrator.js +++ b/pushtx/index-orchestrator.js @@ -8,7 +8,7 @@ const Logger = require('../lib/logger') const db = require('../lib/db/mysql-db-wrapper') - const RpcClient = require('../lib/bitcoind-rpc/rpc-client') + const { waitForBitcoindRpcApi } = require('../lib/bitcoind-rpc/rpc-client') const network = require('../lib/bitcoin/network') const keys = require('../keys')[network.key] const Orchestrator = require('./orchestrator') @@ -23,7 +23,7 @@ // Wait for Bitcoind RPC API // being ready to process requests - await RpcClient.waitForBitcoindRpcApi() + await waitForBitcoindRpcApi() // Initialize the db wrapper const dbConfig = { diff --git a/pushtx/index.js b/pushtx/index.js index 022e882..e8fa5f3 100644 --- a/pushtx/index.js +++ b/pushtx/index.js @@ -8,7 +8,7 @@ const Logger = require('../lib/logger') const db = require('../lib/db/mysql-db-wrapper') - const RpcClient = require('../lib/bitcoind-rpc/rpc-client') + const { waitForBitcoindRpcApi } = require('../lib/bitcoind-rpc/rpc-client') const network = require('../lib/bitcoin/network') const keys = require('../keys')[network.key] const HttpServer = require('../lib/http-server/http-server') @@ -24,7 +24,7 @@ // Wait for Bitcoind RPC API // being ready to process requests - await RpcClient.waitForBitcoindRpcApi() + await waitForBitcoindRpcApi() // Initialize the db wrapper const dbConfig = { diff --git a/pushtx/orchestrator.js b/pushtx/orchestrator.js index 8b4f54a..8c87931 100644 --- a/pushtx/orchestrator.js +++ b/pushtx/orchestrator.js @@ -8,7 +8,7 @@ const zmq = require('zeromq') const Sema = require('async-sema') const Logger = require('../lib/logger') const db = require('../lib/db/mysql-db-wrapper') -const RpcClient = require('../lib/bitcoind-rpc/rpc-client') +const { createRpcClient, isConnectionError } = require('../lib/bitcoind-rpc/rpc-client') const network = require('../lib/bitcoin/network') const keys = require('../keys')[network.key] const pushTxProcessor = require('./pushtx-processor') @@ -24,7 +24,7 @@ class Orchestrator { */ constructor() { // RPC client - this.rpcClient = new RpcClient() + this.rpcClient = createRpcClient() // ZeroMQ socket for bitcoind blocks messages this.blkSock = null // Initialize a semaphor protecting the onBlockHash() method @@ -77,7 +77,7 @@ class Orchestrator { // Retrieve the block height const blockHash = buf.toString('hex') - const header = await this.rpcClient.getblockheader(blockHash, true) + const header = await this.rpcClient.getblockheader({ blockhash: blockHash, verbose: true }) const height = header.height Logger.info(`Orchestrator : Block ${height} ${blockHash}`) @@ -100,7 +100,7 @@ class Orchestrator { // Check if previous transaction has been confirmed if (hasParentTx) { try { - parentTx = await this.rpcClient.getrawtransaction(tx.schParentTxid, true) + parentTx = await this.rpcClient.getrawtransaction({ txid: tx.schParentTxid, verbose: true }) } catch(e) { Logger.error(e, 'Orchestrator : Transaction.getTransaction()') } @@ -116,7 +116,7 @@ class Orchestrator { Logger.error(e, `Orchestrator : Orchestrator.onBlockHash() : ${msg}`) // Check if it's an issue with the connection to the RPC API // (=> immediately stop the loop) - if (RpcClient.isConnectionError(e)) { + if (isConnectionError(e)) { Logger.info('Orchestrator : Connection issue') rpcConnOk = false break diff --git a/pushtx/pushtx-processor.js b/pushtx/pushtx-processor.js index 07a6593..11766e6 100644 --- a/pushtx/pushtx-processor.js +++ b/pushtx/pushtx-processor.js @@ -9,7 +9,7 @@ const zmq = require('zeromq') const Logger = require('../lib/logger') const errors = require('../lib/errors') const db = require('../lib/db/mysql-db-wrapper') -const RpcClient = require('../lib/bitcoind-rpc/rpc-client') +const { createRpcClient } = require('../lib/bitcoind-rpc/rpc-client') const addrHelper = require('../lib/bitcoin/addresses-helper') const network = require('../lib/bitcoin/network') const activeNet = network.network @@ -37,7 +37,7 @@ class PushTxProcessor { this.notifSock = null this.sources = new Sources() // Initialize the rpc client - this.rpcClient = new RpcClient() + this.rpcClient = createRpcClient() } /** @@ -109,7 +109,7 @@ class PushTxProcessor { // At this point, the raw hex parses as a legitimate transaction. // Attempt to send via RPC to the bitcoind instance try { - const txid = await this.rpcClient.sendrawtransaction(rawtx) + const txid = await this.rpcClient.sendrawtransaction({ hexstring: rawtx }) Logger.info('PushTx : Pushed!') // Update the stats status.updateStats(value) diff --git a/pushtx/status.js b/pushtx/status.js index ec60a0e..7a1aa40 100644 --- a/pushtx/status.js +++ b/pushtx/status.js @@ -10,7 +10,7 @@ const Logger = require('../lib/logger') const db = require('../lib/db/mysql-db-wrapper') const network = require('../lib/bitcoin/network') const keys = require('../keys')[network.key] -const RpcClient = require('../lib/bitcoind-rpc/rpc-client') +const { createRpcClient } = require('../lib/bitcoind-rpc/rpc-client') /** @@ -49,7 +49,7 @@ class Status { amount: 0, count: 0 } - this.rpcClient = new RpcClient() + this.rpcClient = createRpcClient() } /** @@ -106,7 +106,7 @@ class Status { * Refresh network info */ async _refreshNetworkInfo() { - const info = await this.rpcClient.getNetworkInfo() + const info = await this.rpcClient.getnetworkinfo() this.status.bitcoind.conn = info.connections this.status.bitcoind.version = info.version this.status.bitcoind.protocolversion = info.protocolversion @@ -117,9 +117,9 @@ class Status { * Refresh blockchain info */ async _refreshBlockchainInfo() { - const info = await this.rpcClient.getBlockchainInfo() + const info = await this.rpcClient.getblockchaininfo() this.status.bitcoind.blocks = info.blocks - this.status.bitcoind.testnet = (info.chain != 'main') + this.status.bitcoind.testnet = (info.chain !== 'main') this.status.bitcoind.up = true } diff --git a/pushtx/transactions-scheduler.js b/pushtx/transactions-scheduler.js index 11f085c..00b845c 100644 --- a/pushtx/transactions-scheduler.js +++ b/pushtx/transactions-scheduler.js @@ -10,7 +10,7 @@ const errors = require('../lib/errors') const db = require('../lib/db/mysql-db-wrapper') const network = require('../lib/bitcoin/network') const keys = require('../keys')[network.key] -const RpcClient = require('../lib/bitcoind-rpc/rpc-client') +const { createRpcClient } = require('../lib/bitcoind-rpc/rpc-client') const pushTxProcessor = require('./pushtx-processor') @@ -23,7 +23,7 @@ class TransactionsScheduler { * Constructor */ constructor() { - this.rpcClient = new RpcClient() + this.rpcClient = createRpcClient() } /** @@ -41,7 +41,7 @@ class TransactionsScheduler { script.sort((a,b) => a.hop - b.hop || a.nlocktime - b.nlocktime) // Get the height of last block seen - const info = await this.rpcClient.getBlockchainInfo() + const info = await this.rpcClient.getblockchaininfo() const lastHeight = info.blocks // Get the nLockTime associated to the first transaction diff --git a/scripts/create-first-blocks.js b/scripts/create-first-blocks.js index e103420..bed335d 100644 --- a/scripts/create-first-blocks.js +++ b/scripts/create-first-blocks.js @@ -9,7 +9,7 @@ const Logger = require('../lib/logger') const util = require('../lib/util') const db = require('../lib/db/mysql-db-wrapper') const network = require('../lib/bitcoin/network') -const RpcClient = require('../lib/bitcoind-rpc/rpc-client') +const { createRpcClient } = require('../lib/bitcoind-rpc/rpc-client') const keys = require('../keys')[network.key] @@ -19,7 +19,7 @@ const keys = require('../keys')[network.key] */ // RPC Client requests data from bitcoind -let client = new RpcClient() +let client = createRpcClient() // Database id of the previous block let prevID = null; @@ -28,10 +28,10 @@ let prevID = null; async function processBlock(height) { Logger.info('Start processing block ' + height) - const blockHash = await client.getblockhash(height) + const blockHash = await client.getblockhash({ height }) if (blockHash) { - const header = await client.getblockheader(blockHash, true) + const header = await client.getblockheader({ blockhash: blockHash, verbose: true }) if (header) { const dbBlock = { diff --git a/tracker/block-worker.js b/tracker/block-worker.js index 9601aa8..f19a2ef 100644 --- a/tracker/block-worker.js +++ b/tracker/block-worker.js @@ -8,7 +8,7 @@ const { isMainThread, parentPort } = require('worker_threads') const network = require('../lib/bitcoin/network') const keys = require('../keys')[network.key] const db = require('../lib/db/mysql-db-wrapper') -const RpcClient = require('../lib/bitcoind-rpc/rpc-client') +const { createRpcClient } = require('../lib/bitcoind-rpc/rpc-client') const Block = require('./block') @@ -104,7 +104,7 @@ async function processMessage(msg) { */ async function initBlock(header) { status = INITIALIZED - const hex = await rpcClient.getblock(header.hash, false) + const hex = await rpcClient.getblock({ blockhash: header.hash, verbosity: 0 }) block = new Block(hex, header) return true } @@ -153,7 +153,7 @@ function reset() { /** * MAIN */ -const rpcClient = new RpcClient() +const rpcClient = createRpcClient() let block = null let txsForBroadcast = [] let status = IDLE diff --git a/tracker/blockchain-processor.js b/tracker/blockchain-processor.js index 695685d..15185de 100644 --- a/tracker/blockchain-processor.js +++ b/tracker/blockchain-processor.js @@ -11,7 +11,7 @@ const util = require('../lib/util') const Logger = require('../lib/logger') const db = require('../lib/db/mysql-db-wrapper') const network = require('../lib/bitcoin/network') -const RpcClient = require('../lib/bitcoind-rpc/rpc-client') +const { createRpcClient } = require('../lib/bitcoind-rpc/rpc-client') const keys = require('../keys')[network.key] const Block = require('./block') const blocksProcessor = require('./blocks-processor') @@ -28,7 +28,7 @@ class BlockchainProcessor { */ constructor(notifSock) { // RPC client - this.client = new RpcClient() + this.client = createRpcClient() // ZeroMQ socket for bitcoind blocks messages this.blkSock = null // Initialize a semaphor protecting the onBlockHash() method @@ -117,8 +117,8 @@ class BlockchainProcessor { await util.seriesCall(blockRange, async height => { try { - const blockHash = await this.client.getblockhash(height) - const header = await this.client.getblockheader(blockHash, true) + const blockHash = await this.client.getblockhash({ height }) + const header = await this.client.getblockheader({ blockhash: blockHash, verbose: true }) prevBlockId = await this.processBlockHeader(header, prevBlockId) } catch(e) { Logger.error(e, 'Tracker : BlockchainProcessor.catchupIBDMode()') @@ -236,7 +236,7 @@ class BlockchainProcessor { let headers = null try { - const header = await this.client.getblockheader(blockHash, true) + const header = await this.client.getblockheader({ blockhash: blockHash, verbose: true }) Logger.info(`Tracker : Block #${header.height} ${blockHash}`) // Grab all headers between this block and last known headers = await this.chainBacktrace([header]) @@ -286,7 +286,7 @@ class BlockchainProcessor { if (block == null) { // Previous block does not exist in database. Grab from bitcoind - const header = await this.client.getblockheader(deepest.previousblockhash, true) + const header = await this.client.getblockheader({ blockhash: deepest.previousblockhash, verbose: true }) headers.push(header) return this.chainBacktrace(headers) } else { @@ -363,8 +363,8 @@ class BlockchainProcessor { return util.seriesCall(chunks, async chunk => { const headers = await util.parallelCall(chunk, async height => { - const hash = await this.client.getblockhash(height) - return await this.client.getblockheader(hash) + const hash = await this.client.getblockhash({ height }) + return await this.client.getblockheader({ blockhash: hash }) }) return this.processBlocks(headers) }) diff --git a/tracker/index.js b/tracker/index.js index bbbed6a..b08887c 100644 --- a/tracker/index.js +++ b/tracker/index.js @@ -6,7 +6,7 @@ 'use strict' - const RpcClient = require('../lib/bitcoind-rpc/rpc-client') + const { waitForBitcoindRpcApi } = require('../lib/bitcoind-rpc/rpc-client') const network = require('../lib/bitcoin/network') const keys = require('../keys')[network.key] const db = require('../lib/db/mysql-db-wrapper') @@ -21,7 +21,7 @@ // Wait for Bitcoind RPC API // being ready to process requests - await RpcClient.waitForBitcoindRpcApi() + await waitForBitcoindRpcApi() // Initialize the db wrapper const dbConfig = { diff --git a/tracker/mempool-processor.js b/tracker/mempool-processor.js index 4420482..bd30ef3 100644 --- a/tracker/mempool-processor.js +++ b/tracker/mempool-processor.js @@ -11,7 +11,7 @@ const util = require('../lib/util') const Logger = require('../lib/logger') const db = require('../lib/db/mysql-db-wrapper') const network = require('../lib/bitcoin/network') -const RpcClient = require('../lib/bitcoind-rpc/rpc-client') +const { createRpcClient } = require('../lib/bitcoind-rpc/rpc-client') const keys = require('../keys')[network.key] const Transaction = require('./transaction') const TransactionsBundle = require('./transactions-bundle') @@ -28,7 +28,7 @@ class MempoolProcessor { */ constructor(notifSock) { // RPC client - this.client = new RpcClient() + this.client = createRpcClient() // ZeroMQ socket for notifications sent to others components this.notifSock = notifSock // Mempool buffer @@ -261,7 +261,7 @@ class MempoolProcessor { if (unconfirmedTxs.length > 0) { await util.parallelCall(unconfirmedTxs, tx => { try { - return this.client.getrawtransaction(tx.txnTxid, true) + return this.client.getrawtransaction( { txid: tx.txnTxid, verbose: true }) .then(async rtx => { if (!rtx.blockhash) return null // Transaction is confirmed