von_anchor/anchor/rrbuilder.py
async def _create_rev_reg(self, rr_id: str, rr_size: int = None) -> None:
        """
        Create revocation registry artifacts and new tails file (with association to
        corresponding revocation registry identifier via symbolic link name)
        for input revocation registry identifier. Symbolic link presence signals completion.
        If revocation registry builder operates in a process external to its Issuer's,
        target directory is hopper directory.

        Raise WalletState for closed wallet.

        :param rr_id: revocation registry identifier
        :param rr_size: revocation registry size (defaults to 64)
        """

        LOGGER.debug('RevRegBuilder._create_rev_reg >>> rr_id: %s, rr_size: %s', rr_id, rr_size)

        if not self.wallet.handle:
            LOGGER.debug('RevRegBuilder._create_rev_reg <!< Wallet %s is closed', self.wallet.name)
            raise WalletState('Wallet {} is closed'.format(self.wallet.name))

        if not ok_rev_reg_id(rr_id):
            LOGGER.debug('RevRegBuilder._create_rev_reg <!< Bad rev reg id %s', rr_id)
            raise BadIdentifier('Bad rev reg id {}'.format(rr_id))

        rr_size = rr_size or 64

        (cd_id, tag) = rev_reg_id2cred_def_id_tag(rr_id)

        dir_tails = self.dir_tails_top(rr_id)
        dir_target = self.dir_tails_target(rr_id)
        if self._rrbx:
            try:
                makedirs(dir_target, exist_ok=False)
            except FileExistsError:
                LOGGER.warning(
                    'RevRegBuilder._create_rev_reg found dir %s, but task not in progress: rebuilding rev reg %s',
                    dir_target,
                    rr_id)
                rmtree(dir_target)
                makedirs(dir_target, exist_ok=False)

        LOGGER.info('Creating revocation registry (capacity %s) for rev reg id %s', rr_size, rr_id)
        tails_writer_handle = await blob_storage.open_writer(
            'default',
            json.dumps({
                'base_dir': dir_target,
                'uri_pattern': ''
            }))

        (created_rr_id, rr_def_json, rr_ent_json) = await anoncreds.issuer_create_and_store_revoc_reg(
            self.wallet.handle,
            self.did,
            'CL_ACCUM',
            tag,
            cd_id,
            json.dumps({
                'max_cred_num': rr_size,
                'issuance_type': 'ISSUANCE_BY_DEFAULT'
            }),
            tails_writer_handle)

        tails_hash = basename(Tails.unlinked(dir_target).pop())
        with open(join(dir_target, 'rr_def.json'), 'w') as rr_def_fh:
            print(rr_def_json, file=rr_def_fh)
        with open(join(dir_target, 'rr_ent.json'), 'w') as rr_ent_fh:
            print(rr_ent_json, file=rr_ent_fh)
        Tails.associate(dir_tails, created_rr_id, tails_hash)  # associate last: symlink signals completion

        LOGGER.debug('RevRegBuilder._create_rev_reg <<<')

        Create revocation registry artifacts and new tails file (with association to
        corresponding revocation registry identifier via symbolic link name)
        for input revocation registry identifier. Symbolic link presence signals completion.
        If revocation registry builder operates in a process external to its Issuer's,
        target directory is hopper directory.

        Raise WalletState for closed wallet.

        :param rr_id: revocation registry identifier
        :param rr_size: revocation registry size (defaults to 64)
        
Create revocation registry artifacts and new tails file (with association to
corresponding revocation registry identifier via symbolic link name)
for input revocation registry identifier. Symbolic link presence signals completion.
If revocation registry builder operates in a process external to its Issuer's,
target directory is hopper directory.

