1.1.46 • Published 9 months ago

@kryptogo/kryptogokit-sdk-react v1.1.46

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

KryptogoKit

The KryptogoKit SDK is a library that allows you to integrate Web3 wallets into your React application.

Manual setup

npm install @kryptogo/kryptogokit-sdk-react wagmi viem@2.x @tanstack/react-query
# or
pnpm add @kryptogo/kryptogokit-sdk-react wagmi viem@2.x @tanstack/react-query

Basic import

Import KryptogoKit, Wagmi and TanStack Query.

import { createClient, http } from 'viem';
import { WagmiProvider, createConfig } from 'wagmi';
// Import chains
import { mainnet, arbitrum, polygon, bsc } from 'wagmi/chains';

// Import kryptogokit
import {
  KryptogoKitProvider,
  ConnectButton,
  connectorsForWallets,
  kryptogoConnector,
} from '@kryptogo/kryptogokit-sdk-react';
// Import styles
import '@kryptogo/kryptogokit-sdk-react/styles.css';
// Import wallets
import { walletConnectWallet, binanceWallet, okxWallet, kryptogoWallet } from '@kryptogo/kryptogokit-sdk-react/wallets';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

Configure providers

const queryClient = new QueryClient();

// Configure your clientId
const clientId = '9c5a79fc1117310f976b53752659b61d';

// Configure connectors
const connectors = connectorsForWallets(
  [
    {
      groupName: 'Recommended',
      wallets: [walletConnectWallet, coinbaseWallet, rainbowWallet, okxWallet, kryptogoWallet],
    },
    {
      groupName: 'More',
      wallets: [bitgetWallet, binanceWallet, subWallet, argentWallet],
    },
  ],
  {
    appName: 'KryptogoKit Demo',
    projectId: 'YOUR_PROJECT_ID', // The projectId is required for walletConnect setup
  },
);

// Create Kryptogo connector (for social logins)
const KryptogoConnector = kryptogoConnector();

const config = createConfig({
  connectors: [...connectors, KryptogoConnector],
  chains: [mainnet, arbitrum, polygon, bsc],
  client({ chain }) {
    return createClient({ chain, transport: http() });
  },
});

return (
    <WagmiProvider config={config}>
      <QueryClientProvider client={queryClient}>
        <KryptogoKitProvider clientId={clientId}>
          <ConnectButton />
          {/* Your Dapp here */}
        </KryptogoKitProvider>
      </QueryClientProvider>
    </WagmiProvider>
  );
1.1.29

10 months ago

1.1.28

10 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.1.70

8 months ago

1.1.74

8 months ago

1.1.30

10 months ago

1.1.73

8 months ago

1.1.72

8 months ago

1.1.71

8 months ago

1.1.78

7 months ago

1.1.34

10 months ago

1.1.77

7 months ago

1.1.33

10 months ago

1.1.76

7 months ago

1.1.32

10 months ago

1.1.75

8 months ago

1.1.31

10 months ago

1.1.38

9 months ago

1.1.37

9 months ago

1.1.36

9 months ago

1.1.79

7 months ago

1.1.35

10 months ago

1.1.39

9 months ago

1.1.80

7 months ago

1.1.41

9 months ago

1.1.40

9 months ago

1.1.45

9 months ago

1.1.44

9 months ago

1.1.43

9 months ago

1.1.42

9 months ago

1.1.49

9 months ago

1.1.48

9 months ago

1.1.47

9 months ago

1.1.46

9 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.9

12 months ago

1.1.8

12 months ago

1.1.7

12 months ago

1.1.6

12 months ago

1.1.5

12 months ago

1.1.4

12 months ago

1.1.3

12 months ago

1.1.2

1 year ago

1.1.52

9 months ago

1.1.51

9 months ago

1.1.50

9 months ago

1.1.56

9 months ago

1.1.12

12 months ago

1.1.55

9 months ago

1.1.11

12 months ago

1.1.54

9 months ago

1.1.10

12 months ago

1.1.53

9 months ago

1.1.16

12 months ago

1.1.59

9 months ago

1.1.15

12 months ago

1.1.58

9 months ago

1.1.14

12 months ago

1.1.57

9 months ago

1.1.13

12 months ago

1.1.19

12 months ago

1.1.18

12 months ago

1.1.17

12 months ago

1.1.63

9 months ago

1.1.62

9 months ago

1.1.61

9 months ago

1.1.60

9 months ago

1.1.67

8 months ago

1.1.23

11 months ago

1.1.66

8 months ago

1.1.22

11 months ago

1.1.65

9 months ago

1.1.21

11 months ago

1.1.64

9 months ago

1.1.20

12 months ago

1.1.27

11 months ago

1.1.26

11 months ago

1.1.69

8 months ago

1.1.25

11 months ago

1.1.68

8 months ago

1.1.24

11 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago