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

    Class Keypair

    An account keypair backed by WebCrypto.

    Implements Kit's KeyPairSigner (and therefore MessagePartialSigner and TransactionPartialSigner), so instances can be passed directly to Kit APIs and generated program clients that accept a TransactionSigner or KeyPairSigner.

    Implements

    • KeyPairSigner
    Index
    signMessages: (
        messages: readonly Readonly<
            { content: Uint8Array; signatures: SignatureDictionary },
        >[],
        config?: Readonly<{ abortSignal?: AbortSignal }>,
    ) => Promise<readonly Readonly<Record<Address, SignatureBytes>>[]> = ...

    Sign one or more messages as a Kit MessagePartialSigner.

    Declared as an arrow-function field so callers can destructure (const {signMessages} = keypair) without losing this binding.

    signTransactions: (
        transactions: readonly (
            Readonly<
                { messageBytes: TransactionMessageBytes; signatures: SignaturesMap },
            > & TransactionWithinSizeLimit & TransactionWithLifetime
        )[],
        config?: BaseTransactionSignerConfig,
    ) => Promise<readonly Readonly<Record<Address, SignatureBytes>>[]> = ...

    Sign one or more transactions as a Kit TransactionPartialSigner.

    Declared as an arrow-function field so callers can destructure (const {signTransactions} = keypair) without losing this binding.

    • get address(): Address

      Returns the base-58 address as a Kit-compatible branded Address string.

      This property is provided for structural compatibility with @solana/signers / Kit (so Keypair can be used where a TransactionSigner is expected).

      Most users of this library should use publicKey instead.

      Returns Address

    • get keyPair(): CryptoKeyPair

      The underlying WebCrypto CryptoKeyPair.

      Returns CryptoKeyPair

    • Sign raw message bytes and return the 64-byte ed25519 signature.

      Parameters

      • message: Uint8Array

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Verify a signature against the provided message using this keypair's public key.

      Parameters

      • signature: Uint8Array
      • message: Uint8Array

      Returns Promise<boolean>

    • Create a keypair from a raw 64-byte secret key (32-byte private key followed by 32-byte public key).

      Parameters

      • secretKey: Uint8Array

      Returns Promise<Keypair>