resolveMaxEpoch
resolveMaxEpoch(
provider,leadEpochs?):Promise<number>
Defined in: ootle/src/builder.ts:54
Reads the chain tip and returns the max_epoch a transaction built now should carry:
currentEpoch + leadEpochs.
const builder = TransactionBuilder.new(provider.network(), await resolveMaxEpoch(provider));Parameters
Section titled “Parameters”provider
Section titled “provider”leadEpochs?
Section titled “leadEpochs?”number = DEFAULT_TRANSACTION_VALIDITY_EPOCHS
Returns
Section titled “Returns”Promise<number>
Throws
Section titled “Throws”if leadEpochs is not a positive integer, or exceeds
MAX_TRANSACTION_VALIDITY_EPOCHS (which the network would reject with
AbortReason::ValidityWindowTooLong).