A Hedera private key — Ed25519 or ECDSA secp256k1.
Signing follows Hedera's conventions: Ed25519 signs the message bytes directly;
ECDSA secp256k1 signs the Keccak-256 digest of the message and returns the
canonical 64-byte r ‖ s (low-S) signature.
Summary
Functions
Parse a 32-byte ECDSA secp256k1 private key from a hex string (0x optional).
Parse a 32-byte Ed25519 private key from a hex string (0x optional).
Generate a new ECDSA secp256k1 private key.
Generate a new Ed25519 private key.
Derive the corresponding public key.
Sign a message with Hedera's per-key-type convention.
Lowercase hex (no 0x) of the raw private key bytes.
Types
Functions
Parse a 32-byte ECDSA secp256k1 private key from a hex string (0x optional).
Parse a 32-byte Ed25519 private key from a hex string (0x optional).
@spec generate_ecdsa() :: t()
Generate a new ECDSA secp256k1 private key.
@spec generate_ed25519() :: t()
Generate a new Ed25519 private key.
@spec public_key(t()) :: Hedera.PublicKey.t()
Derive the corresponding public key.
Sign a message with Hedera's per-key-type convention.
Lowercase hex (no 0x) of the raw private key bytes.