/** * @pwngh/economy-lab * * Copyright (c) Preston Neal * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ import type { WorkerCtx } from '../contract.js'; import type { Store } from '../ports.js'; /** * Reports which payouts moved this run, bucketed by outcome. `deadLettered` holds payouts that can * never succeed, including a timed-out submit; `retrying` holds temporary failures that get * another go next run, plus wedged sagas (anchor check refused, code CHAIN_BROKEN) that every * sweep re-reports until an operator acts. Settlement arrives via the provider's webhook (see * src/operations/settlePayout.ts), not this sweep. */ export type PayoutSweepSummary = { submitted: ReadonlyArray; deadLettered: ReadonlyArray<{ id: string; reason: string; }>; retrying: ReadonlyArray<{ id: string; code: string; }>; }; /** * Advances a batch of due payouts one step each, then reports the outcomes. * * A payout runs as a multi-step saga. This job claims the ones whose next step is due and pushes each * forward in its own error boundary, so one broken payout cannot stop the others. * * @see {@link https://economy-lab-docs.pages.dev/economy/reference/background-worker/ Background * worker} for how this sweep claims and advances due payouts. */ export declare function advanceDuePayouts(store: Store, ctx: WorkerCtx, input: { now: number; limit: number; }): Promise;