Skip to content
Back to skills

Wagmi Connectors

ASecurity

Wallet connectors for MetaMask, WalletConnect, injected, and more. Use when setting up wallet connections.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 10, 2026
blockchaintypescripttesting

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add cyotee/indexedex --skill wagmi-connectors --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Wagmi Connectors?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Wagmi Connectors
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cyotee-wagmi-connectors/badge)](https://www.skillsdirectory.com/skills/cyotee-wagmi-connectors)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: wagmi-connectors
description: Wallet connectors for MetaMask, WalletConnect, injected, and more. Use when setting up wallet connections.
---

# Wagmi Connectors

Wallet connection adapters.

## Setup Connectors

```typescript
import { createConfig, http } from '@wagmi/core'
import { mainnet, sepolia } from '@wagmi/core/chains'
import { injected } from '@wagmi/connectors'
import { walletConnect } from '@wagmi/connectors'
import { safe } from '@wagmi/connectors'

export const config = createConfig({
  chains: [mainnet, sepolia],
  connectors: [
    injected(),                    // Browser wallets (MetaMask, etc.)
    walletConnect({ projectId: '...' }),
    safe()
  ],
  transports: { ... }
})
```

## Connect/Disconnect

```typescript
import { connect, disconnect, getConnection } from '@wagmi/core'

// Connect
const { account, chainId, connector } = await connect(config, {
  connector: injected()  // or omit to use first available
})

// Get current connection
const { account, chainId } = getConnection(config)

// Disconnect
await disconnect(config)
```

## Available Connectors

### Injected (Browser Wallets)

```typescript
import { injected } from '@wagmi/connectors'

injected({
  shimDisconnect: true  // persist disconnect state
})
```

### MetaMask

```typescript
import { metaMask } from '@wagmi/connectors'

metaMask({
  shimDisconnect: true,
  flag: 'all'  // or 'ethereum'
})
```

### WalletConnect

```typescript
import { walletConnect } from '@wagmi/connectors'

walletConnect({
  projectId: 'YOUR_PROJECT_ID',
  showQrModal: true,
  qrModalOptions: {
    themeMode: 'dark'
  }
})
```

### Safe (Gnosis Safe)

```typescript
import { safe } from '@wagmi/connectors'

safe({
  allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/],
  debug: false
})
```

### Mock (Testing)

```typescript
import { mock } from '@wagmi/connectors'

mock({
  accounts: [privateKeyToAccount('0x...')],
  chainId: 1
})
```

## Switch Chains

```typescript
import { switchChain } from '@wagmi/core'
import { base } from '@wagmi/core/chains'

await switchChain(config, { chainId: base.id })
```

## Watch Connections

```typescript
import { watchConnections, watchConnector } from '@wagmi/core'

// Watch all connections
watchConnections(config, (connections) => {
  console.log('Connections:', connections)
})

// Watch specific connector
watchConnector(config, 'injected', (connector) => {
  console.log('Injected connector:', connector)
})
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…