Skip to content

Latest commit

 

History

History

wallet

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A note on Security

DISCLAIMER: This code is provided for demonstration purposes only. The Sui Wallet has not been thoroughly tested, verified, or audited. There are known security issues with the current implementation of the Sui Wallet. Currently, the wallet is not password protected, and the mnemonic is not encrypted in storage. Please do not use the code or derivatives in production without proper diligence.

Sui Wallet

A Chrome extension wallet for Sui.

Set Up

Requirements: Node 14.0.0 or later.

Dependencies are managed using pnpm. You can start by installing dependencies in the root of the Sui repository:

$ pnpm install

All pnpm commands are intended to be run in the root of the Sui repo. You can also run them within the apps/wallet directory, and remove change pnpm wallet to just pnpm when running commands.

Build in watch mode (dev)

To build the extension and watch for changes run:

pnpm wallet 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.)

Environment Variables

You can config default network and RPC endpoints by copying configs/environment/.env.defaults and rename it to configs/environment/.env.

For example, to change the default network from DevNet to Local Network, you can change API_ENV=devNet to API_ENV=local.

Build once in dev mode

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

pnpm wallet 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

pnpm wallet 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

pnpm wallet test