successfulSingleTransactionPlanResultFromSignature

function successfulSingleTransactionPlanResultFromSignature<
    TContext,
    TTransactionMessage,
>(
    transactionMessage,
    signature,
    context?,
): SingleTransactionPlanResult<TContext, TTransactionMessage>;

Creates a successful SingleTransactionPlanResult from a transaction message and signature.

This function creates a single result with a 'successful' status, indicating that the transaction was successfully executed. It also includes the original transaction message, the signature of the executed transaction, and an optional context object.

Type Parameters

Type ParameterDefault typeDescription
TContext extends TransactionPlanResultContextTransactionPlanResultContextThe type of the context object
TTransactionMessage extends Readonly<{ instructions: readonly Instruction<string, readonly ( | AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> & TransactionMessageWithFeePayer<string>Readonly<{ instructions: readonly Instruction<string, readonly ( | AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> & TransactionMessageWithFeePayer<string>The type of the transaction message

Parameters

ParameterTypeDescription
transactionMessageTTransactionMessageThe original transaction message
signatureSignatureThe signature of the successfully executed transaction
context?TContextOptional context object to be included with the result

Returns

SingleTransactionPlanResult<TContext, TTransactionMessage>

Example

const result = successfulSingleTransactionPlanResult(
  transactionMessage,
  signature
);
result satisfies SingleTransactionPlanResult;

See

SingleTransactionPlanResult

On this page