Skip to content

Commit d33b6b2

Browse files
authored
docs: update mppx to 0.5.13 (#569)
1 parent 6424f10 commit d33b6b2

3 files changed

Lines changed: 39 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@stripe/stripe-js": "^9.1.0",
2626
"@vercel/blob": "^2.3.3",
2727
"mermaid": "^11.14.0",
28-
"mppx": "0.5.12",
28+
"mppx": "0.5.13",
2929
"react": "^19",
3030
"react-dom": "^19",
3131
"stripe": "^22.0.0",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pages/sdk/typescript/server/Method.tempo.charge.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,29 @@ export async function handler(request: Request) {
7171
}
7272
```
7373

74+
### With a custom fee-payer policy
75+
76+
Override the default fee-sponsor limits when you co-sign charges locally.
77+
78+
```ts twoslash
79+
import { Mppx, tempo } from 'mppx/server'
80+
import { privateKeyToAccount } from 'viem/accounts'
81+
82+
const account = privateKeyToAccount('0x...')
83+
84+
const mppx = Mppx.create({
85+
methods: [
86+
tempo.charge({
87+
account,
88+
feePayer: true,
89+
feePayerPolicy: {
90+
maxPriorityFeePerGas: 50_000_000_000n,
91+
},
92+
}),
93+
],
94+
})
95+
```
96+
7497
### With replay protection for zero-dollar auth
7598

7699
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
136159
137160
This setting only applies to non-zero charges. Zero-amount proof flows do not create a transaction.
138161
162+
### feePayerPolicy (optional)
163+
164+
- **Type:** `{ maxGas?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; maxTotalFee?: bigint; maxValidityWindowSeconds?: number }`
165+
166+
Override the fee-sponsor policy when you co-sign charge transactions locally.
167+
168+
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.
169+
170+
If you raise `maxGas` or `maxFeePerGas`, also review `maxTotalFee` so the combined fee budget still fits your policy.
171+
139172
### getClient (optional)
140173
141174
- **Type:** `(parameters: { chainId?: number }) => MaybePromise<Client>`

0 commit comments

Comments
 (0)