Kit
Functions

signTransactionMessageWithSigners

signTransactionMessageWithSigners<TTransactionMessage>(transactionMessage, config?): Promise<NominalType<"transactionSignedness", "fullySigned"> & Readonly<{ messageBytes: TransactionMessageBytes; signatures: SignaturesMap; }> & TransactionFromTransactionMessage<TTransactionMessage>>

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.

Type Parameters

Type ParameterDescription
TTransactionMessage extends Readonly<{ instructions: readonly Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> & TransactionMessageWithFeePayer<string> & TransactionMessageWithSignersThe inferred type of the transaction message provided.

Parameters

ParameterType
transactionMessageTTransactionMessage
config?BaseTransactionSignerConfig

Returns

Promise<NominalType<"transactionSignedness", "fullySigned"> & Readonly<{ messageBytes: TransactionMessageBytes; signatures: SignaturesMap; }> & TransactionFromTransactionMessage<TTransactionMessage>>

Example

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;

See

On this page