Skip to content
docs

ReviewGate

Defined in: gate.ts:31

new ReviewGate(now?): ReviewGate

Defined in: gate.ts:34

() => number

ReviewGate

get pending(): number

Defined in: gate.ts:56

number

clear(): void

Defined in: gate.ts:60

void


consume(op): boolean

Defined in: gate.ts:47

True (and the matcher is spent) when a pre-approval covers op.

GatedOp

boolean


preApprove(matchers, ttlMs?, account?): void

Defined in: gate.ts:41

Each matcher passes ONE operation, within ttlMs (default 10 min). With account, only an op whose account is that account (an op without one does not pass). reviewSwapPlan and reviewEarnPlan always bind.

GateMatcher[]

number = ...

string

void