code: async def set_did_endpoint(self, remote_did: str, did_endpoint: str) ->  EndpointInfo:
          
  
          LOGGER.debug('BaseAnchor.set_did_endpoint >>> remote_did: %s, did_endpoint: %s', remote_did, did_endpoint)
  
          if not ok_did(remote_did):
              LOGGER.debug('BaseAnchor.set_did_endpoint <!< Bad DID %s', remote_did)
              raise BadIdentifier('Bad DID {}'.format(remote_did))
  
          pairwise_info = (await self.wallet.get_pairwise(remote_did)).get(remote_did, None)
          if not pairwise_info:
              LOGGER.debug(
                  'BaseAnchor.set_did_endpoint <!< Anchor %s has no pairwise relation for remote DID %s',
                  self.name,
                  remote_did)
              raise AbsentRecord('Anchor {} has no pairwise relation for remote DID {}'.format(
                  self.name,
                  remote_did))
  
          await self.wallet.write_pairwise(
              pairwise_info.their_did,
              pairwise_info.their_verkey,
              pairwise_info.my_did,
              {'did_endpoint': did_endpoint})
  
          rv = EndpointInfo(did_endpoint, pairwise_info.their_verkey)
  
          LOGGER.debug('BaseAnchor.set_did_endpoint <<< %s', rv)
          return rv
docs: Set endpoint as metadata for pairwise remote DID in wallet. Pick up (transport)
          verification key from pairwise relation and return with endpoint in EndpointInfo.
  
  
          Raise BadIdentifier on bad DID. Raise WalletState if wallet is closed.
          Raise AbsentRecord if pairwise relation not present in wallet.
  
          :param remote_did: pairwise remote DID
          :param endpoint: value to set as endpoint in wallet and cache
          :return: endpoint and (transport) verification key