Skip to main content


Connectors are what Solib uses to communicate with all the different wallets it supports.

Current Connectors


WalletConnectConnector is used to communicate with the plethora of wallets that support WalletConnect like Spot, Math Wallet and many others.


new WalletConnectConnector({
relayerRegion: 'wss://', // which relay to use
metadata: {
description: 'Test app for solib',
name: 'Test Solib dApp',
icons: [''],
url: 'http://localhost:3000'
// Should the connector automatically connect if a pairing was made before
autoconnect: true,
// Should WalletConnectConnector automatically display a qrcode modal for the user
qrcode: true


InjectedConnector is used to support wallets that are used as browser extensions. Eg: solflare or phantom.


To create an InjectedConnector, simply give it a path. The most common path is window.solana, but there are other wallets with their own path like window.solflare.

import { InjectedConnector }  from '@walletconnect/solib'

new InjectedConnector('window.solana');

Phantom Connector

Phantom Connector is simply an InjectedConnector with Phantom's provider's path preloaded for convenience.


new PhantomConnector()