von_anchor/wallet/wallet.py
async def write_pairwise(
            self,
            their_did: str,
            their_verkey: str,
            my_did: str = None,
            metadata: dict = None,
            replace_meta: bool = False) -> PairwiseInfo:
        """
        Store a pairwise DID for a secure connection. Use verification key for local DID in wallet if
        supplied; otherwise, create one first. If local DID specified but not present, raise AbsentRecord.

        With supplied metadata, replace or augment and overwrite any existing metadata for the pairwise
        relation if one already exists in the wallet. Always include local and remote DIDs and keys in
        metadata to allow for WQL search.

        :param their_did: remote DID
        :param their_verkey: remote verification key
        :param my_did: local DID
        :param metadata: metadata for pairwise connection
        :param replace_meta: whether to (True) replace or (False) augment and overwrite existing metadata
        :return: resulting PairwiseInfo
        """

        LOGGER.debug(
            'Wallet.write_pairwise >>> their_did: %s, their_verkey: %s, my_did: %s, metadata: %s, replace_meta: %s',
            their_did,
            their_verkey,
            my_did,
            metadata,
            replace_meta)

        try:
            await did.store_their_did(self.handle, json.dumps({'did': their_did, 'verkey': their_verkey}))
        except IndyError as x_indy:
            if x_indy.error_code == ErrorCode.WalletItemAlreadyExists:
                pass  # exists already, carry on
            else:
                LOGGER.debug(
                    'Wallet.write_pairwise <!< Wallet %s write of their_did %s raised indy error code %s',
                    self.name,
                    their_did,
                    x_indy.error_code)
                raise

        if my_did:
            my_did_info = await self.get_local_did_info(my_did)  # raises AbsentRecord if no such local did
        else:
            my_did_info = await self.create_local_did(None, None, {'pairwise_for': their_did})

        pairwise = PairwiseInfo(their_did, their_verkey, my_did_info.did, my_did_info.verkey, metadata)
        non_sec = await self.write_non_secret(
            NonSecret(TYPE_PAIRWISE, their_did, their_verkey, pairwise_info2tags(pairwise)),
            replace_meta)

        rv = non_secret2pairwise_info(non_sec)
        LOGGER.debug('Wallet.write_pairwise <<< %s', rv)
        return rv

        Store a pairwise DID for a secure connection. Use verification key for local DID in wallet if
        supplied; otherwise, create one first. If local DID specified but not present, raise AbsentRecord.

        With supplied metadata, replace or augment and overwrite any existing metadata for the pairwise
        relation if one already exists in the wallet. Always include local and remote DIDs and keys in
        metadata to allow for WQL search.

        :param their_did: remote DID
        :param their_verkey: remote verification key
        :param my_did: local DID
        :param metadata: metadata for pairwise connection
        :param replace_meta: whether to (True) replace or (False) augment and overwrite existing metadata
        :return: resulting PairwiseInfo
        
Store a pairwise DID for a secure connection. Use verification key for local DID in wallet if
supplied; otherwise, create one first. If local DID specified but not present, raise AbsentRecord.

With supplied metadata, replace or augment and overwrite any existing metadata for the pairwise
relation if one already exists in the wallet. Always include local and remote DIDs and keys in
metadata to allow for WQL search.
Store a pairwise DID for a secure connection . Use verification key for local DID in wallet if supplied ; otherwise create one first . If local DID specified but not present raise AbsentRecord . With supplied metadata replace or augment and overwrite any existing metadata for the pairwise relation if one already exists in the wallet . Always include local and remote DIDs and keys in metadata to allow for WQL search .
async def write_pairwise(
            self,
            their_did: str,
            their_verkey: str,
            my_did: str = None,
            metadata: dict = None,
            replace_meta: bool = False) -> PairwiseInfo:
        LOGGER.debug(
            'Wallet.write_pairwise >>> their_did: %s, their_verkey: %s, my_did: %s, metadata: %s, replace_meta: %s',
            their_did,
            their_verkey,
            my_did,
            metadata,
            replace_meta)
        try:
            await did.store_their_did(self.handle, json.dumps({'did': their_did, 'verkey': their_verkey}))
        except IndyError as x_indy:
            if x_indy.error_code == ErrorCode.WalletItemAlreadyExists:
                pass  
            else:
                LOGGER.debug(
                    'Wallet.write_pairwise <!< Wallet %s write of their_did %s raised indy error code %s',
                    self.name,
                    their_did,
                    x_indy.error_code)
                raise
        if my_did:
            my_did_info = await self.get_local_did_info(my_did)  
        else:
            my_did_info = await self.create_local_did(None, None, {'pairwise_for': their_did})
        pairwise = PairwiseInfo(their_did, their_verkey, my_did_info.did, my_did_info.verkey, metadata)
        non_sec = await self.write_non_secret(
            NonSecret(TYPE_PAIRWISE, their_did, their_verkey, pairwise_info2tags(pairwise)),
            replace_meta)
        rv = non_secret2pairwise_info(non_sec)
        LOGGER.debug('Wallet.write_pairwise <<< %s', rv)
        return rv
async def write_pairwise ( self , their_did : str , their_verkey : str , my_did : str = None , metadata : dict = None , replace_meta : bool = False ) -> PairwiseInfo : LOGGER . debug ( 'Wallet.write_pairwise >>> their_did: %s, their_verkey: %s, my_did: %s, metadata: %s, replace_meta: %s' , their_did , their_verkey , my_did , metadata , replace_meta ) try : await did . store_their_did ( self . handle , json . dumps ( { 'did' : their_did , 'verkey' : their_verkey } ) ) except IndyError as x_indy : if x_indy . error_code == ErrorCode . WalletItemAlreadyExists : pass else : LOGGER . debug ( 'Wallet.write_pairwise <!< Wallet %s write of their_did %s raised indy error code %s' , self . name , their_did , x_indy . error_code ) raise if my_did : my_did_info = await self . get_local_did_info ( my_did ) else : my_did_info = await self . create_local_did ( None , None , { 'pairwise_for' : their_did } ) pairwise = PairwiseInfo ( their_did , their_verkey , my_did_info . did , my_did_info . verkey , metadata ) non_sec = await self . write_non_secret ( NonSecret ( TYPE_PAIRWISE , their_did , their_verkey , pairwise_info2tags ( pairwise ) ) , replace_meta ) rv = non_secret2pairwise_info ( non_sec ) LOGGER . debug ( 'Wallet.write_pairwise <<< %s' , rv ) return rv
Store a pairwise DID for a secure connection.
Store a pairwise DID for a secure connection .
"""
        Store a pairwise DID for a secure connection. Use verification key for local DID in wallet if
        supplied; otherwise, create one first. If local DID specified but not present, raise AbsentRecord.

        With supplied metadata, replace or augment and overwrite any existing metadata for the pairwise
        relation if one already exists in the wallet. Always include local and remote DIDs and keys in
        metadata to allow for WQL search.

        :param their_did: remote DID
        :param their_verkey: remote verification key
        :param my_did: local DID
        :param metadata: metadata for pairwise connection
        :param replace_meta: whether to (True) replace or (False) augment and overwrite existing metadata
        :return: resulting PairwiseInfo
        """ # exists already, carry on # raises AbsentRecord if no such local did
None
self
their_did
str
None
their_verkey
str
remote verification key
remote verification key
my_did
str
None
metadata
dict
metadata for pairwise connection
metadata for pairwise connection
replace_meta
bool
whether to (True) replace or (False) augment and overwrite existing metadata
whether to ( True ) replace or ( False ) augment and overwrite existing metadata