dai-plugin-walletconnect
A Dai.js plugin for using WalletConnect in a browser environment.
Example usage
import WalletConnect from '@makerdao/dai-plugin-walletconnect';
import Maker from '@makerdao/dai';
const maker = await Maker.create('http', {
plugins: [WalletConnect],
accounts: {
myWalletConnect1: { type: 'walletconnect' }
}
});
await maker.authenticate();
await maker.addAccount('myWalletConnect2', { type: 'walletconnect' });
Using the optional address callback
await maker.addAccount('myWalletConnect', {
type: 'walletconnect',
callback: address => {
console.log('My WalletConnect address', address);
}
});