1.0.8 • Published 5 months ago

@totejs/walletkit v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 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 @totejs/walletkit wagmi viem

Usage

import '@totejs/walletkit/styles.css';
import { WagmiConfig, createConfig } from 'wagmi';
import { chains } from './chains';
import {
  WalletKitButton,
  WalletKitProvider,
  getDefaultConfig,
  WalletKitOptions,
  SwitchNetworkModal,
} from '@totejs/walletkit';
import { metaMask, trustWallet, walletConnect } from '@totejs/walletkit/wallets';

const config = createConfig(
  getDefaultConfig({
    autoConnect: true,
    appName: 'WalletKit',

    // 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',

    chains,
    connectors: [trustWallet(), metaMask(), walletConnect()],
  }),
);

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

export default function App() {
  return (
    <WagmiConfig config={config}>
      <WalletKitProvider options={options} mode="light">
        <WalletKitButton />

        {/*
          👇 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>
    </WagmiConfig>
  );
}

Contributing

Please follow our WalletKit Contribution Guide.

License

See LICENSE for more information.

1.0.9-alpha.4

5 months ago

1.0.9-alpha.3

5 months ago

1.0.9-alpha.2

5 months ago

0.2.8-alpha.0

5 months ago

1.0.9-alpha.1

5 months ago

0.2.8-alpha.2

5 months ago

1.0.9-alpha.0

5 months ago

0.2.8-alpha.1

5 months ago

1.0.8

5 months ago

0.2.7

5 months ago

1.0.7

5 months ago

0.2.6

5 months ago

1.0.7-alpha.6

5 months ago

0.2.6-alpha.3

5 months ago

1.0.6

5 months ago

1.0.7-alpha.0

5 months ago

1.0.7-alpha.1

5 months ago

1.0.7-alpha.2

5 months ago

1.0.7-alpha.3

5 months ago

1.0.7-alpha.4

5 months ago

1.0.7-alpha.5

5 months ago

0.2.6-alpha.1

5 months ago

0.2.6-alpha.2

5 months ago

0.2.6-alpha.0

5 months ago

0.2.5

6 months ago

1.0.5

6 months ago

0.2.4

6 months ago

0.2.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

0.2.2

6 months ago

0.2.1

6 months ago

1.0.0

6 months ago

0.2.0

6 months ago

0.1.7

6 months ago

0.1.6

6 months ago

0.1.5

6 months ago

0.1.4

6 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago