Helios API/ API Reference/ Namespaces/
Ed25519
The elliptic curve signature algorithm used by Cardano wallets.
Ported from: https://ed25519.cr.yp.to/python/ed25519.py.
ExtendedPoint implementation taken from: https://github.com/paulmillr/noble-ed25519.
Index
Functions
deriveBip32PublicKey
▸ deriveBip32PublicKey(extendedKey
): number
[]
Similar to Ed25519.derivePublicKey
, but doesn't hash the input key.
Parameters
Name | Type |
---|---|
extendedKey | number [] |
Returns
number
[]
32 byte public key.
derivePublicKey
▸ derivePublicKey(privateKey
): number
[]
Derive a public key from a private key. The private key can be any number of bytes (it's hashed internally). The returned public key is 32 bytes long.
Parameters
Name | Type |
---|---|
privateKey | number [] |
Returns
number
[]
32 byte public key.
sign
▸ sign(message
, privateKey
): number
[]
Creates a 64 byte signature.
Parameters
Name | Type |
---|---|
message | number [] |
privateKey | number [] |
Returns
number
[]
64 byte signature.
signBip32
▸ signBip32(message
, extendedKey
): number
[]
Like Ed25519.sign
, but doesn't hash the input key.
Parameters
Name | Type |
---|---|
message | number [] |
extendedKey | number [] |
Returns
number
[]
64 byte signature.
verify
▸ verify(signature
, message
, publicKey
): boolean
Returns true
if the signature is correct.
Parameters
Name | Type |
---|---|
signature | number [] |
message | number [] |
publicKey | number [] |
Returns
boolean