# @b2network/b2-wallet-connector

> ## Getting Started

Latest version **0.0.5** (published 2024-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @b2network/b2-wallet-connector
pnpm add @b2network/b2-wallet-connector
yarn add @b2network/b2-wallet-connector
bun add @b2network/b2-wallet-connector
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2024-01-05 |
| First published | 2023-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 158 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | b2network |

## Links

- npm: https://www.npmjs.com/package/@b2network/b2-wallet-connector
- Repository: https://github.com/b2network/b2-wallet-connector
- Homepage: https://github.com/b2network/b2-wallet-connector#readme
- Issues: https://github.com/b2network/b2-wallet-connector/issues
- npm.io page: https://npm.io/package/@b2network/b2-wallet-connector

## Dependencies (4)

- [viem](https://npm.io/package/viem.md) 1.19.13
- [wagmi](https://npm.io/package/wagmi.md) 1.4.11
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) ^3.1.10
- [@b2network/aa-utils](https://npm.io/package/@b2network/aa-utils.md) ^0.0.3

## Recent versions

- 0.0.5 (latest) — 2024-01-05
- 0.0.4 — 2023-12-23
- 0.0.3 — 2023-12-22
- 0.0.2 — 2023-12-22
- 0.0.1 — 2023-12-19

## README

# b2-wallet-connector

## Getting Started

- Install the package

```bash
// with yarn
yarn add @b2network/b2-wallet-connector
// with npm
npm i @b2network/b2-wallet-connector
```

- Integrate B2 connector with rainbowkit

```typescript
import {
  connectorsForWallets,
  RainbowKitProvider,
} from "@rainbow-me/rainbowkit";
import { configureChains, createConfig, WagmiConfig } from "wagmi";
import { publicProvider } from "wagmi/providers/public";

import {
  B2Connector,
  b2test,
  b2Wallet,
  withB2PublicClient,
} from "@b2network/b2-wallet-connector";

const { chains, publicClient } = configureChains(
  [b2test],
  [publicProvider()]
);

const connectors = connectorsForWallets([
  {
    groupName: "Recommended",
    wallets: [
      b2Wallet(
        new B2Connector({
          chains,
          options: {
            shimDisconnect: true,
          },
        })
      ),
    ],
  },
]);

// Pass `publicClient` to withB2PublicClient HOF
const wagmiConfig = createConfig({
  autoConnect: true,
  connectors,
  publicClient: withB2PublicClient(publicClient),
});


// Now you can use the config as you use to
```

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