Skip to content
LogoLogo

Fetch.restore

Restore global fetch

Choose a signing account

Create a server-only wallet.ts module, then import account wherever an example creates a local signing account.

wallet.ts
import { privateKeyToAccount } from 'viem/accounts'

export const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`)

Restores the original globalThis.fetch after Fetch.polyfill or Mppx.create installs a payment-aware wrapper.

Usage

Return type

type ReturnType = void

Parameters

None.