Skip to content

PermissionlessProvider

React Context Provider for Permissionless.

Import

import { PermissionlessProvider } from "@permissionless/wagmi"

Usage

main.ts
import { PermissionlessProvider } from "@permissionless/wagmi"
 
// enables ERC-7677 if external account is a smart account and supports 7677
// e.g. Coinbase Smart Account
const capabilities = { 
  paymasterService: { 
    [baseSepolia.id]: { 
        url: `https://api.pimlico.io/v2/${baseSepolia.id}/rpc?apikey=${pimlicoApiKey}`
    } 
  } 
} 
 
function App() {
  return (
    <WagmiProvider config={config}>
        <QueryClientProvider client={queryClient}>
            <PermissionlessProvider 
                capabilities={capabilities} 
            >
                {/** ... */}
            </PermissionlessProvider>
        </QueryClientProvider>
    </WagmiProvider>
  )
}

Parameters

import { type PermissionlessProviderProps } from "@permissionless/wagmi"

capabilities

WalletCapabilities | undefined

Capability to use for the calls (e.g. specifying a paymaster).