psffpp 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +12 -1
- package/package.json +4 -4
- package/test/mocks/wallet.js +1 -1
package/index.js
CHANGED
|
@@ -30,6 +30,12 @@ class PSFFPP {
|
|
|
30
30
|
throw new Error('Instance of minimal-slp-wallet must be passed in as a property called \'wallet\', when initializing the psf-multisig-approval library.')
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
// Allow user to pass in alternative IPFS gateway.
|
|
34
|
+
this.ipfsGateway = localConfig.ipfsGateway
|
|
35
|
+
if (!this.ipfsGateway) {
|
|
36
|
+
this.ipfsGateway = 'https://free-bch.fullstack.cash'
|
|
37
|
+
}
|
|
38
|
+
|
|
33
39
|
// Encapsulate dependencies
|
|
34
40
|
this.bchjs = this.wallet.bchjs
|
|
35
41
|
this.ps009 = null // placeholder for Multisig Approval library.
|
|
@@ -52,7 +58,12 @@ class PSFFPP {
|
|
|
52
58
|
// initialized.
|
|
53
59
|
async _initPs009 () {
|
|
54
60
|
if (!this.ps009) {
|
|
55
|
-
|
|
61
|
+
const inObj = {
|
|
62
|
+
wallet: this.wallet,
|
|
63
|
+
ipfsGateway: this.ipfsGateway
|
|
64
|
+
}
|
|
65
|
+
// console.log('inObj: ', inObj)
|
|
66
|
+
this.ps009 = new MultisigApproval(inObj)
|
|
56
67
|
}
|
|
57
68
|
|
|
58
69
|
return true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "psffpp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "PS010 PSF File Pinning Protocol",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"repository": "Permissionless-Software-Foundation/psffpp",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"axios": "1.3.5",
|
|
37
|
-
"psf-multisig-approval": "2.
|
|
37
|
+
"psf-multisig-approval": "2.2.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@psf/bch-js": "
|
|
40
|
+
"@psf/bch-js": "7.1.10",
|
|
41
41
|
"apidoc": "0.54.0",
|
|
42
42
|
"c8": "9.1.0",
|
|
43
43
|
"chai": "4.3.7",
|
|
44
44
|
"husky": "8.0.3",
|
|
45
45
|
"lodash.clonedeep": "4.5.0",
|
|
46
|
-
"minimal-slp-wallet": "
|
|
46
|
+
"minimal-slp-wallet": "7.1.3",
|
|
47
47
|
"mocha": "10.2.0",
|
|
48
48
|
"semantic-release": "19.0.5",
|
|
49
49
|
"sinon": "15.0.3",
|
package/test/mocks/wallet.js
CHANGED
|
@@ -17,7 +17,7 @@ class MockBchWallet {
|
|
|
17
17
|
this.walletInfoPromise = true
|
|
18
18
|
this.walletInfo = mockWallet
|
|
19
19
|
this.initialize = async () => {}
|
|
20
|
-
this.bchjs = new BCHJS()
|
|
20
|
+
this.bchjs = new BCHJS({ restURL: 'https://bch.fullstack.cash/v6/' })
|
|
21
21
|
this.burnTokens = async () => {
|
|
22
22
|
return 'txid'
|
|
23
23
|
}
|