> bch-api@2.0.0 test > npm run lint && npm run test-v5 > bch-api@2.0.0 lint > standard --env mocha --fix > bch-api@2.0.0 test-v5 > export NETWORK=mainnet && nyc --reporter=text mocha --exit --timeout 60000 test/v5/ Initializing minimal-slp-wallet routers with this interface: rest-api #Electrumx Testing type is: integration #root ✓ should respond to GET for base route #getBalance ✓ should throw 400 if address is empty ✓ should throw 400 on array input ✓ should throw an error for an invalid address ✓ should detect a network mismatch ✓ should pass errors from electrum-cash to user 1) should get balance for a single address result: { "success": false, "error": "404 page not found\n" } 2) should get balance for a single eCash address #balanceBulk ✓ should throw 400 if addresses is empty ✓ should throw 400 if input provided is not array ✓ should throw 400 error if addresses array is too large ✓ should throw an error for an invalid address ✓ should detect a network mismatch ✓ should pass errors from electrum-cash to user ✓ should handle error 3) should get balance for an array of addresses #getUtxos ✓ should throw 400 if address is empty ✓ should throw 400 on array input Error in elecrumx.js/getUtxos(). Error: Unsupported address format : 02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c at Address._decode (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/@psf/bch-js/src/address.js:303:11) at Address.toCashAddress (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/@psf/bch-js/src/address.js:116:26) at Electrum.getUtxos (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/electrumx.js:97:252) at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/a01-electrumx.js:444:43) at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21) at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7) at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14) at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)  at process.processImmediate (node:internal/timers:483:21) { [stack]: 'Error: Unsupported address format : 02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c\n' + ' at Address._decode (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/@psf/bch-js/src/address.js:303:11)\n' + ' at Address.toCashAddress (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/@psf/bch-js/src/address.js:116:26)\n' + ' at Electrum.getUtxos (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/electrumx.js:97:252)\n' + ' at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/a01-electrumx.js:444:43)\n' + ' at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21)\n' + ' at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7)\n' + ' at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14)\n' + ' at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)\n' + ' at process.processImmediate (node:internal/timers:483:21)', [message]: 'Unsupported address format : 02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c' } ✓ should throw an error for an invalid address ✓ should detect a network mismatch Error in elecrumx.js/getUtxos(). Error: Unsupported address format : bitcoincash:qr69kyzha07dcecrsvjwsj4s6slnlq4r8c30lxnur2 at Address._decode (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/@psf/bch-js/src/address.js:303:11) at Address.toCashAddress (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/@psf/bch-js/src/address.js:116:26) at Electrum.getUtxos (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/electrumx.js:97:252) at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/a01-electrumx.js:477:43) at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21) at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7) at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14) at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)  at process.processImmediate (node:internal/timers:483:21) { [stack]: 'Error: Unsupported address format : bitcoincash:qr69kyzha07dcecrsvjwsj4s6slnlq4r8c30lxnur2\n' + ' at Address._decode (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/@psf/bch-js/src/address.js:303:11)\n' + ' at Address.toCashAddress (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/@psf/bch-js/src/address.js:116:26)\n' + ' at Electrum.getUtxos (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/electrumx.js:97:252)\n' + ' at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/a01-electrumx.js:477:43)\n' + ' at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21)\n' + ' at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7)\n' + ' at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14)\n' + ' at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)\n' + ' at process.processImmediate (node:internal/timers:483:21)', [message]: 'Unsupported address format : bitcoincash:qr69kyzha07dcecrsvjwsj4s6slnlq4r8c30lxnur2' } ✓ should pass errors from electrum-cash to user Error in elecrumx.js/getUtxos(). Error: Request failed with status code 404 at createError (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/createError.js:16:15) at settle (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/adapters/http.js:269:11)  at IncomingMessage.emit (node:events:531:35)  at endReadableNT (node:internal/streams/readable:1696:12)  at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { [stack]: 'Error: Request failed with status code 404\n' + ' at createError (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/createError.js:16:15)\n' + ' at settle (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/settle.js:17:12)\n' + ' at IncomingMessage.handleStreamEnd (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/adapters/http.js:269:11)\n' + ' at IncomingMessage.emit (node:events:531:35)\n' + ' at endReadableNT (node:internal/streams/readable:1696:12)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:82:21)', [message]: 'Request failed with status code 404', config: { url: 'http://fulcrum-api.fullstackbch.nl/v1/electrumx/utxos/bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7', method: 'get', headers: [Object], transformRequest: [Array], transformResponse: [Array], timeout: 0, adapter: [Function], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function], transitional: [Object], data: undefined }, request: ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [Array], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'GET /v1/electrumx/utxos/bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7 HTTP/1.1\r\n' + 'Accept: application/json, text/plain, */*\r\n' + 'User-Agent: axios/0.21.4\r\n' + 'Host: fulcrum-api.fullstackbch.nl\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/v1/electrumx/utxos/bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: true, host: 'fulcrum-api.fullstackbch.nl', protocol: 'http:', _redirectable: [Writable], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null, [errored]: [Getter], [closed]: [Getter], [writableFinished]: [Getter], [writableObjectMode]: [Getter], [writableLength]: [Getter], [writableHighWaterMark]: [Getter], [writableCorked]: [Getter], [_headers]: [Getter/Setter], [connection]: [Getter/Setter], [_headerNames]: [Getter/Setter], headersSent: [Getter], [writableEnded]: [Getter], [writableNeedDrain]: [Getter] }, response: { status: 404, statusText: 'Not Found', headers: [Object], config: [Object], request: [ClientRequest], data: '404 page not found\n' }, isAxiosError: true, toJSON: [Function: toJSON] { [length]: 0, [name]: 'toJSON', [prototype]: [Object] } } 4) should get utxos for a single address #utxosBulk ✓ should throw 400 if addresses is empty ✓ should throw 400 if input provided is not array ✓ should throw 400 error if addresses array is too large ✓ should throw an error for an invalid address ✓ should detect a network mismatch ✓ should pass errors from electrum-cash to user ✓ should handle error 5) should get utxos for an array of addresses #getTransactionDetails ✓ should throw 400 if tx is empty ✓ should throw 400 on array input err: Error: Request failed with status code 404 at createError (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/createError.js:16:15) at settle (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/adapters/http.js:269:11)  at IncomingMessage.emit (node:events:531:35)  at endReadableNT (node:internal/streams/readable:1696:12)  at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { [stack]: 'Error: Request failed with status code 404\n' + ' at createError (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/createError.js:16:15)\n' + ' at settle (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/settle.js:17:12)\n' + ' at IncomingMessage.handleStreamEnd (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/adapters/http.js:269:11)\n' + ' at IncomingMessage.emit (node:events:531:35)\n' + ' at endReadableNT (node:internal/streams/readable:1696:12)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:82:21)', [message]: 'Request failed with status code 404', config: { url: 'http://fulcrum-api.fullstackbch.nl/v1/electrumx/tx/data/02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c', method: 'get', headers: [Object], transformRequest: [Array], transformResponse: [Array], timeout: 0, adapter: [Function], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function], transitional: [Object], data: undefined }, request: ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [Array], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'GET /v1/electrumx/tx/data/02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c HTTP/1.1\r\n' + 'Accept: application/json, text/plain, */*\r\n' + 'User-Agent: axios/0.21.4\r\n' + 'Host: fulcrum-api.fullstackbch.nl\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/v1/electrumx/tx/data/02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: true, host: 'fulcrum-api.fullstackbch.nl', protocol: 'http:', _redirectable: [Writable], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null, [errored]: [Getter], [closed]: [Getter], [writableFinished]: [Getter], [writableObjectMode]: [Getter], [writableLength]: [Getter], [writableHighWaterMark]: [Getter], [writableCorked]: [Getter], [_headers]: [Getter/Setter], [connection]: [Getter/Setter], [_headerNames]: [Getter/Setter], headersSent: [Getter], [writableEnded]: [Getter], [writableNeedDrain]: [Getter] }, response: { status: 404, statusText: 'Not Found', headers: [Object], config: [Object], request: [ClientRequest], data: '404 page not found\n' }, isAxiosError: true, toJSON: [Function: toJSON] { [length]: 0, [name]: 'toJSON', [prototype]: [Object] } } 6) should pass errors from electrum-cash to user err: Error: Request failed with status code 404 at createError (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/createError.js:16:15) at settle (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/adapters/http.js:269:11)  at IncomingMessage.emit (node:events:531:35)  at endReadableNT (node:internal/streams/readable:1696:12)  at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { [stack]: 'Error: Request failed with status code 404\n' + ' at createError (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/createError.js:16:15)\n' + ' at settle (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/core/settle.js:17:12)\n' + ' at IncomingMessage.handleStreamEnd (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/axios/lib/adapters/http.js:269:11)\n' + ' at IncomingMessage.emit (node:events:531:35)\n' + ' at endReadableNT (node:internal/streams/readable:1696:12)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:82:21)', [message]: 'Request failed with status code 404', config: { url: 'http://fulcrum-api.fullstackbch.nl/v1/electrumx/tx/data/a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d', method: 'get', headers: [Object], transformRequest: [Array], transformResponse: [Array], timeout: 0, adapter: [Function], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function], transitional: [Object], data: undefined }, request: ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [Array], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'GET /v1/electrumx/tx/data/a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d HTTP/1.1\r\n' + 'Accept: application/json, text/plain, */*\r\n' + 'User-Agent: axios/0.21.4\r\n' + 'Host: fulcrum-api.fullstackbch.nl\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/v1/electrumx/tx/data/a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: true, host: 'fulcrum-api.fullstackbch.nl', protocol: 'http:', _redirectable: [Writable], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null, [errored]: [Getter], [closed]: [Getter], [writableFinished]: [Getter], [writableObjectMode]: [Getter], [writableLength]: [Getter], [writableHighWaterMark]: [Getter], [writableCorked]: [Getter], [_headers]: [Getter/Setter], [connection]: [Getter/Setter], [_headerNames]: [Getter/Setter], headersSent: [Getter], [writableEnded]: [Getter], [writableNeedDrain]: [Getter] }, response: { status: 404, statusText: 'Not Found', headers: [Object], config: [Object], request: [ClientRequest], data: '404 page not found\n' }, isAxiosError: true, toJSON: [Function: toJSON] { [length]: 0, [name]: 'toJSON', [prototype]: [Object] } } 7) should get details for a single tx #transactionDetailsBulk ✓ should throw 400 if txids is empty ✓ should throw 400 if input provided is not array ✓ should throw 400 error if addresses array is too large ✓ should handle error 8) should get details for an array of tx #broadcastTransaction ✓ should throw 400 if txHex is empty ✓ should throw 400 on invalid input type 9) should pass errors from electrum-cash to user - should broadcast transaction #getBlockHeaders ✓ should throw 400 if height is empty ✓ should throw 400 if height is not a number ✓ should throw 400 if height is negative ✓ should throw 400 if count is not a number ✓ should throw 400 if count is negative 10) should pass errors from electrum-cash to user ✓ should handle error 11) should get headers for a single block height with count 2 #blockHeadersBulk ✓ should throw 400 for an empty body result: { success: false, error: '404 page not found\n' } 12) should NOT throw 400 error for an invalid height ✓ should throw 400 error if heights array is too large ✓ should handle error 13) should get block heights #getTransactions ✓ should throw 400 if address is empty ✓ should throw 400 on array input ✓ should throw an error for an invalid address ✓ should detect a network mismatch ✓ should pass errors from electrum-cash to user 14) should get transaction for a single address #transactionsBulk ✓ should throw 400 if addresses is empty ✓ should throw 400 if input provided is not array ✓ should throw 400 error if addresses array is too large ✓ should throw an error for an invalid address ✓ should detect a network mismatch ✓ should pass errors from electrum-cash to user ✓ should handle error result: { "success": false, "error": "404 page not found\n" } 15) should get transaction for an array of addresses #getMempool ✓ should throw 400 if address is empty ✓ should throw 400 on array input ✓ should throw an error for an invalid address ✓ should detect a network mismatch ✓ should pass errors from electrum-cash to user 16) should get mempool for a single address #mempoolBulk ✓ should throw 400 if addresses is empty ✓ should throw 400 if input provided is not array ✓ should throw 400 error if addresses array is too large ✓ should throw an error for an invalid address ✓ should detect a network mismatch ✓ should pass errors from electrum-cash to user ✓ should handle error 17) should get mempool for multiple addresses #bcash-slp Testing type is: integration #root ✓ should respond to GET for base route #getUtxos ✓ should return UTXOs for an address, hydrated with SLP info ✓ should handle error if address is array ✓ should throw error if address has invalid format ✓ should catch axios error #hydrateUTXOS ✓ should hydrate slp utxos Error: UTXOs must be an array of slp utxos at BcashSlp.hydrateUTXOS (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/bcash/slp.js:31:184) at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/bcash-slp.js:181:24) at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21) at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7) at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14) at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)  at process.processImmediate (node:internal/timers:483:21) { [stack]: 'Error: UTXOs must be an array of slp utxos\n' + ' at BcashSlp.hydrateUTXOS (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/bcash/slp.js:31:184)\n' + ' at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/bcash-slp.js:181:24)\n' + ' at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21)\n' + ' at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7)\n' + ' at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14)\n' + ' at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)\n' + ' at process.processImmediate (node:internal/timers:483:21)', [message]: 'UTXOs must be an array of slp utxos' } ✓ should throw error if utxos is not provided ✓ should handle error #getTokenInfo ✓ should return SLP info for an token id Error: tokenId must be string at BcashSlp.getTokenInfo (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/bcash/slp.js:33:256) at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/bcash-slp.js:216:24) at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21) at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7) at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14) at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)  at process.processImmediate (node:internal/timers:483:21) { [stack]: 'Error: tokenId must be string\n' + ' at BcashSlp.getTokenInfo (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/bcash/slp.js:33:256)\n' + ' at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/bcash-slp.js:216:24)\n' + ' at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21)\n' + ' at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7)\n' + ' at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14)\n' + ' at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)\n' + ' at process.processImmediate (node:internal/timers:483:21)', [message]: 'tokenId must be string' } ✓ should throw error if token id is not provided Error: test error at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/bcash-slp.js:224:52) at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21) at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7) at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14) at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)  at process.processImmediate (node:internal/timers:483:21) { [stack]: 'Error: test error\n' + ' at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/bcash-slp.js:224:52)\n' + ' at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21)\n' + ' at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7)\n' + ' at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14)\n' + ' at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)\n' + ' at process.processImmediate (node:internal/timers:483:21)', [message]: 'test error' } ✓ should catch axios error #errorHandler ✓ should handle unexpected errors #BlockchainRouter #root ✓ should respond to GET for base route getBestBlockHash() ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 18) should GET /getBestBlockHash getBlockchainInfo() ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 19) should GET /getBlockchainInfo getBlockCount() ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 20) should GET /getBlockCount getBlockHeaderSingle() ✓ should throw 400 error if hash is missing ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 21) should GET block header 22) should GET verbose block header #getBlockHeaderBulk ✓ should throw an error for an empty body ✓ should error on non-array single hash ✓ should throw 400 error if addresses array is too large ✓ should throw a 400 error for an invalid hash ✓ should throw 500 when network issues (15012ms) ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 23) should get concise block header for a single hash 24) should get verbose block header for a single hash 25) should get details for multiple block heights getChainTips() ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 26) should GET /getChainTips getDifficulty() ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 27) should GET /getDifficulty getMempoolInfo() ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 28) should GET /getMempoolInfo getRawMempool() ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 29) should GET /getRawMempool getMempoolEntrySingle() ✓ should throw 400 if txid is empty ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 30) should GET /getMempoolEntry #getMempoolEntryBulk ✓ should throw an error for an empty body ✓ should error on non-array single txid ✓ should throw 400 error if addresses array is too large ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 31) should retrieve single mempool entry 32) should retrieve multiple mempool entries getMempoolAncestorsSingle() ✓ should throw 400 if txid is empty ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ should GET /getMempoolAncestorsSingle getTxOut() ✓ should throw 400 if txid is empty ✓ should throw 400 if n is empty ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 33) should GET /getTxOut getTxOutPost() ✓ should throw 400 if txid is empty ✓ should throw 400 if n is empty ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 34) should POST /getTxOut getTxOutProofSingle() ✓ should throw 400 if txid is empty ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 35) should GET /getTxOutProof #getTxOutProofBulk ✓ should throw an error for an empty body ✓ should error on non-array single txid ✓ should throw 400 error if addresses array is too large ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 36) should GET proof for single txid 37) should GET proof for multiple txids verifyTxOutProofSingle() ✓ should throw 400 if proof is empty ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 38) should GET /verifyTxOutProof #verifyTxOutProofBulk ✓ should throw an error for an empty body ✓ should error on non-array single txid ✓ should throw 400 error if addresses array is too large ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 39) should get single proof 40) should get multiple proofs #getBlock() ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ should throw 400 if blockhash is empty 41) should return block info with verbosity 0 42) should return block info with verbosity 1 43) should return block info with verbosity 2 44) should return block info without verbosity especified #ControlRouter #root ✓ should respond to GET for base route #GetNetworkInfo ✓ should throw 500 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 45) should get info on the full node #DSProof #root ✓ should respond to GET for base route #getDSProof ✓ should throw 400 error if txid is missing ✓ should throw 400 error if txid is invalid ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down - should GET double-spend proof #Encryption Router #root ✓ should respond to GET for base route #getPublicKey 46) should get public key from blockchain ✓ should return false for address with no send history (4127ms) #JWTRouter #root ✓ should respond to GET for base route #jwtInfo result: { error: 'jwt expired' } ✓ should decode the JWT token ✓ should return an error with malformed JWT token #Mining #root ✓ should respond to GET for base route #getMiningInfo ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 47) should GET mining information #getNetworkHashPS ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 48) should GET Network Hash per second #PriceRouter #root ✓ should respond to GET for base route #getUSD ✓ should throw 500 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ should get the USD price of BCH (327ms) #getBCHRate ✓ should throw 500 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ should get several rates for BCH #errorHandler ✓ should handle unexpected errors #getBCHAUSD ✓ should throw 500 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ should get the USD price of BCH (253ms) #getBCHUSD ✓ should throw 500 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ should get the USD price of BCH (239ms) #PsfSlpIndexer #root ✓ should respond to GET for base route #getTokenStats ✓ should throw 400 error if tokenId is missing ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down - should GET tokens stats - should GET tokens stats with tx hisroty #getTxid ✓ should throw 400 error if txid is missing ✓ should throw 400 error if txid is invalid format ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down - should GET tx data #getAddress ✓ should throw 400 error if address is missing ✓ should throw 400 error if address is invalid format ✓ should throw 400 error for invalid network address (38ms) ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down - should GET address data - should GET data for ecash address #getStatus ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down - should GET indexer status #errorHandler ✓ should handle unexpected errors ✓ should handle unknow errors #checkEnvVar ✓ should throw errors if SLP_INDEXER_API env var is not provided #getCIDData Error in getCIDData(): Error: cid must be a string. at PsfSlpIndexer.getCIDData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:169:249) at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:565:19) at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21) at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7) at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14) at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)  at process.processImmediate (node:internal/timers:483:21) { [stack]: 'Error: cid must be a string.\n' + ' at PsfSlpIndexer.getCIDData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:169:249)\n' + ' at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:565:19)\n' + ' at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21)\n' + ' at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7)\n' + ' at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14)\n' + ' at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)\n' + ' at process.processImmediate (node:internal/timers:483:21)', [message]: 'cid must be a string.' } ✓ should throw errors if cid is not provided dataUrl: https://gp3bfmj6woms7pywb7s7r6npcdudvsabvzne2chyspxtdendrwmy.ipfs.dweb.link/data.json Error in getCIDData(): Error: test error at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:578:47) at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21) at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7) at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14) at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)  at process.processImmediate (node:internal/timers:483:21) { [stack]: 'Error: test error\n' + ' at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:578:47)\n' + ' at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21)\n' + ' at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7)\n' + ' at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14)\n' + ' at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)\n' + ' at process.processImmediate (node:internal/timers:483:21)', [message]: 'test error' } ✓ should handle axios error dataUrl: https://gp3bfmj6woms7pywb7s7r6npcdudvsabvzne2chyspxtdendrwmy.ipfs.dweb.link/data.json ✓ should return cid object data #decodeOpReturn Error in decodeOpReturn(). ✓ should throw errors if txid is not provided Error in decodeOpReturn(). ✓ should handle bchjs error ✓ should return data ✓ should return false if data is not found #getTokenData ✓ should throw 400 error if tokenId is missing Error in getTokenData(): Error: getaddrinfo EAI_AGAIN fakeurl  at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) { [stack]: 'Error: getaddrinfo EAI_AGAIN fakeurl\n' + ' at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)', [message]: 'getaddrinfo EAI_AGAIN fakeurl', errno: -3001, code: 'EAI_AGAIN', syscall: 'getaddrinfo', hostname: 'fakeurl', config: { url: 'http://fakeurl/api/slp/token/', method: 'post', data: '{"tokenId":"a4fb5c2da1aa064e25018a43f9165040071d9e984ba190c222a7f59053af84b2","withTxHistory":false}', headers: [Object], transformRequest: [Array], transformResponse: [Array], timeout: 0, adapter: [Function], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function], transitional: [Object] }, request: Writable { _events: [Object], _writableState: [WritableState], _maxListeners: undefined, _options: [Object], _ended: false, _ending: true, _redirectCount: 0, _redirects: [Array], _requestBodyLength: 100, _requestBodyBuffers: [Array], _eventsCount: 2, _onNativeResponse: [Function], _currentRequest: [ClientRequest], _currentUrl: 'http://fakeurl/api/slp/token/', [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [aborted]: [Getter], [connection]: [Getter], [socket]: [Getter], _writev: null, [closed]: [Getter], [destroyed]: [Getter/Setter], [writable]: [Getter/Setter], [writableFinished]: [Getter], [writableObjectMode]: [Getter], [writableBuffer]: [Getter], [writableEnded]: [Getter], [writableNeedDrain]: [Getter], [writableHighWaterMark]: [Getter], [writableCorked]: [Getter], [writableLength]: [Getter], [errored]: [Getter], [writableAborted]: [Getter] }, response: undefined, isAxiosError: true, toJSON: [Function: toJSON] { [length]: 0, [name]: 'toJSON', [prototype]: [Object] } } ✓ should throw 503 when network issues Error in getTokenData(): { code: 'ECONNABORTED' } ✓ returns proper error when downstream service stalls Error in getTokenData(): { code: 'ECONNREFUSED' } ✓ returns proper error when downstream service is down - should GET token data 49) should get token data for problematic token - should GET tokens data if immutableData data not found - should GET tokens data if mutable data not found 50) should GET token data with transaction history #getMutableData Error in getMutableData(): Error: documentHash string required when calling mutableData(). at PsfSlpIndexer.getMutableData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:143:279) at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:888:19) at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21) at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7) at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14) at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)  at process.processImmediate (node:internal/timers:483:21) { [stack]: 'Error: documentHash string required when calling mutableData().\n' + ' at PsfSlpIndexer.getMutableData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:143:279)\n' + ' at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:888:19)\n' + ' at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21)\n' + ' at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7)\n' + ' at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14)\n' + ' at Immediate._onImmediate (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)\n' + ' at process.processImmediate (node:internal/timers:483:21)', [message]: 'documentHash string required when calling mutableData().' } ✓ should throw errors if documentHash is not provided jsonData: {} Retrieving and decoding txid 0bd2a8a72108659cd39a59bde89c45fff7d51c334531f036b1e102ab4b62f33f obj: {} Retrieving and decoding txid 4f2837b7fff325c0442b550863de3470e016df234561d9151cbb6949fe43ac17 obj: {} Retrieving and decoding txid 1bfa83355839c0ef0f974463415fa983466e0286d7bcdfdd825f244e357ad1e5 obj: {} Retrieving and decoding txid 6eba09627175af4b50ac75fa8b3a15a9015df8a19b5b28a992f26044f4fd8891 obj: {} Retrieving and decoding txid c37ba29f40ecc61662ea56324fdb72a5f1e66add2078854c2144765b9030358a obj: {} Error in getMutableData(): Error: CID could not be found in OP_RETURN data at PsfSlpIndexer.getMutableData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:161:192) at async Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:906:9) { [stack]: 'Error: CID could not be found in OP_RETURN data\n' + ' at PsfSlpIndexer.getMutableData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:161:192)\n' + ' at async Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:906:9)', [message]: 'CID could not be found in OP_RETURN data' } ✓ should throw errors if cid is not provided in OP Return jsonData: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } Mutable Data Not found Error in getMutableData(): Error: CID could not be found in OP_RETURN data at PsfSlpIndexer.getMutableData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:161:192) at async Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:924:9) { [stack]: 'Error: CID could not be found in OP_RETURN data\n' + ' at PsfSlpIndexer.getMutableData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:161:192)\n' + ' at async Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:924:9)', [message]: 'CID could not be found in OP_RETURN data' } ✓ should throw errors if data is not found jsonData: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } Error in getMutableData(): Error: test error at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:938:66) at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21) at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7) at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14) at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7 at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14) at Immediate. (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)  at process.processImmediate (node:internal/timers:483:21) { [stack]: 'Error: test error\n' + ' at Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:938:66)\n' + ' at callFn (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:374:21)\n' + ' at Runnable.run (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runnable.js:361:7)\n' + ' at Runner.runTest (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:619:10)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:745:12\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:536:14)\n' + ' at /home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:546:7\n' + ' at next (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:448:14)\n' + ' at Immediate. (/home/trout/bvt/bvt-bchjs/uut/bch-api/node_modules/mocha/lib/runner.js:514:5)\n' + ' at process.processImmediate (node:internal/timers:483:21)', [message]: 'test error' } ✓ should handle bchjs error jsonData: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } Retrieving and decoding txid 0bd2a8a72108659cd39a59bde89c45fff7d51c334531f036b1e102ab4b62f33f obj: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } Data is not generated by MDA, skipping. Retrieving and decoding txid 4f2837b7fff325c0442b550863de3470e016df234561d9151cbb6949fe43ac17 obj: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } Data is not generated by MDA, skipping. Retrieving and decoding txid 1bfa83355839c0ef0f974463415fa983466e0286d7bcdfdd825f244e357ad1e5 obj: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } Data is not generated by MDA, skipping. Retrieving and decoding txid 6eba09627175af4b50ac75fa8b3a15a9015df8a19b5b28a992f26044f4fd8891 obj: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } Data is not generated by MDA, skipping. Retrieving and decoding txid c37ba29f40ecc61662ea56324fdb72a5f1e66add2078854c2144765b9030358a obj: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } Data is not generated by MDA, skipping. Mutable Data Not found Error in getMutableData(): Error: CID could not be found in OP_RETURN data at PsfSlpIndexer.getMutableData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:161:192) at async Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:961:9) { [stack]: 'Error: CID could not be found in OP_RETURN data\n' + ' at PsfSlpIndexer.getMutableData (/home/trout/bvt/bvt-bchjs/uut/bch-api/src/routes/v5/psf-slp-indexer.js:161:192)\n' + ' at async Context. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js:961:9)', [message]: 'CID could not be found in OP_RETURN data' } ✓ should skip mutable data if was not generated by the MDA private key jsonData: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } Retrieving and decoding txid 0bd2a8a72108659cd39a59bde89c45fff7d51c334531f036b1e102ab4b62f33f Retrieving and decoding txid 4f2837b7fff325c0442b550863de3470e016df234561d9151cbb6949fe43ac17 obj: { "mda": "bitcoincash:qrg77j4jf2pl7azgvzrz2z567ls464gkuuhplt30dp", "cid": "bafybeie6t5uyupddc7azms737xg4hxrj7i5t5ov3lb5g2qeehaujj6ak64" } ✓ should return mutable data #getTokenData2 updateCache: undefined ✓ should get expanded token data #getMutableCid ping01 MDA has 3 transactions in its history. 3 transactions reviewed to find mutable data. ✓ should return mutable cid from documentHash property ✓ should return false if documentHash property is missing ping01 ✓ should return false if op return cant be decoded ping01 MDA has 3 transactions in its history. 3 transactions reviewed to find mutable data. ✓ should return false if cid cant be found ping01 MDA has 3 transactions in its history. 3 transactions reviewed to find mutable data. ✓ should return false if data found is not generated by mda ping01 MDA has 3 transactions in its history. 3 transactions reviewed to find mutable data. ✓ should return older mutable cid for two entries in the same block ping01 MDA has 3 transactions in its history. 3 transactions reviewed to find mutable data. ✓ should return older mutable cid if entries are switched in the same block ping01 MDA has 3 transactions in its history. 2 transactions reviewed to find mutable data. ✓ should stop searching for best entry if block height is less #rate-routelimit #checkInternalIp ✓ should return true for a request from localhost ✓ should return true for a request from a Docker container ✓ should return false for a random ip address ✓ should return false when an error is encountered #isInWhitelist ✓ should return false when no argument is passed in ✓ should return false when origin is not in the whitelist ✓ should return true when origin is in the whitelist #decodeJwtToken ✓ should return the default JWT payload if decoding fails ✓ should return the default JWT payload if no input is given ✓ should correctly decode a JWT token ✓ should return the default payload if there is an unhandled error #trackRateLimits ✓ should apply anonymous rate limits if no JWT token is provided ✓ should apply 100 RPM rate limits when JWT token is provided #applyRateLimits External call, basic auth, skipping rate limits. ✓ should skip rate limits if basic auth token is used ✓ should skip rate limits if internal call passes basic auth token ✓ should apply rate limits to anonymous users ✓ should return 429 error when anonymous users exceed rate limit (51ms) ✓ should apply rate limits when JWT token is provided ✓ should apply internal rate limits to internal calls ✓ should return 429 error when internal calls exceed interal rate limit (1763ms) ✓ should apply JWT rate limits to internal calls when JWT passes through ✓ should return 429 error when internal calls using JWT pass-through exceeds rate limit (151ms) ✓ should move to the next middleware when encountering an unexpected internal error #Raw-Transactions #root ✓ should respond to GET for base route decodeRawTransactionSingle() ✓ should throw error if hex is missing ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down Error in getTokenData(): Error: connect ETIMEDOUT 195.201.0.99:5010  at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16) { [stack]: 'Error: connect ETIMEDOUT 195.201.0.99:5010\n' + ' at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16)', [message]: 'connect ETIMEDOUT 195.201.0.99:5010', errno: -110, code: 'ETIMEDOUT', syscall: 'connect', address: '195.201.0.99', port: 5010, config: { url: 'http://195.201.0.99:5010/slp/token/', method: 'post', data: '{"tokenId":"5f31905f335fa932879c5aabfd1c14ac748f6696148bd300f845ea5016ad573e","withTxHistory":false}', headers: [Object], transformRequest: [Array], transformResponse: [Array], timeout: 0, adapter: [Function], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function], transitional: [Object] }, request: Writable { _events: [Object], _writableState: [WritableState], _maxListeners: undefined, _options: [Object], _ended: false, _ending: true, _redirectCount: 0, _redirects: [Array], _requestBodyLength: 100, _requestBodyBuffers: [Array], _eventsCount: 2, _onNativeResponse: [Function], _currentRequest: [ClientRequest], _currentUrl: 'http://195.201.0.99:5010/slp/token/', [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [aborted]: [Getter], [connection]: [Getter], [socket]: [Getter], _writev: null, [closed]: [Getter], [destroyed]: [Getter/Setter], [writable]: [Getter/Setter], [writableFinished]: [Getter], [writableObjectMode]: [Getter], [writableBuffer]: [Getter], [writableEnded]: [Getter], [writableNeedDrain]: [Getter], [writableHighWaterMark]: [Getter], [writableCorked]: [Getter], [writableLength]: [Getter], [errored]: [Getter], [writableAborted]: [Getter] }, response: undefined, isAxiosError: true, toJSON: [Function: toJSON] { [length]: 0, [name]: 'toJSON', [prototype]: [Object] } } result: { success: false, error: 'connect ETIMEDOUT 195.201.0.99:5010' } 51) should GET /decodeRawTransaction decodeRawTransactionBulk() ✓ should throw 400 error if hexes array is missing ✓ should throw 400 error if hexes array is too large ✓ should throw 400 error if hexes is empty ✓ should error on non-array single hex ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 52) should decode an array with a single hex 53) should decode an array with multiple hexes decodeScriptSingle() ✓ should throw error if hex is missing ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down result: { error: 'Network error: Could not communicate with full node or other external service.' } 54) should GET /decodeScriptSingle decodeScriptBulk() ✓ should throw 400 error if hexes array is missing ✓ should throw 400 error if hexes array is too large ✓ should throw 400 error if hexes is empty ✓ should error on non-array single hex ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down Error in getTokenData(): Error: connect ETIMEDOUT 195.201.0.99:5010  at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16) { [stack]: 'Error: connect ETIMEDOUT 195.201.0.99:5010\n' + ' at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16)', [message]: 'connect ETIMEDOUT 195.201.0.99:5010', errno: -110, code: 'ETIMEDOUT', syscall: 'connect', address: '195.201.0.99', port: 5010, config: { url: 'http://195.201.0.99:5010/slp/token/', method: 'post', data: '{"tokenId":"43eddfb11c9941edffb8c8815574bb0a43969a7b1de39ad14cd043eaa24fd38d","withTxHistory":true}', headers: [Object], transformRequest: [Array], transformResponse: [Array], timeout: 0, adapter: [Function], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function], transitional: [Object] }, request: Writable { _events: [Object], _writableState: [WritableState], _maxListeners: undefined, _options: [Object], _ended: false, _ending: true, _redirectCount: 0, _redirects: [Array], _requestBodyLength: 99, _requestBodyBuffers: [Array], _eventsCount: 2, _onNativeResponse: [Function], _currentRequest: [ClientRequest], _currentUrl: 'http://195.201.0.99:5010/slp/token/', [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [aborted]: [Getter], [connection]: [Getter], [socket]: [Getter], _writev: null, [closed]: [Getter], [destroyed]: [Getter/Setter], [writable]: [Getter/Setter], [writableFinished]: [Getter], [writableObjectMode]: [Getter], [writableBuffer]: [Getter], [writableEnded]: [Getter], [writableNeedDrain]: [Getter], [writableHighWaterMark]: [Getter], [writableCorked]: [Getter], [writableLength]: [Getter], [errored]: [Getter], [writableAborted]: [Getter] }, response: undefined, isAxiosError: true, toJSON: [Function: toJSON] { [length]: 0, [name]: 'toJSON', [prototype]: [Object] } } result: { "success": false, "error": "connect ETIMEDOUT 195.201.0.99:5010" } 55) should decode an array with a single hex 56) should decode an array with a multiple hexes getRawTransactionBulk() ✓ should throw 400 error if txids array is missing ✓ should throw 400 error if txids array is too large ✓ should throw 400 error if txid is empty ✓ should throw 400 error if txid is invalid ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 57) should get concise transaction data 58) should get verbose transaction data getRawTransactionSingle() ✓ should throw 400 error if txid is missing ✓ should throw 400 error if txid is invalid ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 59) should get concise transaction data 60) should get verbose transaction data sendRawTransactionBulk() ✓ should throw 400 error if hexs array is missing ✓ should throw 400 error if hexs array is too large ✓ should throw 400 error if hex array element is empty 61) should throw 400 error if hex is invalid ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 62) should submit hex encoded transaction sendRawTransactionSingle() ✓ should throw an error for an empty hex ✓ should throw an error for a non-string ✓ should throw 500 when network issues 63) should throw an error for invalid hex ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down 64) should GET /sendRawTransaction/:hex #route-utils #decodeError decodeError: err: { error: '\r\n' + '429 Too Many Requests\r\n' + '\r\n' + '

