# @grmkris/web3auth-wagmi-connector

> wagmi connector to connect with web3auth SDK

Latest version **1.0.1-chainIdFix** (published 2022-12-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @grmkris/web3auth-wagmi-connector
pnpm add @grmkris/web3auth-wagmi-connector
yarn add @grmkris/web3auth-wagmi-connector
bun add @grmkris/web3auth-wagmi-connector
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1-chainIdFix |
| Published | 2022-12-04 |
| First published | 2022-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14.17.0 |
| Dependencies | 9 |
| Unpacked size | 7.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | grmkris |

## Links

- npm: https://www.npmjs.com/package/@grmkris/web3auth-wagmi-connector
- npm.io page: https://npm.io/package/@grmkris/web3auth-wagmi-connector

## Dependencies (9)

- [loglevel](https://npm.io/package/loglevel.md) ^1.8.0
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [@wagmi/core](https://npm.io/package/@wagmi/core.md) ^0.5.7
- [@web3auth/ui](https://npm.io/package/@web3auth/ui.md) ^2.1.2
- [@web3auth/base](https://npm.io/package/@web3auth/base.md) ^2.1.2
- [@web3auth/core](https://npm.io/package/@web3auth/core.md) ^2.1.2
- [@changesets/cli](https://npm.io/package/@changesets/cli.md) ^2.24.4
- [@toruslabs/openlogin-jrpc](https://npm.io/package/@toruslabs/openlogin-jrpc.md) ^2.6.0
- [@web3auth/openlogin-adapter](https://npm.io/package/@web3auth/openlogin-adapter.md) ^2.1.2

## Recent versions

- 1.0.1-chainIdFix (latest) — 2022-12-04

## README

<p align="center">
 <img src="https://web3auth.io/images/w3a-L-Favicon-1.svg" align="center" alt="Ledger" />
 <h2 align="center">Web3Auth Wagmi Connector</h2>
 <p align="center"><a href="https://github.com/tmm/wagmi">Wagmi</a> Connector for Web3Auth</p>
</p>



# About

`@web3auth/web3auth-wagmi-connector` is a connector for the popular [wagmi](https://github.com/tmm/wagmi) library built on top of the [@web3auth/web3auth
](https://github.com/web3auth/web3auth).

It can be used to initialize a [wagmi client](https://wagmi.sh/docs/client) that will seemlessly manage the interaction of your DApp with Web3Auth.

## How to use

Here is an example of a wagmi client using both the `Web3AuthConnector` and the default `InjectedConnector` respectively.

```js
import { Web3AuthConnector } from '@web3auth/web3auth-wagmi-connector';
import { chain, configureChains, createClient } from 'wagmi';
import { InjectedConnector } from 'wagmi/connectors/injected';
import { publicProvider } from 'wagmi/providers/public';

const { chains, provider } = configureChains(
  [chain.mainnet, chain.polygon],
  [publicProvider()]
);

const wagmiClient = createClient({
  autoConnect: true,
  connectors: [
    new Web3AuthConnector({ 
      chains,
      options: {
        enableLogging: true,
        clientId: "YOUR_CLIENT_ID", // Get your own client id from https://dashboard.web3auth.io
        network: "testnet", // web3auth network
        chainId: "0x1" // chainId that you want to connect with
      },
    }),
    new InjectedConnector({ chains }),
  ],
  provider,
});
```

# Documentation

Have a look at [the wagmi repo](https://github.com/tmm/wagmi) and [the wagmi doc](https://wagmi.sh/) to learn more on connectors and wagmi.

---
_Source: https://npm.io/package/@grmkris/web3auth-wagmi-connector · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
