getTransactionLifetimeConstraintFromCompiledTransactionMessage

function getTransactionLifetimeConstraintFromCompiledTransactionMessage(
    compiledTransactionMessage,
): Promise<
    TransactionBlockhashLifetime | TransactionDurableNonceLifetime
>;

Get the lifetime constraint for a transaction from a compiled transaction message that includes a lifetime token.

Parameters

ParameterTypeDescription
compiledTransactionMessageCompiledTransactionMessage & Readonly<{ lifetimeToken: string; }>A compiled transaction message that includes a lifetime token

Returns

Promise< | TransactionBlockhashLifetime | TransactionDurableNonceLifetime>

A lifetime constraint for the transaction Note that this is less precise than checking a decompiled instruction, as we can't inspect the address or role of input accounts (which may be in lookup tables). However, this is sufficient for all valid advance durable nonce instructions. Note that the program address must not be in a lookup table, see this answer on StackExchange

See

isAdvanceNonceAccountInstruction Note that this function is async to allow for future implementations that may fetch lastValidBlockHeight using an RPC

On this page