psf-multisig-approval 2.0.7 → 2.0.9

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.
Files changed (3) hide show
  1. package/README.md +3 -3
  2. package/index.js +5 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # psf-multisig-approval
2
2
 
3
- This is an npm library for node.js. It implements the [PS009 specification for multisignature approval](https://github.com/Permissionless-Software-Foundation/specifications/blob/master/ps009-multisig-approval.md). The main consumers of this library of [psf-bch-wallet](https://github.com/Permissionless-Software-Foundation/psf-bch-wallet) and [ipfs-p2wdb-service](https://github.com/Permissionless-Software-Foundation/ipfs-p2wdb-service).
3
+ This is an npm library for node.js. It implements the [PS009 specification for multisignature approval](https://github.com/Permissionless-Software-Foundation/specifications/blob/master/ps009-multisig-approval.md). The main consumers of this library is the [psffpp](https://github.com/Permissionless-Software-Foundation/psffpp) library and various [Cash Stack](https://cashstack.info) infrastructure.
4
4
 
5
5
  ## Instancing Library
6
6
  This library depends on [minimal-slp-wallet](https://www.npmjs.com/package/minimal-slp-wallet). An instance of that library is expected to be injected into this this one when instantiated. Here is an example:
@@ -69,7 +69,7 @@ console.log(result)
69
69
  ```
70
70
 
71
71
  ## Get an Approval Transaction
72
- This function will take a BCH address as input. It will search the transaction history for the address, and will return an object about the first `APPROVAL` transaction that it finds. If it can't find one, it will return null.
72
+ This function will take a BCH address as input. It will search the transaction history for the address, and will return an object for the first `APPROVAL` transaction that it finds. If it can't find one, it will return null.
73
73
 
74
74
  ```javascript
75
75
  const address = 'bitcoincash:qrwe6kxhvu47ve6jvgrf2d93w0q38av7s5xm9xfehr'
@@ -129,7 +129,7 @@ The update transaction will reference an IPFS CID. That data will need to be ret
129
129
  // Instance this library and overwrite the default IPFS gateway
130
130
  const ps009 = new MultisigApproval({
131
131
  wallet,
132
- ipfsGateway: 'https://p2wdb-gateway-678.fullstack.cash'
132
+ ipfsGateway: 'https://pin.fullstack.cash'
133
133
  })
134
134
 
135
135
  const cid = 'bafybeib5d6s6t3tq4lhwp2ocvz7y2ws4czgkrmhlhv5y5aeyh6bqrmsxxi'
package/index.js CHANGED
@@ -38,6 +38,10 @@ class MultisigApproval {
38
38
  this.getNftHolderInfo = this.getNftHolderInfo.bind(this)
39
39
  this.createMultisigAddress = this.createMultisigAddress.bind(this)
40
40
  this.getApprovalTx = this.getApprovalTx.bind(this)
41
+ this.getUpdateTx = this.getUpdateTx.bind(this)
42
+ this.getCidData = this.getCidData.bind(this)
43
+ this.validateApproval = this.validateApproval.bind(this)
44
+ this.getUpdateHistory = this.getUpdateHistory.bind(this)
41
45
 
42
46
  // Create a transaction details cache, to reduce the number of API calls.
43
47
  this.txCache = {}
@@ -136,7 +140,7 @@ class MultisigApproval {
136
140
 
137
141
  // Get the transaction history for the address
138
142
  const txHistory = await this.wallet.getTransactions(address)
139
- console.log('txHistory: ', JSON.stringify(txHistory, null, 2))
143
+ // console.log('txHistory: ', JSON.stringify(txHistory, null, 2))
140
144
 
141
145
  // Loop through the transaction history
142
146
  for (let i = 0; i < txHistory.length; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "psf-multisig-approval",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Utility library implementing the PS009 specification",
5
5
  "main": "index.js",
6
6
  "scripts": {