> bch-api@2.0.0 test /home/trout/bvt/bvt-bchjs/uut/bch-api > 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 ✓ should get balance for a single address (86ms) result: { "success": true, "balance": { "confirmed": 0, "unconfirmed": 0 } } ✓ should get balance for a single eCash address (207ms) #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 ✓ should get balance for an array of addresses (161ms) #getUtxos ✓ 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 ✓ 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 ✓ should get utxos for an array of addresses (64ms) #getTransactionDetails ✓ should throw 400 if tx is empty ✓ should throw 400 on array input err: Error: Request failed with status code 400 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 (events.js:327:22)  at endReadableNT (internal/streams/readable.js:1327:12)  at processTicksAndRejections (internal/process/task_queues.js:80:21) { [stack]: 'Error: Request failed with status code 400\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 (events.js:327:22)\n' + ' at endReadableNT (internal/streams/readable.js:1327:12)\n' + ' at processTicksAndRejections (internal/process/task_queues.js:80:21)', [message]: 'Request failed with status code 400', 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: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: 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: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/v1/electrumx/tx/data/02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'fulcrum-api.fullstackbch.nl', protocol: 'http:', _redirectable: [Writable], [Symbol(kCapture)]: false, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [writableFinished]: [Getter], [writableObjectMode]: [Getter], [writableLength]: [Getter], [writableHighWaterMark]: [Getter], [writableCorked]: [Getter], [_headers]: [Getter/Setter], [connection]: [Getter/Setter], [_headerNames]: [Getter/Setter], headersSent: [Getter], [writableEnded]: [Getter] }, response: { status: 400, statusText: 'Bad Request', headers: [Object], config: [Object], request: [ClientRequest], data: [Object] }, isAxiosError: true, toJSON: [Function: toJSON] { [length]: 0, [name]: 'toJSON', [prototype]: [Object] } } ✓ should pass errors from electrum-cash to user ✓ should get details for a single tx (60ms) #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 ✓ should get details for an array of tx (67ms) #broadcastTransaction ✓ should throw 400 if txHex is empty ✓ should throw 400 on invalid input type ✓ 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 ✓ should pass errors from electrum-cash to user ✓ should handle error ✓ should get headers for a single block height with count 2 #blockHeadersBulk ✓ should throw 400 for an empty body result: { success: true, headers: [ [Object], [length]: 1 ] } ✓ should NOT throw 400 error for an invalid height ✓ should throw 400 error if heights array is too large ✓ should handle error ✓ 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 ✓ should get transaction for a single address (87ms) #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": true, "transactions": [ { "transactions": [ { "height": 786502, "tx_hash": "f92edc91ec44a8c72a2fa0da4aed697b86fce5cde6c22f3d635fda3252809cde" }, { "height": 601861, "tx_hash": "6181c669614fa18039a19b23eb06806bfece1f7514ab457c3bb82a40fe171a6d" } ], "address": "bitcoincash:qp3sn6vlwz28ntmf3wmyra7jqttfx7z6zgtkygjhc7" }, { "transactions": [ { "height": 796927, "tx_hash": "c3aa6fca797690159a0565a78b27e88f46cb48faefee25cd818f4917d60e3c75" }, { "height": 630834, "tx_hash": "4fe60a51e0d8f5134bfd8e5f872d6e502d7f01b28a6afebb27f4438a4f638d53" }, { "height": 604392, "tx_hash": "7774e449c5a3065144cefbc4c0c21e6b69c987f095856778ef9f45ddd8ae1a41" }, { "height": 601332, "tx_hash": "e6194e4db7c931ae4a39c42d584aeb7d859986609617a3e9887b4601d83124a2" }, { "height": 560430, "tx_hash": "27ec8512c1a9ee9e9ae9b98eb60375f1d2bd60e2e76a1eff5a45afdbc517cf9c" }, { "height": 560039, "tx_hash": "6e1ae1bf7db6de799ec1c05ab2816ac65549bd80141567af088e6f291385b07d" }, { "height": 560034, "tx_hash": "5d95f4e6047901fc1502a9758bbdb14ce73f24662b1784d13e0217b3d37bb7a2" }, { "height": 560028, "tx_hash": "2b25ab4f25c282e4ac4d2144f6d69c5f080a722e56bd5a6447873bbb4c0a5756" }, { "height": 560028, "tx_hash": "78c17d5f91dcf0b644de8ec713a5eb03a184552de3e9683e0ab3df1b447c56c2" }, { "height": 553933, "tx_hash": "e5ccd2a0dda20a9e3313e5855924060642f36add6197bdb73ac2812bfebf3715" }, { "height": 548857, "tx_hash": "7939db8deb801e615a24cdf94e25e86fef083d59fdfa9c2d31935e5dde36b7ad" }, { "height": 543327, "tx_hash": "432f3d3add69ba0c296d0618ce2708c4a3bbd097af0377181033ab67e896bf24" }, { "height": 543324, "tx_hash": "72384d38319210bb34b75658b3da2bb00b5565142951e0818ba64658ee4975f6" }, { "height": 542794, "tx_hash": "fa368297485ac922276733d2d41b04b258c66c5b6bb67abe36f6477fb8dbca97" }, { "height": 541741, "tx_hash": "8cc92b2bb49c1ec340db8f7f0bce99769f4a91fb35f4d497834f51d9dd305d72" }, { "height": 541455, "tx_hash": "28af7392122adaedd0ee56a934fd486a7b7c36f50dd084b8d35d191bc61526b8" }, { "height": 541455, "tx_hash": "55fded909a0f08d76cc53330e432846e07a5748c214b7652e8cad47e9e6a2268" }, { "height": 541049, "tx_hash": "4b832850d92b96e95e9bdb2fa80d4255a8b9bc2bc01a6f1ba2dfce5e8814b626" }, { "height": 540046, "tx_hash": "fe1a9670d19668077e3c7798be2e5508485922e36b153e59c118e3d534b05fe4" }, { "height": 539448, "tx_hash": "948ed625b9bdcc1b5c94a2009a27621889c62da61de93b4a096e905ab83d4769" }, { "height": 539180, "tx_hash": "05b3686241dee363d727be673076ab81953f53e9a9e9ea7d29d1ce740997fba9" }, { "height": 538201, "tx_hash": "86ab66d30d65d15d1cbf732c66e4db94ba277cb2b4b565ff5186ba1168017d9c" }, { "height": 536298, "tx_hash": "c11d84c65999c72c88d2dd6b7140ed22714e5cb9301d8f2f3938d536d4b0f4f2" }, { "height": 535293, "tx_hash": "198c5333f4f46b05975dbd7382edd8d6238e9a584363e57f89ec4ff15f96769b" }, { "height": 535293, "tx_hash": "c6374494f03e9cb2af54ab3e5fa16e912a252ca5d8ac910a36e8ce954a6fb894" }, { "height": 535090, "tx_hash": "d58d7d931d344e3ab21ad61e07b8ef6ecc98bc0d156eeaffd80d1ad243e5faf4" }, { "height": 534220, "tx_hash": "d152145e2104f805afee1b2bcc523e89a61bab35ff34bd0ff0aa2dbcf1b4543c" }, { "height": 533856, "tx_hash": "49b5361e0978b0e4711e520fb321b0216acabd5f57b31b8b87cfd1ac6cc6aeb0" }, { "height": 532117, "tx_hash": "208fa60255d82cebeeb8783ea27dac88edc962c59e93eeb3c1d2fed71b8d313a" }, { "height": 531591, "tx_hash": "0056efb8835aff72d6b086d1e476cf900b3f41187a5b81d2e2ed10eaae983fe2" }, { "height": 531417, "tx_hash": "e08cdd9a64927eb19132558d9e5da8d239d31aa695fa505c2b09841d085ce7e4" }, { "height": 530548, "tx_hash": "0aaf18db5be02ea23344af807e89afed0a530a2043ed257cd5233969b81c0b43" }, { "height": 528980, "tx_hash": "9e570394b31fac6593952b2aa6154ba024b62a86e1a3746a9d144491b4f6c1e2" }, { "height": 528247, "tx_hash": "ca2ae0cad1f5ea877085aed3a0996076bbe34da77b9c13e5f15f4231050fb04d" }, { "height": 527749, "tx_hash": "df5d1a4e1b35344e13b4f7b99bd0bf3472fed45b1a7b2d24c49356ae5471ba54" }, { "height": 527664, "tx_hash": "f76962f1bf388dc38b769dd04a221b6d9bf97811a6ea60d2f76a099bd28e1a4e" }, { "height": 527601, "tx_hash": "4eecefcb4bd6da3745165d4fa72df0519f9cb44f05b3f624e9a0fdf66eeb2a08" }, { "height": 526489, "tx_hash": "be67ca87a13d7c99ee4d4f6b3e0433349a112eddfc877244ba4e184303a14e5d" }, { "height": 525619, "tx_hash": "d1ac13af4288d127bc3430c0b55d94ca7be2b8aa80868a867b50b118ca0166b9" }, { "height": 524759, "tx_hash": "392748f85192e6286c223fd550ac86b30c46884a2c79b9a1955d64938471dc61" }, { "height": 523893, "tx_hash": "e0931ca0fb253623be927284c7507040b68e5c30820ac9103a1460ab5765a52b" }, { "height": 523515, "tx_hash": "9d53e96809ca14781f689c527a6187b855035fb5f778b95b196b1b5b91cd14d7" }, { "height": 523254, "tx_hash": "48521827a9d5a24f9f47dd4432aa0bae354291b04f3116dacc345c9c92b6ea43" }, { "height": 523253, "tx_hash": "49036e43eb15cb41587bbc9a016b0808991201eab9521f6003db1cf22128b4c0" }, { "height": 523200, "tx_hash": "3a98ee09b9c84875440c01b70e3b4a6d9d0eed63435ffe257697bc24bb2e0102" }, { "height": 523045, "tx_hash": "847acd97cdafb9f7d3a07350a10c7c8167142031809dc3b30405f0f5f209a9e1" }, { "height": 522191, "tx_hash": "e0c2c777495a71441706af6e5503dbaae7e05854e52dcb72fba1f16b5e60d89e" }, { "height": 521315, "tx_hash": "44e9e8a2dc0edd35a8728db70c65715b4f568a89d343a66b4b62161769f430c3" }, { "height": 520444, "tx_hash": "a5fdec04acf0495d5d914e178a2a5bdf44a16287cd406922e1f3ae13c1ee0e0f" }, { "height": 519728, "tx_hash": "30e9ddce7c6b8628e3fc568515586b7256456406418701a47b58770ed6bca357" }, { "height": 519516, "tx_hash": "11d33f4d880466e2f7c15566bcbe0d4539472e20ed48d20f4d9a7e0a832246e6" }, { "height": 518722, "tx_hash": "07ebc6465f7def97054db2f43f99ce17c87d393981e6bf9b73a14f77515145b1" }, { "height": 518711, "tx_hash": "b930fc04baf7c3e15383e3f5ebe70cf708b219ca0dcc70b83d14be317633cd7f" }, { "height": 517876, "tx_hash": "243ffa634eb7edeedbc9acd7194a0559e89e430b00a8a401e878716d033dc7f2" }, { "height": 517010, "tx_hash": "9b287819001ca94c0db45d4ffdd883fafadb2395ce614741619eef5bb92bd545" }, { "height": 516750, "tx_hash": "8ee9620cd16e30964f8a94d617a1ab7a10346f4cb8a5765597af07c22e103316" }, { "height": 515635, "tx_hash": "ebebe782627d1b2b73bc830121e40e0150004ffed5a0c0286d747b891c57893d" }, { "height": 515034, "tx_hash": "81a904a10228581c123d3254592b8f97f75148f34faf8c28e74175ba28664beb" }, { "height": 514557, "tx_hash": "f071dc9a4fe090025371179769129cba86fc0f80811b7db717f0ea702e957f63" }, { "height": 514493, "tx_hash": "50588176fd3f9c021131ba4aa665402d943e3338ba72402c8f92ed076a6e08a0" }, { "height": 514295, "tx_hash": "de3292787bd92b60479c9449858cb34261b5dcbb0ef0e1b628ea98eea36f9998" }, { "height": 514295, "tx_hash": "787a45812487af2ecaa63b575e6adf625b3d196ada8b940734ccc0fc3c9f4c64" }, { "height": 514290, "tx_hash": "f7a6dc1112e88a3e6c1f73a4a9795a08bec7f386fcdb7bce9afaaee24ca25c9d" }, { "height": 514290, "tx_hash": "1b24ba12b1c66eeca9185c0e973e7f8977ccd3871f34304448c2ca560433f6e6" }, { "height": 513735, "tx_hash": "bfe71ac9af9bf78ddf7109baa83b7f2ca69dd3e7de7ebfc7b048b933c035f90b" }, { "height": 513569, "tx_hash": "2ba7275028fc7aa96207a78144705576e80113cf10ad0213f2b57c60f2713b58" }, { "height": 513569, "tx_hash": "9f9377227cc5dc8fe03920e7a2e43978ed579e5c23f618c6c098a6adfab21cbb" }, { "height": 513569, "tx_hash": "3d03f97f0817241e89cac98cf72f56a63be90a3d400d534db2fa4b8b6db7848c" }, { "height": 513569, "tx_hash": "6e86c591185b7079bfc26304334060cb6433848caff7dae89f9f3a729afc8828" }, { "height": 513311, "tx_hash": "15127968c0e4633ebb2fedda599273d8247bb2316b83d09cc7e79d2f279e1cde" }, { "height": 513311, "tx_hash": "d1c32e134694fc82ea88724f17e0b157faf9c2b28e49a55f751a3cefb1ab875a" }, { "height": 513251, "tx_hash": "ed28ee5547be0e4ce571c00a34aa9faabed3ee7d19991a4c558d03e7e79cb64a" }, { "height": 513244, "tx_hash": "e1330d59527c411dfa6645c0b7457bcdf48fe6d39a3b9c0dfcd7938a648e172b" }, { "height": 513169, "tx_hash": "d3e6c78332ad8c3e5bb560e43f843f9d65b60fd4984a9ed376df4c9a193cae00" }, { "height": 513162, "tx_hash": "1c7daca1bc45a4e813b33647e34fef78c84ea6b9fa29b34abd5218df3a33c98c" }, { "height": 513142, "tx_hash": "4dd38e243d8b0a29bb8c1fbd0ea4ec45c3e348a0bf3fc365662d970237c23282" }, { "height": 513031, "tx_hash": "3a619d206c5c31b39f471e26295b2367e946d32918077bdd08d20ec12393a009" }, { "height": 512837, "tx_hash": "5a361930bd4acccef53375e33b88b8208cc8472c3a9ecaaef4b7b16b013fbcd1" }, { "height": 512678, "tx_hash": "d0cee7e9eee14cc14e258338e12ee41b6888d365721cc8b1e249e7c7c283009b" }, { "height": 512231, "tx_hash": "97a537d3500b70443a90639ad0d3ab489fe1176aee36e81ae7a03d20d3255523" }, { "height": 510881, "tx_hash": "760b8f306bec1d4b910d50504afa6c6b5cb3772ba36720c38d15bf14497af6a3" }, { "height": 509595, "tx_hash": "6631d54a086f58d531b0fa7f273f92f1d3e7d330f41150f56cf6d4903955d8b3" }, { "height": 509595, "tx_hash": "c91d695dbff2bbb0553314be1e603d9b427a1c8cf0726191187707d7284df2e7" }, { "height": 509521, "tx_hash": "a9e70dc7b3e3747045f96008bd09fd8c7e5b25ab3bdcf7a21abb8e57440cd5a8" }, { "height": 509376, "tx_hash": "97f60955e98804902b038a82fdbeb6834c5722f5edf309b3818b25e4717da31d" }, { "height": 507994, "tx_hash": "89035b729da8a45332ba01defdf57613c36971aee481483caad4cbbf63d5396f" }, { "height": 507983, "tx_hash": "dbb7ecbb19e56dd706ca1ec7c87634487332ed591557aec15558b46bfedfa6ba" }, { "height": 501087, "tx_hash": "39b94ef9573b453efcd1491998b332066a37ec6c6ef31dd30152ea211453839e" }, { "height": 500029, "tx_hash": "1dcd59449918de93a1ad0fd23133a4ce107f6e3680609fc48b74f73cc719764f" } ], "address": "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf" } ] } ✓ should get transaction for an array of addresses (189ms) #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 ✓ 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 ✓ 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 Test.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 processImmediate (internal/timers.js:461: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 Test.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 processImmediate (internal/timers.js:461: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 Test.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 processImmediate (internal/timers.js:461: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 Test.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 processImmediate (internal/timers.js:461: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 Test.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 processImmediate (internal/timers.js:461: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 Test.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 processImmediate (internal/timers.js:461: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 ✓ 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 ✓ 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 ✓ 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 ✓ should GET block header ✓ 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 ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ should get concise block header for a single hash ✓ should get verbose block header for a single hash ✓ 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 ✓ should GET /getChainTips (338ms) getDifficulty() ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ 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 ✓ 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 ✓ 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 ✓ 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 ✓ should retrieve single mempool entry ✓ 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 ✓ 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 ✓ 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 ✓ should GET /getTxOutProof (321ms) #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 ✓ should GET proof for single txid (365ms) ✓ should GET proof for multiple txids (757ms) 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 ✓ 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 ✓ should get single proof ✓ 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 ✓ should return block info with verbosity 0 ✓ should return block info with verbosity 1 ✓ should return block info with verbosity 2 (56ms) ✓ 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 ✓ 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 ✓ should get public key from blockchain (3099ms) ✓ should return false for address with no send history (3115ms) #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 ✓ should GET mining information (49ms) #getNetworkHashPS ✓ should throw 503 when network issues ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ 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 (406ms) #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 (45ms) #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 (280ms) #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 (285ms) #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 ✓ 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:163: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 Test.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 processImmediate (internal/timers.js:461: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:163: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 Test.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 processImmediate (internal/timers.js:461: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 Test.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 processImmediate (internal/timers.js:461: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 Test.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 processImmediate (internal/timers.js:461: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.onlookup [as oncomplete] (dns.js:67:26) { [stack]: 'Error: getaddrinfo EAI_AGAIN fakeurl\n' + ' at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67: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 { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, _options: [Object], _ended: false, _ending: true, _redirectCount: 0, _redirects: [Array], _requestBodyLength: 100, _requestBodyBuffers: [Array], _onNativeResponse: [Function], _currentRequest: [ClientRequest], _currentUrl: 'http://fakeurl/api/slp/token/', [Symbol(kCapture)]: false, [aborted]: [Getter], [connection]: [Getter], [socket]: [Getter], _writev: null, [destroyed]: [Getter/Setter], [writable]: [Getter/Setter], [writableFinished]: [Getter], [writableObjectMode]: [Getter], [writableBuffer]: [Getter], [writableEnded]: [Getter], [writableHighWaterMark]: [Getter], [writableCorked]: [Getter], [writableLength]: [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 jsonData: { "mda": "bitcoincash:qpxf0hdk6yv6kjvv8dnnqxhr7uckcn7tvc0y6j32sp" } Retrieving and decoding txid eabc577544c1daaa40cb43c927ca4add6200c31c36be682bdf372980a5db6067 obj: { "cid": "ipfs://bafybeihg4yyoqfcu4i7t6hpouwbulfzyrfxi2rd5oygtd6clvbkp2s7abi", "ts": 1670180735931 } getTokenData() mutableData: ipfs://bafybeihg4yyoqfcu4i7t6hpouwbulfzyrfxi2rd5oygtd6clvbkp2s7abi result: { genesisData: { type: 65, ticker: 'PSFG', name: 'PSF Governance', tokenId: '5f31905f335fa932879c5aabfd1c14ac748f6696148bd300f845ea5016ad573e', documentUri: 'ipfs://bafybeibpc7yblwf3lobuxwru74rc447pqagmsgxs7lcdi4exq56xmijz6y', documentHash: '908e0ea3e255cc0aee8d517b41bcd79c574d9dad310dec87c34c3520b9ef000a', decimals: 0, mintBatonIsActive: false, tokensInCirculationBN: '1', tokensInCirculationStr: '1', blockCreated: 769548, totalBurned: '0', totalMinted: '1', parentGroupId: '5c8cb997cce61426b7149a74a3997443ec7eb738c5c246d9cfe70185a6911476' }, immutableData: 'ipfs://bafybeibpc7yblwf3lobuxwru74rc447pqagmsgxs7lcdi4exq56xmijz6y', mutableData: 'ipfs://bafybeihg4yyoqfcu4i7t6hpouwbulfzyrfxi2rd5oygtd6clvbkp2s7abi' } ✓ should get token data for problematic token (3237ms) - should GET tokens data if immutableData data not found - should GET tokens data if mutable data not found jsonData: { "mda": "bitcoincash:qrd60ncrw834crh3p6z83k89ed0ns6v9hs8xmwsvdv" } Retrieving and decoding txid a1f16f24e572205a988a376480302200f8cec2bb22aba8088bfdc641fcd79c9d obj: { "cid": "ipfs://bafybeiajjdndwtvlw6xxlk5vldxo4wsabc6x4xg73vqegytltch2ryhsna" } getTokenData() mutableData: ipfs://bafybeiajjdndwtvlw6xxlk5vldxo4wsabc6x4xg73vqegytltch2ryhsna result: { "genesisData": { "type": 1, "ticker": "Payload 1", "name": "Payload 1", "tokenId": "43eddfb11c9941edffb8c8815574bb0a43969a7b1de39ad14cd043eaa24fd38d", "documentUri": "ipfs://bafybeicp4n4jxm6z6yuftlqvkrgxj3elzctnjn2ufmwz7ivijfowleg6j4", "documentHash": "99b9f3833309f08fa262aa7ce796aed5e610a4c0c0329794ea1a86cc6a343624", "decimals": 0, "mintBatonIsActive": false, "tokensInCirculationBN": "1", "tokensInCirculationStr": "1", "blockCreated": 748446, "totalBurned": "0", "totalMinted": "1", "txs": [ { "txid": "43eddfb11c9941edffb8c8815574bb0a43969a7b1de39ad14cd043eaa24fd38d", "height": 748446, "type": "GENESIS", "qty": "1" } ] }, "immutableData": "ipfs://bafybeicp4n4jxm6z6yuftlqvkrgxj3elzctnjn2ufmwz7ivijfowleg6j4", "mutableData": "ipfs://bafybeiajjdndwtvlw6xxlk5vldxo4wsabc6x4xg73vqegytltch2ryhsna" } ✓ should GET token data with transaction history (3242ms) #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:137: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 Test.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 processImmediate (internal/timers.js:461: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:137: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 Test.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 processImmediate (internal/timers.js:461: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:155: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:155: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:155: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:155: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 Test.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 processImmediate (internal/timers.js:461: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 Test.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 processImmediate (internal/timers.js:461: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:155: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:155: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 #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 ✓ 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 (1541ms) ✓ 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 (125ms) ✓ 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 ✓ 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 ✓ should decode an array with a single hex ✓ 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: { asm: '0 0 -57 OP_NOP6 OP_LSHIFT OP_UNKNOWN OP_UNKNOWN OP_UNKNOWN c486b2b3a3c03c79b5bade6ec9a77ced850515ab5e64edcc21010000006b483045022100a7b1b08956abb8d6f322aa OP_2OVER OP_NUMEQUALVERIFY OP_OR OP_INVERT OP_OUTPOINTTXHASH OP_UNKNOWN 2ba0585f1a6f4f9983520af74a5a0220411aee4a9a54effab617b0508c504c31681b15f9b187179b4874257badd4139041210360cfc66fdacb650bc4c83b4e351805181ee696b7d5ab 67c57b2786f51c413dffffffff0210270000000000001976a914eb4b180def88e3f5625b2d8ae2c098ff7d85f66488ac786e9800000000001976a914eb4b180def88e3f5625b [error]', type: 'nonstandard', p2sh: 'bitcoincash:pzy6dwfy6yf373w0dr05a6flfqksurjhwcmref46t8', p2sh_32: 'bitcoincash:pwywjz77v99gn6d8sncv46uscggpd65v8jhwrv838f229qnayve2xffvqzf02' } ✓ 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 ✓ should decode an array with a single hex ✓ 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 ✓ should get concise transaction data ✓ 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 ✓ should get concise transaction data ✓ 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 ✓ should throw 400 error if hex is invalid ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ 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 ✓ should throw an error for invalid hex ✓ returns proper error when downstream service stalls ✓ returns proper error when downstream service is down ✓ 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 ✓ 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 ✓ should validate a single address ✓ 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 (89ms) 391 passing (20s) 11 pending -------------------------|---------|----------|---------|---------|--------------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -------------------------|---------|----------|---------|---------|--------------------------------- All files | 85.56 | 78.63 | 89.67 | 85.87 | 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 | 79.69 | 74.39 | 85.07 | 79.68 | electrumx.js | 94.35 | 87.23 | 100 | 94.53 | ...37-638,949-950,961,1159-1166 encryption.js | 75 | 50 | 80 | 73.84 | 45-61,88-89,109-110,132,185-187 jwt.js | 78.37 | 50 | 100 | 78.37 | 53-54,78-85 price.js | 100 | 100 | 100 | 100 | psf-slp-indexer.js | 92.07 | 90.32 | 100 | 92.38 | ...-258,321,330,384-385,400-401 slp.js | 31.66 | 30.95 | 30.76 | 32.02 | 86-141,161-253,281-456,522-533 util.js | 89.74 | 77.77 | 100 | 89.47 | 26,31,93-96,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 | 93.12 | 88.95 | 96.77 | 93.62 | blockchain.js | 92.28 | 87.23 | 93.54 | 92.61 | ...66,813-814,907-908,1003-1026 control.js | 93.54 | 50 | 100 | 93.54 | 45-46 dsproof.js | 90.24 | 80 | 100 | 92.5 | 37-38,86 mining.js | 91.48 | 50 | 100 | 95.55 | 44-45 rawtransactions.js | 95.37 | 98.33 | 100 | 95.16 | 54-55,495-499,550-553,583-584 src/util | 77.92 | 73.77 | 85.71 | 79.72 | route-utils.js | 76.11 | 75.43 | 100 | 78.12 | ...1-92,123,132,175-182,197-201 winston-logging.js | 90 | 50 | 0 | 90 | 40 -------------------------|---------|----------|---------|---------|---------------------------------