StaticrandomCreate a new random Sr25519 private key.
StaticrandomCreate a new random Sr25519 private key using the provided RNG.
StaticfromCreate an Sr25519 private key from a 32-byte seed.
StaticfromCreate an Sr25519 private key from raw data. Alias for fromSeed.
StaticfromStaticderiveDerive an Sr25519 private key from arbitrary key material using BLAKE2b.
Arbitrary bytes to derive the key from
A new Sr25519 private key
StatickeypairGenerate a keypair and return both private and public keys.
Tuple of [privateKey, publicKey]
StatickeypairGenerate a keypair using the provided RNG.
Random number generator
Tuple of [privateKey, publicKey]
Returns the raw seed bytes.
Returns the raw seed bytes (alias for toData).
Returns the hex representation of the seed.
Derives the corresponding public key.
Sign a message using the default "substrate" context.
The message to sign
64-byte signature
Sign a message using a custom context.
Note: The @scure/sr25519 library uses a hardcoded "substrate" context. Custom context is accepted for API compatibility but only "substrate" context will produce signatures verifiable by this library.
The message to sign
The signing context (only "substrate" is supported)
64-byte signature
Get string representation (truncated for security).
Sr25519PrivateKey - Private key for Schnorr signatures over Ristretto25519.
This is the signature scheme used by Polkadot/Substrate.