async def get_non_secret(
            self,
            typ: str,
            filt: Union[dict, str] = None,
            canon_wql: Callable[[dict], dict] = None,
            limit: int = None) -> dict:
        """
        Return dict mapping each non-secret storage record of interest by identifier or,
        for no filter specified, mapping them all. If wallet has no such item, return empty dict.

        :param typ: non-secret storage record type
        :param filt: non-secret storage record identifier or WQL json (default all)
        :param canon_wql: WQL canonicalization function (default von_anchor.canon.canon_non_secret_wql())
        :param limit: maximum number of results to return (default no limit)
        :return: dict mapping identifiers to non-secret storage records
        """

        LOGGER.debug('Wallet.get_non_secret >>> typ: %s, filt: %s, canon_wql: %s', typ, filt, canon_wql)

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

        records = []
        if isinstance(filt, str):  # ordinary lookup by value
            try:
                records = [json.loads(await non_secrets.get_wallet_record(
                    self.handle,
                    typ,
                    filt,
                    json.dumps({
                        'retrieveType': False,
                        'retrieveValue': True,
                        'retrieveTags': True
                    })))]
            except IndyError as x_indy:
                if x_indy.error_code == ErrorCode.WalletItemNotFound:
                    pass
                else:
                    LOGGER.debug(
                        'Wallet.get_non_secret <!< Wallet %s lookup raised indy exception %s',
                        self.name,
                        x_indy.error_code)
                    raise
        else:
            canon = canon_wql or canon_non_secret_wql
            s_handle = await non_secrets.open_wallet_search(
                self.handle,
                typ,
                json.dumps(canon(filt or {})),
                json.dumps({
                    'retrieveRecords': True,
                    'retrieveTotalCount': True,
                    'retrieveType': False,
                    'retrieveValue': True,
                    'retrieveTags': True
                }))

            records = []
            cardinality = int(json.loads(
                await non_secrets.fetch_wallet_search_next_records(self.handle, s_handle, 0))['totalCount'])
            chunk = min(cardinality, limit or cardinality, Wallet.DEFAULT_CHUNK)
            if limit:
                cardinality = min(limit, cardinality)
            try:
                while len(records) != cardinality:
                    batch = json.loads(
                        await non_secrets.fetch_wallet_search_next_records(self.handle, s_handle, chunk))['records']
                    records.extend(batch)
                    if len(batch) < chunk:
                        break
                if len(records) != cardinality:
                    LOGGER.warning(
                        'Non-secret search/limit indicated %s results but fetched %s',
                        cardinality,
                        len(records))
            finally:
                await non_secrets.close_wallet_search(s_handle)

        rv = {record['id']: StorageRecord(typ, record['value'], record['tags'], record['id']) for record in records}
        LOGGER.debug('Wallet.get_non_secret <<< %s', rv)
        return rv
async def get_non_secret ( self , typ : str , filt : Union [ dict , str ] = None , canon_wql : Callable [ [ dict ] , dict ] = None , limit : int = None ) -> dict : LOGGER . debug ( 'Wallet.get_non_secret >>> typ: %s, filt: %s, canon_wql: %s' , typ , filt , canon_wql ) if not self . handle : LOGGER . debug ( 'Wallet.get_non_secret <!< Wallet %s is closed' , self . name ) raise WalletState ( 'Wallet {} is closed' . format ( self . name ) ) records = [ ] if isinstance ( filt , str ) : try : records = [ json . loads ( await non_secrets . get_wallet_record ( self . handle , typ , filt , json . dumps ( { 'retrieveType' : False , 'retrieveValue' : True , 'retrieveTags' : True } ) ) ) ] except IndyError as x_indy : if x_indy . error_code == ErrorCode . WalletItemNotFound : pass else : LOGGER . debug ( 'Wallet.get_non_secret <!< Wallet %s lookup raised indy exception %s' , self . name , x_indy . error_code ) raise else : canon = canon_wql or canon_non_secret_wql s_handle = await non_secrets . open_wallet_search ( self . handle , typ , json . dumps ( canon ( filt or { } ) ) , json . dumps ( { 'retrieveRecords' : True , 'retrieveTotalCount' : True , 'retrieveType' : False , 'retrieveValue' : True , 'retrieveTags' : True } ) ) records = [ ] cardinality = int ( json . loads ( await non_secrets . fetch_wallet_search_next_records ( self . handle , s_handle , 0 ) ) [ 'totalCount' ] ) chunk = min ( cardinality , limit or cardinality , Wallet . DEFAULT_CHUNK ) if limit : cardinality = min ( limit , cardinality ) try : while len ( records ) != cardinality : batch = json . loads ( await non_secrets . fetch_wallet_search_next_records ( self . handle , s_handle , chunk ) ) [ 'records' ] records . extend ( batch ) if len ( batch ) < chunk : break if len ( records ) != cardinality : LOGGER . warning ( 'Non-secret search/limit indicated %s results but fetched %s' , cardinality , len ( records ) ) finally : await non_secrets . close_wallet_search ( s_handle ) rv = { record [ 'id' ] : StorageRecord ( typ , record [ 'value' ] , record [ 'tags' ] , record [ 'id' ] ) for record in records } LOGGER . debug ( 'Wallet.get_non_secret <<< %s' , rv ) return rv
Return dict mapping each non-secret storage record of interest by identifier or,
        for no filter specified, mapping them all. If wallet has no such item, return empty dict.

        :param typ: non-secret storage record type
        :param filt: non-secret storage record identifier or WQL json (default all)
        :param canon_wql: WQL canonicalization function (default von_anchor.canon.canon_non_secret_wql())
        :param limit: maximum number of results to return (default no limit)
        :return: dict mapping identifiers to non-secret storage records