resolveExpiry
resolveExpiry(
expiry,context):ResolvedExpiry
Defined in: src/entity/expiry.ts:82
Resolves an expiry into the wire pair and the block the entity will expire at.
Durations are converted to blocks at the nominal BLOCK_TIME (2 seconds), which makes them
approximate: block production is not a clock, so a lifetime asked for in days drifts if the
chain runs fast or slow. The block it was converted to comes back as
ResolvedExpiry.target, so the approximation is always observable rather than assumed.
Parameters
Section titled “Parameters”expiry
Section titled “expiry”context
Section titled “context”Returns
Section titled “Returns”Throws
Section titled “Throws”If the expiry is malformed, does not fit the uint64 the wire
carries, or would leave the entity dead on arrival.