psf-multisig-approval 2.1.0 → 2.2.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 CHANGED
@@ -4,12 +4,12 @@
4
4
  */
5
5
 
6
6
  // global libraries
7
- const bitcore = require('@chris.troutner/bitcore-lib-cash')
8
- const axios = require('axios')
7
+ import bitcore from '@chris.troutner/bitcore-lib-cash'
8
+ import axios from 'axios'
9
9
 
10
10
  // Local libraries
11
- const NFTs = require('./lib/nfts')
12
- const UtilLib = require('./lib/util')
11
+ import NFTs from './lib/nfts.js'
12
+ import UtilLib from './lib/util.js'
13
13
 
14
14
  class MultisigApproval {
15
15
  constructor (localConfig = {}) {
@@ -415,4 +415,4 @@ class MultisigApproval {
415
415
  }
416
416
  }
417
417
 
418
- module.exports = MultisigApproval
418
+ export default MultisigApproval
package/lib/nfts.js CHANGED
@@ -110,4 +110,4 @@ class NFTs {
110
110
  }
111
111
  }
112
112
 
113
- module.exports = NFTs
113
+ export default NFTs
package/lib/util.js CHANGED
@@ -47,4 +47,4 @@ class UtilLib {
47
47
  }
48
48
  }
49
49
 
50
- module.exports = UtilLib
50
+ export default UtilLib
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "psf-multisig-approval",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Utility library implementing the PS009 specification",
5
+ "type": "module",
5
6
  "main": "index.js",
6
7
  "scripts": {
7
8
  "start": "node index.js",
@@ -40,7 +41,7 @@
40
41
  "chai": "4.3.7",
41
42
  "husky": "8.0.3",
42
43
  "lodash.clonedeep": "4.5.0",
43
- "minimal-slp-wallet": "5.11.2",
44
+ "minimal-slp-wallet": "7.1.3",
44
45
  "mocha": "10.2.0",
45
46
  "nyc": "15.1.0",
46
47
  "semantic-release": "19.0.5",
@@ -3,11 +3,11 @@
3
3
  */
4
4
 
5
5
  // Global npm libraries
6
- const SlpWallet = require('minimal-slp-wallet')
7
- const assert = require('chai').assert
6
+ import SlpWallet from 'minimal-slp-wallet'
7
+ import { assert } from 'chai'
8
8
 
9
9
  // Local libraries
10
- const MultisigApproval = require('../../index')
10
+ import MultisigApproval from '../../index.js'
11
11
 
12
12
  describe('#psf-multisig-approval', () => {
13
13
  let uut
@@ -3,16 +3,16 @@
3
3
  */
4
4
 
5
5
  // npm libraries
6
- const assert = require('chai').assert
7
- const sinon = require('sinon')
8
- const cloneDeep = require('lodash.clonedeep')
9
- const SlpWallet = require('minimal-slp-wallet')
6
+ import { assert } from 'chai'
7
+ import sinon from 'sinon'
8
+ import cloneDeep from 'lodash.clonedeep'
9
+ import SlpWallet from 'minimal-slp-wallet'
10
10
 
11
11
  // Mocking data libraries.
12
12
 
13
13
  // Local libraries
14
- const MultisigApproval = require('../../index')
15
- const mockDataLib = require('./mocks/main-index-mocks')
14
+ import MultisigApproval from '../../index.js'
15
+ import mockDataLib from './mocks/main-index-mocks.js'
16
16
 
17
17
  describe('#MultisigApproval.js', () => {
18
18
  let sandbox
@@ -277,7 +277,19 @@ const updateObj01 = {
277
277
  txDetails: updateTxDetails01
278
278
  }
279
279
 
280
- module.exports = {
280
+ export {
281
+ pubkeys01,
282
+ txHistory01,
283
+ txHistory02,
284
+ approvalTxDetails01,
285
+ updateTxDetails01,
286
+ tokenHolderInfo01,
287
+ updateData01,
288
+ approvalObj01,
289
+ updateObj01
290
+ }
291
+
292
+ export default {
281
293
  pubkeys01,
282
294
  txHistory01,
283
295
  txHistory02,
@@ -26,7 +26,7 @@ const mockUtxos = {
26
26
  ]
27
27
  }
28
28
 
29
- module.exports = {
29
+ export {
30
30
  mockBalance,
31
31
  mockUtxos
32
32
  }
@@ -3,19 +3,16 @@
3
3
  */
4
4
 
5
5
  // npm libraries
6
- const chai = require('chai')
7
- const sinon = require('sinon')
8
- // const cloneDeep = require('lodash.clonedeep')
9
- const SlpWallet = require('minimal-slp-wallet')
10
-
11
- // Locally global variables.
12
- const assert = chai.assert
6
+ import { assert } from 'chai'
7
+ import sinon from 'sinon'
8
+ // import cloneDeep from 'lodash.clonedeep'
9
+ import SlpWallet from 'minimal-slp-wallet'
13
10
 
14
11
  // Mocking data libraries.
15
- // const mockDataLib = require('./mocks/util-mocks')
12
+ // import mockDataLib from './mocks/util-mocks.js'
16
13
 
17
14
  // Unit under test
18
- const NftsLib = require('../../lib/nfts')
15
+ import NftsLib from '../../lib/nfts.js'
19
16
 
20
17
  describe('#NFTs', () => {
21
18
  let sandbox
@@ -3,16 +3,16 @@
3
3
  */
4
4
 
5
5
  // npm libraries
6
- const assert = require('chai').assert
7
- const sinon = require('sinon')
8
- // const cloneDeep = require('lodash.clonedeep')
9
- const SlpWallet = require('minimal-slp-wallet')
6
+ import { assert } from 'chai'
7
+ import sinon from 'sinon'
8
+ // import cloneDeep from 'lodash.clonedeep'
9
+ import SlpWallet from 'minimal-slp-wallet'
10
10
 
11
11
  // Local libraries
12
- // const mockDataLib = require('./mocks/util-mocks')
12
+ // import mockDataLib from './mocks/util-mocks.js'
13
13
 
14
14
  // Unit under test
15
- const UtilLib = require('../../lib/util')
15
+ import UtilLib from '../../lib/util.js'
16
16
 
17
17
  describe('#Util', () => {
18
18
  let sandbox