Raise WalletState for closed wallet.
Create revocation registry artifacts and new tails file ( with association to corresponding revocation registry identifier via symbolic link name ) for input revocation registry identifier . Symbolic link presence signals completion . If revocation registry builder operates in a process external to its Issuer ' s target directory is hopper directory . Raise WalletState for closed wallet .
async def _create_rev_reg(self, rr_id: str, rr_size: int = None) -> None:
        LOGGER.debug('RevRegBuilder._create_rev_reg >>> rr_id: %s, rr_size: %s', rr_id, rr_size)
        if not self.wallet.handle:
            LOGGER.debug('RevRegBuilder._create_rev_reg <!< Wallet %s is closed', self.wallet.name)
            raise WalletState('Wallet {} is closed'.format(self.wallet.name))
        if not ok_rev_reg_id(rr_id):
            LOGGER.debug('RevRegBuilder._create_rev_reg <!< Bad rev reg id %s', rr_id)
            raise BadIdentifier('Bad rev reg id {}'.format(rr_id))
        rr_size = rr_size or 64
        (cd_id, tag) = rev_reg_id2cred_def_id_tag(rr_id)
        dir_tails = self.dir_tails_top(rr_id)
        dir_target = self.dir_tails_target(rr_id)
        if self._rrbx:
            try:
                makedirs(dir_target, exist_ok=False)
            except FileExistsError:
                LOGGER.warning(
                    'RevRegBuilder._create_rev_reg found dir %s, but task not in progress: rebuilding rev reg %s',
                    dir_target,
                    rr_id)
                rmtree(dir_target)
                makedirs(dir_target, exist_ok=False)
        LOGGER.info('Creating revocation registry (capacity %s) for rev reg id %s', rr_size, rr_id)
        tails_writer_handle = await blob_storage.open_writer(
            'default',
            json.dumps({
                'base_dir': dir_target,
                'uri_pattern': ''
            }))
        (created_rr_id, rr_def_json, rr_ent_json) = await anoncreds.issuer_create_and_store_revoc_reg(
            self.wallet.handle,
            self.did,
            'CL_ACCUM',
            tag,
            cd_id,
            json.dumps({
                'max_cred_num': rr_size,
                'issuance_type': 'ISSUANCE_BY_DEFAULT'
            }),
            tails_writer_handle)
        tails_hash = basename(Tails.unlinked(dir_target).pop())
        with open(join(dir_target, 'rr_def.json'), 'w') as rr_def_fh:
            print(rr_def_json, file=rr_def_fh)
        with open(join(dir_target, 'rr_ent.json'), 'w') as rr_ent_fh:
            print(rr_ent_json, file=rr_ent_fh)
        Tails.associate(dir_tails, created_rr_id, tails_hash)  
        LOGGER.debug('RevRegBuilder._create_rev_reg <<<')
async def _create_rev_reg ( self , rr_id : str , rr_size : int = None ) -> None : LOGGER . debug ( 'RevRegBuilder._create_rev_reg >>> rr_id: %s, rr_size: %s' , rr_id , rr_size ) if not self . wallet . handle : LOGGER . debug ( 'RevRegBuilder._create_rev_reg <!< Wallet %s is closed' , self . wallet . name ) raise WalletState ( 'Wallet {} is closed' . format ( self . wallet . name ) ) if not ok_rev_reg_id ( rr_id ) : LOGGER . debug ( 'RevRegBuilder._create_rev_reg <!< Bad rev reg id %s' , rr_id ) raise BadIdentifier ( 'Bad rev reg id {}' . format ( rr_id ) ) rr_size = rr_size or 64 ( cd_id , tag ) = rev_reg_id2cred_def_id_tag ( rr_id ) dir_tails = self . dir_tails_top ( rr_id ) dir_target = self . dir_tails_target ( rr_id ) if self . _rrbx : try : makedirs ( dir_target , exist_ok = False ) except FileExistsError : LOGGER . warning ( 'RevRegBuilder._create_rev_reg found dir %s, but task not in progress: rebuilding rev reg %s' , dir_target , rr_id ) rmtree ( dir_target ) makedirs ( dir_target , exist_ok = False ) LOGGER . info ( 'Creating revocation registry (capacity %s) for rev reg id %s' , rr_size , rr_id ) tails_writer_handle = await blob_storage . open_writer ( 'default' , json . dumps ( { 'base_dir' : dir_target , 'uri_pattern' : '' } ) ) ( created_rr_id , rr_def_json , rr_ent_json ) = await anoncreds . issuer_create_and_store_revoc_reg ( self . wallet . handle , self . did , 'CL_ACCUM' , tag , cd_id , json . dumps ( { 'max_cred_num' : rr_size , 'issuance_type' : 'ISSUANCE_BY_DEFAULT' } ) , tails_writer_handle ) tails_hash = basename ( Tails . unlinked ( dir_target ) . pop ( ) ) with open ( join ( dir_target , 'rr_def.json' ) , 'w' ) as rr_def_fh : print ( rr_def_json , file = rr_def_fh ) with open ( join ( dir_target , 'rr_ent.json' ) , 'w' ) as rr_ent_fh : print ( rr_ent_json , file = rr_ent_fh ) Tails . associate ( dir_tails , created_rr_id , tails_hash ) LOGGER . debug ( 'RevRegBuilder._create_rev_reg <<<' )
Create revocation registry artifacts and new tails file (with association to
corresponding revocation registry identifier via symbolic link name)
for input revocation registry identifier.
Create revocation registry artifacts and new tails file ( with association to corresponding revocation registry identifier via symbolic link name ) for input revocation registry identifier .
"""
        Create revocation registry artifacts and new tails file (with association to
        corresponding revocation registry identifier via symbolic link name)
        for input revocation registry identifier. Symbolic link presence signals completion.
        If revocation registry builder operates in a process external to its Issuer's,
        target directory is hopper directory.

        Raise WalletState for closed wallet.

        :param rr_id: revocation registry identifier
        :param rr_size: revocation registry size (defaults to 64)
        """ # associate last: symlink signals completion
self
rr_id
str
revocation registry identifier
revocation registry identifier
rr_size
int
revocation registry size (defaults to 64)
revocation registry size ( defaults to 64 )
64)