Derive a Substrate sr25519 account for a given context string.
HKDF(masterKey, "", "account:" + context) → 32-byte seed → sr25519 keypair
Derive NaCl encryption and signing keypairs from the master key.
Derive a 32-byte symmetric key for a given context string.
Uses HKDF-SHA256: IKM=masterKey, salt="", info=context
Export the raw master key bytes for consumer-managed persistence.
StaticfromCreate a KeyManager from raw 32-byte key material. For restoring from storage, testing, etc.
StaticfromCreate a KeyManager from a cryptographic signature.
Derives master key via HKDF-SHA256: IKM = signatureBytes, salt = options.salt (default "polkadot-apps-keys-v1"), info = signerAddress
Hex string (with/without 0x prefix) or raw bytes
SS58 address of the signer
Optionaloptions: { salt?: string }Optionalsalt?: stringHKDF salt, defaults to "polkadot-apps-keys-v1"
Hierarchical key manager.
Holds a 32-byte master key in memory and derives child keys via HKDF-SHA256. Does not persist anything — persistence is the consumer's responsibility.