• Extracts all TransactionSigners inside the provided transaction message and uses them to return a signed transaction before asserting that all signatures required by the transaction are present.

    This function delegates to the partiallySignTransactionMessageWithSigners function in order to extract signers from the transaction message and sign the transaction.

    Parameters

    • transactionMessage: (TransactionMessage & TransactionMessageWithFeePayer<string>) & Partial<Pick<TransactionMessageWithFeePayer<string> | TransactionMessageWithFeePayerSigner<string, TransactionSigner<string>>, "feePayer">> & Readonly<{
          instructions: readonly (Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]> & InstructionWithSigners<TransactionSigner<string>, readonly AccountMetaWithSigner<TransactionSigner<string>>[]>)[];
      }>
    • Optionalconfig: BaseTransactionSignerConfig

    Returns Promise<SendableTransaction & Transaction & TransactionWithLifetime>

    const mySignedTransaction = await signTransactionMessageWithSigners(myTransactionMessage);

    // With additional config.
    const mySignedTransaction = await signTransactionMessageWithSigners(myTransactionMessage, {
    abortSignal: myAbortController.signal,
    });

    // We now know the transaction is fully signed.
    mySignedTransaction satisfies FullySignedTransaction;