Skip to content

Commit

Permalink
jin_fix_ed25519_derive_publickey (#10357)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmigo authored Oct 3, 2023
1 parent 89a3dd3 commit 6d58e7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ecosystem/typescript/sdk_v2/src/crypto/ed25519.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,13 @@ export class Ed25519PrivateKey extends PrivateKey {
return new Ed25519PrivateKey({ hexInput: keyPair.secretKey.slice(0, Ed25519PrivateKey.LENGTH) });
}

publicKey(): PublicKey {

/**
* Derive the Ed25519PublicKey for this private key.
*
* @returns Ed25519PublicKey
*/
publicKey(): Ed25519PublicKey {
const bytes = this.signingKeyPair.publicKey;
return new Ed25519PublicKey({ hexInput: bytes });
}
Expand Down

0 comments on commit 6d58e7e

Please sign in to comment.