429 Too Many Requests

\r\n' + '
nginx/1.18.0 (Ubuntu)
\r\n' + '\r\n' + '\r\n', level: 'error', message: 'Error in slp.js/hydrateUtxos().', timestamp: '2021-03-31T04:13:36.662Z' } ✓ should decode a 429 error from nginx #SLP #root ✓ should respond to GET for base route #validate2Single ✓ should throw 400 if txid is empty #generateSendOpReturn() ✓ should throw 400 if tokenUtxos is missing ✓ should throw 400 if tokenUtxos is empty ✓ should throw 400 if tokenUtxos is not array ✓ should throw 400 if tokenUtxos is empty array ✓ should throw 400 if sendQty is missing ✓ should throw 400 if sendQty is empty ✓ should throw 400 if sendQty is not a number ✓ should return OP_RETURN script #Util #root ✓ should respond to GET for base route #validateAddressSingle ✓ should throw an error for an empty address ✓ should throw 503 when network issues 65) should validate address #validateAddressBulk ✓ should throw an error for an empty body ✓ should error on non-array single address ✓ should throw 400 error if addresses array is too large ✓ should error on invalid address ✓ should error on mainnet address when using testnet ✓ should throw 503 when network issues 66) should validate a single address 67) should validate a multiple addresses #XPUBRouter #root ✓ should respond to GET for base route #FromXPubSingle ✓ should throw 400 if xpub is empty ✓ should error on an array ✓ should create an address from xpub (198ms) 332 passing (14m) 11 pending 67 failing 1) #Electrumx #getBalance should get balance for a single address: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:204:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2) #Electrumx #getBalance should get balance for a single eCash address: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:229:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 3) #Electrumx #balanceBulk should get balance for an array of addresses: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:370:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 4) #Electrumx #getUtxos should get utxos for a single address: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:505:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 5) #Electrumx #utxosBulk should get utxos for an array of addresses: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:681:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 6) #Electrumx #getTransactionDetails should pass errors from electrum-cash to user: AssertionError: the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string at Context. (test/v5/a01-electrumx.js:788:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 7) #Electrumx #getTransactionDetails should get details for a single tx: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:812:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 8) #Electrumx #transactionDetailsBulk should get details for an array of tx: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:914:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 9) #Electrumx #broadcastTransaction should pass errors from electrum-cash to user: Expect 400 status code + expected - actual -404 +400 at Context. (test/v5/a01-electrumx.js:985:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 10) #Electrumx #getBlockHeaders should pass errors from electrum-cash to user: AssertionError: the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string at Context. (test/v5/a01-electrumx.js:1115:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 11) #Electrumx #getBlockHeaders should get headers for a single block height with count 2: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:1151:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 12) #Electrumx #blockHeadersBulk should NOT throw 400 error for an invalid height: Expect 200 status code + expected - actual -404 +200 at Context. (test/v5/a01-electrumx.js:1186:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 13) #Electrumx #blockHeadersBulk should get block heights: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:1254:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 14) #Electrumx #getTransactions should get transaction for a single address: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:1355:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 15) #Electrumx #transactionsBulk should get transaction for an array of addresses: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:1499:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 16) #Electrumx #getMempool should get mempool for a single address: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:1605:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 17) #Electrumx #mempoolBulk should get mempool for multiple addresses: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/a01-electrumx.js:1742:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 18) #BlockchainRouter getBestBlockHash() should GET /getBestBlockHash: AssertionError: expected { Object (error) } to be a string at Context. (test/v5/blockchain.js:153:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 19) #BlockchainRouter getBlockchainInfo() should GET /getBlockchainInfo: AssertionError: expected { Object (error) } to have keys 'chain', 'blocks', 'headers', 'bestblockhash', 'difficulty', 'mediantime', 'verificationprogress', 'chainwork', 'pruned', 'softforks', or 'bip9_softforks' + expected - actual [ - "error" + "bestblockhash" + "bip9_softforks" + "blocks" + "chain" + "chainwork" + "difficulty" + "headers" + "mediantime" + "pruned" + "softforks" + "verificationprogress" ] at Context. (test/v5/blockchain.js:221:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 20) #BlockchainRouter getBlockCount() should GET /getBlockCount: AssertionError: expected { Object (error) } to be a number at Context. (test/v5/blockchain.js:299:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 21) #BlockchainRouter getBlockHeaderSingle() should GET block header: AssertionError: expected { Object (error) } to be a string at Context. (test/v5/blockchain.js:389:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 22) #BlockchainRouter getBlockHeaderSingle() should GET verbose block header: AssertionError: expected { Object (error) } to have keys 'hash', 'confirmations', 'height', 'version', 'versionHex', 'merkleroot', 'time', 'mediantime', 'nonce', 'bits', 'difficulty', 'chainwork', 'previousblockhash', 'nextblockhash', and 'nTx' + expected - actual [ - "error" + "bits" + "chainwork" + "confirmations" + "difficulty" + "hash" + "height" + "mediantime" + "merkleroot" + "nTx" + "nextblockhash" + "nonce" + "previousblockhash" + "time" + "version" + "versionHex" ] at Context. (test/v5/blockchain.js:411:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 23) #BlockchainRouter #getBlockHeaderBulk should get concise block header for a single hash: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:561:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 24) #BlockchainRouter #getBlockHeaderBulk should get verbose block header for a single hash: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:588:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 25) #BlockchainRouter #getBlockHeaderBulk should get details for multiple block heights: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:625:14) at processTicksAndRejections (node:internal/process/task_queues:95:5) at runNextTicks (node:internal/process/task_queues:64:3) at listOnTimeout (node:internal/timers:545:9) at process.processTimers (node:internal/timers:519:7) 26) #BlockchainRouter getChainTips() should GET /getChainTips: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:690:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 27) #BlockchainRouter getDifficulty() should GET /getDifficulty: AssertionError: expected { Object (error) } to be a number at Context. (test/v5/blockchain.js:755:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 28) #BlockchainRouter getMempoolInfo() should GET /getMempoolInfo: AssertionError: expected { Object (error) } to have keys 'result', 'bytes', 'usage', 'maxmempool', or 'mempoolminfree' + expected - actual [ - "error" + "bytes" + "maxmempool" + "mempoolminfree" + "result" + "usage" ] at Context. (test/v5/blockchain.js:819:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 29) #BlockchainRouter getRawMempool() should GET /getRawMempool: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:892:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 30) #BlockchainRouter getMempoolEntrySingle() should GET /getMempoolEntry: AssertionError: expected 'Network error: Could not communicate with full node or other external service.' to equal 'Transaction not in mempool' + expected - actual -Network error: Could not communicate with full node or other external service. +Transaction not in mempool at Context. (test/v5/blockchain.js:980:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 31) #BlockchainRouter #getMempoolEntryBulk should retrieve single mempool entry: AssertionError: expected 'Network error: Could not communicate with full node or other external service.' to equal 'Transaction not in mempool' + expected - actual -Network error: Could not communicate with full node or other external service. +Transaction not in mempool at Context. (test/v5/blockchain.js:1074:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 32) #BlockchainRouter #getMempoolEntryBulk should retrieve multiple mempool entries: AssertionError: expected 'Network error: Could not communicate with full node or other external service.' to equal 'Transaction not in mempool' + expected - actual -Network error: Could not communicate with full node or other external service. +Transaction not in mempool at Context. (test/v5/blockchain.js:1091:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 33) #BlockchainRouter getTxOut() should GET /getTxOut: AssertionError: expected { Object (error) } to have keys 'bestblock', 'confirmations', 'value', 'scriptPubKey', and 'coinbase' + expected - actual [ - "error" + "bestblock" + "coinbase" + "confirmations" + "scriptPubKey" + "value" ] at Context. (test/v5/blockchain.js:1276:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 34) #BlockchainRouter getTxOutPost() should POST /getTxOut: AssertionError: expected { Object (error) } to have keys 'bestblock', 'confirmations', 'value', 'scriptPubKey', and 'coinbase' + expected - actual [ - "error" + "bestblock" + "coinbase" + "confirmations" + "scriptPubKey" + "value" ] at Context. (test/v5/blockchain.js:1393:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 35) #BlockchainRouter getTxOutProofSingle() should GET /getTxOutProof: AssertionError: expected { Object (error) } to be a string at Context. (test/v5/blockchain.js:1498:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 36) #BlockchainRouter #getTxOutProofBulk should GET proof for single txid: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:1596:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 37) #BlockchainRouter #getTxOutProofBulk should GET proof for multiple txids: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:1616:14) at processTicksAndRejections (node:internal/process/task_queues:95:5) at runNextTicks (node:internal/process/task_queues:64:3) at listOnTimeout (node:internal/timers:545:9) at process.processTimers (node:internal/timers:519:7) 38) #BlockchainRouter verifyTxOutProofSingle() should GET /verifyTxOutProof: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:1702:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 39) #BlockchainRouter #verifyTxOutProofBulk should get single proof: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:1800:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 40) #BlockchainRouter #verifyTxOutProofBulk should get multiple proofs: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/blockchain.js:1824:14) at processTicksAndRejections (node:internal/process/task_queues:95:5) at runNextTicks (node:internal/process/task_queues:64:3) at listOnTimeout (node:internal/timers:545:9) at process.processTimers (node:internal/timers:519:7) 41) #BlockchainRouter #getBlock() should return block info with verbosity 0: AssertionError: expected { Object (error) } to be a string at Context. (test/v5/blockchain.js:1890:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 42) #BlockchainRouter #getBlock() should return block info with verbosity 1: AssertionError: hash property expected: expected { Object (error) } to have property 'hash' at Context. (test/v5/blockchain.js:1908:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 43) #BlockchainRouter #getBlock() should return block info with verbosity 2: AssertionError: hash property expected: expected { Object (error) } to have property 'hash' at Context. (test/v5/blockchain.js:1954:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 44) #BlockchainRouter #getBlock() should return block info without verbosity especified: AssertionError: hash property expected: expected { Object (error) } to have property 'hash' at Context. (test/v5/blockchain.js:1999:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 45) #ControlRouter #GetNetworkInfo should get info on the full node: AssertionError: expected { Object (error) } to have keys 'version', 'subversion', 'protocolversion', 'localservices', 'localrelay', 'timeoffset', 'networkactive', 'connections', 'networks', 'relayfee', 'excessutxocharge', 'localaddresses', or 'warnings' + expected - actual [ - "error" + "connections" + "excessutxocharge" + "localaddresses" + "localrelay" + "localservices" + "networkactive" + "networks" + "protocolversion" + "relayfee" + "subversion" + "timeoffset" + "version" + "warnings" ] at Context. (test/v5/control.js:147:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 46) #Encryption Router #getPublicKey should get public key from blockchain: AssertionError: expected false to equal true + expected - actual -false +true at Context. (test/v5/encryption.js:92:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 47) #Mining #getMiningInfo should GET mining information: AssertionError: expected { Object (error) } to have property 'blocks' at Context. (test/v5/mining.js:150:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 48) #Mining #getNetworkHashPS should GET Network Hash per second: AssertionError: expected { Object (error) } to be a number at Context. (test/v5/mining.js:221:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 49) #PsfSlpIndexer #getTokenData should get token data for problematic token: Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js) at listOnTimeout (node:internal/timers:581:17) at process.processTimers (node:internal/timers:519:7) 50) #PsfSlpIndexer #getTokenData should GET token data with transaction history: Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/trout/bvt/bvt-bchjs/uut/bch-api/test/v5/psf-slp-indexer.js) at listOnTimeout (node:internal/timers:581:17) at process.processTimers (node:internal/timers:519:7) 51) #Raw-Transactions decodeRawTransactionSingle() should GET /decodeRawTransaction: AssertionError: expected { Object (error) } to have keys 'txid', 'hash', 'size', 'version', 'locktime', 'vin', or 'vout' + expected - actual [ - "error" + "hash" + "locktime" + "size" + "txid" + "version" + "vin" + "vout" ] at Context. (test/v5/raw-transactions.js:194:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 52) #Raw-Transactions decodeRawTransactionBulk() should decode an array with a single hex: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/raw-transactions.js:305:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 53) #Raw-Transactions decodeRawTransactionBulk() should decode an array with multiple hexes: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/raw-transactions.js:335:14) at processTicksAndRejections (node:internal/process/task_queues:95:5) at runNextTicks (node:internal/process/task_queues:64:3) at listOnTimeout (node:internal/timers:545:9) at process.processTimers (node:internal/timers:519:7) 54) #Raw-Transactions decodeScriptSingle() should GET /decodeScriptSingle: AssertionError: expected { Object (error) } to have property 'asm' at Context. (test/v5/raw-transactions.js:447:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 55) #Raw-Transactions decodeScriptBulk() should decode an array with a single hex: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/raw-transactions.js:567:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 56) #Raw-Transactions decodeScriptBulk() should decode an array with a multiple hexes: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/raw-transactions.js:589:14) at processTicksAndRejections (node:internal/process/task_queues:95:5) at runNextTicks (node:internal/process/task_queues:64:3) at listOnTimeout (node:internal/timers:545:9) at process.processTimers (node:internal/timers:519:7) 57) #Raw-Transactions getRawTransactionBulk() should get concise transaction data: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/raw-transactions.js:714:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 58) #Raw-Transactions getRawTransactionBulk() should get verbose transaction data: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/raw-transactions.js:734:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 59) #Raw-Transactions getRawTransactionSingle() should get concise transaction data: AssertionError: expected { Object (error) } to be a string at Context. (test/v5/raw-transactions.js:847:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 60) #Raw-Transactions getRawTransactionSingle() should get verbose transaction data: AssertionError: expected { Object (error) } to have keys 'hex', 'txid', 'hash', 'size', 'version', 'locktime', 'vin', 'vout', 'blockhash', 'confirmations', 'time', or 'blocktime' + expected - actual [ - "error" + "blockhash" + "blocktime" + "confirmations" + "hash" + "hex" + "locktime" + "size" + "time" + "txid" + "version" + "vin" + "vout" ] at Context. (test/v5/raw-transactions.js:865:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 61) #Raw-Transactions sendRawTransactionBulk() should throw 400 error if hex is invalid: HTTP status code 400 expected. + expected - actual -503 +400 at Context. (test/v5/raw-transactions.js:932:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 62) #Raw-Transactions sendRawTransactionBulk() should submit hex encoded transaction: AssertionError: expected 'Network error: Could not communicate with full node or other external service.' to include 'Missing inputs' at Context. (test/v5/raw-transactions.js:1017:18) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 63) #Raw-Transactions sendRawTransactionSingle() should throw an error for invalid hex: HTTP status code 400 expected. + expected - actual -503 +400 at Context. (test/v5/raw-transactions.js:1097:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 64) #Raw-Transactions sendRawTransactionSingle() should GET /sendRawTransaction/:hex: AssertionError: expected 'Network error: Could not communicate with full node or other external service.' to include 'Missing inputs' at Context. (test/v5/raw-transactions.js:1180:18) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 65) #Util #validateAddressSingle should validate address: AssertionError: expected { Object (error) } to have keys 'isvalid', 'address', 'scriptPubKey', 'ismine', 'iswatchonly', or 'isscript' + expected - actual [ - "error" + "address" + "ismine" + "isscript" + "isvalid" + "iswatchonly" + "scriptPubKey" ] at Context. (test/v5/util.js:164:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 66) #Util #validateAddressBulk should validate a single address: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/util.js:286:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 67) #Util #validateAddressBulk should validate a multiple addresses: AssertionError: expected { Object (error) } to be an array at Context. (test/v5/util.js:314:14) at processTicksAndRejections (node:internal/process/task_queues:95:5) at runNextTicks (node:internal/process/task_queues:64:3) at listOnTimeout (node:internal/timers:545:9) at process.processTimers (node:internal/timers:519:7) ----------------------------------|---------|----------|---------|---------|------------------------ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------------------------------|---------|----------|---------|---------|------------------------ All files | 80.27 | 77.73 | 84.9 | 80.86 | config | 100 | 50 | 100 | 100 | index.js | 100 | 50 | 100 | 100 | 8-33 src/middleware | 87.59 | 78.57 | 75 | 89.34 | route-ratelimit.js | 87.59 | 78.57 | 75 | 89.34 | 181-191,221,444-473 src/routes/v5 | 75.67 | 74.44 | 84.05 | 75.92 | electrumx.js | 82.81 | 84.04 | 100 | 83.65 | ...1138-1139,1160-1167 encryption.js | 80.88 | 50 | 100 | 80 | ...109-110,132,169-170 jwt.js | 78.37 | 50 | 100 | 78.37 | 53-54,78-85 price.js | 90 | 100 | 87.5 | 90 | 209-219 psf-slp-indexer.js | 89.13 | 89.53 | 100 | 89.23 | ...402,417-418,657,666 slp.js | 31.66 | 30.95 | 30.76 | 32.02 | ...253,281-456,522-533 util.js | 83.33 | 77.77 | 83.33 | 84.21 | ...-96,180-183,192-195 xpub.js | 79.41 | 70 | 100 | 79.41 | 62-72 src/routes/v5/bcash | 94.8 | 83.33 | 100 | 94.66 | slp.js | 94.8 | 83.33 | 100 | 94.66 | 61,150,186-187 src/routes/v5/full-node | 85.17 | 87.93 | 87.3 | 86.12 | blockchain.js | 85.39 | 87.23 | 83.87 | 86.36 | ...1-934,980,1004-1027 control.js | 90.32 | 50 | 100 | 90.32 | 45-46,71 dsproof.js | 90.24 | 80 | 100 | 92.5 | 37-38,86 mining.js | 87.23 | 50 | 100 | 91.11 | 44-45,94,130 rawtransactions.js | 82.83 | 95.16 | 84.21 | 83.03 | ...533,584-587,617-618 src/routes/v5/minimal-slp-wallet | 22.22 | 0 | 0 | 22.22 | write-price.js | 22.22 | 0 | 0 | 22.22 | 12-25 src/util | 76.62 | 70.49 | 85.71 | 78.37 | route-utils.js | 74.62 | 71.92 | 100 | 76.56 | ...132,175-182,197-201 winston-logging.js | 90 | 50 | 0 | 90 | 40 ----------------------------------|---------|----------|---------|---------|------------------------