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

    Type Alias FeePolicy

    FeePolicy: (
        input: {
            buyerId?: string;
            feeBps: number;
            price: Amount;
            recipients: ReadonlyArray<Recipient>;
            sku?: string;
        },
    ) => ReadonlyArray<Leg>

    Splits a sale's price across recipients and the platform into the debit/credit lines (legs) to post, accounting for every minor unit with no rounding loss. Implemented in pricing.ts.

    Type Declaration

      • (
            input: {
                buyerId?: string;
                feeBps: number;
                price: Amount;
                recipients: ReadonlyArray<Recipient>;
                sku?: string;
            },
        ): ReadonlyArray<Leg>
      • Parameters

        • input: {
              buyerId?: string;
              feeBps: number;
              price: Amount;
              recipients: ReadonlyArray<Recipient>;
              sku?: string;
          }

        Returns ReadonlyArray<Leg>

    Pricing for the fee-off-the-top, rounded-down shares, and leftover-penny-to-revenue split.