From 3f7d058e4b096aa675f881e78e104205b3ad125e Mon Sep 17 00:00:00 2001 From: Shibo Lyu Date: Fri, 11 Oct 2024 01:53:40 +0800 Subject: [PATCH] feat: make keypair constructor public --- crypto/keypair.ts | 7 ++----- crypto/publicKey.ts | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/crypto/keypair.ts b/crypto/keypair.ts index 0f7e2d0..e2e076f 100644 --- a/crypto/keypair.ts +++ b/crypto/keypair.ts @@ -37,11 +37,8 @@ export class BlahKeyPair { return this.internalPrivateKey; } - private constructor( - publicIdentity: BlahPublicKey, - privateKey: CryptoKey, - ) { - this.internalPublicKey = publicIdentity; + constructor(publicKey: BlahPublicKey, privateKey: CryptoKey) { + this.internalPublicKey = publicKey; this.internalPrivateKey = privateKey; } diff --git a/crypto/publicKey.ts b/crypto/publicKey.ts index 4e3fb11..7118110 100644 --- a/crypto/publicKey.ts +++ b/crypto/publicKey.ts @@ -29,9 +29,7 @@ export class BlahPublicKey { rawKey, { name: "Ed25519" }, true, - [ - "verify", - ], + ["verify"], ); return new BlahPublicKey(publicKey, id); }