• Core
  • Actions
  • fetchSigner

fetchSigner

Action for accessing ethers Signer object for connected account.

import { fetchSigner } from '@wagmi/core'

Usage

The following examples use the ENS Registry contract.

import { fetchSigner } from '@wagmi/core'
 
const signer = await fetchSigner()

Return Value

Signer

Configuration

chainId (optional)

Chain ID to use for signer.

import { fetchSigner } from '@wagmi/core'
import { optimism } from '@wagmi/core/chains'
 
const signer = await fetchSigner({
  chainId: optimism.id,
})