mirror of
https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-service.git
synced 2026-09-21 16:52:03 -07:00
fix(psf-bch-wallet): Got working with psf-bch-wallet and ipfs-coord v6
This commit is contained in:
Vendored
+4
-1
@@ -73,5 +73,8 @@ module.exports = {
|
|||||||
|
|
||||||
// IPFS Ports
|
// IPFS Ports
|
||||||
ipfsTcpPort: process.env.IPFS_TCP_PORT ? process.env.IPFS_TCP_PORT : 5668,
|
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 : ''
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+88
-24
@@ -13,7 +13,7 @@
|
|||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"ipfs": "0.55.4",
|
"ipfs": "0.55.4",
|
||||||
"ipfs-coord": "^6.1.4",
|
"ipfs-coord": "^6.1.6",
|
||||||
"jsonrpc-lite": "^2.2.0",
|
"jsonrpc-lite": "^2.2.0",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
"jwt-bch-lib": "^1.3.0",
|
"jwt-bch-lib": "^1.3.0",
|
||||||
@@ -55,6 +55,37 @@
|
|||||||
"uuid": "^8.3.2"
|
"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": {
|
"node_modules/@assemblyscript/loader": {
|
||||||
"version": "0.9.4",
|
"version": "0.9.4",
|
||||||
"resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz",
|
"resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz",
|
||||||
@@ -9999,9 +10030,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ipfs-coord": {
|
"node_modules/ipfs-coord": {
|
||||||
"version": "6.1.4",
|
"version": "6.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-6.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-6.1.6.tgz",
|
||||||
"integrity": "sha512-uWSNJIp5JapAlLLaLczcsfZw8UO4jMu+ObA97u0otlU6eA5x2SLJj1nKnl5u1+hpRfBSiMqWGOLNifjThjdTIA==",
|
"integrity": "sha512-Kpz8FW5dBNl2davNbgKycZzZx8Z5pAnUll4oRwS7+ms6cv1ydUcV5yQVItRKGxigwEzuRm9NqRLTg9eTuytP7w==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bch-encrypt-lib": "^2.0.0",
|
"bch-encrypt-lib": "^2.0.0",
|
||||||
"orbit-db": "^0.26.1"
|
"orbit-db": "^0.26.1"
|
||||||
@@ -10531,14 +10562,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ipfs-log/node_modules/ipld-dag-cbor/node_modules/multicodec": {
|
"node_modules/ipfs-log/node_modules/ipld-dag-cbor/node_modules/multicodec": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.1.1.tgz",
|
||||||
"integrity": "sha512-f6d4DhbQ9a8WiJ/wpbKgeJSeR0/juP/1wnjbKdZ0KAWDkC/z7Lb3xOegMUG+uTcfwSYf6j1eTvFf8HDgqPRGmQ==",
|
"integrity": "sha512-q29htEIgHglgxEcD0SvTmf1er68nfhm87rMKPqpClequHOTJknDCX5xA8QHBwBstgj+niO2KrsJeFzpsMZj2DQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"uint8arrays": "^2.1.5",
|
"uint8arrays": "^3.0.0",
|
||||||
"varint": "^6.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": {
|
"node_modules/ipfs-log/node_modules/ipld-dag-pb": {
|
||||||
"version": "0.20.0",
|
"version": "0.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.20.0.tgz",
|
"resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.20.0.tgz",
|
||||||
@@ -21024,17 +21063,24 @@
|
|||||||
"integrity": "sha512-LPzSaBYp/TcbuSlpGwqT5jR9kvJ3Zp5ic2N5c2ybx6XB/lSfEHq2D7ja8AgoxHoMD91wXFALJoXsvshKPuXyew=="
|
"integrity": "sha512-LPzSaBYp/TcbuSlpGwqT5jR9kvJ3Zp5ic2N5c2ybx6XB/lSfEHq2D7ja8AgoxHoMD91wXFALJoXsvshKPuXyew=="
|
||||||
},
|
},
|
||||||
"node_modules/protons": {
|
"node_modules/protons": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/protons/-/protons-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/protons/-/protons-2.0.3.tgz",
|
||||||
"integrity": "sha512-EIPoT9ftVirJ9QJ3oFoueYUiBhmPqE1AoSBPypLSqbbvHvx+OcUeK9z84YIsk6jda+N3FL58dU1LcWmfGCZGHA==",
|
"integrity": "sha512-j6JikP/H7gNybNinZhAHMN07Vjr1i4lVupg598l4I9gSTjJqOvKnwjzYX2PzvBTSVf2eZ2nWv4vG+mtW8L6tpA==",
|
||||||
"deprecated": "This module is no longer maintained",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"protocol-buffers-schema": "^3.3.1",
|
"protocol-buffers-schema": "^3.3.1",
|
||||||
"signed-varint": "^2.0.1",
|
"signed-varint": "^2.0.1",
|
||||||
"uint8arrays": "^2.1.3",
|
"uint8arrays": "^3.0.0",
|
||||||
"varint": "^5.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": {
|
"node_modules/protons/node_modules/varint": {
|
||||||
"version": "5.0.2",
|
"version": "5.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
|
||||||
@@ -33042,9 +33088,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ipfs-coord": {
|
"ipfs-coord": {
|
||||||
"version": "6.1.4",
|
"version": "6.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-6.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-6.1.6.tgz",
|
||||||
"integrity": "sha512-uWSNJIp5JapAlLLaLczcsfZw8UO4jMu+ObA97u0otlU6eA5x2SLJj1nKnl5u1+hpRfBSiMqWGOLNifjThjdTIA==",
|
"integrity": "sha512-Kpz8FW5dBNl2davNbgKycZzZx8Z5pAnUll4oRwS7+ms6cv1ydUcV5yQVItRKGxigwEzuRm9NqRLTg9eTuytP7w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bch-encrypt-lib": "^2.0.0",
|
"bch-encrypt-lib": "^2.0.0",
|
||||||
"orbit-db": "^0.26.1"
|
"orbit-db": "^0.26.1"
|
||||||
@@ -33531,12 +33577,22 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"multicodec": {
|
"multicodec": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.1.1.tgz",
|
||||||
"integrity": "sha512-f6d4DhbQ9a8WiJ/wpbKgeJSeR0/juP/1wnjbKdZ0KAWDkC/z7Lb3xOegMUG+uTcfwSYf6j1eTvFf8HDgqPRGmQ==",
|
"integrity": "sha512-q29htEIgHglgxEcD0SvTmf1er68nfhm87rMKPqpClequHOTJknDCX5xA8QHBwBstgj+niO2KrsJeFzpsMZj2DQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"uint8arrays": "^2.1.5",
|
"uint8arrays": "^3.0.0",
|
||||||
"varint": "^6.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"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41687,16 +41743,24 @@
|
|||||||
"integrity": "sha512-LPzSaBYp/TcbuSlpGwqT5jR9kvJ3Zp5ic2N5c2ybx6XB/lSfEHq2D7ja8AgoxHoMD91wXFALJoXsvshKPuXyew=="
|
"integrity": "sha512-LPzSaBYp/TcbuSlpGwqT5jR9kvJ3Zp5ic2N5c2ybx6XB/lSfEHq2D7ja8AgoxHoMD91wXFALJoXsvshKPuXyew=="
|
||||||
},
|
},
|
||||||
"protons": {
|
"protons": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/protons/-/protons-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/protons/-/protons-2.0.3.tgz",
|
||||||
"integrity": "sha512-EIPoT9ftVirJ9QJ3oFoueYUiBhmPqE1AoSBPypLSqbbvHvx+OcUeK9z84YIsk6jda+N3FL58dU1LcWmfGCZGHA==",
|
"integrity": "sha512-j6JikP/H7gNybNinZhAHMN07Vjr1i4lVupg598l4I9gSTjJqOvKnwjzYX2PzvBTSVf2eZ2nWv4vG+mtW8L6tpA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"protocol-buffers-schema": "^3.3.1",
|
"protocol-buffers-schema": "^3.3.1",
|
||||||
"signed-varint": "^2.0.1",
|
"signed-varint": "^2.0.1",
|
||||||
"uint8arrays": "^2.1.3",
|
"uint8arrays": "^3.0.0",
|
||||||
"varint": "^5.0.0"
|
"varint": "^5.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"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": {
|
"varint": {
|
||||||
"version": "5.0.2",
|
"version": "5.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ipfs-bch-wallet-service",
|
"name": "ipfs-bch-wallet-service",
|
||||||
"version": "1.11.0",
|
"version": "1.11.1",
|
||||||
"description": "IPFS and REST service providing blockchain access needed by a wallet. ",
|
"description": "IPFS and REST service providing blockchain access needed by a wallet. ",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"ipfs": "0.55.4",
|
"ipfs": "0.55.4",
|
||||||
"ipfs-coord": "^6.1.4",
|
"ipfs-coord": "^6.1.6",
|
||||||
"jsonrpc-lite": "^2.2.0",
|
"jsonrpc-lite": "^2.2.0",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
"jwt-bch-lib": "^1.3.0",
|
"jwt-bch-lib": "^1.3.0",
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ class IpfsCoordAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async start (localConfig = {}) {
|
async start (localConfig = {}) {
|
||||||
|
// console.log('this.config.announceJsonLd: ', this.config.announceJsonLd)
|
||||||
|
|
||||||
this.ipfsCoord = new this.IpfsCoord({
|
this.ipfsCoord = new this.IpfsCoord({
|
||||||
ipfs: this.ipfs,
|
ipfs: this.ipfs,
|
||||||
type: 'node.js',
|
type: 'node.js',
|
||||||
@@ -51,11 +53,12 @@ class IpfsCoordAdapter {
|
|||||||
privateLog: console.log, // Default to console.log
|
privateLog: console.log, // Default to console.log
|
||||||
isCircuitRelay: this.config.isCircuitRelay,
|
isCircuitRelay: this.config.isCircuitRelay,
|
||||||
apiInfo: this.config.apiInfo,
|
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.
|
// 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.
|
// Signal that this adapter is ready.
|
||||||
this.isReady = true
|
this.isReady = true
|
||||||
|
|||||||
Reference in New Issue
Block a user