Socket
Socket
Sign inDemoInstall

@wagmi/connectors

Package Overview
Dependencies
9
Maintainers
2
Versions
389
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wagmi/connectors

A collection of connectors for wagmi


Version published
Weekly downloads
201K
increased by8.45%
Maintainers
2
Created
Weekly downloads
 

Package description

What is @wagmi/connectors?

@wagmi/connectors is a package that provides a set of connectors for integrating with various Ethereum wallets. It is part of the wagmi library, which is designed to make it easier to work with Ethereum in JavaScript and TypeScript applications. The connectors facilitate the connection between your application and different wallet providers, enabling functionalities such as authentication, transaction signing, and more.

What are @wagmi/connectors's main functionalities?

MetaMask Connector

This feature allows you to connect your application to the MetaMask wallet. The MetaMaskConnector can be configured with various options, such as supported chains and whether to shim the disconnect functionality.

const { MetaMaskConnector } = require('@wagmi/connectors');

const metaMaskConnector = new MetaMaskConnector({
  chains: [/* array of supported chains */],
  options: {
    shimDisconnect: true,
  },
});

WalletConnect Connector

This feature allows you to connect your application to wallets that support WalletConnect. The WalletConnectConnector can be configured with options like whether to display a QR code for connection.

const { WalletConnectConnector } = require('@wagmi/connectors');

const walletConnectConnector = new WalletConnectConnector({
  chains: [/* array of supported chains */],
  options: {
    qrcode: true,
  },
});

Coinbase Wallet Connector

This feature allows you to connect your application to the Coinbase Wallet. The CoinbaseWalletConnector can be configured with options such as the name of your application.

const { CoinbaseWalletConnector } = require('@wagmi/connectors');

const coinbaseWalletConnector = new CoinbaseWalletConnector({
  chains: [/* array of supported chains */],
  options: {
    appName: 'MyApp',
  },
});

Other packages similar to @wagmi/connectors

Readme

Source

@wagmi/connectors

Collection of connectors for wagmi.

Installation

Install the @wagmi/connectors package.

npm i @wagmi/connectors

Usage

Configure your wagmi config with connectors!

import { configureChains, createConfig } from 'wagmi'

import { InjectedConnector } from '@wagmi/connectors/injected'

const { chains, provider } = configureChains(...)

const config = createConfig({
  connectors: [
    new InjectedConnector({ chains }),
  ],
  provider,
})

If your bundler supports tree-shaking (most likely), only the used connectors will be included in the bundle, so you don't have to worry about bundle size. 😊

Connectors

  • CoinbaseWalletConnector
  • InjectedConnector
  • MetaMaskConnector
  • MockConnector
  • SafeConnector
  • WalletConnectConnector

Contributing

Want to add another chain to the list? Make sure you read the contributing guide first.

Keywords

FAQs

Last updated on 03 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc