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

@bitski/wagmi-connector

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitski/wagmi-connector

Wagmi adapter for Bitski

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

Bitski Wagmi Connector

npm

Installation

npm install @bitski/wagmi-connector

Usage

Below are common examples. For more details on all configurable options, please also see the wagmi and RainbowKit docs.

Wagmi Only

import { BitskiConnector } from '@bitski/wagmi-connector';
import { createConfig } from '@wagmi/core';

wagmiConfig = createConfig({
  connectors: [
    new BitskiConnector({
      chains,
      options: {
        id: 'my-connector',
        name: 'My App Wallet',
        appId: 'my-bitski-app-id',
        bitskiOptions: {
          waas: { enabled: false },
          callbackURL: 'https://callback.url:3000',
          // For more options, see the list of ProviderOptions under the bitski package
        },
      },
    }),
    new WalletConnectConnector({
      chains,
      options: { projectId: walletConnectProjectId, showQrModal: false, metadata },
    }),
  ],
  ...defaultConfig,
});

RainbowKit + Wagmi

import { bitskiWallet } from '@bitski/wagmi-connector';
import {
  connectorsForWallets,
  RainbowKitProvider,
  Locale,
} from "@rainbow-me/rainbowkit";
import {
  injectedWallet,
  metaMaskWallet,
  coinbaseWallet,
} from "@rainbow-me/rainbowkit/wallets";
import { configureChains, createConfig, WagmiConfig } from "wagmi";
import { mainnet, polygon, optimism, arbitrum, base, zora } from "viem/chains";
import { publicProvider } from "wagmi/providers/public";

const connectors = connectorsForWallets([
  {
    groupName: "Recommended",
    wallets: [
      bitskiWallet({
        options: { appId: 'my-bitski-app-id', bitskiOptions: { network } },
        chains,
      }),
    ],
  },
  {
    groupName: "Other Wallets",
    wallets: [
      injectedWallet({ chains }),
      metaMaskWallet({ chains, projectId: "YOUR_PROJECT_ID" }),
      coinbaseWallet({ appName: "YOUR_APP_NAME", chains }),
    ],
  },
]);

const wagmiConfig = createConfig({
  autoConnect: true,
  connectors,
  publicClient,
  webSocketPublicClient,
});

function MyApp({ Component, pageProps }: AppProps) {
  const { locale } = useRouter() as { locale: Locale };
  return (
    <WagmiConfig config={wagmiConfig}>
      <RainbowKitProvider appInfo={demoAppInfo} chains={chains} locale={locale}>
        <Component {...pageProps} />
      </RainbowKitProvider>
    </WagmiConfig>
  );
}

FAQs

Package last updated on 22 Jan 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