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

    Type Alias InstancePurchase

    One purchase offered to the lane. The economy service builds this from its own catalog and routing, so a malformed shape (non-CREDIT price, unknown kind, shares off 10000 bps) throws a fault rather than rejecting — a bad one is a wiring bug, not a buyer outcome.

    type InstancePurchase = {
        buyerId: string;
        orderId?: string;
        price: Amount;
        product: { expiresAt?: number; kind: ProductKind; sku: string };
        recipients: ReadonlyArray<Recipient>;
    }
    Index
    buyerId: string
    orderId?: string

    Defaults to sess:<sessionId>:<n>. A caller-supplied id must carry the session prefix, so session orders can never collide with main-lane orderIds by construction.

    price: Amount

    The full CREDIT price; drawn from spendable only (promo is main-lane).

    product: { expiresAt?: number; kind: ProductKind; sku: string }

    Type Declaration

    • OptionalexpiresAt?: number

      Epoch ms a temporary grant lapses; required for temporary, forbidden otherwise.

    • kind: ProductKind
    • sku: string
    recipients: ReadonlyArray<Recipient>

    Sale split, spend's rule: shares of the post-fee net, summing to exactly 10000 bps.