Skip to content

takeLegs

function takeLegs(
counters,
legs,
units,
options?
): Promise<TakeResult>;

Defined in: src/ledger.ts:207

Atomically take units across the legs. Modes for settling work that already happened: force records any shortfall on the allowance counter past its limit; bestEffort keeps whatever fit and reports success.

Parameter Type
counters CounterStore
legs readonly Leg[]
units number
options? { bestEffort?: boolean; force?: boolean; }
options.bestEffort? boolean
options.force? boolean

Promise<TakeResult>