@solana/web3.js
    Preparing search index...

    Class Keypair

    An account keypair used for signing transactions.

    Index
    • get secretKey(): Uint8Array

      The raw secret key for this keypair

      Returns Uint8Array

      Secret key in an array of Uint8 bytes

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

      Parameters

      • secretKey: Uint8Array

        secret key byte array

      • Optionaloptions: { skipValidation?: boolean }

        skip secret key validation

      Returns Keypair

      Keypair

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

    • Generate a keypair from a 32 byte seed.

      Parameters

      • seed: Uint8Array

        seed byte array

      Returns Keypair

      Keypair