Return the :class:`~eth.db.account.BaseAccountDB` class that the
        state class uses.
179803
def get_account_db_class(cls) -> Type[BaseAccountDB]:
        
        if cls.account_db_class is None:
            raise AttributeError("No account_db_class set for {0}".format(cls.__name__))
        return cls.account_db_class
1009256
def rpc_get_account_record(self, address, token_type, **con_info):
        
        if not check_account_address(address):
            return {'error': 'Invalid address', 'http_status': 400}

        if not check_token_type(token_type):
            return {'error': 'Invalid token type', 'http_status': 400}

        # must be b58
        if is_c32_address(address):
            address = c32ToB58(address)

        db = get_db_state(self.working_dir)
        account = db.get_account(address, token_type)
        db.close()

        if account is None:
            return {'error': 'No such account', 'http_status': 404}

        state = self.export_account_state(account)
        return self.success_response({'account': state})
1008772
def GET_account_record(self, path_info, account_addr, token_type):
        
        if not check_account_address(account_addr):
            return self._reply_json({'error': 'Invalid address'}, status_code=400)

        if not check_token_type(token_type):
            return self._reply_json({'error': 'Invalid token type'}, status_code=400)

        blockstackd_url = get_blockstackd_url()
        res = blockstackd_client.get_account_record(account_addr, token_type, hostport=blockstackd_url)
        if json_is_error(res):
            log.error("Failed to get account state for {} {}: {}".format(account_addr, token_type, res['error']))
            return self._reply_json({'error': 'Failed to get account record for {} {}: {}'.format(token_type, account_addr, res['error'])}, status_code=res.get('http_status', 500))

        self._reply_json(res)
        return
121879
def get(account):
        
        account = Account.get(account)
        if not account:
            return None

        acct_type = AccountType.get(account.account_type_id).account_type
        account_class = get_plugin_by_name(PLUGIN_NAMESPACES['accounts'], acct_type)

        return account_class(account)
400299
def accounts(self):
        
        d = {}

        if False and not self._account_password:
            from ambry.dbexceptions import ConfigurationError
            raise ConfigurationError(
                "Can't access accounts without setting an account password"
                " either in the accounts.password config, or in the AMBRY_ACCOUNT_PASSWORD"
                " env var.")

        for act in self.database.session.query(Account).all():
            if self._account_password:
                act.secret_password = self._account_password
            e = act.dict
            a_id = e['account_id']
            d[a_id] = e

        return d
656404
private BasicDBObject identifyFieldsToRetrieve(Class<T> entityClass, String viewOfClassName) {
        if (viewOfClassName == null) {
            return null;     // Null is equivalent to retrieving all fields
        }

        BasicDBObject fields = new BasicDBObject();

        try {
            determineFieldsToRetrieve(entityClass, Class.forName(viewOfClassName), "", fields);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }

        if (optimisticLockEnabled) {
            fields.put(OPTIMISTIC_LOCK_VERSION_FIELD, 1);
        }
        
        if (accessControlContextProvider != null) {
            fields.put(ACCESS_CONTROL_FIELD, 1);
        }
        
        if (fields.containsField("id")) {
            fields.remove("id"); // Included by default, no need to specify
        } else {
            fields.put(ID_FIELD, 0); // Need to explicitly exclude it
        }

        return fields;
    }
84729
def using_db(self, _db: BaseDBAsyncClient) -> "QuerySet":
        
        queryset = self._clone()
        queryset._db = _db
        return queryset
446091
def from_genesis(cls,
                     base_db: BaseAtomicDB,
                     genesis_params: Dict[str, HeaderParams],
                     genesis_state: AccountState=None) -> 'BaseChain':
        
        genesis_vm_class = cls.get_vm_class_for_block_number(BlockNumber(0))

        pre_genesis_header = BlockHeader(difficulty=0, block_number=-1, gas_limit=0)
        state = genesis_vm_class.build_state(base_db, pre_genesis_header)

        if genesis_state is None:
            genesis_state = {}

        # mutation
        apply_state_dict(state, genesis_state)
        state.persist()

        if 'state_root' not in genesis_params:
            # If the genesis state_root was not specified, use the value
            # computed from the initialized state database.
            genesis_params = assoc(genesis_params, 'state_root', state.state_root)
        elif genesis_params['state_root'] != state.state_root:
            # If the genesis state_root was specified, validate that it matches
            # the computed state from the initialized state database.
            raise ValidationError(
                "The provided genesis state root does not match the computed "
                "genesis state root.  Got {0}.  Expected {1}".format(
                    state.state_root,
                    genesis_params['state_root'],
                )
            )

        genesis_header = BlockHeader(**genesis_params)
        return cls.from_genesis_header(base_db, genesis_header)
445088
def Account(self):
		

		return(clc.v2.Account(alias=self.alias,session=self.session))
322730
def Clone(self):
        
        return AccountState(self.ScriptHash, self.IsFrozen, self.Votes, self.Balances)
169790
def _db(self):
        
        if not hasattr(self, "_db_client") or getattr(self, "_db_client") is None:
            self._db_client = get_db_client()
        return self._db_client
914640
def asset_class(self) -> str:
        
        result = self.parent.name if self.parent else ""
        # Iterate to the top asset class and add names.
        cursor = self.parent
        while cursor:
            result = cursor.name + ":" + result
            cursor = cursor.parent
        return result
528781
def resolve_class(operation):
        """"""

        create_txn_class = Transaction.type_registry.get(Transaction.CREATE)
        return Transaction.type_registry.get(operation, create_txn_class)
842728
public function getBaseClass()
    {
        if ($this->isAlias() && null === $this->baseClass) {
            return $this->alias;
        }

        if (null === $this->baseClass) {
            return $this->database->getBaseClass();
        }

        return $this->baseClass;
    }
746076
public function getBaseClass()
    {
        // Use explicit base class
        if ($this->baseClass) {
            return $this->baseClass;
        }
        // Default to the basename of the record
        $schema = DataObject::getSchema();
        if ($this->record) {
            return $schema->baseDataClass($this->record);
        }
        // During dev/build only the table is assigned
        $tableClass = $schema->tableClass($this->getTable());
        if ($tableClass && ($baseClass = $schema->baseDataClass($tableClass))) {
            return $baseClass;
        }
        // Fallback to global default
        return DataObject::class;
    }
235829
def storage_class(self):
        
        if not hasattr(self, '_storage_class'):
            self._storage_class = conf.lib.clang_Cursor_getStorageClass(self)

        return StorageClass.from_id(self._storage_class)
35291
public AccountService getAccountService() {
        if (_accountService == null) {
            synchronized (CCApi2.class) {
                if (_accountService == null) {
                    _accountService = _retrofit.create(AccountService.class);
                }
            }
        }

        return _accountService;
    }