/** * @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 { AccrualRow, Leg } from '../ports.js'; /** * Replaces each credit to a user's earned account with the same credit to SETTLEMENT_ACCRUAL and * sums the redirected amount per seller. Non-earned legs pass through untouched; the posting * stays balanced because only the account changes. */ export declare function parkEarnedLegs(legs: ReadonlyArray): { legs: Leg[]; shares: Map; }; /** * The share map as sealed posting metadata, `{sellerId: minorString}` — the entries mirror the * rows {@link accrualRowsOf} writes, and metadata rides the chain-hash preimage, so refund and * the drain can prove every unhashed accrual row against the posting that created it. */ export declare function sharesMeta(shares: ReadonlyMap): Record; /** * The pending rows a charge writes alongside its posting: one per seller share, on the ACCRUAL * shard the routing key resolves to — the same key the legs were routed with, so the drain debits * the row the posting credited. */ export declare function accrualRowsOf(input: { orderId: string; shares: ReadonlyMap; routeKey: string; shards: number; txnId: string; recordedAt: number; }): AccrualRow[];