@nuggetslife/vc-multiplatform 1.2.5 → 1.3.1

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 (2) hide show
  1. package/index.js +78 -4
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -2,20 +2,94 @@
2
2
  //
3
3
  try {
4
4
  const nativeBinding = require('@nuggetslife/vc')
5
- const { Bls12381G2KeyPair, KeyPairSigner, KeyPairVerifier } = nativeBinding
5
+ const {
6
+ // Key pairs
7
+ Bls12381G2KeyPair,
8
+ KeyPairSigner,
9
+ KeyPairVerifier,
10
+ BoundBls12381G2KeyPair,
11
+ // BBS+ signature suites
12
+ BbsBlsSignature2020,
13
+ BbsBlsSignatureProof2020,
14
+ // Holder-bound signature suites
15
+ BbsBlsHolderBoundSignature2022,
16
+ BbsBlsHolderBoundSignatureProof2022,
17
+ // JSON-LD processor
18
+ JsonLd,
19
+ // Linked data signature functions
20
+ ldSign,
21
+ ldVerify,
22
+ ldDeriveProof,
23
+ deriveProof,
24
+ // Blind signing functions
25
+ createCommitment,
26
+ verifyCommitment,
27
+ unblindSignature,
28
+ deriveProofHolderBound,
29
+ } = nativeBinding
6
30
  module.exports.Bls12381G2KeyPair = Bls12381G2KeyPair
7
31
  module.exports.KeyPairSigner = KeyPairSigner
8
32
  module.exports.KeyPairVerifier = KeyPairVerifier
33
+ module.exports.BoundBls12381G2KeyPair = BoundBls12381G2KeyPair
34
+ module.exports.BbsBlsSignature2020 = BbsBlsSignature2020
35
+ module.exports.BbsBlsSignatureProof2020 = BbsBlsSignatureProof2020
36
+ module.exports.BbsBlsHolderBoundSignature2022 = BbsBlsHolderBoundSignature2022
37
+ module.exports.BbsBlsHolderBoundSignatureProof2022 = BbsBlsHolderBoundSignatureProof2022
38
+ module.exports.JsonLd = JsonLd
39
+ module.exports.ldSign = ldSign
40
+ module.exports.ldVerify = ldVerify
41
+ module.exports.ldDeriveProof = ldDeriveProof
42
+ module.exports.deriveProof = deriveProof
43
+ module.exports.createCommitment = createCommitment
44
+ module.exports.verifyCommitment = verifyCommitment
45
+ module.exports.unblindSignature = unblindSignature
46
+ module.exports.deriveProofHolderBound = deriveProofHolderBound
9
47
  } catch (e) {
10
- throw new Error(`failed to load: {e}`)
48
+ throw new Error(`failed to load native binding: ${e}`)
11
49
  }
12
50
 
13
51
  // React Native Support
14
52
  //
15
53
  // try {
16
54
  // const nativeBinding = require('@nuggetslife/vc-rn')
17
- // const { Bls12381G2KeyPair } = nativeBinding
55
+ // const {
56
+ // // Key pairs
57
+ // Bls12381G2KeyPair,
58
+ // BoundBls12381G2KeyPair,
59
+ // // BBS+ signature suites
60
+ // BbsBlsSignature2020,
61
+ // BbsBlsSignatureProof2020,
62
+ // // Holder-bound signature suites
63
+ // BbsBlsHolderBoundSignature2022,
64
+ // BbsBlsHolderBoundSignatureProof2022,
65
+ // // JSON-LD processor
66
+ // JsonLd,
67
+ // // Linked data signature functions
68
+ // ldSign,
69
+ // ldVerify,
70
+ // ldDeriveProof,
71
+ // deriveProof,
72
+ // // Blind signing functions
73
+ // createCommitment,
74
+ // verifyCommitment,
75
+ // unblindSignature,
76
+ // deriveProofHolderBound,
77
+ // } = nativeBinding
18
78
  // module.exports.Bls12381G2KeyPair = Bls12381G2KeyPair
79
+ // module.exports.BoundBls12381G2KeyPair = BoundBls12381G2KeyPair
80
+ // module.exports.BbsBlsSignature2020 = BbsBlsSignature2020
81
+ // module.exports.BbsBlsSignatureProof2020 = BbsBlsSignatureProof2020
82
+ // module.exports.BbsBlsHolderBoundSignature2022 = BbsBlsHolderBoundSignature2022
83
+ // module.exports.BbsBlsHolderBoundSignatureProof2022 = BbsBlsHolderBoundSignatureProof2022
84
+ // module.exports.JsonLd = JsonLd
85
+ // module.exports.ldSign = ldSign
86
+ // module.exports.ldVerify = ldVerify
87
+ // module.exports.ldDeriveProof = ldDeriveProof
88
+ // module.exports.deriveProof = deriveProof
89
+ // module.exports.createCommitment = createCommitment
90
+ // module.exports.verifyCommitment = verifyCommitment
91
+ // module.exports.unblindSignature = unblindSignature
92
+ // module.exports.deriveProofHolderBound = deriveProofHolderBound
19
93
  // } catch (e) {
20
- // throw new Error(`failed to load: {e}`)
94
+ // throw new Error(`failed to load: ${e}`)
21
95
  // }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuggetslife/vc-multiplatform",
3
- "version": "1.2.5",
3
+ "version": "1.3.1",
4
4
  "description": "Multiplatform support for VC library",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@
9
9
  "author": "",
10
10
  "license": "ISC",
11
11
  "optionalDependencies": {
12
- "@nuggetslife/vc": "0.0.17",
13
- "@nuggetslife/vc-rn": "0.1.6"
12
+ "@nuggetslife/vc": "0.0.20",
13
+ "@nuggetslife/vc-rn": "0.1.8"
14
14
  }
15
15
  }