@nuggetslife/vc-multiplatform 1.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.
Files changed (2) hide show
  1. package/index.js +21 -0
  2. package/package.json +15 -0
package/index.js ADDED
@@ -0,0 +1,21 @@
1
+ // NodeJS Support
2
+ //
3
+ try {
4
+ const nativeBinding = require('@nuggetslife/vc')
5
+ const { Bls12381G2KeyPair, KeyPairSigner, KeyPairVerifier } = nativeBinding
6
+ module.exports.Bls12381G2KeyPair = Bls12381G2KeyPair
7
+ module.exports.KeyPairSigner = KeyPairSigner
8
+ module.exports.KeyPairVerifier = KeyPairVerifier
9
+ } catch (e) {
10
+ throw new Error(`failed to load: {e}`)
11
+ }
12
+
13
+ // React Native Support
14
+ //
15
+ // try {
16
+ // const nativeBinding = require('@nuggetslife/vc-rn')
17
+ // const { Bls12381G2KeyPair } = nativeBinding
18
+ // module.exports.Bls12381G2KeyPair = Bls12381G2KeyPair
19
+ // } catch (e) {
20
+ // throw new Error(`failed to load: {e}`)
21
+ // }
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@nuggetslife/vc-multiplatform",
3
+ "version": "1.2.0",
4
+ "description": "Multiplatform support for VC library",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "ISC",
11
+ "optionalDependencies": {
12
+ "@nuggetslife/vc": "0.0.10",
13
+ "@nuggetslife/vc-rn": "0.1.1"
14
+ }
15
+ }