von_anchor/wallet/wallet.py
async def create(self, seed: str) -> 'Wallet':
        """
        Create wallet as configured and store DID.

        Raise ExtantWallet if wallet already exists on current name.

        :param seed: seed
        :return: current object
        """

        LOGGER.debug('Wallet.create >>> seed: [SEED]')

        try:
            await wallet.create_wallet(
                config=json.dumps(self.config),
                credentials=json.dumps(self.access_creds or Wallet.DEFAULT_ACCESS_CREDS))
            LOGGER.info('Created wallet %s', self.name)
        except IndyError as x_indy:
            if x_indy.error_code == ErrorCode.WalletAlreadyExistsError:
                LOGGER.info('Wallet %s already exists', self.name)
                raise ExtantWallet('Wallet {} already exists'.format(self.name))
            else:
                LOGGER.debug(
                    'Wallet.create <!< indy error code %s on creation of wallet %s',
                    x_indy.error_code,
                    self.name)
                raise

        self._handle = await wallet.open_wallet(
            json.dumps(self.config),
            json.dumps(self.access_creds or Wallet.DEFAULT_ACCESS_CREDS))
        LOGGER.info('Opened wallet %s on handle %s', self.name, self.handle)

        try:
            (self._did, self.verkey) = await did.create_and_store_my_did(
                self.handle,
                json.dumps({'seed': seed}))
            LOGGER.debug('Wallet %s stored new DID %s, verkey %s from seed', self.name, self.did, self.verkey)
            await did.set_did_metadata(
                self.handle,
                self.did,
                json.dumps({
                    'anchor': True,
                    'since': int(time())
                }))
            LOGGER.info('Wallet %s set seed hash metadata for DID %s', self.name, self.did)
        finally:
            await wallet.close_wallet(self.handle)  # bypass self.close() in case auto-remove set
            self._handle = None

        LOGGER.debug('Wallet.create <<<')
        return self

        Create wallet as configured and store DID.

        Raise ExtantWallet if wallet already exists on current name.

        :param seed: seed
        :return: current object
        
Create wallet as configured and store DID.
Raise ExtantWallet if wallet already exists on current name.
Create wallet as configured and store DID . Raise ExtantWallet if wallet already exists on current name .
async def create(self, seed: str) -> 'Wallet':
        LOGGER.debug('Wallet.create >>> seed: [SEED]')
        try:
            await wallet.create_wallet(
                config=json.dumps(self.config),
                credentials=json.dumps(self.access_creds or Wallet.DEFAULT_ACCESS_CREDS))
            LOGGER.info('Created wallet %s', self.name)
        except IndyError as x_indy:
            if x_indy.error_code == ErrorCode.WalletAlreadyExistsError:
                LOGGER.info('Wallet %s already exists', self.name)
                raise ExtantWallet('Wallet {} already exists'.format(self.name))
            else:
                LOGGER.debug(
                    'Wallet.create <!< indy error code %s on creation of wallet %s',
                    x_indy.error_code,
                    self.name)
                raise
        self._handle = await wallet.open_wallet(
            json.dumps(self.config),
            json.dumps(self.access_creds or Wallet.DEFAULT_ACCESS_CREDS))
        LOGGER.info('Opened wallet %s on handle %s', self.name, self.handle)
        try:
            (self._did, self.verkey) = await did.create_and_store_my_did(
                self.handle,
                json.dumps({'seed': seed}))
            LOGGER.debug('Wallet %s stored new DID %s, verkey %s from seed', self.name, self.did, self.verkey)
            await did.set_did_metadata(
                self.handle,
                self.did,
                json.dumps({
                    'anchor': True,
                    'since': int(time())
                }))
            LOGGER.info('Wallet %s set seed hash metadata for DID %s', self.name, self.did)
        finally:
            await wallet.close_wallet(self.handle)  
            self._handle = None
        LOGGER.debug('Wallet.create <<<')
        return self
async def create ( self , seed : str ) -> 'Wallet' : LOGGER . debug ( 'Wallet.create >>> seed: [SEED]' ) try : await wallet . create_wallet ( config = json . dumps ( self . config ) , credentials = json . dumps ( self . access_creds or Wallet . DEFAULT_ACCESS_CREDS ) ) LOGGER . info ( 'Created wallet %s' , self . name ) except IndyError as x_indy : if x_indy . error_code == ErrorCode . WalletAlreadyExistsError : LOGGER . info ( 'Wallet %s already exists' , self . name ) raise ExtantWallet ( 'Wallet {} already exists' . format ( self . name ) ) else : LOGGER . debug ( 'Wallet.create <!< indy error code %s on creation of wallet %s' , x_indy . error_code , self . name ) raise self . _handle = await wallet . open_wallet ( json . dumps ( self . config ) , json . dumps ( self . access_creds or Wallet . DEFAULT_ACCESS_CREDS ) ) LOGGER . info ( 'Opened wallet %s on handle %s' , self . name , self . handle ) try : ( self . _did , self . verkey ) = await did . create_and_store_my_did ( self . handle , json . dumps ( { 'seed' : seed } ) ) LOGGER . debug ( 'Wallet %s stored new DID %s, verkey %s from seed' , self . name , self . did , self . verkey ) await did . set_did_metadata ( self . handle , self . did , json . dumps ( { 'anchor' : True , 'since' : int ( time ( ) ) } ) ) LOGGER . info ( 'Wallet %s set seed hash metadata for DID %s' , self . name , self . did ) finally : await wallet . close_wallet ( self . handle ) self . _handle = None LOGGER . debug ( 'Wallet.create <<<' ) return self
Create wallet as configured and store DID.
Create wallet as configured and store DID .
"""
        Create wallet as configured and store DID.

        Raise ExtantWallet if wallet already exists on current name.

        :param seed: seed
        :return: current object
        """ # bypass self.close() in case auto-remove set
None
self
seed
str
None