@nuggetslife/vc-rn 0.1.9 → 0.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/lib/commonjs/BbsBlsHolderBoundSignature2022.js +4 -9
- package/lib/commonjs/BbsBlsHolderBoundSignature2022.js.map +1 -1
- package/lib/commonjs/BbsBlsHolderBoundSignatureProof2022.js +3 -9
- package/lib/commonjs/BbsBlsHolderBoundSignatureProof2022.js.map +1 -1
- package/lib/commonjs/BbsBlsSignatureProof2020.js +0 -1
- package/lib/commonjs/BbsBlsSignatureProof2020.js.map +1 -1
- package/lib/commonjs/Bls12381G2KeyPair.js +3 -3
- package/lib/commonjs/Bls12381G2KeyPair.js.map +1 -1
- package/lib/commonjs/blind_signing.js +12 -30
- package/lib/commonjs/blind_signing.js.map +1 -1
- package/lib/commonjs/index.js +93 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/jose.js +228 -0
- package/lib/commonjs/jose.js.map +1 -0
- package/lib/commonjs/ld_signatures.js +3 -12
- package/lib/commonjs/ld_signatures.js.map +1 -1
- package/lib/commonjs/utils/codec.js +12 -0
- package/lib/commonjs/utils/codec.js.map +1 -1
- package/lib/commonjs/utils/index.js +12 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/BbsBlsHolderBoundSignature2022.js +1 -6
- package/lib/module/BbsBlsHolderBoundSignature2022.js.map +1 -1
- package/lib/module/BbsBlsHolderBoundSignatureProof2022.js +1 -7
- package/lib/module/BbsBlsHolderBoundSignatureProof2022.js.map +1 -1
- package/lib/module/BbsBlsSignatureProof2020.js +0 -1
- package/lib/module/BbsBlsSignatureProof2020.js.map +1 -1
- package/lib/module/Bls12381G2KeyPair.js +3 -3
- package/lib/module/Bls12381G2KeyPair.js.map +1 -1
- package/lib/module/blind_signing.js +1 -19
- package/lib/module/blind_signing.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/jose.js +216 -0
- package/lib/module/jose.js.map +1 -0
- package/lib/module/ld_signatures.js +1 -10
- package/lib/module/ld_signatures.js.map +1 -1
- package/lib/module/utils/codec.js +11 -1
- package/lib/module/utils/codec.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/src/BbsBlsHolderBoundSignature2022.d.ts.map +1 -1
- package/lib/typescript/src/BbsBlsHolderBoundSignatureProof2022.d.ts +0 -1
- package/lib/typescript/src/BbsBlsHolderBoundSignatureProof2022.d.ts.map +1 -1
- package/lib/typescript/src/BbsBlsSignatureProof2020.d.ts +0 -1
- package/lib/typescript/src/BbsBlsSignatureProof2020.d.ts.map +1 -1
- package/lib/typescript/src/blind_signing.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/jose.d.ts +106 -0
- package/lib/typescript/src/jose.d.ts.map +1 -0
- package/lib/typescript/src/ld_signatures.d.ts.map +1 -1
- package/lib/typescript/src/utils/codec.d.ts +2 -0
- package/lib/typescript/src/utils/codec.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +1 -1
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/package.json +1 -2
- package/src/BbsBlsHolderBoundSignature2022.ts +1 -5
- package/src/BbsBlsHolderBoundSignatureProof2022.ts +1 -7
- package/src/BbsBlsSignatureProof2020.ts +0 -2
- package/src/Bls12381G2KeyPair.ts +3 -3
- package/src/blind_signing.ts +1 -15
- package/src/index.tsx +20 -0
- package/src/jose.ts +246 -0
- package/src/ld_signatures.ts +1 -8
- package/src/utils/codec.ts +9 -1
- package/src/utils/index.ts +1 -1
- package/lib/commonjs/index.d.js +0 -18
- package/lib/commonjs/index.d.js.map +0 -1
- package/lib/module/index.d.js +0 -9
- package/lib/module/index.d.js.map +0 -1
- package/src/index.d.ts +0 -126
package/lib/commonjs/index.d.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.KeyPairVerifier = exports.KeyPairSigner = exports.Bls12381G2KeyPair = void 0;
|
|
7
|
-
/* tslint:disable */
|
|
8
|
-
/* eslint-disable */
|
|
9
|
-
|
|
10
|
-
/* auto-generated by NAPI-RS */
|
|
11
|
-
|
|
12
|
-
class Bls12381G2KeyPair {}
|
|
13
|
-
exports.Bls12381G2KeyPair = Bls12381G2KeyPair;
|
|
14
|
-
class KeyPairSigner {}
|
|
15
|
-
exports.KeyPairSigner = KeyPairSigner;
|
|
16
|
-
class KeyPairVerifier {}
|
|
17
|
-
exports.KeyPairVerifier = KeyPairVerifier;
|
|
18
|
-
//# sourceMappingURL=index.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Bls12381G2KeyPair","exports","KeyPairSigner","KeyPairVerifier"],"sourceRoot":"../../src","sources":["index.d.ts"],"mappings":";;;;;;AAAA;AACA;;AAEA;;AA6FO,MAAMA,iBAAiB,CAAC;AAsB9BC,OAAA,CAAAD,iBAAA,GAAAA,iBAAA;AACM,MAAME,aAAa,CAAC;AAE1BD,OAAA,CAAAC,aAAA,GAAAA,aAAA;AACM,MAAMC,eAAe,CAAC;AAE5BF,OAAA,CAAAE,eAAA,GAAAA,eAAA","ignoreList":[]}
|
package/lib/module/index.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Bls12381G2KeyPair","KeyPairSigner","KeyPairVerifier"],"sourceRoot":"../../src","sources":["index.d.ts"],"mappings":"AAAA;AACA;;AAEA;;AA6FA,OAAO,MAAMA,iBAAiB,CAAC;AAuB/B,OAAO,MAAMC,aAAa,CAAC;AAG3B,OAAO,MAAMC,eAAe,CAAC","ignoreList":[]}
|
package/src/index.d.ts
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
/* auto-generated by NAPI-RS */
|
|
5
|
-
|
|
6
|
-
export interface KeyPairOptions {
|
|
7
|
-
id?: string
|
|
8
|
-
controller?: string
|
|
9
|
-
privateKeyBase58?: string
|
|
10
|
-
publicKeyBase58?: string
|
|
11
|
-
}
|
|
12
|
-
export interface JwkKeyPairOptions {
|
|
13
|
-
id?: string
|
|
14
|
-
controller?: string
|
|
15
|
-
privateKeyJwk?: JsonWebKey
|
|
16
|
-
publicKeyJwk?: JsonWebKey
|
|
17
|
-
}
|
|
18
|
-
export interface FingerPrintFromPublicKeyOptions {
|
|
19
|
-
publicKeyBase58: string
|
|
20
|
-
}
|
|
21
|
-
export interface KeyPairFromFingerPrintOptions {
|
|
22
|
-
id?: string
|
|
23
|
-
controller?: string
|
|
24
|
-
fingerprint: string
|
|
25
|
-
}
|
|
26
|
-
export interface JsonWebKey {
|
|
27
|
-
/**
|
|
28
|
-
* Indicates the key type used
|
|
29
|
-
* For BLS12381_G1 and BLS12381_G2 the string "EC" MUST be used
|
|
30
|
-
* @see https://tools.ietf.org/html/rfc7517#section-4.1
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
kty: string
|
|
34
|
-
/**
|
|
35
|
-
* Indicates the curve this key is associated with
|
|
36
|
-
* In the case of BLS12-381, the curve will also indicate if it's a G1 or G2 point
|
|
37
|
-
* For a G1 point, use the string "BLS12381_G1"
|
|
38
|
-
* For a G2 point, use the string "BLS12381_G2"
|
|
39
|
-
*/
|
|
40
|
-
crv: string
|
|
41
|
-
/**
|
|
42
|
-
* This is a compression of the public key point
|
|
43
|
-
* For a G1 public key, X is a 384bit base64url encoding of the octet string representation of the coordinate
|
|
44
|
-
* For a G2 public key, X is a 768bit made up of the concatenation of two 384 bit x coordinates known as
|
|
45
|
-
* x_a and x_b in the following form (x_a || x_b) as a base64url encoding of the octet string representation of the two coordinates
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
x: string
|
|
49
|
-
/** @see https://tools.ietf.org/html/rfc7517#section-4.2 */
|
|
50
|
-
use?: string
|
|
51
|
-
/**
|
|
52
|
-
* @see https://tools.ietf.org/html/rfc7517#section-4.3
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
keyOps?: Array<string>
|
|
56
|
-
/**
|
|
57
|
-
* @see https://tools.ietf.org/html/rfc7517#section-4.4
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
alg?: string
|
|
61
|
-
/**
|
|
62
|
-
* @see https://tools.ietf.org/html/rfc7517#section-4.5
|
|
63
|
-
* TODO: Add note about referencing did-jose-extensions when ready
|
|
64
|
-
*
|
|
65
|
-
*/
|
|
66
|
-
kid?: string
|
|
67
|
-
/**
|
|
68
|
-
* IMPORTANT NOTE: d represents the private key value and should not be shared
|
|
69
|
-
* IT IS HIGHLY SENSITIVE DATA AND IF NOT SECURED PROPERLY CONSIDER THE KEY COMPROMISED
|
|
70
|
-
* @see https://tools.ietf.org/html/rfc7517#section-9.2
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
d?: string
|
|
74
|
-
/**
|
|
75
|
-
* This coordinate is not used for BLS Keys, but is kept here to make the interface more standard
|
|
76
|
-
*
|
|
77
|
-
*/
|
|
78
|
-
y?: string
|
|
79
|
-
/**
|
|
80
|
-
* @see https://www.w3.org/TR/WebCryptoAPI/#cryptokey-interface-members
|
|
81
|
-
*
|
|
82
|
-
*/
|
|
83
|
-
ext?: boolean
|
|
84
|
-
}
|
|
85
|
-
export interface GenerateKeyPairOptions {
|
|
86
|
-
id?: string
|
|
87
|
-
controller?: string
|
|
88
|
-
seed?: Buffer
|
|
89
|
-
}
|
|
90
|
-
export interface KeyPairSignerOptions {
|
|
91
|
-
data: Array<Uint8Array>
|
|
92
|
-
}
|
|
93
|
-
export interface KeyPairVerifierOptions {
|
|
94
|
-
data: Array<Uint8Array>
|
|
95
|
-
signature: Uint8Array
|
|
96
|
-
}
|
|
97
|
-
export class Bls12381G2KeyPair {
|
|
98
|
-
id?: string
|
|
99
|
-
controller?: string
|
|
100
|
-
privateKeyInner?: Array<number>
|
|
101
|
-
publicKeyInner?: Array<number>
|
|
102
|
-
type: string
|
|
103
|
-
constructor(options?: KeyPairOptions | undefined | null)
|
|
104
|
-
static generate(options?: GenerateKeyPairOptions | undefined | null): Promise<Bls12381G2KeyPair>
|
|
105
|
-
static from(options: KeyPairOptions): Promise<Bls12381G2KeyPair>
|
|
106
|
-
static fromJwk(options: JwkKeyPairOptions): Promise<Bls12381G2KeyPair>
|
|
107
|
-
static fromFingerprint(options: KeyPairFromFingerPrintOptions): Promise<Bls12381G2KeyPair>
|
|
108
|
-
get publicKey(): string | null
|
|
109
|
-
get publicKeyBuffer(): Buffer
|
|
110
|
-
get privateKeyBuffer(): Buffer
|
|
111
|
-
publicKeyJwk(): JsonWebKey
|
|
112
|
-
get privateKey(): string | null
|
|
113
|
-
privateKeyJwk(): JsonWebKey
|
|
114
|
-
signer(): KeyPairSigner
|
|
115
|
-
verifier(): KeyPairVerifier
|
|
116
|
-
fingerprint(): string
|
|
117
|
-
static fingerprintFromPublicKey(options: FingerPrintFromPublicKeyOptions): string
|
|
118
|
-
verifyFingerprint(fingerprint: string): void
|
|
119
|
-
}
|
|
120
|
-
export class KeyPairSigner {
|
|
121
|
-
sign(options: KeyPairSignerOptions): Promise<Uint8Array>
|
|
122
|
-
}
|
|
123
|
-
export class KeyPairVerifier {
|
|
124
|
-
verify(options: KeyPairVerifierOptions): Promise<boolean>
|
|
125
|
-
}
|
|
126
|
-
|