ocp.CouponMinter hosts off-ledger helpers that mirror the DAML rate limit policy: minIntervalMicros = (lastMint.count * 1_000_000) / maxTps. When maxTps is null or there was no prior mint, minting is always allowed. These utilities help you avoid submitting MintCoupons transactions that the contract would reject for pacing.
Setup
import { OcpClient } from '@open-captable-protocol/canton';
const ocp = new OcpClient({ ledger: canton.ledger });
Topic pages
Payload shape (CouponMinterPayload)
operator— operator party controlling the minter.maxTps—string | null(decimal string from chain);nulldisables rate limiting in helpers.lastMint—nullor{ time: string; count: number }(DAML time ISO string).
See also
- Errors —
OcpValidationErrorfrom pure checks; compare withWaitAbortedError/WaitTimeoutError.
Source
src/functions/CouponMinter/src/OcpClient.ts— namespace wiring