/** * @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 */ /** * A growable `BigInt64Array` that pushes and pops one value at a time, like a Vec. Capacity doubles * on overflow; `pop` only shrinks the live length, so a rolled-back posting leaves the buffer sized * for the next one. `view` is the live prefix — what a fold reads. */ export declare class I64Column { private buffer; private size; constructor(capacity?: number); get length(): number; push(value: bigint): void; pop(): void; view(): BigInt64Array; } /** * Sums a column to one balance. Small columns take a plain loop; larger ones fold in WebAssembly, * falling back to the same-result `bigint` reference where WebAssembly is unavailable. The fold * checks every intermediate against the 64-bit range the ledger stores, so an unstorable running * total surfaces as {@link ERROR_CODES.AMOUNT_OVERFLOW} rather than a raw trap. */ export declare function foldColumn(column: I64Column): bigint;