@rsksmart/rlogin-walletconnect2-provider
v1.0.1
Published
rLogin - WalletConnect2 Adapter as a Provider
Downloads
565
Readme
A WalletConnect 2 provider connection for rLogin. Still in beta and tested manually for now.
Features
Allow you to connect to WalletConnect 2 by using rLogin
Implementation
Add the dependecy to your project
yarn add @rsksmart/rlogin-walletconnect2-provider
In your dapp, your rLogin implementation should be similar to this:
import RLogin from '@rsksmart/rlogin'
import { WalletConnect2Provider } from '@rsksmart/rlogin-walletconnect2-provider'
const rLogin = new RLogin({
cacheProvider: false,
providerOptions: {
walletconnect: {
package: WalletConnect2Provider,
options: {
projectId: 'PROJECTID',
chains: [30, 31],
showQrModal: true,
//methods, // OPTIONAL ethereum methods
//events, // OPTIONAL ethereum events
rpcMap: rpcUrls, // OPTIONAL rpc urls for each chain
//metadata, // OPTIONAL metadata of your app
//qrModalOptions, // OPTIONAL - `undefined` by default
}
},
},
supportedChains: [30, 31]
})
Implementation notes
Run for development
Install dependencies:
yarn
Run unit tests
TBD
Run linter
TBD
Auto-fix:
yarn run lint:fix
Build for production
yarn run build