Skip to content

Files

Latest commit

83e9845 · Jul 19, 2022

History

History
This branch is 13075 commits behind MystenLabs/sui:main.

wallet

Sui Wallet

A chrome (v88+) extension wallet for Sui.

Set Up

Requirements: Node 14.0.0 or later.

Currently the Wallet depends on an unreleased version of sui.js, the TypeScript SDK for Sui. Therefore, you need to build the SDK first:

$ cd <Your Sui Repository>/sdk/typescript
$ yarn && yarn build

Then, in the project directory, run:

$ npm i

Note: If you are updating the SDK and Wallet at the same time, you need to run the following commands to make sure the Explorer depends on the updated SDK.

$ cd <Your Sui Repository>/sdk/typescript
$ yarn build

$ cd ../../wallet
$ rm -rf node_modules/ && npm i

Then one of the following build steps is required:

Build in watch mode (dev)

To build the extension and watch for changes run:

npm start

This will build the app in the dist/ directory, watch for changes and rebuild it. (Also runs prettier to format the files that changed.)

Build once in dev mode

To build the app once in development mode (no optimizations etc) run

npm run build:dev

The output directory is the same dist/, all build artifacts will go there

Build once in prod mode

To build the app once in production mode run

npm run build:prod

Same as above the output is dist/.

Install the extension to Chrome

After building the app, the extension needs to be installed to Chrome. Follow the steps to load an unpacked extension and install the app from the dist/ directory.

Testing

npm run test