2

When I want to create a wallet in EOS, I get this error:

$ cleos wallet list
Wallets
[]
$ cleos wallet create
Either indicate a file using "--file" or pass "--to-console"

enter image description here

2
  • 1
    Hi @Damian, It's better to copy and paste from your terminal than to post images of code/terminal. Image links may not be maintained, often are difficult to read & don't allow for text selection.
    – Don
    Commented Sep 13, 2018 at 16:03
  • If the any of the answers below solved your issue, please mark it as accepted. Thanks!
    – Don
    Commented Oct 15, 2018 at 21:57

2 Answers 2

2

Either indicate a file using "--file" or pass "--to-console"

You need to specify the location to write password output to:

$ cleos wallet create --to-console

$ cleos wallet create -n <wallet-name> --to-console

See the dev documentation:

Options

-n, --name TEXT - The name of the new wallet -f, --file TEXT - Name of file to write wallet password output to. (Must be set, unless "--to-console" is passed --to-console - Print password to console

Usage

Shell

$ ./cleos wallet create --to-console

$ ./cleos wallet create -n second-wallet --to-console

$ ./cleos wallet create --name my-new-wallet --file my-new-wallet.txt

$ ./cleos wallet create --to-console

$ ./cleos wallet create -n second-wallet --to-console

$ ./cleos wallet create --name my-new-wallet --file my-new-wallet.txt

1

Basically, you just need to use one between the following commands, in your command line:

  cleos wallet create --to-console

  cleos wallet create --file test.txt
  1. to print the password of your wallet to the console;
  2. to save the password of your wallet in a specific file.

Please, note that running this command, you create an empty waller, and you need to keep note of the “PASSWORD” provided, to access the wallet in the future.

Moreover, I use to specify also the name - that is 12 char long - of the wallet with the option -n:

cleos wallet create -n randaccountx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.