Skip to main content

PPOSIXTimeRange and PInterval

used to describe the time interval in which a transaction is considered valid

definition:

export const PExtended = pstruct({
PNegInf: {},
PFinite: { _0: int },
PPosInf: {}
});

export const PUpperBound = pstruct({
PUpperBound: {
bound: PExtended.type,
inclusive: bool
}
});

export const PLowerBound = pstruct({
PLowerBound: {
bound: PExtended.type,
inclusive: bool
}
});

export const PInterval = pstruct({
PInterval: {
from: PLowerBound.type,
to: PUpperBound.type
}
});

export const PPOSIXTimeRange = PInterval;

PInterval

from

type: PLowerBound

to

type: PUpperBound

PLowerBound and PUpperBound

even if the two have differnet name they are foundamentaly interchangeable since both have the same strucutre.

bound

type: PExtended

inclusive

type: bool

PExtended

either an interger or positive/negative infinite representation

PNegInf

PFinite

field type: int

PPosInf