import {
init, PhantomConnector, WalletConnectConnector,
InjectedConnector, mainnetBetaWalletConnect
} from '@walletconnect/solib'
init(() => ({
// Define available connector methodologies
connectors: [
new PhantomConnector(),
new InjectedConnector('window.solib'),
new InjectedConnector('window.solflare'),
new WalletConnectConnector({
relayerRegion: 'wss://relay.walletconnect.com',
metadata: {
description: 'Test app for solib',
name: 'Test Solib dApp',
icons: ['https://avatars.githubusercontent.com/u/37784886'],
url: 'http://localhost:3000'
},
autoconnect: true,
qrcode: true
})
],
// Set the default connector to be used (must be registered in connectors array)
connectorName: WalletConnectConnector.connectorName,
// Set the cluster and network for communication
chosenCluster: mainnetBetaWalletConnect(PROJECT_ID)
})
}, PROJECT_ID)