From 081a3fb32ba85cc397acb13421238836f5651523 Mon Sep 17 00:00:00 2001 From: Tony D'Addeo Date: Tue, 14 Apr 2026 16:39:36 -0500 Subject: [PATCH 1/4] docs: deprecate Handler.feePayer in favor of Handler.relay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace Handler.feePayer.mdx with deprecation notice and migration guide - Update all code examples to use Handler.relay({ feePayer: { ... } }) - Update withFeePayer → withRelay in transport examples - Update internal links from handler.feePayer to handler.relay - Update old SDK redirect to point to handler.relay Amp-Thread-ID: https://ampcode.com/threads/T-019d8de3-aa62-7298-ae7d-0d9196db28ee Co-authored-by: Amp --- src/pages/accounts/api/provider.mdx | 2 +- src/pages/accounts/server/handler.compose.mdx | 4 +- .../accounts/server/handler.feePayer.mdx | 167 ++++-------------- src/pages/accounts/server/index.mdx | 12 +- src/pages/accounts/wagmi/tempoWallet.mdx | 2 +- src/pages/accounts/wagmi/webAuthn.mdx | 2 +- .../guide/payments/sponsor-user-fees.mdx | 8 +- src/snippets/unformatted/withFeePayer.ts | 8 +- src/snippets/wagmi.config.ts | 2 +- src/wagmi.config.ts | 6 +- vocs.config.ts | 2 +- 11 files changed, 57 insertions(+), 158 deletions(-) diff --git a/src/pages/accounts/api/provider.mdx b/src/pages/accounts/api/provider.mdx index f2320044..60024c9d 100644 --- a/src/pages/accounts/api/provider.mdx +++ b/src/pages/accounts/api/provider.mdx @@ -111,7 +111,7 @@ const provider = Provider.create({ - **Type:** `string | { url: string; precedence?: 'fee-payer-first' | 'user-first' }` - **Optional** -Fee payer configuration for interacting with a service running [`Handler.feePayer`](/accounts/server/handler.feePayer) from `accounts/server`. Pass a URL string, or an object with `url` and optional `precedence` to control whether the fee payer or the user pays first. +Fee payer configuration for interacting with a service running [`Handler.relay`](/accounts/server/handler.relay) from `accounts/server`. Pass a URL string, or an object with `url` and optional `precedence` to control whether the fee payer or the user pays first. ```ts twoslash import { Provider } from 'accounts' diff --git a/src/pages/accounts/server/handler.compose.mdx b/src/pages/accounts/server/handler.compose.mdx index 161a983f..e3d1c02c 100644 --- a/src/pages/accounts/server/handler.compose.mdx +++ b/src/pages/accounts/server/handler.compose.mdx @@ -13,8 +13,8 @@ Composes multiple handlers into a single handler, routing requests to the handle import { Handler } from 'accounts/server' const handler = Handler.compose([ - Handler.feePayer({ - account: privateKeyToAccount('0x...') + Handler.relay({ + feePayer: { account: privateKeyToAccount('0x...') }, }), Handler.webAuthn({ kv: Kv.memory(), diff --git a/src/pages/accounts/server/handler.feePayer.mdx b/src/pages/accounts/server/handler.feePayer.mdx index 4baf405b..041878a8 100644 --- a/src/pages/accounts/server/handler.feePayer.mdx +++ b/src/pages/accounts/server/handler.feePayer.mdx @@ -1,149 +1,42 @@ --- -title: Handler.feePayer -description: Server handler that sponsors transaction fees for users. +title: Handler.feePayer (Deprecated) +description: Deprecated — use Handler.relay with feePayer option instead. --- -# `Handler.feePayer` +# `Handler.feePayer` (Deprecated) -Creates a server handler that acts as a fee payer for transactions, enabling you to subsidize gas costs for users by signing transactions with a dedicated fee payer account on your backend. - -:::info -[See the guide](/guide/payments/sponsor-user-fees) +:::warning +`Handler.feePayer` has been deprecated. Use [`Handler.relay`](/accounts/server/handler.relay) with the [`feePayer`](/accounts/server/handler.relay#feepayer) option instead. ::: -## Usage - -```ts -import { privateKeyToAccount } from 'viem/accounts' -import { Handler } from 'accounts/server' - -const handler = Handler.feePayer({ - account: privateKeyToAccount('0x...'), -}) -``` - -Then plug `handler` into your server framework of choice: - -```ts -createServer(handler.listener) // Node.js -Bun.serve(handler) // Bun -Deno.serve(handler) // Deno -app.all('*', c => handler.fetch(c.request)) // Elysia -app.use(handler.listener) // Express -app.use(c => handler.fetch(c.req.raw)) // Hono -export const GET = handler.fetch // Next.js -export const POST = handler.fetch // Next.js -``` - -## Parameters - -### account - -- **Type:** `LocalAccount` -- **Required** +## Migration -The account to use as the fee payer. This account will sign all transactions and pay the gas fees. +Replace `Handler.feePayer` calls with `Handler.relay` and nest the `account` under `feePayer`: -```ts twoslash -import { privateKeyToAccount } from 'viem/accounts' -import { Handler } from 'accounts/server' - -const handler = Handler.feePayer({ - account: privateKeyToAccount('0x...'), // [!code focus] -}) +```diff +- const handler = Handler.feePayer({ +- account: privateKeyToAccount('0x...'), +- }) ++ const handler = Handler.relay({ ++ feePayer: { ++ account: privateKeyToAccount('0x...'), ++ }, ++ }) ``` -### chains - -- **Type:** `readonly [Chain, ...Chain[]]` -- **Default:** `[tempo, tempoModerato]` - -Supported chains. The handler resolves the client based on the `chainId` in the incoming transaction. - -```ts twoslash -import { privateKeyToAccount } from 'viem/accounts' -import { tempo } from 'viem/chains' -import { Handler } from 'accounts/server' - -const handler = Handler.feePayer({ - account: privateKeyToAccount('0x...'), - chains: [tempo], // [!code focus] -}) +All other options (`chains`, `transports`, `path`, `onRequest`) remain the same — `validate` moves inside `feePayer`: + +```diff +- const handler = Handler.feePayer({ +- account: privateKeyToAccount('0x...'), +- validate: (request) => request.from !== blocked, +- }) ++ const handler = Handler.relay({ ++ feePayer: { ++ account: privateKeyToAccount('0x...'), ++ validate: (request) => request.from !== blocked, ++ }, ++ }) ``` -### onRequest - -- **Type:** `(request: RpcRequest) => Promise` -- **Optional** - -Callback called before processing each request. Useful for logging, rate limiting, or custom validation. - -```ts twoslash -import { privateKeyToAccount } from 'viem/accounts' -import { Handler } from 'accounts/server' - -const handler = Handler.feePayer({ - account: privateKeyToAccount('0x...'), - onRequest: async (request) => { // [!code focus] - console.log('Processing request:', request.method) // [!code focus] - }, // [!code focus] -}) -``` - -### path - -- **Type:** `string` -- **Default:** `'/'` - -Path where the handler listens for requests. - -```ts twoslash -import { privateKeyToAccount } from 'viem/accounts' -import { Handler } from 'accounts/server' - -const handler = Handler.feePayer({ - account: privateKeyToAccount('0x...'), - path: '/fee-payer', // [!code focus] -}) -``` - -### transports - -- **Type:** `Record` -- **Default:** `http()` for each chain - -Transports keyed by chain ID. - -```ts twoslash -import { http } from 'viem' -import { privateKeyToAccount } from 'viem/accounts' -import { tempo } from 'viem/chains' -import { Handler } from 'accounts/server' - -const handler = Handler.feePayer({ - account: privateKeyToAccount('0x...'), - transports: { // [!code focus] - [tempo.id]: http('https://rpc.tempo.xyz'), // [!code focus] - }, // [!code focus] -}) -``` - - -### validate - -- **Type:** `(request: TransactionRequest) => boolean | Promise` -- **Optional** - -Validates whether to sponsor a transaction. When omitted, all transactions are sponsored. Return `false` to reject sponsorship — the handler will re-fill without `feePayer` so gas/nonce are correct for self-payment. - -```ts twoslash -import { privateKeyToAccount } from 'viem/accounts' -import { Handler } from 'accounts/server' - -const blocked = '0x...' - -const handler = Handler.feePayer({ - account: privateKeyToAccount('0x...'), - validate: (request) => request.from !== blocked, // [!code focus] -}) -``` \ No newline at end of file +See [`Handler.relay`](/accounts/server/handler.relay) for the full API reference. diff --git a/src/pages/accounts/server/index.mdx b/src/pages/accounts/server/index.mdx index ee469483..c7f9d943 100644 --- a/src/pages/accounts/server/index.mdx +++ b/src/pages/accounts/server/index.mdx @@ -17,8 +17,8 @@ Handlers are compatible with any server framework that supports the: import { Handler } from 'accounts/server' import { privateKeyToAccount } from 'viem/accounts' -const handler = Handler.feePayer({ - account: privateKeyToAccount('0x...'), +const handler = Handler.relay({ + feePayer: { account: privateKeyToAccount('0x...') }, }) createServer(handler.listener) // Node.js @@ -39,7 +39,13 @@ export const POST = handler.fetch // Next.js title="Handler.compose" /> + diff --git a/src/snippets/unformatted/withFeePayer.ts b/src/snippets/unformatted/withFeePayer.ts index 91299c37..06780d66 100644 --- a/src/snippets/unformatted/withFeePayer.ts +++ b/src/snippets/unformatted/withFeePayer.ts @@ -1,12 +1,12 @@ // @ts-nocheck // [!region client] import { walletActions } from 'viem' -import { withFeePayer } from 'viem/tempo' +import { withRelay } from 'viem/tempo' const _client = createClient({ account: privateKeyToAccount('0x...'), chain: tempo, - transport: withFeePayer( + transport: withRelay( // [!code hl] http(), // [!code hl] http('http://localhost:3000'), // [!code hl] @@ -34,9 +34,9 @@ const _receipt2 = await client.sendTransactionSync({ import { Handler } from 'accounts/server' import { privateKeyToAccount } from 'viem/accounts' -const handler = Handler.feePayer({ +const handler = Handler.relay({ // [!code hl] - account: privateKeyToAccount('0x...'), // [!code hl] + feePayer: { account: privateKeyToAccount('0x...') }, // [!code hl] }) // [!code hl] const server = createServer(handler.listener) diff --git a/src/snippets/wagmi.config.ts b/src/snippets/wagmi.config.ts index 3c7ca7e9..af6435a4 100644 --- a/src/snippets/wagmi.config.ts +++ b/src/snippets/wagmi.config.ts @@ -22,7 +22,7 @@ export const config = createConfig({ // [!region withFeePayer] import { tempoWallet } from 'accounts/wagmi' import { tempo } from 'viem/chains' -import { withFeePayer } from 'viem/tempo' +import { withRelay } from 'viem/tempo' import { createConfig, http } from 'wagmi' import { KeyManager, webAuthn } from 'wagmi/tempo' diff --git a/src/wagmi.config.ts b/src/wagmi.config.ts index c5401041..89007557 100644 --- a/src/wagmi.config.ts +++ b/src/wagmi.config.ts @@ -4,7 +4,7 @@ import { tempoWallet, webAuthn as webAuthnAccounts } from 'accounts/wagmi' import * as React from 'react' import { parseUnits } from 'viem' import { tempoDevnet, tempoLocalnet, tempoModerato } from 'viem/chains' -import { withFeePayer } from 'viem/tempo' +import { withRelay } from 'viem/tempo' import { type CreateConfigParameters, createConfig, @@ -79,7 +79,7 @@ export function getConfig(options: getConfig.Options = {}) { key: 'tempo-docs', }), transports: { - [tempoModerato.id]: withFeePayer( + [tempoModerato.id]: withRelay( fallback([ http('https://rpc.moderato.tempo.xyz'), webSocket('wss://rpc.moderato.tempo.xyz', { @@ -89,7 +89,7 @@ export function getConfig(options: getConfig.Options = {}) { http('https://sponsor.moderato.tempo.xyz'), { policy: 'sign-only' }, ), - [tempoDevnet.id]: withFeePayer( + [tempoDevnet.id]: withRelay( fallback([ http(tempoDevnet.rpcUrls.default.http[0]), webSocket(tempoDevnet.rpcUrls.default.webSocket[0], { diff --git a/vocs.config.ts b/vocs.config.ts index e6a3ca85..73ce4857 100644 --- a/vocs.config.ts +++ b/vocs.config.ts @@ -1188,7 +1188,7 @@ export default defineConfig({ }, { source: '/sdk/typescript/server/handler.feePayer', - destination: '/accounts/server/handler.feePayer', + destination: '/accounts/server/handler.relay', status: 301, }, { From ddc3759f6c1415b2db8d28a5378d892cb761a254 Mon Sep 17 00:00:00 2001 From: Tony D'Addeo Date: Tue, 14 Apr 2026 16:59:33 -0500 Subject: [PATCH 2/4] docs: remove deprecated Handler.feePayer card from server index Amp-Thread-ID: https://ampcode.com/threads/T-019d8de3-aa62-7298-ae7d-0d9196db28ee Co-authored-by: Amp --- src/pages/accounts/server/index.mdx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/pages/accounts/server/index.mdx b/src/pages/accounts/server/index.mdx index c7f9d943..bf98df93 100644 --- a/src/pages/accounts/server/index.mdx +++ b/src/pages/accounts/server/index.mdx @@ -44,12 +44,6 @@ export const POST = handler.fetch // Next.js to="/accounts/server/relay" title="Handler.relay" /> - Date: Wed, 15 Apr 2026 10:22:30 -0500 Subject: [PATCH 3/4] docs: relay auto-sponsors when feePayer configured MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sponsorship is now automatic — clients no longer need feePayer: true. To opt out, pass feePayer: false per-transaction. Amp-Thread-ID: https://ampcode.com/threads/T-019d8de3-aa62-7298-ae7d-0d9196db28ee Co-authored-by: Amp --- src/components/guides/steps/payments/SponsorUserFees.tsx | 2 +- src/pages/accounts/rpc/eth_fillTransaction.mdx | 2 +- src/pages/accounts/server/handler.relay.mdx | 4 ++-- src/pages/guide/payments/sponsor-user-fees.mdx | 6 +++--- src/snippets/unformatted/withFeePayer.ts | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/guides/steps/payments/SponsorUserFees.tsx b/src/components/guides/steps/payments/SponsorUserFees.tsx index db8e4ec4..46552931 100644 --- a/src/components/guides/steps/payments/SponsorUserFees.tsx +++ b/src/components/guides/steps/payments/SponsorUserFees.tsx @@ -44,7 +44,7 @@ export function SendRelayerSponsoredPayment(props: DemoStepProps) { to: recipient as `0x${string}`, token: alphaUsd, memo: memo ? pad(stringToHex(memo), { size: 32 }) : undefined, - feePayer: true, + // feePayer is automatic when relay has feePayer configured }) } diff --git a/src/pages/accounts/rpc/eth_fillTransaction.mdx b/src/pages/accounts/rpc/eth_fillTransaction.mdx index aa7cdbab..85eea270 100644 --- a/src/pages/accounts/rpc/eth_fillTransaction.mdx +++ b/src/pages/accounts/rpc/eth_fillTransaction.mdx @@ -242,7 +242,7 @@ result.capabilities.fee ### With Sponsorship -When the relay is configured with a [`feePayer`](/accounts/server/handler.relay#feepayer) and the request is sponsorable, the response includes `sponsored: true` and `sponsor` details. +When the relay is configured with a [`feePayer`](/accounts/server/handler.relay#feepayer), all transactions are automatically sponsored. The response includes `sponsored: true` and `sponsor` details. Clients can opt out per-transaction by passing `feePayer: false`. ```ts twoslash // @noErrors diff --git a/src/pages/accounts/server/handler.relay.mdx b/src/pages/accounts/server/handler.relay.mdx index 138ba274..e0361918 100644 --- a/src/pages/accounts/server/handler.relay.mdx +++ b/src/pages/accounts/server/handler.relay.mdx @@ -77,7 +77,7 @@ export const POST = handler.fetch // Next.js ### Sponsorship -Configure a [`feePayer`](#feepayer) to sponsor transactions. The relay signs `feePayerSignature` on the filled transaction and returns sponsor details in the response metadata. Use a [`validate`](#feepayervalidate) callback for conditional sponsorship — rejected transactions are re-filled for self-payment. +Configure a [`feePayer`](#feepayer) to sponsor transactions. When a fee payer is configured, **all transactions are sponsored by default** — clients do not need to opt in. A client can opt out of sponsorship for a specific transaction by passing `feePayer: false`. Use a [`validate`](#feepayervalidate) callback for conditional sponsorship — rejected transactions are re-filled for self-payment. :::code-group @@ -435,7 +435,7 @@ const handler = Handler.relay({ - **Type:** `object` - **Optional** -Fee payer configuration. When provided, the relay will sign `feePayerSignature` on the filled transaction. +Fee payer configuration. When provided, the relay automatically sponsors all transactions by signing `feePayerSignature` on the filled transaction. Clients can opt out per-transaction by passing `feePayer: false`. ```ts twoslash import { privateKeyToAccount } from 'viem/accounts' diff --git a/src/pages/guide/payments/sponsor-user-fees.mdx b/src/pages/guide/payments/sponsor-user-fees.mdx index fe68eac5..fde143f7 100644 --- a/src/pages/guide/payments/sponsor-user-fees.mdx +++ b/src/pages/guide/payments/sponsor-user-fees.mdx @@ -98,7 +98,7 @@ export const config = createConfig({ ### Sponsor your user's transactions -Now you can sponsor transactions by passing `feePayer: true` in the transaction parameters. For more details on how to send a transaction, see the [Send a payment](/guide/payments/send-a-payment) guide. +All transactions are now automatically sponsored when a relay with a fee payer is configured — no client-side opt-in is needed. To opt out of sponsorship for a specific transaction, pass `feePayer: false`. For more details on how to send a transaction, see the [Send a payment](/guide/payments/send-a-payment) guide. :::info You can also build your own fee paying service. See [Build your own fee paying service](#build-your-own-fee-paying-service) below. @@ -132,7 +132,7 @@ function SendSponsoredPayment() { sendPayment.mutate({ // [!code hl] amount: parseUnits('100', metadata.data.decimals), // [!code hl] - feePayer: true, // [!code focus] + // feePayer: false, // uncomment to opt out of sponsorship // [!code focus] to: recipient, // [!code hl] token: alphaUsd, // [!code hl] }) // [!code hl] @@ -211,7 +211,7 @@ The SDKs handle this automatically. Here's how each SDK manages the dual-signing ``` :::info - Alternatively, use `feePayer: true` with the [`withRelay`](https://viem.sh/tempo/transports/withRelay) transport to delegate signing to a remote fee payer service. See the [Steps section above](#configure-your-client-to-use-the-fee-payer-service) for setup. + Alternatively, use the [`withRelay`](https://viem.sh/tempo/transports/withRelay) transport to delegate signing to a remote fee payer service — sponsorship is automatic. See the [Steps section above](#configure-your-client-to-use-the-fee-payer-service) for setup. ::: diff --git a/src/snippets/unformatted/withFeePayer.ts b/src/snippets/unformatted/withFeePayer.ts index 06780d66..108fca71 100644 --- a/src/snippets/unformatted/withFeePayer.ts +++ b/src/snippets/unformatted/withFeePayer.ts @@ -16,15 +16,15 @@ const _client = createClient({ // [!endregion client] // [!region usage] -// Regular transaction +// Sponsored transaction (automatic when relay has feePayer configured) const _receipt1 = await client.sendTransactionSync({ to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb', }) -// Sponsored transaction // [!code hl] +// Opt out of sponsorship // [!code hl] const _receipt2 = await client.sendTransactionSync({ // [!code hl] - feePayer: true, // [!code hl] + feePayer: false, // [!code hl] to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb', // [!code hl] }) // [!code hl] From 1c8713414b86c273cb990e0b4f6d86e02d31c037 Mon Sep 17 00:00:00 2001 From: Tony D'Addeo Date: Wed, 15 Apr 2026 10:58:18 -0500 Subject: [PATCH 4/4] clean up --- src/components/guides/steps/payments/SponsorUserFees.tsx | 1 - src/pages/accounts/rpc/eth_fillTransaction.mdx | 2 +- src/pages/accounts/server/handler.relay.mdx | 4 ++-- src/pages/guide/payments/sponsor-user-fees.mdx | 6 +++--- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/guides/steps/payments/SponsorUserFees.tsx b/src/components/guides/steps/payments/SponsorUserFees.tsx index 46552931..8c386c8e 100644 --- a/src/components/guides/steps/payments/SponsorUserFees.tsx +++ b/src/components/guides/steps/payments/SponsorUserFees.tsx @@ -44,7 +44,6 @@ export function SendRelayerSponsoredPayment(props: DemoStepProps) { to: recipient as `0x${string}`, token: alphaUsd, memo: memo ? pad(stringToHex(memo), { size: 32 }) : undefined, - // feePayer is automatic when relay has feePayer configured }) } diff --git a/src/pages/accounts/rpc/eth_fillTransaction.mdx b/src/pages/accounts/rpc/eth_fillTransaction.mdx index 85eea270..1fc6d4d0 100644 --- a/src/pages/accounts/rpc/eth_fillTransaction.mdx +++ b/src/pages/accounts/rpc/eth_fillTransaction.mdx @@ -242,7 +242,7 @@ result.capabilities.fee ### With Sponsorship -When the relay is configured with a [`feePayer`](/accounts/server/handler.relay#feepayer), all transactions are automatically sponsored. The response includes `sponsored: true` and `sponsor` details. Clients can opt out per-transaction by passing `feePayer: false`. +When the relay is configured with a [`feePayer`](/accounts/server/handler.relay#feepayer), validated transactions are sponsored. The response includes `sponsored: true` and `sponsor` details. ```ts twoslash // @noErrors diff --git a/src/pages/accounts/server/handler.relay.mdx b/src/pages/accounts/server/handler.relay.mdx index e0361918..138ba274 100644 --- a/src/pages/accounts/server/handler.relay.mdx +++ b/src/pages/accounts/server/handler.relay.mdx @@ -77,7 +77,7 @@ export const POST = handler.fetch // Next.js ### Sponsorship -Configure a [`feePayer`](#feepayer) to sponsor transactions. When a fee payer is configured, **all transactions are sponsored by default** — clients do not need to opt in. A client can opt out of sponsorship for a specific transaction by passing `feePayer: false`. Use a [`validate`](#feepayervalidate) callback for conditional sponsorship — rejected transactions are re-filled for self-payment. +Configure a [`feePayer`](#feepayer) to sponsor transactions. The relay signs `feePayerSignature` on the filled transaction and returns sponsor details in the response metadata. Use a [`validate`](#feepayervalidate) callback for conditional sponsorship — rejected transactions are re-filled for self-payment. :::code-group @@ -435,7 +435,7 @@ const handler = Handler.relay({ - **Type:** `object` - **Optional** -Fee payer configuration. When provided, the relay automatically sponsors all transactions by signing `feePayerSignature` on the filled transaction. Clients can opt out per-transaction by passing `feePayer: false`. +Fee payer configuration. When provided, the relay will sign `feePayerSignature` on the filled transaction. ```ts twoslash import { privateKeyToAccount } from 'viem/accounts' diff --git a/src/pages/guide/payments/sponsor-user-fees.mdx b/src/pages/guide/payments/sponsor-user-fees.mdx index fde143f7..ea27b310 100644 --- a/src/pages/guide/payments/sponsor-user-fees.mdx +++ b/src/pages/guide/payments/sponsor-user-fees.mdx @@ -98,7 +98,7 @@ export const config = createConfig({ ### Sponsor your user's transactions -All transactions are now automatically sponsored when a relay with a fee payer is configured — no client-side opt-in is needed. To opt out of sponsorship for a specific transaction, pass `feePayer: false`. For more details on how to send a transaction, see the [Send a payment](/guide/payments/send-a-payment) guide. +Now transactions will be sponsored by your relay. For more details on how to send a transaction, see the [Send a payment](/guide/payments/send-a-payment) guide. :::info You can also build your own fee paying service. See [Build your own fee paying service](#build-your-own-fee-paying-service) below. @@ -132,7 +132,7 @@ function SendSponsoredPayment() { sendPayment.mutate({ // [!code hl] amount: parseUnits('100', metadata.data.decimals), // [!code hl] - // feePayer: false, // uncomment to opt out of sponsorship // [!code focus] + feePayer: sponsorAccount, // [!code focus] to: recipient, // [!code hl] token: alphaUsd, // [!code hl] }) // [!code hl] @@ -211,7 +211,7 @@ The SDKs handle this automatically. Here's how each SDK manages the dual-signing ``` :::info - Alternatively, use the [`withRelay`](https://viem.sh/tempo/transports/withRelay) transport to delegate signing to a remote fee payer service — sponsorship is automatic. See the [Steps section above](#configure-your-client-to-use-the-fee-payer-service) for setup. + Alternatively, use the [`withRelay`](https://viem.sh/tempo/transports/withRelay) transport to delegate signing to a remote fee payer service. See the [Steps section above](#configure-your-client-to-use-the-fee-payer-service) for setup. :::