Wallet Connect
Module for connecting wallets under Wallet Connect to web3-onboard

@web3-onboard/walletconnect

Install

npm i @web3-onboard/walletconnect

Options

1
type WalletConnectOptions = {
2
bridge?: string // default = 'https://bridge.walletconnect.org'
3
qrcodeModalOptions?: {
4
mobileLinks: string[] // set the order and list of mobile linking wallets
5
}
6
}
Copied!

Usage

1
import Onboard from '@web3-onboard/core'
2
import walletConnectModule from '@web3-onboard/walletconnect'
3
4
// initialize the module with options
5
const walletConnect = walletConnectModule({
6
bridge: 'YOUR_CUSTOM_BRIDGE_SERVER',
7
qrcodeModalOptions: {
8
mobileLinks: ['rainbow', 'metamask', 'argent', 'trust', 'imtoken', 'pillar']
9
}
10
})
11
12
// can also initialize with no options...
13
// const walletConnect = walletConnectModule()
14
15
const onboard = Onboard({
16
// ... other Onboard options
17
wallets: [
18
walletConnect
19
//... other wallets
20
]
21
})
22
23
const connectedWallets = await onboard.connectWallet()
24
console.log(connectedWallets)
Copied!