• Core
  • Connectors
  • Safe

Safe Wallet

The SafeConnector supports connecting with Safe Wallet using the Safe Apps SDK.

import { SafeConnector } from '@wagmi/connectors/safe'

Usage

import { SafeConnector } from '@wagmi/connectors/safe'
 
const connector = new SafeConnector({
  chains,
  options: {
    allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/],
    debug: false,
  },
})

Configuration

chains (optional)

Chains supported by app. Defaults to defaultChains.

import { SafeConnector } from '@wagmi/core/connectors/safe'
import { mainnet, optimism } from '@wagmi/core/chains'
 
const connector = new SafeConnector({
  chains: [mainnet, optimism],
  options: {
    allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/],
    debug: false,
  },
})

Note: The above example is using chains from @wagmi/core/chains entrypoint.

options (optional)

Options to pass to the Safe Apps SDK. For the most up-to-date information on the available options, please refer to the Safe Apps SDK documentation.

import { SafeConnector } from '@wagmi/core/connectors/safe'
import { mainnet, optimism } from '@wagmi/core/chains'
 
const connector = new SafeConnector({
  chains: [mainnet, optimism],
  options: {
    allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/],
    debug: false,
  },
})