Helios API/ API Reference/ Classes/

Ed25519PrivateKey

Implements

Hierarchy

Implements

Index

Constructors

constructor

new Ed25519PrivateKey(bytes)

Parameters

NameType
bytesstring | number[]

Overrides

HeliosData.constructor

Accessors

bytes

get bytes(): number[]

Returns

number[]

hex

get hex(): string

Returns

string

Methods

derivePubKey

derivePubKey(): PubKey

Returns

PubKey

Implementation of

PrivateKey.derivePubKey

extend

extend(): Ed25519PrivateKey

NOT the Ed25519-Bip32 hierarchial extension algorithm (see ExtendedPrivateKey below)

Returns

Ed25519PrivateKey

sign

sign(message): Signature

Parameters

NameType
messagenumber[]

Returns

Signature

Implementation of

PrivateKey.sign

toCbor

toCbor(): number[]

Returns

number[]

Inherited from

HeliosData.toCbor

toCborHex

toCborHex(): string

Returns

string

Inherited from

HeliosData.toCborHex

toSchemaJson

toSchemaJson(): string

Returns

string

Inherited from

HeliosData.toSchemaJson

random

Static random(random): Ed25519PrivateKey

Generate a private key from a random number generator. This is not cryptographically secure, only use this for testing purpose

Parameters

NameType
randomNumberGenerator

Returns

Ed25519PrivateKey

  • Ed25519 private key is 32 bytes long