successfulSingleTransactionPlanResult
Creates a successful SingleTransactionPlanResult from a transaction message and context.
This function creates a single result with a 'successful' status, indicating that
the transaction was successfully executed. It also includes the original transaction
message and a context object, which becomes the result's context as-is, typed as
TContext. Passing a context containing a signature — the common case — yields the
default TransactionPlanResultContextWithSignature shape; supply a different
context shape when the transaction has no fee payer signature to report.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TContext extends TransactionPlanResultContext | TransactionPlanResultContextWithSignature | The type of the context object |
TTransactionMessage extends TransactionMessage & TransactionMessageWithFeePayer<string> | TransactionMessage & TransactionMessageWithFeePayer<string> | The type of the transaction message |
Parameters
| Parameter | Type | Description |
|---|---|---|
plannedMessage | TTransactionMessage | The original transaction message |
context | TContext | The context object to be included with the result, as TContext |
Returns
SuccessfulSingleTransactionPlanResult<TContext, TTransactionMessage>