A blockchain wallet browser extension for Starcoin blockchain.
-
github->Settings->Developer Settings-> Personal access tokens
-
add a token with only 2 permissions: repo and read::packages
-
npm login
with this token as password -
npm config set @onekeyhq:registry https://npm.pkg.github.com
-
more ~/.npmrc
registry=https://registry.npmjs.org/
@onekeyhq:registry=https://npm.pkg.github.com
yarn add @onekeyhq/eth-onekey-keyring
yarn setup
cp .starmaskrc.dist .starmaskrc # change the values according to your needs
yarn start
It is convenient to use yarn link @starcoin/xxx
for debugging in localhost,
but dont forget doing the following steps before next release:
yarn unlink @starcoin/xxx`
yarn add @starcoin/xxx
yarn setup:postinstall
- check the last_version_number in
app/scripts/migrations/index.js
- NEW_VERSION = last_version_number + 1
yarn generate:migration <NEW_VERSION>
to generateapp/scripts/migrations/<NEW_VERSION>.js
andapp/scripts/migrations/<NEW_VERSION>.test.js
- modify
transformState
inapp/scripts/migrations/<NEW_VERSION>.js
, add test cases inapp/scripts/migrations/<NEW_VERSION>.test.js
- add following line in
app/scripts/migrations/index.js
:
require('./<NEW_VERSION>').default,
- run
yarn start
or wait until it reloaded, then the old state will be migrated to the new state.
Tips:
if you want to debug and re-run <NEW_VERSION>.js multi times, you can add following in app/scripts/background.js
-> loadStateFromPersistence
versionedData.meta.version = <last_version_number>;
before this line:
const { TransactionController } = versionedData.data;
- For security reason, highly reommand add a new profile:
- open Chrome
- At the top right
- click Profile
- Click Add. Choose a name, photo and color scheme.
- Open Settings > Extensions.
- Check "Developer mode".
- Alternatively, use the URL chrome://extensions/ in your address bar
- At the top, click Load Unpacked Extension.
- Navigate to
dist/chrome
folder - Click Select.
- Change to your locale via chrome://settings/languages
- Restart the browser and test the plugin in your locale
- change version in
app/manifest/_base.json
yarn dist