@twin.org/web 0.0.1-next.41 → 0.0.1-next.42
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/dist/cjs/index.cjs
CHANGED
|
@@ -737,7 +737,7 @@ class Jwk {
|
|
|
737
737
|
x: core.Converter.bytesToBase64Url(publicKey),
|
|
738
738
|
d: core.Converter.bytesToBase64Url(privateKey)
|
|
739
739
|
};
|
|
740
|
-
return jose.importJWK(jwk);
|
|
740
|
+
return (await jose.importJWK(jwk));
|
|
741
741
|
}
|
|
742
742
|
catch (err) {
|
|
743
743
|
throw new core.GeneralError(Jwk._CLASS_NAME, "jwkImportFailed", undefined, err);
|
|
@@ -758,7 +758,7 @@ class Jwk {
|
|
|
758
758
|
crv: "Ed25519",
|
|
759
759
|
x: core.Converter.bytesToBase64Url(publicKey)
|
|
760
760
|
};
|
|
761
|
-
return jose.importJWK(jwk);
|
|
761
|
+
return (await jose.importJWK(jwk));
|
|
762
762
|
}
|
|
763
763
|
catch (err) {
|
|
764
764
|
throw new core.GeneralError(Jwk._CLASS_NAME, "jwkImportFailed", undefined, err);
|
package/dist/esm/index.mjs
CHANGED
|
@@ -735,7 +735,7 @@ class Jwk {
|
|
|
735
735
|
x: Converter.bytesToBase64Url(publicKey),
|
|
736
736
|
d: Converter.bytesToBase64Url(privateKey)
|
|
737
737
|
};
|
|
738
|
-
return importJWK(jwk);
|
|
738
|
+
return (await importJWK(jwk));
|
|
739
739
|
}
|
|
740
740
|
catch (err) {
|
|
741
741
|
throw new GeneralError(Jwk._CLASS_NAME, "jwkImportFailed", undefined, err);
|
|
@@ -756,7 +756,7 @@ class Jwk {
|
|
|
756
756
|
crv: "Ed25519",
|
|
757
757
|
x: Converter.bytesToBase64Url(publicKey)
|
|
758
758
|
};
|
|
759
|
-
return importJWK(jwk);
|
|
759
|
+
return (await importJWK(jwk));
|
|
760
760
|
}
|
|
761
761
|
catch (err) {
|
|
762
762
|
throw new GeneralError(Jwk._CLASS_NAME, "jwkImportFailed", undefined, err);
|
|
@@ -15,11 +15,11 @@ export declare class Jwk {
|
|
|
15
15
|
* @param privateKey The private key to use.
|
|
16
16
|
* @returns The crypto key.
|
|
17
17
|
*/
|
|
18
|
-
static fromEd25519Private(privateKey: Uint8Array): Promise<
|
|
18
|
+
static fromEd25519Private(privateKey: Uint8Array): Promise<CryptoKey>;
|
|
19
19
|
/**
|
|
20
20
|
* Convert the Ed25519 public key to a crypto key.
|
|
21
21
|
* @param publicKey The private key to use.
|
|
22
22
|
* @returns The crypto key.
|
|
23
23
|
*/
|
|
24
|
-
static fromEd25519Public(publicKey: Uint8Array): Promise<
|
|
24
|
+
static fromEd25519Public(publicKey: Uint8Array): Promise<CryptoKey>;
|
|
25
25
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -38,7 +38,7 @@ The crypto key.
|
|
|
38
38
|
|
|
39
39
|
### fromEd25519Private()
|
|
40
40
|
|
|
41
|
-
> `static` **fromEd25519Private**(`privateKey`): `Promise
|
|
41
|
+
> `static` **fromEd25519Private**(`privateKey`): `Promise`\<`CryptoKey`\>
|
|
42
42
|
|
|
43
43
|
Convert the Ed25519 private key to a crypto key.
|
|
44
44
|
|
|
@@ -52,7 +52,7 @@ The private key to use.
|
|
|
52
52
|
|
|
53
53
|
#### Returns
|
|
54
54
|
|
|
55
|
-
`Promise
|
|
55
|
+
`Promise`\<`CryptoKey`\>
|
|
56
56
|
|
|
57
57
|
The crypto key.
|
|
58
58
|
|
|
@@ -60,7 +60,7 @@ The crypto key.
|
|
|
60
60
|
|
|
61
61
|
### fromEd25519Public()
|
|
62
62
|
|
|
63
|
-
> `static` **fromEd25519Public**(`publicKey`): `Promise
|
|
63
|
+
> `static` **fromEd25519Public**(`publicKey`): `Promise`\<`CryptoKey`\>
|
|
64
64
|
|
|
65
65
|
Convert the Ed25519 public key to a crypto key.
|
|
66
66
|
|
|
@@ -74,6 +74,6 @@ The private key to use.
|
|
|
74
74
|
|
|
75
75
|
#### Returns
|
|
76
76
|
|
|
77
|
-
`Promise
|
|
77
|
+
`Promise`\<`CryptoKey`\>
|
|
78
78
|
|
|
79
79
|
The crypto key.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/web",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.42",
|
|
4
4
|
"description": "Contains classes for use with web operations",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "0.0.1-next.
|
|
18
|
-
"@twin.org/crypto": "0.0.1-next.
|
|
17
|
+
"@twin.org/core": "0.0.1-next.42",
|
|
18
|
+
"@twin.org/crypto": "0.0.1-next.42",
|
|
19
19
|
"@twin.org/nameof": "next",
|
|
20
20
|
"jose": "6.0.8"
|
|
21
21
|
},
|