From b91f33fb65fb918f2ff5f63df12a99eb6fa8d564 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 2 Sep 2023 22:35:38 -0400 Subject: [PATCH] refactor: add publicKeyRaw method to ed25519 --- src/ed25519.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ed25519.ts b/src/ed25519.ts index 603f400..c9c7850 100644 --- a/src/ed25519.ts +++ b/src/ed25519.ts @@ -12,10 +12,14 @@ export default class KeyPairEd25519 { public get publicKey(): Uint8Array { return concatBytes( Uint8Array.from([CID_HASH_TYPES.ED25519]), - ed25519.getPublicKey(this._bytes), + this.publicKeyRaw, ); } + public get publicKeyRaw(): Uint8Array { + return ed25519.getPublicKey(this._bytes); + } + public extractBytes(): Uint8Array { return this._bytes; }