Kit
Functions

partiallySignTransactionMessageWithSigners

partiallySignTransactionMessageWithSigners<TTransactionMessage>(transactionMessage, config?): Promise<TransactionFromTransactionMessage<TTransactionMessage>>

Extracts all TransactionSigners inside the provided transaction message and uses them to return a signed transaction.

It first uses all TransactionModifyingSigners sequentially before using all TransactionPartialSigners in parallel.

If a composite signer implements both interfaces, it will be used as a TransactionModifyingSigner if no other signer implements that interface. Otherwise, it will be used as a TransactionPartialSigner.

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<TransactionFromTransactionMessage<TTransactionMessage>>

Example

const signedTransaction = await partiallySignTransactionMessageWithSigners(transactionMessage);

It also accepts an optional AbortSignal that will be propagated to all signers.

const signedTransaction = await partiallySignTransactionMessageWithSigners(transactionMessage, {
    abortSignal: myAbortController.signal,
});

Remarks

Finally, note that this function ignores TransactionSendingSigners as it does not send the transaction. Check out the signAndSendTransactionMessageWithSigners function for more details on how to use sending signers.

See

On this page