diff --git a/package-lock.json b/package-lock.json index 0b56232..e15f7e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -810,11 +810,6 @@ "resolved": "https://registry.npmjs.org/@transloadit/prettier-bytes/-/prettier-bytes-0.0.7.tgz", "integrity": "sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA==" }, - "@types/big.js": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/big.js/-/big.js-4.0.5.tgz", - "integrity": "sha512-D9KFrAt05FDSqLo7PU9TDHfDgkarlwdkuwFsg7Zm4xl62tTNaz+zN+Tkcdx2wGLBbSMf8BnoMhOVeUGUaJfLKg==" - }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", @@ -2243,14 +2238,6 @@ "safe-buffer": "^5.0.1" } }, - "bitcoin-rpc-promise-retry": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/bitcoin-rpc-promise-retry/-/bitcoin-rpc-promise-retry-1.3.0.tgz", - "integrity": "sha512-xhldBhYwiUNY4spzkXXcU9LEq+nbSKJ5tvYWEUe/XTCe1VYoe8tEb5jJq4MBA2d+5egiUOA+P1QTTYm1FqPtOg==", - "requires": { - "bitcoind-rpc": "^0.8.0" - } - }, "bitcoincash-ops": { "version": "github:christroutner/bitcoincash-ops#0041f2d945aa0e893fbbb5c2ebdf6254f6ff0555", "from": "github:christroutner/bitcoincash-ops" @@ -2281,11 +2268,6 @@ "wif": "^2.0.1" } }, - "bitcoind-rpc": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/bitcoind-rpc/-/bitcoind-rpc-0.8.1.tgz", - "integrity": "sha512-NfhykAT/x/P1SOiog8UzltvTiv6A6d2X5VWJ3UjGeAqFLXv+IYHy+E4fFCBmgQRyIb1EIcyIZK1SVpSOGRHsaw==" - }, "bitcoinjs-message": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/bitcoinjs-message/-/bitcoinjs-message-2.1.3.tgz", @@ -13365,11 +13347,6 @@ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, - "p-cancelable": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.0.0.tgz", - "integrity": "sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg==" - }, "p-each-series": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz", @@ -15304,22 +15281,6 @@ "bignumber.js": "^9.0.0" } }, - "slp-validate": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/slp-validate/-/slp-validate-1.2.2.tgz", - "integrity": "sha512-V6XV44qup2gssw4+7ETGoK5eDdvs9UwTA5/bbyk3NhQzQzMq64hDlySJi8qC1R3pkFMbqoFslHUMbZKTm7VVQA==", - "requires": { - "@types/big.js": "^4.0.5", - "big.js": "5.2.2" - }, - "dependencies": { - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" - } - } - }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", diff --git a/package.json b/package.json index 4478854..9d226ba 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "@psf/bch-js": "^3.6.3", "apidoc": "^0.23.0", "axios": "^0.19.0", - "bitcoin-rpc-promise-retry": "^1.3.0", "bitcore-lib-cash": "^8.20.3", "body-parser": "^1.18.3", "cookie-parser": "~1.4.3", @@ -50,15 +49,12 @@ "mocha": "^7.1.1", "morgan": "^1.9.1", "mqtt": "^4.0.0", - "p-cancelable": "^2.0.0", - "p-timeout": "^3.2.0", "passport": "^0.4.0", "passport-anonymous": "^1.0.1", "passport-http": "^0.3.0", "pg": "^8.0.0", "pg-hstore": "^2.3.2", "rate-limiter-flexible": "^2.0.0", - "slp-validate": "^1.2.2", "winston": "^3.2.1", "winston-daily-rotate-file": "^4.0.0" }, diff --git a/src/routes/v3/slp.js b/src/routes/v3/slp.js index 5c79d0b..42130ed 100644 --- a/src/routes/v3/slp.js +++ b/src/routes/v3/slp.js @@ -10,14 +10,6 @@ const routeUtils = new RouteUtils() const Slpdb = require('./services/slpdb') -// slp-validate dependencies. Used to validate SLP TXIDs independent of SLPDB. -const slpValidate = require('slp-validate') -const ValidatorType1 = slpValidate.ValidatorType1 -const RpcClient = require('bitcoin-rpc-promise-retry') -const RPC_CONNECTION_STRING = `http://${process.env.RPC_USERNAME}:${process.env.RPC_PASSWORD}@${process.env.RPC_IP}` -const pTimeout = require('p-timeout') -const PCancelable = require('p-cancelable') - // const strftime = require('strftime') const wlogger = require('../../util/winston-logging') @@ -68,17 +60,6 @@ class Slp { _this.rawTransactions = rawTransactions _this.slpdb = new Slpdb() - // Instantiate and encapsulate slp-validate and dependencies. - _this.rpc = new RpcClient(RPC_CONNECTION_STRING) - _this.slpValidator = new ValidatorType1({ - getRawTransaction: async (txid) => { - const rawTx = await _this.rpc.getRawTransaction(txid) - // console.log(`rawTx: ${JSON.stringify(rawTx, null, 2)}`) - return rawTx - } - }) - _this.pTimeout = pTimeout - _this.router = router _this.router.get('/', _this.root)