shell.account

class shell.account.GetAccount(account_object_name, name=None, owner_key=None, active_key=None, verbosity=None)

Bases: core.cleos.GetAccount

Look for the account of the given name, put it into the wallet.

  • parameters:

    account_object_name: the name of the account object
    account_name: the name of the account
    owner_key_private: private owner key, if not ``None``, used for 
        adding any orphan account, when preivate keys are restored from
        a safe
    active_key_private: private active key, if not ``None``, used for 
        adding any orphan account, when preivate keys are restored from
        a safe 
    
  • return::

    account object, if account exists, None otherwise

shell.account.create_master_account(account_object_name, account_name=None, owner_key=None, active_key=None, verbosity=None)

Create account object in caller’s global namespace.

  • parameters:

    account_object_name:: the name of the account object
    account_name: the name of the account; random, if not set
    verbosity: argument to the internal logger
    

### Preconditions

Check the following conditions: * precisely one Wallet object is defined;

### Local testnet

If the local testnet is running, create an account object representing the eosio account. Put the account into the wallet. Put the account object into the global namespace of the caller, and return.

### Remote testnet

Otherwise, an outer testnet has to be defined with setup.set_nodeos_address(<url>).

### Existing account

If the account_name argument is set, check the testnet for presence of the account. If present, create the corresponding object and put the account into the wallet, and put the account object into the global namespace of the caller. and return. Otherwise start a registration procedure, described in the next paragraph.

### Registration to a remote testnet

If the account_name argument is not set or it does not address any existing account, see the previous paragraph, start a registration procedure.

  • if the account_name argument is not set, make it random
  • print registration data, namely:
    • account name
    • owner public key
    • active public key
    • owner private key
    • active private key
  • wait for the user to register the master account
  • … .
  • detect the named account on the remote testnet
  • put the account into the wallet
  • put the account object into the global namespace of the caller

### Name conflict between account objects

If the new account object is going to be added to the wallet, an error is reported. Then an offer is given to edith the mapping file in order to resolve the conflict. When the conflict is resolved, the procedure finishes successfully.

shell.account.is_wallet_defined(logger, globals=None)
shell.account.wallet_globals = None

The singleton Wallet object.