TransactionPlanResultContextWithSignature

type TransactionPlanResultContextWithSignature = BaseTransactionPlanResultContext & TransactionPlanResultContext & object;

A TransactionPlanResultContext that is guaranteed to include a Signature.

This is the default context for every transaction plan result type, which is why a successful result exposes a required context.signature unless a different context is supplied.

Type Declaration

NameType
signatureSignature

Example

Intersect this type into a custom context to keep the signature guarantee alongside your own properties.

const executor = createTransactionPlanExecutor<
    TransactionPlanResultContextWithSignature & { startedAt: number }
>({
    executeTransactionMessage: async (context, message) => {
        const startedAt = Date.now();
        context.startedAt = startedAt;
        const signature = await sendAndConfirm(message);
        return { signature, startedAt };
    },
});

See

TransactionPlanResultContext

On this page