Skip to content

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

Expiry = object

Defined in: src/entity/expiry.ts:23

How long an entity should live.

This is the pair the ABI carries, and the engine resolves it as max(expiresAt, currentBlock + minLifetime) — whichever is later. Build one with ExpirationTime; there is no other way to make one.

Which slot a value lands in also decides which rules govern it. minLifetime is a duration, so it must come to a whole number of blocks. expiresAt is a block height, which is a whole number by construction, so a wall-clock date rounds into it rather than being rejected.

readonly [validated]: true

Defined in: src/entity/expiry.ts:31


readonly expiresAt: bigint | Date

Defined in: src/entity/expiry.ts:30

Absolute deadline: a block height, or a Date still to be placed against the current block. 0n if unset.


readonly minLifetime: bigint

Defined in: src/entity/expiry.ts:25

Lifetime floor in blocks, counted from the block the transaction lands in. 0n if unset.