Skip to content

getConnections

Action for getting active connections.

Import

ts
import { getConnections } from '@wagmi/core'
import { getConnections } from '@wagmi/core'

Usage

ts
import { getConnections } from '@wagmi/core'
import { config } from './config'

const connections = getConnections(config)
import { getConnections } from '@wagmi/core'
import { config } from './config'

const connections = getConnections(config)
ts
import { http, createConfig } from '@wagmi/core'
import { mainnet, sepolia } from '@wagmi/core/chains'

export const config = createConfig({
  chains: [mainnet, sepolia],
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})
import { http, createConfig } from '@wagmi/core'
import { mainnet, sepolia } from '@wagmi/core/chains'

export const config = createConfig({
  chains: [mainnet, sepolia],
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})

Return Type

ts
import { type GetConnectionsReturnType } from '@wagmi/core'
import { type GetConnectionsReturnType } from '@wagmi/core'

Connection[]

Active connections.

Released under the MIT License.