Options
All
  • Public
  • Public/Protected
  • All
Menu

An account keypair used for signing transactions.

Hierarchy

  • Keypair

Index

Constructors

  • Create a new keypair instance. Generate random keypair if no Ed25519Keypair is provided.

    Parameters

    Returns Keypair

Properties

_keypair: any

Accessors

  • The public key for this keypair

    Returns PublicKey

  • get secretKey(): Uint8Array
  • The raw secret key for this keypair

    Returns Uint8Array

Methods

  • fromSecretKey(secretKey: Uint8Array, options?: { skipValidation?: boolean }): Keypair
  • Create a keypair from a raw secret key byte array.

    This method should only be used to recreate a keypair from a previously generated secret key. Generating keypairs from a random seed should be done with the Keypair.fromSeed method.

    throws

    error if the provided secret key is invalid and validation is not skipped.

    Parameters

    • secretKey: Uint8Array

      secret key byte array

    • Optional options: { skipValidation?: boolean }
      • Optional skipValidation?: boolean

    Returns Keypair

  • fromSeed(seed: Uint8Array): Keypair
  • Generate a keypair from a 32 byte seed.

    Parameters

    • seed: Uint8Array

      seed byte array

    Returns Keypair

  • Generate a new random keypair

    Returns Keypair

Generated using TypeDoc