Compare commits

...
16 Commits
Author SHA1 Message Date
Chris Troutner eab7a30926 Merge pull request #21 from Permissionless-Software-Foundation/ct-unstable
fix(psf-bch-wallet): Got working with psf-bch-wallet and ipfs-coord v6
2021-08-24 16:05:04 -07:00
Chris Troutner 85a8efb5bf fix(psf-bch-wallet): Got working with psf-bch-wallet and ipfs-coord v6 2021-08-24 16:03:17 -07:00
Chris Troutner e33ee49879 Merge pull request #20 from Permissionless-Software-Foundation/ct-unstable
fix(upstream): Synced with upstream repo ipfs-service-provider
2021-08-24 11:01:09 -07:00
Chris Troutner 9c53204a91 fix(upstream): Synced with upstream repo ipfs-service-provider 2021-08-24 10:59:39 -07:00
Chris Troutner 6faf1ccf86 Merge branch 'master' into ct-unstable 2021-08-24 10:58:21 -07:00
Chris Troutner 8fafe96e01 Merge pull request #23 from Permissionless-Software-Foundation/ct-unstable
fix(ipfs-coord): Bumping to v6.1.4
2021-08-24 10:53:32 -07:00
Chris Troutner d06c995174 fix(ipfs-coord): Bumping to v6.1.4 2021-08-24 10:51:58 -07:00
Chris Troutner 2d02904ed1 fix(ipfs-coord): Bumped to v6.1.3 2021-08-24 10:44:25 -07:00
Chris Troutner 51d7ddb362 Merge pull request #22 from Permissionless-Software-Foundation/ct-unstable
fix(node-fetch): Adding node-fetch as dependency, which was preventin…
2021-08-24 10:28:51 -07:00
Chris Troutner ee1fbad02a Fixing broken test 2021-08-24 10:26:46 -07:00
Chris Troutner f5ae98cb9c fix(node-fetch): Adding node-fetch as dependency, which was preventing install on some machines 2021-08-24 10:23:19 -07:00
Chris Troutner e416478522 Explicitly adding node-pre-gyp 2021-08-24 07:54:04 -07:00
Chris Troutner ce85dffc97 Adding node-fetch as a dep 2021-08-24 07:31:52 -07:00
Chris Troutner c9f7a43339 fix(Docker): integrating changes into production Docker container 2021-08-24 07:27:10 -07:00
Chris Troutner a885fb7edf Merge pull request #19 from Permissionless-Software-Foundation/ct-unstable
fix(version): Bumping to v1.11.0 for wallet consumer
2021-08-23 17:16:23 -07:00
Chris Troutner 93d1542522 fix(version): Bumping to v1.11.0 for wallet consumer 2021-08-23 17:12:49 -07:00
6 changed files with 112 additions and 73 deletions
+4 -1
View File
@@ -73,5 +73,8 @@ module.exports = {
// IPFS Ports
ipfsTcpPort: process.env.IPFS_TCP_PORT ? process.env.IPFS_TCP_PORT : 5668,
ipfsWsPort: process.env.IPFS_WS_PORT ? process.env.IPFS_WS_PORT : 5669
ipfsWsPort: process.env.IPFS_WS_PORT ? process.env.IPFS_WS_PORT : 5669,
// BCH Mnemonic for generating encryption keys and payment address
mnemonic: process.env.MNEMONIC ? process.env.MNEMONIC : ''
}
+92 -59
View File
@@ -1,11 +1,11 @@
{
"name": "ipfs-bch-wallet-service",
"version": "1.9.1",
"version": "1.11.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.9.1",
"version": "1.11.0",
"license": "MIT",
"dependencies": {
"@psf/bch-js": "^4.20.3",
@@ -13,7 +13,7 @@
"bcryptjs": "^2.4.3",
"glob": "^7.1.6",
"ipfs": "0.55.4",
"ipfs-coord": "^6.1.2",
"ipfs-coord": "^6.1.6",
"jsonrpc-lite": "^2.2.0",
"jsonwebtoken": "^8.5.1",
"jwt-bch-lib": "^1.3.0",
@@ -30,6 +30,7 @@
"koa2-ratelimit": "^0.9.0",
"line-reader": "^0.4.0",
"mongoose": "^5.11.15",
"node-fetch": "npm:@achingbrain/node-fetch@^2.6.7",
"nodemailer": "^6.4.17",
"passport-local": "^1.0.0",
"winston": "^3.3.3",
@@ -54,6 +55,37 @@
"uuid": "^8.3.2"
}
},
"../ipfs-coord": {
"version": "6.0.0",
"extraneous": true,
"license": "MIT",
"dependencies": {
"bch-encrypt-lib": "^2.0.0",
"orbit-db": "^0.26.1"
},
"devDependencies": {
"@psf/bch-js": "^4.20.10",
"apidoc": "^0.25.0",
"chai": "^4.2.0",
"coveralls": "^3.1.0",
"eslint": "7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-standard": "^4.0.0",
"husky": "^4.3.6",
"lodash.clonedeep": "^4.5.0",
"mocha": "^8.2.1",
"nyc": "^15.1.0",
"semantic-release": "^17.4.4",
"sinon": "^9.2.2",
"standard": "^16.0.3"
},
"peerDependencies": {
"ipfs": "0.55.4"
}
},
"node_modules/@assemblyscript/loader": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz",
@@ -8027,20 +8059,6 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -9235,10 +9253,7 @@
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/hat/-/hat-0.0.3.tgz",
"integrity": "sha1-uwFKnmSzeIrtgAWRdBPU/z1QLYo=",
"optional": true,
"engines": {
"node": "*"
}
"optional": true
},
"node_modules/he": {
"version": "1.2.0",
@@ -10015,9 +10030,9 @@
}
},
"node_modules/ipfs-coord": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-6.1.2.tgz",
"integrity": "sha512-SimYZFMx+L3k6/RmNwfbME48BdA+RY6fdrwrm2Jf4vwlARTgwjn+Pyl0rS+JklmniWIOFjrgs2yoy07cR3jimQ==",
"version": "6.1.6",
"resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-6.1.6.tgz",
"integrity": "sha512-Kpz8FW5dBNl2davNbgKycZzZx8Z5pAnUll4oRwS7+ms6cv1ydUcV5yQVItRKGxigwEzuRm9NqRLTg9eTuytP7w==",
"dependencies": {
"bch-encrypt-lib": "^2.0.0",
"orbit-db": "^0.26.1"
@@ -10547,14 +10562,22 @@
}
},
"node_modules/ipfs-log/node_modules/ipld-dag-cbor/node_modules/multicodec": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.1.0.tgz",
"integrity": "sha512-f6d4DhbQ9a8WiJ/wpbKgeJSeR0/juP/1wnjbKdZ0KAWDkC/z7Lb3xOegMUG+uTcfwSYf6j1eTvFf8HDgqPRGmQ==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.1.1.tgz",
"integrity": "sha512-q29htEIgHglgxEcD0SvTmf1er68nfhm87rMKPqpClequHOTJknDCX5xA8QHBwBstgj+niO2KrsJeFzpsMZj2DQ==",
"dependencies": {
"uint8arrays": "^2.1.5",
"uint8arrays": "^3.0.0",
"varint": "^6.0.0"
}
},
"node_modules/ipfs-log/node_modules/ipld-dag-cbor/node_modules/multicodec/node_modules/uint8arrays": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz",
"integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==",
"dependencies": {
"multiformats": "^9.4.2"
}
},
"node_modules/ipfs-log/node_modules/ipld-dag-pb": {
"version": "0.20.0",
"resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.20.0.tgz",
@@ -21040,17 +21063,24 @@
"integrity": "sha512-LPzSaBYp/TcbuSlpGwqT5jR9kvJ3Zp5ic2N5c2ybx6XB/lSfEHq2D7ja8AgoxHoMD91wXFALJoXsvshKPuXyew=="
},
"node_modules/protons": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/protons/-/protons-2.0.2.tgz",
"integrity": "sha512-EIPoT9ftVirJ9QJ3oFoueYUiBhmPqE1AoSBPypLSqbbvHvx+OcUeK9z84YIsk6jda+N3FL58dU1LcWmfGCZGHA==",
"deprecated": "This module is no longer maintained",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/protons/-/protons-2.0.3.tgz",
"integrity": "sha512-j6JikP/H7gNybNinZhAHMN07Vjr1i4lVupg598l4I9gSTjJqOvKnwjzYX2PzvBTSVf2eZ2nWv4vG+mtW8L6tpA==",
"dependencies": {
"protocol-buffers-schema": "^3.3.1",
"signed-varint": "^2.0.1",
"uint8arrays": "^2.1.3",
"uint8arrays": "^3.0.0",
"varint": "^5.0.0"
}
},
"node_modules/protons/node_modules/uint8arrays": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz",
"integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==",
"dependencies": {
"multiformats": "^9.4.2"
}
},
"node_modules/protons/node_modules/varint": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
@@ -22785,11 +22815,6 @@
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
},
"bin": {
"sshpk-conv": "bin/sshpk-conv",
"sshpk-sign": "bin/sshpk-sign",
"sshpk-verify": "bin/sshpk-verify"
},
"engines": {
"node": ">=0.10.0"
}
@@ -24143,9 +24168,6 @@
},
"bin": {
"nopt": "bin/nopt.js"
},
"engines": {
"node": "*"
}
},
"node_modules/tough-cookie": {
@@ -31550,13 +31572,6 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"optional": true
},
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -33073,9 +33088,9 @@
}
},
"ipfs-coord": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-6.1.2.tgz",
"integrity": "sha512-SimYZFMx+L3k6/RmNwfbME48BdA+RY6fdrwrm2Jf4vwlARTgwjn+Pyl0rS+JklmniWIOFjrgs2yoy07cR3jimQ==",
"version": "6.1.6",
"resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-6.1.6.tgz",
"integrity": "sha512-Kpz8FW5dBNl2davNbgKycZzZx8Z5pAnUll4oRwS7+ms6cv1ydUcV5yQVItRKGxigwEzuRm9NqRLTg9eTuytP7w==",
"requires": {
"bch-encrypt-lib": "^2.0.0",
"orbit-db": "^0.26.1"
@@ -33562,12 +33577,22 @@
},
"dependencies": {
"multicodec": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.1.0.tgz",
"integrity": "sha512-f6d4DhbQ9a8WiJ/wpbKgeJSeR0/juP/1wnjbKdZ0KAWDkC/z7Lb3xOegMUG+uTcfwSYf6j1eTvFf8HDgqPRGmQ==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.1.1.tgz",
"integrity": "sha512-q29htEIgHglgxEcD0SvTmf1er68nfhm87rMKPqpClequHOTJknDCX5xA8QHBwBstgj+niO2KrsJeFzpsMZj2DQ==",
"requires": {
"uint8arrays": "^2.1.5",
"uint8arrays": "^3.0.0",
"varint": "^6.0.0"
},
"dependencies": {
"uint8arrays": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz",
"integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==",
"requires": {
"multiformats": "^9.4.2"
}
}
}
}
}
@@ -41718,16 +41743,24 @@
"integrity": "sha512-LPzSaBYp/TcbuSlpGwqT5jR9kvJ3Zp5ic2N5c2ybx6XB/lSfEHq2D7ja8AgoxHoMD91wXFALJoXsvshKPuXyew=="
},
"protons": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/protons/-/protons-2.0.2.tgz",
"integrity": "sha512-EIPoT9ftVirJ9QJ3oFoueYUiBhmPqE1AoSBPypLSqbbvHvx+OcUeK9z84YIsk6jda+N3FL58dU1LcWmfGCZGHA==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/protons/-/protons-2.0.3.tgz",
"integrity": "sha512-j6JikP/H7gNybNinZhAHMN07Vjr1i4lVupg598l4I9gSTjJqOvKnwjzYX2PzvBTSVf2eZ2nWv4vG+mtW8L6tpA==",
"requires": {
"protocol-buffers-schema": "^3.3.1",
"signed-varint": "^2.0.1",
"uint8arrays": "^2.1.3",
"uint8arrays": "^3.0.0",
"varint": "^5.0.0"
},
"dependencies": {
"uint8arrays": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz",
"integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==",
"requires": {
"multiformats": "^9.4.2"
}
},
"varint": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
+3 -2
View File
@@ -1,6 +1,6 @@
{
"name": "ipfs-bch-wallet-service",
"version": "1.9.1",
"version": "1.11.1",
"description": "IPFS and REST service providing blockchain access needed by a wallet. ",
"main": "index.js",
"scripts": {
@@ -28,7 +28,7 @@
"bcryptjs": "^2.4.3",
"glob": "^7.1.6",
"ipfs": "0.55.4",
"ipfs-coord": "^6.1.2",
"ipfs-coord": "^6.1.6",
"jsonrpc-lite": "^2.2.0",
"jsonwebtoken": "^8.5.1",
"jwt-bch-lib": "^1.3.0",
@@ -45,6 +45,7 @@
"koa2-ratelimit": "^0.9.0",
"line-reader": "^0.4.0",
"mongoose": "^5.11.15",
"node-fetch": "npm:@achingbrain/node-fetch@^2.6.7",
"nodemailer": "^6.4.17",
"passport-local": "^1.0.0",
"winston": "^3.3.3",
+6 -7
View File
@@ -25,32 +25,31 @@ WORKDIR /home/safeuser
# Switch to user account.
USER safeuser
# Prep 'sudo' commands.
RUN echo 'abcd8765' | sudo -S pwd
#RUN echo 'abcd8765' | sudo -S pwd
# Clone the rest.bitcoin.com repository
WORKDIR /home/safeuser
RUN git clone https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-service
# RUN mv koa-api-boilerplate koa
# RUN mkdir keys
# Switch to the desired branch. `master` is usually stable,
# and `stage` has the most up-to-date changes.
WORKDIR /home/safeuser/ipfs-bch-wallet-service
# For development: switch to unstable branch
# RUN git checkout unstable
RUN git checkout ct-unstable
# Install dependencies
RUN npm install -g node-pre-gyp
RUN npm install
# Generate the API docs
RUN npm run docs
# Calling out the directorys that should be mounted as external volumes.
RUN mkdir /home/safeuser/ipfsdata
RUN mkdir /home/safeuser/orbitdb
RUN mkdir /home/safeuser/.ipfsdata
#RUN mkdir /home/safeuser/orbitdb
VOLUME /home/safeuser/ipfsdata
VOLUME /home/safeuser/orbitdb
#VOLUME /home/safeuser/orbitdb
# Start the application.
COPY start-production.sh start-production.sh
+2 -2
View File
@@ -22,7 +22,7 @@ bch-wallet-service:
- '5668:5668' # IPFS TCP Port
- '5669:5669' # IPFS WS Port
volumes:
- ../ipfsdata:/home/safeuser/ipfsdata
- ../orbitdb:/home/safeuser/orbitdb
- ../.ipfsdata:/home/safeuser/.ipfsdata
# - ../orbitdb:/home/safeuser/orbitdb
restart: always
+5 -2
View File
@@ -43,6 +43,8 @@ class IpfsCoordAdapter {
}
async start (localConfig = {}) {
// console.log('this.config.announceJsonLd: ', this.config.announceJsonLd)
this.ipfsCoord = new this.IpfsCoord({
ipfs: this.ipfs,
type: 'node.js',
@@ -51,11 +53,12 @@ class IpfsCoordAdapter {
privateLog: console.log, // Default to console.log
isCircuitRelay: this.config.isCircuitRelay,
apiInfo: this.config.apiInfo,
announceJsonLd: this.config.announceJsonLd
announceJsonLd: this.config.announceJsonLd,
mnemonic: this.config.mnemonic
})
// Wait for the ipfs-coord library to signal that it is ready.
await this.ipfsCoord.start()
await this.ipfsCoord.start({ type: 'node.js' })
// Signal that this adapter is ready.
this.isReady = true