This repo provides a boilerplate for building a new plugin for the Burner Wallet 2.
- Clone the repo
- Run
yarn install. This repo uses Lerna and Yarn Workspaces, soyarn installwill install all dependencies and link modules in the repo - To connect to mainnet & most testnets, you'll need to provide an Infura key. Create a file
named
.envin thebasic-walletfolder and set the contents toREACT_APP_INFURA_KEY=<your key from infura.com> - Run
yarn start-localto start the wallet while connected to Ganache, or runyarn start-basicto start the wallet connected to Mainnet & xDai
To rename the plugin from "MyPlugin" to your own plugin name, you must update the following locations:
- Rename the
my-plugindirectory - Change
my-plugininlerna.jsonand the rootpackage.json - Change the name field in
package.jsonin your plugin'spackage.jsonfile - Rename
MyPlugin.ts - Change
MyPlugin.jsandMyPlugin.d.tsin the pluginpackage.jsonfile - Change the class name in the main plugin file
- Change rename
my-plugindependency inbasic-wallet/package.json&local-wallet/package.json - In
basic-wallet/src/index.tsxandlocal-wallet/src/index.tsx, update the importimport MyPlugin from 'my-plugin';as well as thenew MyPlugin()constructor. - Finally, run
yarn installin the root to re-link the packages