async def create(self) -> '<STR_LIT>':
LOGGER.debug('<STR_LIT>')<EOL>try:<EOL><INDENT>await wallet.create_wallet(<EOL>config=json.dumps(self.cfg),<EOL>credentials=json.dumps(self.access_creds))<EOL>self._created = True<EOL>LOGGER.info('<STR_LIT>', self.name)<EOL><DEDENT>except IndyError as x_indy:<EOL><INDENT>if x_indy.error_code == ErrorCode.WalletAlreadyExistsError:<EOL><INDENT>LOGGER.info('<STR_LIT>', self.name)<EOL><DEDENT>else:<EOL><INDENT>LOGGER.debug(<EOL>'<STR_LIT>',<EOL>x_indy.error_code,<EOL>self.name)<EOL>raise<EOL><DEDENT><DEDENT>LOGGER.debug('<STR_LIT>', self.name)<EOL>self._handle = await wallet.open_wallet(<EOL>json.dumps(self.cfg),<EOL>json.dumps(self.access_creds))<EOL>LOGGER.info('<STR_LIT>', self.name, self.handle)<EOL>if self._created:<EOL><INDENT>(self._did, self._verkey) = await did.create_and_store_my_did(<EOL>self.handle,<EOL>json.dumps({'<STR_LIT>': self._seed}))<EOL>LOGGER.debug('<STR_LIT>', self.name, self.did, self.verkey)<EOL>await did.set_did_metadata(self.handle, self.did, json.dumps({'<STR_LIT>': self._seed}))<EOL><DEDENT>else:<EOL><INDENT>self._created = True<EOL>LOGGER.debug('<STR_LIT>', self.name)<EOL>self._did = await self._seed2did()<EOL>try:<EOL><INDENT>self._verkey = await did.key_for_local_did(self.handle, self.did)<EOL><DEDENT>except IndyError:<EOL><INDENT>LOGGER.debug(<EOL>'<STR_LIT>',<EOL>self.did,<EOL>self.name)<EOL>raise CorruptWallet(<EOL>'<STR_LIT>'.format(<EOL>self.did,<EOL>self.name))<EOL><DEDENT>LOGGER.info('<STR_LIT>', self.name, self.verkey, self.did)<EOL><DEDENT>await wallet.close_wallet(self.handle)<EOL>LOGGER.debug('<STR_LIT>')<EOL>return self<EOL>
Create wallet as configured and store DID, or else re-use any existing configuration.
Operation sequence create/store-DID/close does not auto-remove the wallet on close,
even if so configured.

:return: current object