pactus-project / pactus-gui

Pactus Client (Flutter)
7 stars 5 forks source link

Initializing the node wizard #1

Closed b00f closed 8 months ago

b00f commented 1 year ago

Initializing the node wizard

The initializing wizard helps users to initialize the node. The initialize wizard has these pages:

Initialize Mode page

User decides what he wants to:

It's better to add some icons for these options like Monero.

Current GUI:

Screenshot

Monero:

Screenshot

Create a wallet page

In this page, a mnemonic seed will be generated for the user. To generate the mnemonic seed use this package. More info about BIP-39 can be found here

Current GUI:

Screenshot

Confirm seed page

In this page the user confirms the seed by retyping it again. The paste function should be disabled here and the user has to type the mnemonic seed again manually.

Current GUI:

Screenshot

Password page

In this page user can enter a password for the wallet. The password can be empty.

Current GUI:

Screenshot

Monero:

Screenshot

Summary page

Before the summary page, we should call pactus-daemon with init sub-command and initialize the folder. If any error happens, we need to show it to the user, otherwise in the summary page we show the location of the working directory.

Current GUI:

Screenshot from 2022-11-07 19-55-04

Monero:

Screenshot

Restore wallet page

If the user chose to restore the wallet, we ask him to enter the monotonic seed again.

Monero:

Screenshot

Questions:

How to let the user change the working directory?

Right now, the default location of the working directory is in the home_dir/pactus folder. We have two options to let user to change the location of working directory:

  1. Using command line argument:

The current GUI (and bitcoin-qt) uses this approach. If a user wants to use another location, he can run the GUI with an extra argument. like: pactus-gui.exe -working-dir=C:\another-folder

  1. Adding location option in Create wallet page:

In this approach users can choose another folder for the working directory in the wizard. There is a side effect here: we need to save this location somewhere as a global config (It's different per OS)

Let's choose the first approach for now. but we can change it in the future.

How to show the Validator and Reward address in Summary pages?

The current GUI shows the validator and reward addresses in the summary page. To show these addresses in the new GUI, we need to get these addresses from the wallet:

pactus-wallet.exe address all
b00f commented 1 year ago

More screenshots from monero: Screenshot from 2023-04-26 17-24-01 Screenshot from 2023-04-26 17-24-05