Options
All
  • Public
  • Public/Protected
  • All
Menu

An account keypair used for signing transactions.

Hierarchy

  • Keypair

Index

Constructors

constructor

Accessors

publicKey

secretKey

  • get secretKey(): Uint8Array

Methods

Static fromSecretKey

  • 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

Static fromSeed

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

    Parameters

    • seed: Uint8Array

      seed byte array

    Returns Keypair

Static generate

Generated using TypeDoc