sequence-rainbowkit-wallet
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Sequence RainbowKit wallet connector

Sequence Wallet connector for RainbowKit React library.

How to use

Install package

npm i sequence-rainbowkit-wallet

Use it in your code

import {
  ConnectButton,
  connectorsForWallets,
  wallet,
} from '@rainbow-me/rainbowkit';
import { WagmiConfig } from 'wagmi';
import { chain, configureChains, createClient } from 'wagmi';
import { alchemyProvider } from 'wagmi/providers/alchemy';
import { sequenceWallet } from 'sequence-rainbowkit-wallet';

const defaultProvider = alchemyProvider({
  apiKey: process.env.ALCHEMY_APIKEY,
});

export const { chains, provider, webSocketProvider } = configureChains(
  [chain.polygonMumbai],
  [defaultProvider],
);

const connectors = connectorsForWallets([
  {
    groupName: 'Recommended',
    wallets: [
      sequenceWallet({ chains }),
      wallet.metaMask({ chains }),
      wallet.rainbow({ chains }),
      wallet.walletConnect({ chains }),
    ],
  },
]);

const wagmiClient = createClient({
  autoConnect: true,
  connectors: () => [...connectors()],
  provider,
  webSocketProvider,
});

export const App = () => {
  return (
    <WagmiConfig client={wagmiClient}>
      <RainbowKitProvider>
        <ConnectButton />
      </RainbowKitProvider>
    </WagmiConfig>
  );
};

Package Sidebar

Install

npm i sequence-rainbowkit-wallet

Weekly Downloads

2

Version

1.0.5

License

ISC

Unpacked Size

7.63 kB

Total Files

4

Last publish

Collaborators

  • landyrev