refactor: add publicKeyRaw method to ed25519

This commit is contained in:
Derrick Hammer 2023-09-02 22:35:38 -04:00
parent 437c8c0dcb
commit b91f33fb65
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 1 deletions

View File

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