Setting MASQ Wallets

Initial Set-Up

MASQ Node is configured to have wallets stored, sensitive information encrypted in the node-data.db database file and remain unmodified so the Node user can satisfy all debts and earnings from routing traffic in and out across the network.
There are two Node commands available to load wallets into MASQ Node:
You won't be able to use the generate-wallets or recover-wallets commands if the database already has wallet information, or if the database doesn't have a password set (seedb-password)

Derivation Paths:

Derivation paths are a specific format for ERC20 and Ethereum based tokens.
Make sure you use the correct format, and put in quotation marks "" in commands
FORMAT - m/44'/60'/0'/0/0
e.g. "m/44'/60'/0'/0/1"

generate-wallets

This command will generate and return an earning and consuming wallet using BIP39 mnemonic cryptography securely within the Node software. If you want to reference the wallet derivations and algorithms go to Ian Coleman's BIP39 Mnemomic Code Converter page - its a great resource!
BIP39 - Mnemonic Code
You shouldn't be able to supply any erroneous information (for example, requesting a 10-word phrase, or supplying an invalid derivation path like 'booga'). If you supply the same derivation path for both consuming and earning wallets, you should get the same address back for both of them.

generate-wallets -h HELP Output

1
Generate a pair of wallets (consuming and earning) for the Node if they haven't been generated already
2
3
USAGE:
4
generate-wallets [OPTIONS] --db-password <DB-PASSWORD>
5
6
FLAGS:
7
-h, --help Prints help information
8
-V, --version Prints version information
9
10
OPTIONS:
11
--consuming-path <CONSUMING-PATH> Derivation path from which to generate the consuming wallet from which your
12
bills will be paid. Remember to put it in double quotes; otherwise the
13
single quotes will cause problems [default: m/44'/60'/0'/0/0]
14
--db-password <DB-PASSWORD> The current database password (a password must be set to use this command)
15
--earning-path <EARNING-PATH> Derivation path from which to generate the earning wallet from which your
16
bills will be paid. Can be the same as consuming-path. Remember to put it
17
in double quotes; otherwise the single quotes will cause problems [default:
18
m/44'/60'/0'/0/1]
19
--language <LANGUAGE> The language in which the wallets' mnemonic phrase should be generated
20
[default: English] [possible values: English, Chinese, Traditional
21
Chinese, French, Italian, Japanese, Korean, Spanish]
22
--passphrase <PASSPHRASE> An optional additional word(it can be any word) that the wallet-recovery
23
process should require at the end of the mnemonic phrase
24
--word-count <WORD-COUNT> The number of words that should be generated for the wallets' mnemonic
25
phrase [default: 24] [possible values: 12, 15, 18, 21, 24]
Copied!

recover-wallets

The recover-wallets command will load any existing wallets you may have already set up, deriving it from the mnemonic phrase seed words provided and specific derivation paths for the earning and consuming wallets
In masq, type recover-wallets and press Enter to see the help message that describes how it should be used.
The format for the command is:
1
recover-wallets [OPTIONS] --consuming-path <CONSUMING-PATH> --db-password <DB-PASSWORD> --mnemonic-phrase <MNEMONIC-PHRASE> <--earning-path <EARNING-PATH>|--earning-address <EARNING-ADDRESS>>
Copied!
--mnemonic-phrase - Can be right, or missing, or have an unacceptable number of words, or contain words that aren't among the 2048 that are valid for the selected language. Remember to put it in double quotes; otherwise the single quotes will cause problems
--earning-address - Can be specified, or absent, or invalid--that is, not 0x followed by 40 hexadecimal digits.
Also: you should be forced to specify exactly one of --earning-path and --earning-address. Specifying neither of them should be an error, and specifying both of them should also be.

recover-wallets -h HELP Output

1
Recover a pair of wallets (consuming and earning) for the Node if they haven't been recovered already
2
3
USAGE:
4
recover-wallets [OPTIONS] --consuming-path <CONSUMING-PATH> --db-password <DB-PASSWORD> --mnemonic-phrase <MNEMONIC-PHRASE> <--earning-path <EARNING-PATH>|--earning-address <EARNING-ADDRESS>>
5
6
FLAGS:
7
-h, --help Prints help information
8
-V, --version Prints version information
9
10
OPTIONS:
11
--consuming-path <CONSUMING-PATH> Derivation path from which to generate the consuming wallet from which
12
your bills will be paid. Remember to put it in double quotes; otherwise
13
the single quotes will cause problems
14
--db-password <DB-PASSWORD> The current database password (a password must be set to use this
15
command)
16
--earning-address <EARNING-ADDRESS> Address of earning wallet. Supply this instead of --earning-path if the
17
earning wallet is not derived from the mnemonic phrase
18
--earning-path <EARNING-PATH> Derivation path from which to generate the earning wallet from which your
19
bills will be paid. Can be the same as consuming-path. Remember to put it
20
in double quotes; otherwise the single quotes will cause problems
21
--language <LANGUAGE> The language in which the wallets' mnemonic phrase should be generated
22
[default: English] [possible values: English, Chinese, Traditional
23
Chinese, French, Italian, Japanese, Korean, Spanish]
24
--mnemonic-phrase <MNEMONIC-PHRASE> The mnemonic phrase upon which the consuming wallet (and possibly the
25
earning wallet) is based. Surround with double quotes.
26
--passphrase <PASSPHRASE> An additional word--any word--to place at the end of the mnemonic phrase
27
to recover the wallet pair
Copied!
In case it matters, command validation happens in masq, and only if the command is valid does it get sent to the Node, where parameter validation happens. What this means, for example, is that if you specify an invalid --consuming-path and no --mnemonic-phrase, the error you receive will be from masq, complaining of a missing required parameter: masq has no idea what a valid derivation path is. In order to get that error, the command will need to be correct enough to make masq accept it and send it on to the Node.

Configuring Individual Wallets Manually in Command-Line

You will need your earning wallet address, and the exported private key of the consuming wallet (remember these can be from the same wallet, used for both earning consuming)
    1.
    Open second CLI window and again navigate to the bin folder, then use the masq setupcommand
Windows
Linux
mac
masq setup --earning-wallet <wallet-address>
masq setup --consuming-private-key <private key without the '0x' at front>
./masq setup --earning-wallet <wallet-address>
./masq setup --consuming-private-key <private key without the '0x' at front>
masq setup --earning-wallet <wallet-address>
masq setup --consuming-private-key <private key without the '0x' at front>
Both the wallets should now show as "SET" in the masq setup output screen - example below:
1
NAME VALUE STATUS
2
blockchain-service-url Required
3
chain mainnet Default
4
clandestine-port Required
5
config-file config.toml Default
6
consuming-private-key **************************************************************** Set
7
data-directory C:\Users\xxxxx\AppData\Local\MASQ\mainnet Default
8
db-password **************** Required
9
dns-servers 1.1.1.1 Default
10
earning-wallet 0x47fb8671db83008d382c2e6ea67fa377378c0c13 Set
11
gas-price 1 Default
12
ip Required
13
log-level warn Default
14
neighborhood-mode standard Default
15
neighbors Blank
16
17
ERRORS:
18
neighborhood-mode Node cannot run as --neighborhood-mode standard without --ip specified
19
20
21
C:\Users\xxxxx\Desktop\Node\bin>
Copied!
Last modified 15d ago