feat: make keypair constructor public

This commit is contained in:
Shibo Lyu 2024-10-11 01:53:40 +08:00
parent 58b50c1ec5
commit 3f7d058e4b
2 changed files with 3 additions and 8 deletions

View file

@ -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;
}

View file

@ -29,9 +29,7 @@ export class BlahPublicKey {
rawKey,
{ name: "Ed25519" },
true,
[
"verify",
],
["verify"],
);
return new BlahPublicKey(publicKey, id);
}