@pinkparrot/qsafe-mayo-wasm 0.0.4 → 0.0.6
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/mayo_api.js +3 -4
- package/package.json +1 -1
- package/gitignore +0 -2
package/dist/mayo_api.js
CHANGED
|
@@ -19,10 +19,9 @@ export class MayoSigner {
|
|
|
19
19
|
#secretKey = null;
|
|
20
20
|
#secretKeySize; #publicKeySize; #signatureSize;
|
|
21
21
|
|
|
22
|
-
/** @param {'mayo1'|'mayo2'} variant */
|
|
22
|
+
/** @param {'mayo1' | 'mayo2' | string} variant */
|
|
23
23
|
constructor(variant = 'mayo1') {
|
|
24
|
-
if (variant !== 'mayo1' && variant !== 'mayo2')
|
|
25
|
-
throw new Error(`Unsupported MAYO variant: ${variant}`);
|
|
24
|
+
if (variant !== 'mayo1' && variant !== 'mayo2') throw new Error(`Unsupported MAYO variant: ${variant}`);
|
|
26
25
|
this.variant = variant;
|
|
27
26
|
({ secretKeySize: this.#secretKeySize,
|
|
28
27
|
publicKeySize: this.#publicKeySize,
|
|
@@ -30,7 +29,7 @@ export class MayoSigner {
|
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
/** Factory — preferred way to instantiate.
|
|
33
|
-
* @param {'mayo1'|'mayo2'} variant
|
|
32
|
+
* @param {'mayo1' | 'mayo2' | string} variant
|
|
34
33
|
* @returns {Promise<MayoSigner>} */
|
|
35
34
|
static async create(variant = 'mayo1') {
|
|
36
35
|
const instance = new MayoSigner(variant);
|
package/package.json
CHANGED
package/gitignore
DELETED