0.2.12 • Published 1 year ago

@privy-io/wagmi v0.2.12

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

@privy-io/wagmi

wagmi bindings for the @privy-io/react-auth library.

Installation

npm install -S @privy-io/wagmi

Setup

Configuration

import {http} from 'wagmi';
import {mainnet} from 'wagmi/chains';

import {createConfig} from '@privy-io/wagmi';

export const config = createConfig({
  chains: [mainnet],
  transports: {
    [mainnet.id]: http(),
  },
});

declare module 'wagmi' {
  interface Register {
    config: typeof config;
  }
}

Providers

import {QueryClient, QueryClientProvider} from '@tanstack/react-query';
import {type ReactNode} from 'react';

import {PrivyProvider} from '@privy-io/react-auth';
import {WagmiProvider} from '@privy-io/wagmi';

import config from './config';

const queryClient = new QueryClient();

export const Providers = ({children}: {children: ReactNode}) => (
  <PrivyProvider appId="<your-app-id">
    <QueryClientProvider client={queryClient}>
      <WagmiProvider config={config}>{children}</WagmiProvider>
    </QueryClientProvider>
  </PrivyProvider>
);

Usage

Use wagmi as you normally would!

Changelog

Our changelog contains the latest information about new releases, including features, fixes, and upcoming changes.

We use Semantic Versioning to track changes.

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.7

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.2

1 year ago