Class Keypair

An account keypair used for signing transactions.

Hierarchy

  • Keypair

Constructors

Accessors

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

    Returns Uint8Array

Methods

  • 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 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

  • Generate a keypair from a 32 byte seed.

    Parameters

    • seed: Uint8Array

      seed byte array

    Returns Keypair

Generated using TypeDoc