Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KeyPair

Represents a ED25519 Key Pair (private & public) and provides a few methods for generating new key pairs including deterministic methods.

Hierarchy

  • KeyPair

Index

Constructors

Accessors

Constructors

constructor

  • new KeyPair(publicKey?: undefined | string, privateKey?: undefined | string, entropy?: undefined | string, iterations?: undefined | number, createEmpty?: boolean): KeyPair
  • Constructs a new KeyPair object

    Parameters

    • Optional publicKey: undefined | string
    • Optional privateKey: undefined | string
    • Optional entropy: undefined | string
    • Optional iterations: undefined | number
    • Default value createEmpty: boolean = false

    Returns KeyPair

Accessors

isPaired

  • get isPaired(): boolean
  • Returns if the public key belongs to the private key

    Returns boolean

privateKey

  • get privateKey(): string
  • set privateKey(key: string): void
  • Returns the private key

    Returns string

  • Sets the private key or reduces the value to a private key

    Parameters

    • key: string

    Returns void

publicKey

  • get publicKey(): string
  • set publicKey(key: string): void

Generated using TypeDoc