Compare commits

...
21 Commits
Author SHA1 Message Date
Chris Troutner c21554008c Merge pull request #84 from Permissionless-Software-Foundation/ct-unstable
fix(getTokenData2()): Adding updateCache argument
2023-01-26 18:03:17 -08:00
Chris Troutner e2a900d3a0 fix(getTokenData2()): Adding updateCache argument 2023-01-26 18:01:13 -08:00
Chris Troutner c870b54cae fix(getTokenData2()): Adding updateCache argument 2023-01-26 18:00:05 -08:00
Chris Troutner f022951680 Merge pull request #83 from Permissionless-Software-Foundation/ct-unstable
fix(deps): Updating dependencies
2022-11-02 04:56:51 -07:00
Chris Troutner 942a8f20ec fix(deps): Updating dependencies 2022-11-02 04:54:46 -07:00
Chris Troutner 683c1e4b2b Merge pull request #82 from Permissionless-Software-Foundation/ct-unstable
fix(getTokenData2): Adding token icon lookup
2022-10-06 21:10:50 -07:00
Chris Troutner 953690baa5 fix(getTokenData2): Adding token icon lookup 2022-10-06 21:07:12 -07:00
Chris Troutner 80a65c4e03 Merge pull request #81 from Permissionless-Software-Foundation/ct-unstable
fix(ipfs): Swapping out IPFS docker container with bandwidth limited …
2022-08-22 16:56:28 -07:00
Chris Troutner 63ecd21734 fix(ipfs): Swapping out IPFS docker container with bandwidth limited version 2022-08-22 16:52:11 -07:00
Chris Troutner ae957a835a Merge pull request #80 from Permissionless-Software-Foundation/ct-unstable
Syncing with upstream ipfs-service-provider
2022-08-03 18:34:50 -07:00
Chris Troutner c61feba1e6 Fixing merge conflicts with upstream 2022-08-03 17:47:00 -07:00
Chris Troutner 8a05f1f063 fix(deps): Updating dependencies 2022-08-03 17:43:28 -07:00
Chris Troutner b23acd3cdc Merge pull request #97 from Permissionless-Software-Foundation/ct-unstable
fix(production): Switching to Docker Image
2022-07-25 19:17:27 -07:00
Chris Troutner c71fda38ff fix(production): Switching to Docker Image 2022-07-25 19:14:44 -07:00
Chris Troutner f99f49d840 Merge pull request #96 from Permissionless-Software-Foundation/ct-unstable
Configuring ports with env vars
2022-07-25 17:58:40 -07:00
Chris Troutner 2edd924c57 fix(production): Adding 4003 websocket port 2022-07-25 17:56:02 -07:00
Chris Troutner 689c8fd8d9 fix(ipfs): Using config to set ports 2022-07-25 17:40:05 -07:00
Chris Troutner ffd6c452c9 Merge pull request #95 from Permissionless-Software-Foundation/ct-unstable
fix(mocks): Another update to IPFS test mocks
2022-07-24 08:15:55 -07:00
Chris Troutner fc8e160874 fix(mocks): Another update to IPFS test mocks 2022-07-24 08:14:27 -07:00
Chris Troutner d2f83307e6 Merge pull request #94 from Permissionless-Software-Foundation/ct-unstable
fix(mocks): Improvement to adapter mocks used in tests
2022-07-24 08:08:13 -07:00
Chris Troutner 1a09fcd26f fix(mocks): Improvement to adapter mocks used in tests 2022-07-24 08:06:32 -07:00
9 changed files with 204 additions and 526 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) 2021 Permissionless Software Foundation
Copyright (c) 2022 Permissionless Software Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+47 -500
View File
@@ -9,12 +9,12 @@
"version": "2.0.0",
"license": "MIT",
"dependencies": {
"@psf/bch-js": "6.4.5",
"@psf/bch-js": "6.5.7",
"axios": "0.27.2",
"bcryptjs": "2.4.3",
"glob": "7.1.6",
"ipfs": "0.62.3",
"ipfs-coord": "8.0.2",
"ipfs-coord": "8.0.4",
"ipfs-http-client": "55.0.0",
"jsonrpc-lite": "2.2.0",
"jsonwebtoken": "8.5.1",
@@ -1445,14 +1445,15 @@
"license": "BSD-3-Clause"
},
"node_modules/@psf/bch-js": {
"version": "6.4.5",
"resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-6.4.5.tgz",
"integrity": "sha512-sH72zbJJI5oe9EUMczFQb0jCaNQb8rc3/86E6xXKl3325HCwBqE80BX7JFvZ97Qv1gGxwp/3WROp59v6Dz2NKA==",
"version": "6.5.7",
"resolved": "http://94.130.170.209:4873/@psf%2fbch-js/-/bch-js-6.5.7.tgz",
"integrity": "sha512-V9UweiRCCU4UzM51Ct2Szhpv6V0B686t5ZjMHNkPu8zyJ9+H7mQfteeQECHK5j38QHvLchfUOif5WWQxP6GRVQ==",
"license": "MIT",
"dependencies": {
"@chris.troutner/bip32-utils": "1.0.5",
"@psf/bip21": "2.0.1",
"@psf/bitcoincash-ops": "2.0.0",
"@psf/bitcoincashjs-lib": "4.0.2",
"@psf/bitcoincashjs-lib": "4.0.3",
"@psf/coininfo": "4.0.0",
"axios": "0.26.1",
"bc-bip68": "1.0.5",
@@ -1491,10 +1492,14 @@
},
"node_modules/@psf/bitcoincash-ops": {
"version": "2.0.0",
"resolved": "http://94.130.170.209:4873/@psf%2fbitcoincash-ops/-/bitcoincash-ops-2.0.0.tgz",
"integrity": "sha512-M3PWqRpeJq6rli2NqWGbas76z9TrdGOmNuDFACBWBMctPucEAsFQY2AmyFHRSa7hEwythwvrPh9AG/n6ehmEog==",
"license": "MIT"
},
"node_modules/@psf/bitcoincashjs-lib": {
"version": "4.0.2",
"version": "4.0.3",
"resolved": "http://94.130.170.209:4873/@psf%2fbitcoincashjs-lib/-/bitcoincashjs-lib-4.0.3.tgz",
"integrity": "sha512-sJYi7jYUqR7S+Z8TjN3W/5Lcju7xcIBxYLhIEpnOF+jR9kMt0ftpVjQBt8vVsJZUD8ArL9bf59oDETjdOUcdGQ==",
"license": "MIT",
"dependencies": {
"@psf/bitcoincash-ops": "^2.0.0",
@@ -1526,6 +1531,8 @@
},
"node_modules/@psf/pushdata-bitcoin": {
"version": "1.2.2",
"resolved": "http://94.130.170.209:4873/@psf%2fpushdata-bitcoin/-/pushdata-bitcoin-1.2.2.tgz",
"integrity": "sha512-e1qkZLJFU6Ldg7TMBgSkiR5U1NfpRgSIr2ppk8BeED/Q9wUc9DEVAjXfPMD65xgXdqnlyFEtLbpPMWwyydMVUQ==",
"license": "MIT",
"dependencies": {
"@psf/bitcoincash-ops": "^2.0.0"
@@ -2928,6 +2935,8 @@
},
"node_modules/bech32": {
"version": "1.1.4",
"resolved": "http://94.130.170.209:4873/bech32/-/bech32-1.1.4.tgz",
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==",
"license": "MIT"
},
"node_modules/before-after-hook": {
@@ -5335,125 +5344,6 @@
"esbuild-windows-arm64": "0.14.48"
}
},
"node_modules/esbuild-android-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-android-64/-/esbuild-android-64-0.14.48.tgz",
"integrity": "sha512-3aMjboap/kqwCUpGWIjsk20TtxVoKck8/4Tu19rubh7t5Ra0Yrpg30Mt1QXXlipOazrEceGeWurXKeFJgkPOUg==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-android-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-android-arm64/-/esbuild-android-arm64-0.14.48.tgz",
"integrity": "sha512-vptI3K0wGALiDq+EvRuZotZrJqkYkN5282iAfcffjI5lmGG9G1ta/CIVauhY42MBXwEgDJkweiDcDMRLzBZC4g==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-darwin-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-darwin-64/-/esbuild-darwin-64-0.14.48.tgz",
"integrity": "sha512-gGQZa4+hab2Va/Zww94YbshLuWteyKGD3+EsVon8EWTWhnHFRm5N9NbALNbwi/7hQ/hM1Zm4FuHg+k6BLsl5UA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-darwin-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.48.tgz",
"integrity": "sha512-bFjnNEXjhZT+IZ8RvRGNJthLWNHV5JkCtuOFOnjvo5pC0sk2/QVk0Qc06g2PV3J0TcU6kaPC3RN9yy9w2PSLEA==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-freebsd-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.48.tgz",
"integrity": "sha512-1NOlwRxmOsnPcWOGTB10JKAkYSb2nue0oM1AfHWunW/mv3wERfJmnYlGzL3UAOIUXZqW8GeA2mv+QGwq7DToqA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-freebsd-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.48.tgz",
"integrity": "sha512-gXqKdO8wabVcYtluAbikDH2jhXp+Klq5oCD5qbVyUG6tFiGhrC9oczKq3vIrrtwcxDQqK6+HDYK8Zrd4bCA9Gw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-32": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-32/-/esbuild-linux-32-0.14.48.tgz",
"integrity": "sha512-ghGyDfS289z/LReZQUuuKq9KlTiTspxL8SITBFQFAFRA/IkIvDpnZnCAKTCjGXAmUqroMQfKJXMxyjJA69c/nQ==",
"cpu": [
"ia32"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-64/-/esbuild-linux-64-0.14.48.tgz",
@@ -5471,108 +5361,6 @@
"node": ">=12"
}
},
"node_modules/esbuild-linux-arm": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-arm/-/esbuild-linux-arm-0.14.48.tgz",
"integrity": "sha512-+VfSV7Akh1XUiDNXgqgY1cUP1i2vjI+BmlyXRfVz5AfV3jbpde8JTs5Q9sYgaoq5cWfuKfoZB/QkGOI+QcL1Tw==",
"cpu": [
"arm"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.48.tgz",
"integrity": "sha512-3CFsOlpoxlKPRevEHq8aAntgYGYkE1N9yRYAcPyng/p4Wyx0tPR5SBYsxLKcgPB9mR8chHEhtWYz6EZ+H199Zw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-mips64le": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.48.tgz",
"integrity": "sha512-cs0uOiRlPp6ymknDnjajCgvDMSsLw5mST2UXh+ZIrXTj2Ifyf2aAP3Iw4DiqgnyYLV2O/v/yWBJx+WfmKEpNLA==",
"cpu": [
"mips64el"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-ppc64le": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.48.tgz",
"integrity": "sha512-+2F0vJMkuI0Wie/wcSPDCqXvSFEELH7Jubxb7mpWrA/4NpT+/byjxDz0gG6R1WJoeDefcrMfpBx4GFNN1JQorQ==",
"cpu": [
"ppc64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-riscv64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.48.tgz",
"integrity": "sha512-BmaK/GfEE+5F2/QDrIXteFGKnVHGxlnK9MjdVKMTfvtmudjY3k2t8NtlY4qemKSizc+QwyombGWTBDc76rxePA==",
"cpu": [
"riscv64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-s390x": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.48.tgz",
"integrity": "sha512-tndw/0B9jiCL+KWKo0TSMaUm5UWBLsfCKVdbfMlb3d5LeV9WbijZ8Ordia8SAYv38VSJWOEt6eDCdOx8LqkC4g==",
"cpu": [
"s390x"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-loader": {
"version": "2.19.0",
"resolved": "http://94.130.170.209:4873/esbuild-loader/-/esbuild-loader-2.19.0.tgz",
@@ -5594,108 +5382,6 @@
"webpack": "^4.40.0 || ^5.0.0"
}
},
"node_modules/esbuild-netbsd-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.48.tgz",
"integrity": "sha512-V9hgXfwf/T901Lr1wkOfoevtyNkrxmMcRHyticybBUHookznipMOHoF41Al68QBsqBxnITCEpjjd4yAos7z9Tw==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-openbsd-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.48.tgz",
"integrity": "sha512-+IHf4JcbnnBl4T52egorXMatil/za0awqzg2Vy6FBgPcBpisDWT2sVz/tNdrK9kAqj+GZG/jZdrOkj7wsrNTKA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-sunos-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-sunos-64/-/esbuild-sunos-64-0.14.48.tgz",
"integrity": "sha512-77m8bsr5wOpOWbGi9KSqDphcq6dFeJyun8TA+12JW/GAjyfTwVtOnN8DOt6DSPUfEV+ltVMNqtXUeTeMAxl5KA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-windows-32": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-windows-32/-/esbuild-windows-32-0.14.48.tgz",
"integrity": "sha512-EPgRuTPP8vK9maxpTGDe5lSoIBHGKO/AuxDncg5O3NkrPeLNdvvK8oywB0zGaAZXxYWfNNSHskvvDgmfVTguhg==",
"cpu": [
"ia32"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-windows-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-windows-64/-/esbuild-windows-64-0.14.48.tgz",
"integrity": "sha512-YmpXjdT1q0b8ictSdGwH3M8VCoqPpK1/UArze3X199w6u8hUx3V8BhAi1WjbsfDYRBanVVtduAhh2sirImtAvA==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-windows-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.48.tgz",
"integrity": "sha512-HHaOMCsCXp0rz5BT2crTka6MPWVno121NKApsGs/OIW5QC0ggC69YMGs1aJct9/9FSUF4A1xNE/cLvgB5svR4g==",
"cpu": [
"arm64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/escalade": {
"version": "3.1.1",
"license": "MIT",
@@ -6835,21 +6521,6 @@
"version": "1.0.0",
"license": "ISC"
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "http://94.130.170.209:4873/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/function-bind": {
"version": "1.1.1",
"license": "MIT"
@@ -8057,9 +7728,9 @@
}
},
"node_modules/ipfs-coord": {
"version": "8.0.2",
"resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-8.0.2.tgz",
"integrity": "sha512-CdUH4GLLFArUDb8LIRAXxPlhbRQ44A5PEWB4J9zzDB3by93O7DLEgjqPqLDolalzrtiQBVzoARO/exZvdxBF+w==",
"version": "8.0.4",
"resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-8.0.4.tgz",
"integrity": "sha512-jwZsrDlEWSHMnAde8PdyUScTzRlTCIvPAziChoczj5ZOZJIUbxLNkGphBI0xDj2G/LzjPrU1Ko/QZrU+oLFUnw==",
"license": "MIT",
"dependencies": {
"axios": "0.21.4",
@@ -11378,6 +11049,8 @@
},
"node_modules/merkle-lib": {
"version": "2.0.10",
"resolved": "http://94.130.170.209:4873/merkle-lib/-/merkle-lib-2.0.10.tgz",
"integrity": "sha1-grjbrnXieneFOItz+ddyXQ9vMyY=",
"license": "MIT"
},
"node_modules/methods": {
@@ -19364,6 +19037,8 @@
},
"node_modules/typeforce": {
"version": "1.18.0",
"resolved": "http://94.130.170.209:4873/typeforce/-/typeforce-1.18.0.tgz",
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==",
"license": "MIT"
},
"node_modules/uc.micro": {
@@ -21295,14 +20970,14 @@
"version": "1.1.0"
},
"@psf/bch-js": {
"version": "6.4.5",
"resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-6.4.5.tgz",
"integrity": "sha512-sH72zbJJI5oe9EUMczFQb0jCaNQb8rc3/86E6xXKl3325HCwBqE80BX7JFvZ97Qv1gGxwp/3WROp59v6Dz2NKA==",
"version": "6.5.7",
"resolved": "http://94.130.170.209:4873/@psf%2fbch-js/-/bch-js-6.5.7.tgz",
"integrity": "sha512-V9UweiRCCU4UzM51Ct2Szhpv6V0B686t5ZjMHNkPu8zyJ9+H7mQfteeQECHK5j38QHvLchfUOif5WWQxP6GRVQ==",
"requires": {
"@chris.troutner/bip32-utils": "1.0.5",
"@psf/bip21": "2.0.1",
"@psf/bitcoincash-ops": "2.0.0",
"@psf/bitcoincashjs-lib": "4.0.2",
"@psf/bitcoincashjs-lib": "4.0.3",
"@psf/coininfo": "4.0.0",
"axios": "0.26.1",
"bc-bip68": "1.0.5",
@@ -21340,10 +21015,14 @@
}
},
"@psf/bitcoincash-ops": {
"version": "2.0.0"
"version": "2.0.0",
"resolved": "http://94.130.170.209:4873/@psf%2fbitcoincash-ops/-/bitcoincash-ops-2.0.0.tgz",
"integrity": "sha512-M3PWqRpeJq6rli2NqWGbas76z9TrdGOmNuDFACBWBMctPucEAsFQY2AmyFHRSa7hEwythwvrPh9AG/n6ehmEog=="
},
"@psf/bitcoincashjs-lib": {
"version": "4.0.2",
"version": "4.0.3",
"resolved": "http://94.130.170.209:4873/@psf%2fbitcoincashjs-lib/-/bitcoincashjs-lib-4.0.3.tgz",
"integrity": "sha512-sJYi7jYUqR7S+Z8TjN3W/5Lcju7xcIBxYLhIEpnOF+jR9kMt0ftpVjQBt8vVsJZUD8ArL9bf59oDETjdOUcdGQ==",
"requires": {
"@psf/bitcoincash-ops": "^2.0.0",
"@psf/pushdata-bitcoin": "^1.2.2",
@@ -21370,6 +21049,8 @@
},
"@psf/pushdata-bitcoin": {
"version": "1.2.2",
"resolved": "http://94.130.170.209:4873/@psf%2fpushdata-bitcoin/-/pushdata-bitcoin-1.2.2.tgz",
"integrity": "sha512-e1qkZLJFU6Ldg7TMBgSkiR5U1NfpRgSIr2ppk8BeED/Q9wUc9DEVAjXfPMD65xgXdqnlyFEtLbpPMWwyydMVUQ==",
"requires": {
"@psf/bitcoincash-ops": "^2.0.0"
}
@@ -22404,7 +22085,9 @@
"version": "2.4.3"
},
"bech32": {
"version": "1.1.4"
"version": "1.1.4",
"resolved": "http://94.130.170.209:4873/bech32/-/bech32-1.1.4.tgz",
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
},
"before-after-hook": {
"version": "2.2.2",
@@ -24136,55 +23819,6 @@
"esbuild-windows-arm64": "0.14.48"
}
},
"esbuild-android-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-android-64/-/esbuild-android-64-0.14.48.tgz",
"integrity": "sha512-3aMjboap/kqwCUpGWIjsk20TtxVoKck8/4Tu19rubh7t5Ra0Yrpg30Mt1QXXlipOazrEceGeWurXKeFJgkPOUg==",
"dev": true,
"optional": true
},
"esbuild-android-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-android-arm64/-/esbuild-android-arm64-0.14.48.tgz",
"integrity": "sha512-vptI3K0wGALiDq+EvRuZotZrJqkYkN5282iAfcffjI5lmGG9G1ta/CIVauhY42MBXwEgDJkweiDcDMRLzBZC4g==",
"dev": true,
"optional": true
},
"esbuild-darwin-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-darwin-64/-/esbuild-darwin-64-0.14.48.tgz",
"integrity": "sha512-gGQZa4+hab2Va/Zww94YbshLuWteyKGD3+EsVon8EWTWhnHFRm5N9NbALNbwi/7hQ/hM1Zm4FuHg+k6BLsl5UA==",
"dev": true,
"optional": true
},
"esbuild-darwin-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.48.tgz",
"integrity": "sha512-bFjnNEXjhZT+IZ8RvRGNJthLWNHV5JkCtuOFOnjvo5pC0sk2/QVk0Qc06g2PV3J0TcU6kaPC3RN9yy9w2PSLEA==",
"dev": true,
"optional": true
},
"esbuild-freebsd-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.48.tgz",
"integrity": "sha512-1NOlwRxmOsnPcWOGTB10JKAkYSb2nue0oM1AfHWunW/mv3wERfJmnYlGzL3UAOIUXZqW8GeA2mv+QGwq7DToqA==",
"dev": true,
"optional": true
},
"esbuild-freebsd-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.48.tgz",
"integrity": "sha512-gXqKdO8wabVcYtluAbikDH2jhXp+Klq5oCD5qbVyUG6tFiGhrC9oczKq3vIrrtwcxDQqK6+HDYK8Zrd4bCA9Gw==",
"dev": true,
"optional": true
},
"esbuild-linux-32": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-32/-/esbuild-linux-32-0.14.48.tgz",
"integrity": "sha512-ghGyDfS289z/LReZQUuuKq9KlTiTspxL8SITBFQFAFRA/IkIvDpnZnCAKTCjGXAmUqroMQfKJXMxyjJA69c/nQ==",
"dev": true,
"optional": true
},
"esbuild-linux-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-64/-/esbuild-linux-64-0.14.48.tgz",
@@ -24192,48 +23826,6 @@
"dev": true,
"optional": true
},
"esbuild-linux-arm": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-arm/-/esbuild-linux-arm-0.14.48.tgz",
"integrity": "sha512-+VfSV7Akh1XUiDNXgqgY1cUP1i2vjI+BmlyXRfVz5AfV3jbpde8JTs5Q9sYgaoq5cWfuKfoZB/QkGOI+QcL1Tw==",
"dev": true,
"optional": true
},
"esbuild-linux-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.48.tgz",
"integrity": "sha512-3CFsOlpoxlKPRevEHq8aAntgYGYkE1N9yRYAcPyng/p4Wyx0tPR5SBYsxLKcgPB9mR8chHEhtWYz6EZ+H199Zw==",
"dev": true,
"optional": true
},
"esbuild-linux-mips64le": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.48.tgz",
"integrity": "sha512-cs0uOiRlPp6ymknDnjajCgvDMSsLw5mST2UXh+ZIrXTj2Ifyf2aAP3Iw4DiqgnyYLV2O/v/yWBJx+WfmKEpNLA==",
"dev": true,
"optional": true
},
"esbuild-linux-ppc64le": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.48.tgz",
"integrity": "sha512-+2F0vJMkuI0Wie/wcSPDCqXvSFEELH7Jubxb7mpWrA/4NpT+/byjxDz0gG6R1WJoeDefcrMfpBx4GFNN1JQorQ==",
"dev": true,
"optional": true
},
"esbuild-linux-riscv64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.48.tgz",
"integrity": "sha512-BmaK/GfEE+5F2/QDrIXteFGKnVHGxlnK9MjdVKMTfvtmudjY3k2t8NtlY4qemKSizc+QwyombGWTBDc76rxePA==",
"dev": true,
"optional": true
},
"esbuild-linux-s390x": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.48.tgz",
"integrity": "sha512-tndw/0B9jiCL+KWKo0TSMaUm5UWBLsfCKVdbfMlb3d5LeV9WbijZ8Ordia8SAYv38VSJWOEt6eDCdOx8LqkC4g==",
"dev": true,
"optional": true
},
"esbuild-loader": {
"version": "2.19.0",
"resolved": "http://94.130.170.209:4873/esbuild-loader/-/esbuild-loader-2.19.0.tgz",
@@ -24248,48 +23840,6 @@
"webpack-sources": "^2.2.0"
}
},
"esbuild-netbsd-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.48.tgz",
"integrity": "sha512-V9hgXfwf/T901Lr1wkOfoevtyNkrxmMcRHyticybBUHookznipMOHoF41Al68QBsqBxnITCEpjjd4yAos7z9Tw==",
"dev": true,
"optional": true
},
"esbuild-openbsd-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.48.tgz",
"integrity": "sha512-+IHf4JcbnnBl4T52egorXMatil/za0awqzg2Vy6FBgPcBpisDWT2sVz/tNdrK9kAqj+GZG/jZdrOkj7wsrNTKA==",
"dev": true,
"optional": true
},
"esbuild-sunos-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-sunos-64/-/esbuild-sunos-64-0.14.48.tgz",
"integrity": "sha512-77m8bsr5wOpOWbGi9KSqDphcq6dFeJyun8TA+12JW/GAjyfTwVtOnN8DOt6DSPUfEV+ltVMNqtXUeTeMAxl5KA==",
"dev": true,
"optional": true
},
"esbuild-windows-32": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-windows-32/-/esbuild-windows-32-0.14.48.tgz",
"integrity": "sha512-EPgRuTPP8vK9maxpTGDe5lSoIBHGKO/AuxDncg5O3NkrPeLNdvvK8oywB0zGaAZXxYWfNNSHskvvDgmfVTguhg==",
"dev": true,
"optional": true
},
"esbuild-windows-64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-windows-64/-/esbuild-windows-64-0.14.48.tgz",
"integrity": "sha512-YmpXjdT1q0b8ictSdGwH3M8VCoqPpK1/UArze3X199w6u8hUx3V8BhAi1WjbsfDYRBanVVtduAhh2sirImtAvA==",
"dev": true,
"optional": true
},
"esbuild-windows-arm64": {
"version": "0.14.48",
"resolved": "http://94.130.170.209:4873/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.48.tgz",
"integrity": "sha512-HHaOMCsCXp0rz5BT2crTka6MPWVno121NKApsGs/OIW5QC0ggC69YMGs1aJct9/9FSUF4A1xNE/cLvgB5svR4g==",
"dev": true,
"optional": true
},
"escalade": {
"version": "3.1.1"
},
@@ -25027,13 +24577,6 @@
"fs.realpath": {
"version": "1.0.0"
},
"fsevents": {
"version": "2.3.2",
"resolved": "http://94.130.170.209:4873/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"optional": true
},
"function-bind": {
"version": "1.1.1"
},
@@ -25819,9 +25362,9 @@
}
},
"ipfs-coord": {
"version": "8.0.2",
"resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-8.0.2.tgz",
"integrity": "sha512-CdUH4GLLFArUDb8LIRAXxPlhbRQ44A5PEWB4J9zzDB3by93O7DLEgjqPqLDolalzrtiQBVzoARO/exZvdxBF+w==",
"version": "8.0.4",
"resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-8.0.4.tgz",
"integrity": "sha512-jwZsrDlEWSHMnAde8PdyUScTzRlTCIvPAziChoczj5ZOZJIUbxLNkGphBI0xDj2G/LzjPrU1Ko/QZrU+oLFUnw==",
"requires": {
"axios": "0.21.4",
"bch-encrypt-lib": "2.0.0",
@@ -28314,7 +27857,9 @@
"dev": true
},
"merkle-lib": {
"version": "2.0.10"
"version": "2.0.10",
"resolved": "http://94.130.170.209:4873/merkle-lib/-/merkle-lib-2.0.10.tgz",
"integrity": "sha1-grjbrnXieneFOItz+ddyXQ9vMyY="
},
"methods": {
"version": "1.1.2"
@@ -33761,7 +33306,9 @@
}
},
"typeforce": {
"version": "1.18.0"
"version": "1.18.0",
"resolved": "http://94.130.170.209:4873/typeforce/-/typeforce-1.18.0.tgz",
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
},
"uc.micro": {
"version": "1.0.6",
+2 -2
View File
@@ -24,12 +24,12 @@
},
"repository": "Permissionless-Software-Foundation/ipfs-bch-wallet-service",
"dependencies": {
"@psf/bch-js": "6.4.5",
"@psf/bch-js": "6.5.7",
"axios": "0.27.2",
"bcryptjs": "2.4.3",
"glob": "7.1.6",
"ipfs": "0.62.3",
"ipfs-coord": "8.0.2",
"ipfs-coord": "8.0.4",
"ipfs-http-client": "55.0.0",
"jsonrpc-lite": "2.2.0",
"jsonwebtoken": "8.5.1",
+13 -14
View File
@@ -4,7 +4,7 @@ version: '3.9'
services:
mongo-bch-service:
image: mongo
image: mongo:4.2.0
container_name: mongo-bch-service
ports:
- '5555:27017' # <host port>:<container port>
@@ -14,10 +14,15 @@ services:
restart: always
ipfs-bch-wallet:
image: ipfs/go-ipfs:v0.13.0
image: christroutner/trickle-ipfs:v1.0.1
#build:
# context: ./
# dockerfile: Dockerfile
container_name: ipfs-bch-wallet
environment:
MY_ENV_VAR: 'placeholder'
IPFS_DAEMON_ARGUMENTS: '--enable-pubsub-experiment --migrate=true --agent-version-suffix=docker --routing=dhtclient'
UPLOAD_KBPS: '100'
DOWNLOAD_KBPS: '100'
logging:
driver: 'json-file'
options:
@@ -26,20 +31,14 @@ services:
mem_limit: 2000mb
ports:
- 4001:4001
- 4003:4003
- 172.17.0.1:5001:5001
- 172.17.0.1:8080:8080
command: [
'./start-ipfs.sh'
]
volumes:
- ../data/go-ipfs/data:/data/ipfs
#- ../../swarm.key:/data/ipfs/swarm.key
# https://docs.docker.com/compose/compose-file/compose-file-v3/#command
# https://github.com/ipfs/go-ipfs/blob/91c52657166bcf86f2476926e4fe56694dc26562/Dockerfile#L115
command:
[
'daemon',
'--migrate=true',
'--agent-version-suffix=docker',
'--enable-pubsub-experiment'
]
- ../data/go-ipfs/data:/root/.ipfs
restart: always
bch-wallet-service:
+1 -1
View File
@@ -42,6 +42,6 @@ export SVC_ENV=production
export IPFS_HOST=172.17.0.1
export IPFS_API_PORT=5001
export IPFS_TCP_PORT=4001
#export IPFS_WS_PORT=4002
export IPFS_WS_PORT=4003
npm start
+5 -1
View File
@@ -5,6 +5,7 @@
// Local libraries
const IpfsAdapter = require('./ipfs')
const IpfsCoordAdapter = require('./ipfs-coord')
const config = require('../../../config')
class IPFS {
constructor (localConfig = {}) {
@@ -12,6 +13,7 @@ class IPFS {
this.ipfsAdapter = new IpfsAdapter()
this.IpfsCoordAdapter = IpfsCoordAdapter
this.process = process
this.config = config
this.ipfsCoordAdapter = {} // placeholder
@@ -40,7 +42,9 @@ class IPFS {
// Start ipfs-coord
this.ipfsCoordAdapter = new this.IpfsCoordAdapter({
ipfs: this.ipfs,
bchjs
bchjs,
tcpPort: this.config.ipfsTcpPort,
wsPort: this.config.ipfsWsPort
})
await this.ipfsCoordAdapter.start()
console.log('ipfs-coord is ready.')
+66
View File
@@ -79,6 +79,10 @@ class BCHRPC {
case 'getTokenData':
await this.rateLimit.limiter(rpcData.from)
return await this.getTokenData(rpcData)
case 'getTokenData2':
await this.rateLimit.limiter(rpcData.from)
return await this.getTokenData2(rpcData)
}
} catch (err) {
console.error('Error in BCHRPC/rpcRouter()')
@@ -788,6 +792,68 @@ class BCHRPC {
}
}
}
/**
* @api {JSON} /bch getTokenData2
* @apiPermission public
* @apiName getTokenData2
* @apiGroup JSON BCH
* @apiDescription Get token icon and other media
*
* Get the icon for a token, given it's token ID.
* This function expects a string input of a token ID property.
* This function returns an object with a tokenIcon property that contains
* the URL to the icon.
*
* The output object always have these properties:
* - tokenIcon: A url to the token icon, if it exists.
* - tokenStats: Data about the token from psf-slp-indexer.
* - optimizedTokenIcon: An alternative, potentially more optimal, url to the token icon, if it exists.
* - iconRepoCompatible: true if the token icon is available via token.bch.sx
* - ps002Compatible: true if the token icon is compatible with PS007 specification.
*
* @apiExample Example usage:
* {"jsonrpc":"2.0","id":"555","method":"bch","params":{ "endpoint": "getTokenData2", "tokenId": "c85042ab08a2099f27de880a30f9a42874202751d834c42717a20801a00aab0d", "withTxHistory": true }}
*
*/
async getTokenData2 (rpcData) {
try {
// console.log('createUser rpcData: ', rpcData)
const tokenId = rpcData.payload.params.tokenId
// console.log('tokenId: ', tokenId)
const updateCache = rpcData.payload.params.updateCache
const tokenData = await this.bchjs.PsfSlpIndexer.getTokenData2(tokenId, updateCache)
const retObj = {
success: true,
status: 200,
endpoint: 'getTokenData2',
tokenData
}
// retObj.status = 200
return retObj
} catch (err) {
console.error('Error in JSON RPC BCH utxoIsValid()')
// Handle different error formats.
let error = err
if (err.error && typeof err.error === 'string') {
error = new Error(err.error)
}
// Return an error response
return {
success: false,
status: 422,
message: error.message,
endpoint: 'getTokenData2'
}
}
}
}
module.exports = BCHRPC
@@ -638,4 +638,52 @@ describe('#BCHRPC', () => {
assert.equal(result.endpoint, 'getTokenData')
})
})
describe('#getTokenData2', () => {
it('should return data from PsfSlpIndexer.getTokenData2()', async () => {
// Mock dependencies
sandbox
.stub(uut.bchjs.PsfSlpIndexer, 'getTokenData2')
.resolves({ a: 'b' })
const rpcData = {
payload: {
params: {
tokenId: 'c85042ab08a2099f27de880a30f9a42874202751d834c42717a20801a00aab0d'
}
}
}
const result = await uut.getTokenData2(rpcData)
// console.log('result: ', result)
assert.equal(result.success, true)
assert.equal(result.status, 200)
assert.equal(result.endpoint, 'getTokenData2')
assert.property(result, 'tokenData')
})
it('should catch and return errors', async () => {
// Mock dependencies
sandbox
.stub(uut.bchjs.PsfSlpIndexer, 'getTokenData2')
.rejects(new Error('test error'))
const rpcData = {
payload: {
params: {
tokenId: 'c85042ab08a2099f27de880a30f9a42874202751d834c42717a20801a00aab0d'
}
}
}
const result = await uut.getTokenData2(rpcData)
// console.log('result: ', result)
assert.equal(result.success, false)
assert.equal(result.status, 422)
assert.equal(result.message, 'test error')
assert.equal(result.endpoint, 'getTokenData2')
})
})
})
+21 -7
View File
@@ -2,12 +2,19 @@
Mocks for the Adapter library.
*/
const ipfs = {
ipfsAdapter: {
ipfs: {}
},
ipfsCoordAdapter: {
ipfsCoord: {
class IpfsAdapter {
constructor () {
this.ipfs = {
files: {
stat: () => {}
}
}
}
}
class IpfsCoordAdapter {
constructor () {
this.ipfsCoord = {
useCases: {
peer: {
sendPrivateMessage: () => {}
@@ -17,6 +24,12 @@ const ipfs = {
}
}
const ipfs = {
ipfsAdapter: new IpfsAdapter(),
ipfsCoordAdapter: new IpfsCoordAdapter()
}
ipfs.ipfs = ipfs.ipfsAdapter.ipfs
const localdb = {
Users: class Users {
static findById () {}
@@ -76,7 +89,8 @@ const bchjs = {
chunk100: () => {}
},
PsfSlpIndexer: {
getTokenData: () => {}
getTokenData: () => {},
getTokenData2: () => {}
}
}