2.4.0 • Published 8 months ago

@node-real/walletkit v2.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

WalletKit

WalletKit is a React component library for easily connecting a wallet to your dApp.

Features

  • 💡 Typescript — Get types straight out of the box.
  • 🌱 Ecosystem Standards — Built on top of wagmi and viem
  • 🎨 Customization — Easily customizing wallets and themes

Documentation

For full documentation, visit here.

Examples

The following examples are provided in the examples folder of this repo.

Installation

npm i @node-real/walletkit@^2 wagmi@^2 viem@^2 @tanstack/react-query@^5

Usage

import '@node-real/walletkit/styles.css';

import { trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import {
  defaultWagmiConfig,
  SwitchNetworkModal,
  WalletKitButton,
  WalletKitOptions,
  WalletKitProvider,
  ProfileModal,
  ConnectModal,
} from '@node-real/walletkit';
import { WagmiProvider } from 'wagmi';
import { AppProps } from 'next/app';
import { chains } from './chains';

const queryClient = new QueryClient();

const config = defaultWagmiConfig({
  appName: '[Your app name]', // Your app name
  chains,
  connectors: [trustWallet(), metaMask(), walletConnect()],

  // WalletConnect 2.0 requires a projectId which you can create quickly
  // and easily for free over at WalletConnect Cloud https://cloud.walletconnect.com/sign-in
  walletConnectProjectId: 'xxx',
});

const options: WalletKitOptions = {
  initialChainId: 1,
};

export default function App({ Component, pageProps }: AppProps) {
  return (
    <WagmiProvider config={config} reconnectOnMount={true}>
      <QueryClientProvider client={queryClient}>
        <WalletKitProvider options={options} mode="light">
          <Component {...pageProps} />

          <WalletKitButton />
          <ConnectModal />

          {/* 
            Profile modal shows some basic information about the current account,
            if you don't need this modal, you can remove it.
          */}
          <ProfileModal />

          {/* 👇 Here's the SwitchNetworkModal
            If the user switches to a network that is not supported by our dApp,
            this modal will be displayed to remind the user to switch to our supported networks.
          */}
          <SwitchNetworkModal />
        </WalletKitProvider>
      </QueryClientProvider>
    </WagmiProvider>
  );
}

Contributing

Please follow our WalletKit Contribution Guide.

License

See LICENSE for more information.

2.4.1-alpha.0

8 months ago

2.4.0

8 months ago

2.4.0-alpha.9

8 months ago

2.4.0-alpha.10

8 months ago

2.4.0-alpha.8

8 months ago

2.4.0-alpha.6

8 months ago

2.4.0-alpha.5

8 months ago

2.4.0-alpha.7

8 months ago

2.4.0-alpha.4

8 months ago

2.4.0-alpha.3

8 months ago

2.3.6-alpha.2

9 months ago

2.3.6-alpha.1

9 months ago

2.3.6-alpha.0

9 months ago

2.3.2-alpha.1

10 months ago

2.3.2-alpha.0

10 months ago

2.3.0-alpha.8

10 months ago

2.3.0-alpha.7

10 months ago

2.3.0-alpha.10

10 months ago

2.3.0-alpha.11

10 months ago

1.1.1

12 months ago

2.2.1-alpha.0

11 months ago

2.0.3-alpha.0

11 months ago

1.1.3

11 months ago

1.1.2

12 months ago

2.0.3

11 months ago

2.0.2

11 months ago

2.0.1-alpha.0

11 months ago

2.0.2-alpha.0

11 months ago

2.0.1

11 months ago

2.3.0-alpha.2

10 months ago

1.0.13-alpha.0

1 year ago

2.3.0-alpha.0

10 months ago

2.3.0-alpha.1

10 months ago

2.3.0-alpha.6

10 months ago

0.3.2

12 months ago

2.1.0-alpha.0

11 months ago

0.3.1

12 months ago

2.3.0-alpha.4

10 months ago

0.3.3

11 months ago

0.2.13

1 year ago

0.2.11-alpha.1

1 year ago

1.0.12

1 year ago

1.0.12-alpha.1

1 year ago

1.0.12-alpha.0

1 year ago

0.2.11

1 year ago

1.0.11-alpha.0

1 year ago

1.0.11

1 year ago

0.2.11-alpha.0

1 year ago

0.2.10

1 year ago

1.0.10

1 year ago

0.2.10-alpha.4

1 year ago

1.0.10-alpha.3

1 year ago

1.0.10-alpha.2

1 year ago

0.2.10-alpha.3

1 year ago

0.2.10-alpha.2

1 year ago

1.0.10-alpha.1

1 year ago

0.2.10-alpha.1

1 year ago

1.0.10-alpha.0

1 year ago

0.2.10-alpha.0

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

1.0.9

1 year ago

1.0.9-alpha.0

1 year ago