Signer API Reference
This document provides a concise API reference for the Signer
class within the Hedera DID SDK for JavaScript. This class is responsible for generating key pairs, signing data, and verifying signatures.
Class Diagram
The class diagram below illustrates the core methods of the Signer
interface for interacting with cryptographic keys.

Methods
publicKey
publicKey(): string
Returns the public key associated with the Signer
instance in DER format.
- Returns
-
The public key in DER format.
Errors
Exception code | Description |
---|---|
|
Invalid private key format. Expected DER. |
|
Invalid private key type. Expected ED25519. |
Class Implementation
The Hashgraph DID SDK provides the Signer
class within its signer-internal
package. For further details, refer to the @hashgraph-did-sdk-js/signer-internal
package documentation.