npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@clover-network/clv-wagmi-connector

v0.1.0

Published

CLV Wallet wagmi connector

Downloads

4

Readme

@clover-network/clv-wagmi-connector

@clover-network/clv-wagmi-connector is a custom wagmi connector for CLV Wallet

The use of wagmi can be referred to: https://wagmi.sh

How to use @clover-network/clv-wagmi-connector

Install

yarn add @clover-network/clv-wagmi-connector

Use with RainbowKit

Create a custom Wallet of RainbowKit with CLVConnector

import { CLVConnector } from "@clover-network/clv-wagmi-connector";
import { Wallet } from '@rainbow-me/rainbowkit';

interface MyWalletOptions {
  chains: Chain[]
}

const CLVWallet = ({chains}: MyWalletOptions): Wallet => ({
  id: 'CLV',
  name: 'CLV Wallet',
  iconUrl: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0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jZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0E5RkZFMCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM4NkQ1RkYiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4=',
  iconBackground: 'linear-gradient(39.66deg, #BDFDE2 -8.36%, #9BDAF6 143.89%)',
  downloadUrls: {browserExtension: "https://chrome.google.com/webstore/detail/clover-wallet/nhnkbkgjikgcigadomkphalanndcapjk"},
  createConnector: () => {
    const connector = new CLVConnector({options: undefined, chains});
    return {
      connector,
    };
  },
})

Apply the custom Wallet to RainbowKit connectorsForWallets

import {connectorsForWallets} from '@rainbow-me/rainbowkit';
import {createClient} from 'wagmi';

const connectors = connectorsForWallets([{
  groupName: 'Recommended',
  wallets: [
    CLVWallet({chains}),  //CLVWallet
    metaMaskWallet({chains}),  //metaMaskWallet
  ]
}] as WalletList)

Create wagmi client

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

Use Providers

function MyApp({Component, pageProps}: AppProps) {
  return (
    <WagmiConfig client={wagmiClient}>
      <RainbowKitProvider chains={chains}>
        <Component {...pageProps} />
      </RainbowKitProvider>
    </WagmiConfig>
  );
}

Use RainbowKit component as usual

import {ConnectButton} from '@rainbow-me/rainbowkit';

const RainbowKitConnectButton = () => {
  return (
    <ConnectButton/>
  )
}