Skip to content

This is an isolated patch package that will interop with any v0 wagmi project and allow you to add a specific Phantom connector.

Notifications You must be signed in to change notification settings

phantom/phantom-wagmi-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phantom Wagmi Connector

This small package allows you to add a dedicated, functional, connector to integrate Phantom into your wagmi ^v1 project

to install

yarn add phantom-wagmi-connector
# or
npm install phantom-wagmi-connector
# or
pnpm add phantom-wagmi-connector

Import

import { PhantomConnector } from 'phantom-wagmi-connector'

Usage

import { PhantomConnector } from 'phantom-wagmi-connector'

const connector = new PhantomConnector()

Configuration

chains (optional)

import { mainnet, polygon } from 'wagmi/chains'
import { PhantomConnector } from 'phantom-wagmi-connector'

const connector = new PhantomConnector({
  chains: [mainnet, polygon],
})

options (optional)

Options for configuring the connector.

import { PhantomConnector } from 'phantom-wagmi-connector'
 
const connector = new PhantomConnector({
  options: {
    shimDisconnect: true,
  },
})

shimDisconnect

Phantom does not support programmatic disconnect on EVM chains. This flag simulates the disconnect behavior by keeping track of connection status in storage. Defaults to true.

import { PhantomConnector } from 'phantom-wagmi-connector'
 
const connector = new PhantomConnector({
  options: {
    shimDisconnect: false,
  },
})

About

This is an isolated patch package that will interop with any v0 wagmi project and allow you to add a specific Phantom connector.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published