3

If I want to list all accounts, how is that done? (not for a key but to see what accounts actually exist).

I know

cleos get accounts

can be used for a particular key. But I am trying to find out on my new install what accounts exist. How do I create the first account I guess is the problem? Because the

cleos create account

needs an account to start with.

2

I don't think there's any built-in command to list all existing accounts. On mainnet, EOSNewYork maintains a daily updated snapshot of all existing accounts here, but that is done by querying the ledger periodically.

The first account on a single node testnet is the one you pass to nodeos with the flag --producer-name e.g. $ nodeos --producer-name eosio --enable-stale-production has the account eosio producing blocks by default. I don't believe there's any automatic way to keep track of the accounts created afterwards--you'd have to inspect the entire ledger.

In your example, you'd use

$ cleos create account eosio <new-account-name> <pub-key-for-owner> <pub-key-for-active>
3
  • I get this - cleos create account eosio trevoro1 EOS7oVsWPXFXYrxZARSf5qZ5ApSYwX882VpFdqESWap4ecxiUH7Jc EOS7oVsWPXFXYrxZARSf5qZ5ApSYwX882VpFdqESWap4ecxiUH7Jc Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations Ensure that you have the related private keys inside your wallet and your wallet is unlocked Any idea what could be reason. The public key is correct as in the wallet. – Trevor Lee Oakley Aug 9 '18 at 8:41
  • did you import the private key of eosio from config.ini in your wallet? is the key from cleos get account eosio in cleos wallet keys output? – confused00 Aug 9 '18 at 8:50
  • You must be a genius. This appeared to work - cleos create account eosio trevoro1 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV executed transaction: eb5690fb9add0ca6bf563a88ac867a638e362cbb2ad2967f045bfe47ded587b8 200 bytes 440 us # eosio <= eosio::newaccount {"creator":"eosio","name":"trevoro1","owner":{"threshold":1,"keys":[{"key":"EOS6MRyAjQq8ud7hVNYcfnVP... warning: transaction executed locally, but may not be confirmed by the network yet ] – Trevor Lee Oakley Aug 9 '18 at 9:04
1

This was answered already by confused00 but to augment his answer for anyone else -

# (DEPRECATED - Use signature-provider instead) Tuple of [public key, WIF private key] (may specify multiple times) (eosio::produ
cer_plugin)
# private-key =

# Key=Value pairs in the form =
# Where:
#           is a string form of a vaild EOSIO public key
#
#        is a string in the form :
#
#        is KEY, or KEOSD
#
#    KEY:         is a string form of a valid EOSIO private key which maps to the provided public key
#
#    KEOSD:       is the URL where keosd is available and the approptiate wallet(s) are unlocked (eosio::producer_plugin)
signature-provider = EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD
3

You need the keys specified under signature-provider in config.ini then use then as he stated in his answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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