πŸš€Using Wagmi

Installation​

The connector can be installed via the npm package @rize-labs/banana-wagmi-connector.

npm install @rize-labs/banana-wagmi-connector ethers

or

yarn add @rize-labs/banana-wagmi-connector ethers

Usage​

The connector is then imported and added to the list of connectors alongside the other wagmi connectors.

import { BananaConnector } from '@rize-labs/banana-wagmi-connector'

  const connectors = [
    new BananaConnector({
      chains,
      options: {
        connect: {
          networkId: 80001
        }
      }
    }),
    ...otherConnectors
  ]
  
  const wagmiClient = createClient({
    autoConnect: false,
    connectors,
    provider
  })

Parameters​

chains​

Chains supported by app. This is the same parameter as would be passed to other RainbowKit wallets.

options.connect

Connection details that will be passed to Banana upon connection, which include network id etc.

Compatible Networks

  • Optimism Goerli

  • Ethereum Goerli

  • Polygon Mumbai

  • Gnosis Mainnet

  • Chiado Testnet

PS: if after following these steps you are experiencing webpack polyfill issue please refer to this page

If you have any questions please post them Banana SDK Discord forum.

Last updated