Skip to content

Braga has been retired. The next public testnet is coming in September 2026. Read the announcement →

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.

Expiry

ExpiryContext

ResolvedExpiry

If the expiry is malformed, does not fit the uint64 the wire carries, or would leave the entity dead on arrival.