@pwngh/economy-lab
    Preparing search index...

    Interface Transaction

    A committed posting: the record of money that actually moved.

    interface Transaction {
        id: string;
        legs: readonly { account: AccountRef; amount: Amount }[];
        links: readonly { account: AccountRef; hash: string; prevHash: string }[];
        meta: Record<string, unknown>;
        postedAt: number;
    }
    Index
    id: string

    Of the form txn_.

    legs: readonly { account: AccountRef; amount: Amount }[]

    The individual debit and credit lines that posted. A refund reverses exactly these. Amounts are debit-positive — the ledger's sign, not the account holder's, so a top-up's wallet leg is negative; balanceDelta (from /store-kit) converts a leg to the signed change in that account's balance. May be empty: a committed lifecycle operation (e.g. cancelSubscription) posts a marker that moves no money.

    links: readonly { account: AccountRef; hash: string; prevHash: string }[]

    For each account this transaction touched, how its tamper-evident hash chain advanced: prevHash was that account's latest hash before this posting, hash is the one after.

    meta: Record<string, unknown>

    The posting's metadata, as the handler recorded it: the operation kind plus kind-specific fields — a requestPayout carries the opened saga's sagaId, so the caller can follow its payout without scanning read.payouts(). Empty for a lifecycle marker that posted nothing.

    postedAt: number

    When it committed, in epoch milliseconds.