Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@privy-io/cross-app-connect

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@privy-io/cross-app-connect

Privy cross app wallet connectors for wagmi and RainbowKit

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
330
decreased by-27.47%
Maintainers
0
Weekly downloads
 
Created
Source

@privy-io/cross-app-connect

Privy cross-app wallet connectors for wagmi and RainbowKit

Installation

npm install -S @privy-io/cross-app-connect wagmi viem @rainbow-me/rainbowkit

Usage

import {toPrivyWallet} from '@privy-io/cross-app-connect/rainbow-kit';

import {connectorsForWallets, ConnectButton} from "@rainbow-me/rainbowkit";
import {QueryClient, QueryClientProvider} from '@tanstack/react-query';
import {WagmiProvider, createConfig, http} from 'wagmi';
import {mainnet} from 'wagmi/chains';

const privyWallet = toPrivyWallet({
  id: <privy-wallet-app-id>,
  name: 'Privy wallet app',
  iconUrl: 'https://example.com/image.png',
})

const connectors = connectorsForWallets(
  [
    {
      groupName: "Privy",
      wallets: [privyWallet],
    },
  ],
  {
    appName: "Privy",
    projectId: "Example",
  }
);

export const wagmiConfig = createConfig({
  chains: [mainnet],
  transports: {
    [mainnet.id]: http(),
  },
  connectors,
  ssr: true,
});

const queryClient = new QueryClient();

export default function App({children}: {children: React.ReactNode}) {
  return (
    <WagmiProvider config={wagmiConfig}>
      <QueryClientProvider client={queryClient}>
        <RainbowKitProvider>
          <ConnectButton />
        </RainbowKitProvider>
      </QueryClientProvider>
    </WagmiProvider>
  );
}

Keywords

FAQs

Package last updated on 22 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc