这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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