As of the writing of this tutorial cleos is the only BPC recommended way to create a new account/vote and personally my favorite way to interact with the EOS mainnet.
NOTE I assume you have followed the instructions on how to build the software. https://github.com/EOSIO/eos/wiki/Local-Environment#2-building-eosio
Setting up the wallet is pretty a straight foward process.
- Start keosd
keosd
- Create default wallet
cleos wallet create
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5KKmiBLvZSNBKwxAF3yqRw6nBzUZugoXd28mB5MPBCmTbd38aby"
- Import private keys (Suggest that you have two different keys for Owner and Active
cleos wallet import <priv key>
imported private key for: EOSxxx
Unless you love your randomly generated gibberish username from the snapshot the first thing you will want to do is create a user-friendly account name.
# the staked amount should look like "1.0025 EOS" and require 4 numbers after the decimal
cleos --url https://api.eosnewyork.io:443 system newaccount <creator_name> <new account> <owner key> <active key> --stake-net "N.NNNN EOS" --stake-cpu "N.NNNN EOS" --buy-ram-kbytes 8 --transfer
# for example
cleos --url https://api.eosnewyork.io:443 system newaccount gibberish111 readablename EOSOwnerKey EOSActiveKey --stake-net "1.0000 EOS" --stake-cpu "1.0000 EOS" --buy-ram-kbytes 8 --transfer
Now after you created your brand spanking new account you might as well vote with it.
cleos --url https://api.eosnewyork.io:443 system voteproducer prods readablename producer1 producer2 producer 3
Now if for some reason you feel your Owner or Active key has been compromised you will need to reset the keys by doing the following commands.
# first add the keys to your wallet
cleos --url https://api.eosnewyork.io:443 wallet import <priv key>
# reset the active key
cleos --url https://api.eosnewyork.io:443 set account permission <account name> active <public key> owner
# reset the owner key
cleos --url https://api.eosnewyork.io:443 set account permission <account name> owner <public key> -p <account name>@owner