0.0.20 • Published 3 years ago

@makerdao/dai-plugin-walletconnect v0.0.20

Weekly downloads
79
License
MIT
Repository
-
Last release
3 years ago

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' }
  }
});

// this will not resolve until the account is set up
await maker.authenticate();

// or you can defer setting the account up until later
await maker.addAccount('myWalletConnect2', { type: 'walletconnect' });

Using the optional address callback

await maker.addAccount('myWalletConnect', {
  type: 'walletconnect',
  callback: address => {
    //e.g. for analytics
    console.log('My WalletConnect address', address);
  }
});
0.0.20

3 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago