import { isoly } from "isoly"; import { isly } from "isly"; import { Balance as AccountBalance } from "../Balance"; import type { Settlement } from "../Settlement"; import { Change } from "./Change"; export type Changes = Partial>; export declare namespace Changes { function available(changes: MaybeLegacy, currency: isoly.Currency, legacy?: boolean): number; function reserved(changes: MaybeLegacy, currency: isoly.Currency): number; function counterbalance(changes: Changes, currency: isoly.Currency): number; type Sum = Partial>; type MaybeLegacy = Changes | Legacy; const type: isly.Type>>>; type Legacy = Partial>; namespace Legacy { const type: isly.Type>>>; type Entry = AccountBalance.Legacy.Entry; namespace Entry { type Balance = (typeof AccountBalance.Legacy.Entry.values)[number]; namespace Balance { const type: isly.Type<"actual" | "incomingReserved" | "outgoingReserved" | "bufferReserved">; } } } type Entry = Entry.Balance; namespace Entry { const type: isly.Type<"available" | "reserved-incoming" | "reserved-outgoing" | "reserved-buffer">; function getBalanceType(key: string): string; type Balance = (typeof Balance.values)[number]; namespace Balance { const values: readonly ["available", "reserved-incoming", "reserved-outgoing", "reserved-buffer"]; const type: isly.Type<"available" | "reserved-incoming" | "reserved-outgoing" | "reserved-buffer">; } } function fromCapture(settlement: string, amounts: { net: number; fee: number; }): Changes; function fromRefund(settlement: string, refund: Settlement.Entry.Creatable.Refund, sum: Sum): Changes; }