Order sizing
Peer Cash has no fixed-fill mode, so there is nothing to migrate. No published @zkp2p/cash release has fillMode or minChunkSize, and the sizing below applies to every payout platform.
Default range
Each buyer intent takes part of an order. Unless you pass intentAmountRange, cashout() and prepare() let each buyer take:
| Bound | Default |
|---|---|
| Minimum | 1 USDC, or the whole order when it is smaller |
| Maximum | The whole order |
A cash-out must be at least 0.01 USDC (capabilities().amount.min), or it throws AMOUNT_BELOW_MINIMUM. Below 1 USDC (capabilities().amount.recommendedMin), the minimum is the whole order, so a single buyer must take all of it.
Every buyer intent must fall within the range, so a remaining balance below the minimum can't be filled.
Set a custom range
Pass intentAmountRange in USDC base units to cashout() or prepare(). With this range, each buyer takes exactly 300 USDC, so the order fills in three payments:
import { usdc } from "@zkp2p/cash";
await cash.cashout(
{
amount: usdc(900),
intentAmountRange: { min: usdc(300), max: usdc(300) },
receive: {
platform: "chime",
currency: "USD",
payee: { offchainId: "$your-chime-sign" },
},
},
{ signer },
);
minmust be greater than zero, andmaxmust be betweenminandamount. Otherwise the call throwsINVALID_INTENT_AMOUNT_RANGEbefore sending any transaction.- The range applies to every payout leg in the order.
estimate()takes no range; it prices the full amount.