To see a list of all commands (and usage instructions), run the following terminal command:
yarncli
In the output you will see a list of all available CLI commands and related options:
"2021-12-08, 12:07:09 p.m." - please run as "yarn cli fund --address=fraXXX --amountToFund=1 ""2021-12-08, 12:07:09 p.m." - please run as "yarn cli createWallet""2021-12-08, 12:07:09 p.m." - please run as "yarn cli restoreWallet --mnemonicString='XXX ... ... XXX'"
As you can see, at the moment there are three available commands:
fund
createWallet
runRestoreWallet
2."Fund" Command
By running yarn cli fund --address=fraXXX --amountToFund=1 you would fund an address fraXXX with the amount of 1 FRA.
Please note, the source of funding is another account (whose private key your control) and must have some funds in it. Like your own faucet.
This account would be restored from the private key, which needs to be provided in the .env file, using following format:
PKEY_LOCAL_FAUCET="XAsFsKosjY8J=XXXXXXXXXX";
So, prior to running this command, you would need to create a .env file and put the above information in there. After that, you would be able to perform a quick, one line command to send FRA to other addresses (to fund them).
2."createWallet" command
In case of a need to quickly create a new wallet, you can use yarn cli createWallet command to create a new wallet, as well as to get its mnemonic, address, private and public keys.
This information would be displayed as a command output (similar to the below):
To restore a previously created wallet, (for example to use it as a sender, or to check its private key), run yarn restoreWallet --mnemonicString='XX XXXX" and provide a valid mnemonic string.
For example, to restore the wallet created in the previous example above, run the following:
yarn restoreWallet --mnemonicString="output insect settle weather spray lava seven day rice swamp captain upgrade layer ocean century kitten feel crunch fly huge power divert amused fitness"
Here you can verify that the data from the restored wallet (its address, private and public keys) are identical to the values from the createWallet command output -- since we used the same mnemonic, which was auto-generated and used to create a new wallet.