Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions src/pages/sdk/typescript/server/Method.tempo.charge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<Client>`
Expand Down
Loading