def claim(self, account=None, **kwargs):
if not account:<EOL><INDENT>if "<STR_LIT>" in self.blockchain.config:<EOL><INDENT>account = self.blockchain.config["<STR_LIT>"]<EOL><DEDENT><DEDENT>if not account:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>account = self.account_class(account, blockchain_instance=self.blockchain)<EOL>pubkeys = self.blockchain.wallet.getPublicKeys()<EOL>addresses = dict()<EOL>for p in pubkeys:<EOL><INDENT>if p[: len(self.blockchain.prefix)] != self.blockchain.prefix:<EOL><INDENT>continue<EOL><DEDENT>pubkey = self.publickey_class(p, prefix=self.blockchain.prefix)<EOL>addresses[<EOL>str(<EOL>self.address_class.from_pubkey(<EOL>pubkey,<EOL>compressed=False,<EOL>version=<NUM_LIT:0>,<EOL>prefix=self.blockchain.prefix,<EOL>)<EOL>)<EOL>] = pubkey<EOL>addresses[<EOL>str(<EOL>self.address_class.from_pubkey(<EOL>pubkey,<EOL>compressed=True,<EOL>version=<NUM_LIT:0>,<EOL>prefix=self.blockchain.prefix,<EOL>)<EOL>)<EOL>] = pubkey<EOL>addresses[<EOL>str(<EOL>self.address_class.from_pubkey(<EOL>pubkey,<EOL>compressed=False,<EOL>version=<NUM_LIT>,<EOL>prefix=self.blockchain.prefix,<EOL>)<EOL>)<EOL>] = pubkey<EOL>addresses[<EOL>str(<EOL>self.address_class.from_pubkey(<EOL>pubkey,<EOL>compressed=True,<EOL>version=<NUM_LIT>,<EOL>prefix=self.blockchain.prefix,<EOL>)<EOL>)<EOL>] = pubkey<EOL><DEDENT>if self["<STR_LIT>"] not in addresses.keys():<EOL><INDENT>raise MissingKeyError("<STR_LIT>".format(self["<STR_LIT>"]))<EOL><DEDENT>op = self.operations.Balance_claim(<EOL>**{<EOL>"<STR_LIT>": {"<STR_LIT>": <NUM_LIT:0>, "<STR_LIT>": "<STR_LIT>"},<EOL>"<STR_LIT>": account["<STR_LIT:id>"],<EOL>"<STR_LIT>": self["<STR_LIT:id>"],<EOL>"<STR_LIT>": addresses[self["<STR_LIT>"]],<EOL>"<STR_LIT>": self["<STR_LIT>"],<EOL>"<STR_LIT>": self.blockchain.prefix,<EOL>}<EOL>)<EOL>signers = [<EOL>account["<STR_LIT:name>"],  <EOL>addresses.get(self["<STR_LIT>"]),  <EOL>]<EOL>return self.blockchain.finalizeOp(op, signers, "<STR_LIT>", **kwargs)<EOL>
Claim a balance from the genesis block

            :param str balance_id: The identifier that identifies the balance
                to claim (1.15.x)
            :param str account: (optional) the account that owns the bet
                (defaults to ``default_account``)