From 1c239fac1d314d947669964efe130a8a81ea087f Mon Sep 17 00:00:00 2001 From: Brendan Ryan Date: Wed, 15 Apr 2026 11:59:06 -0700 Subject: [PATCH] docs: update mppx to 0.5.13 --- package.json | 2 +- pnpm-lock.yaml | 10 +++--- .../typescript/server/Method.tempo.charge.mdx | 33 +++++++++++++++++++ 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c9c5dbc8..4dc7cc08 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@stripe/stripe-js": "^9.1.0", "@vercel/blob": "^2.3.3", "mermaid": "^11.14.0", - "mppx": "0.5.12", + "mppx": "0.5.13", "react": "^19", "react-dom": "^19", "stripe": "^22.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1e03979..be3697c5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,8 +29,8 @@ importers: specifier: ^11.14.0 version: 11.14.0 mppx: - specifier: 0.5.12 - version: 0.5.12(@modelcontextprotocol/sdk@1.27.1(@cfworker/json-schema@4.1.1)(zod@4.3.6))(express@5.2.1)(hono@4.12.12)(typescript@6.0.2)(viem@2.47.10(typescript@6.0.2)(zod@4.3.6)) + specifier: 0.5.13 + version: 0.5.13(@modelcontextprotocol/sdk@1.27.1(@cfworker/json-schema@4.1.1)(zod@4.3.6))(express@5.2.1)(hono@4.12.12)(typescript@6.0.2)(viem@2.47.10(typescript@6.0.2)(zod@4.3.6)) react: specifier: ^19 version: 19.2.4 @@ -3335,8 +3335,8 @@ packages: mlly@1.8.2: resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} - mppx@0.5.12: - resolution: {integrity: sha512-pr6epOYJd8Q6D+MRMc27G48IMh0naAGMMyY1cZYrxMXVwH8PPn1ZaqUwv31svcjOV+UpSrSAe/MP2hRWJ0KQ7A==} + mppx@0.5.13: + resolution: {integrity: sha512-HZnsrL2HGJb6Utxhq8tNzw53yQKZqFGVJH5qxepd11icRe4RmoU/HCaOz1t9sq9BI05F8NJeXPBZYb2w3V2FzQ==} hasBin: true peerDependencies: '@modelcontextprotocol/sdk': '>=1.25.0' @@ -7784,7 +7784,7 @@ snapshots: pkg-types: 1.3.1 ufo: 1.6.3 - mppx@0.5.12(@modelcontextprotocol/sdk@1.27.1(@cfworker/json-schema@4.1.1)(zod@4.3.6))(express@5.2.1)(hono@4.12.12)(typescript@6.0.2)(viem@2.47.10(typescript@6.0.2)(zod@4.3.6)): + mppx@0.5.13(@modelcontextprotocol/sdk@1.27.1(@cfworker/json-schema@4.1.1)(zod@4.3.6))(express@5.2.1)(hono@4.12.12)(typescript@6.0.2)(viem@2.47.10(typescript@6.0.2)(zod@4.3.6)): dependencies: incur: 0.3.25 ox: 0.14.10(typescript@6.0.2)(zod@4.3.6) diff --git a/src/pages/sdk/typescript/server/Method.tempo.charge.mdx b/src/pages/sdk/typescript/server/Method.tempo.charge.mdx index a7cdbc23..64e04605 100644 --- a/src/pages/sdk/typescript/server/Method.tempo.charge.mdx +++ b/src/pages/sdk/typescript/server/Method.tempo.charge.mdx @@ -71,6 +71,29 @@ export async function handler(request: Request) { } ``` +### With a custom fee-payer policy + +Override the default fee-sponsor limits when you co-sign charges locally. + +```ts twoslash +import { Mppx, tempo } from 'mppx/server' +import { privateKeyToAccount } from 'viem/accounts' + +const account = privateKeyToAccount('0x...') + +const mppx = Mppx.create({ + methods: [ + tempo.charge({ + account, + feePayer: true, + feePayerPolicy: { + maxPriorityFeePerGas: 50_000_000_000n, + }, + }), + ], +}) +``` + ### With replay protection for zero-dollar auth Pass `store` when you want zero-dollar proof Credentials to be single-use. @@ -136,6 +159,16 @@ Account or URL for sponsoring transaction fees. Pass a viem `Account` to co-sign This setting only applies to non-zero charges. Zero-amount proof flows do not create a transaction. +### feePayerPolicy (optional) + +- **Type:** `{ maxGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; maxTotalFee?: bigint; maxValidityWindowSeconds?: number }` + +Override the fee-sponsor policy when you co-sign charge transactions locally. + +Defaults resolve per chain. In `mppx@0.5.13`, Moderato (`42431`) uses a higher default `maxPriorityFeePerGas` ceiling than Tempo mainnet so sponsored charges keep working when testnet tips spike. + +If you raise `maxGas` or `maxFeePerGas`, also review `maxTotalFee` so the combined fee budget still fits your policy. + ### getClient (optional) - **Type:** `(parameters: { chainId?: number }) => MaybePromise`