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

Accessors

privateKey

  • get privateKey(): string

publicKey

  • get publicKey(): string

Methods

isPaired

  • isPaired(): Promise<boolean>

setPrivateKey

  • setPrivateKey(key: string): Promise<void>
  • Sets the private key or reduces the value to a private key

    Parameters

    • key: string

    Returns Promise<void>

setPublicKey

  • setPublicKey(key: string): Promise<void>

Static from

  • from(publicKey?: undefined | string, privateKey?: undefined | string, entropy?: undefined | string, iterations?: undefined | number, createEmpty?: boolean): Promise<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 Promise<KeyPair>

Generated using TypeDoc