code: async def send_endpoint(self, endpoint: str) -> None:
          
  
          LOGGER.debug('BaseAnchor.send_endpoint >>> endpoint: %s', endpoint)
  
          ledger_endpoint = await self.get_endpoint()
          if ledger_endpoint == endpoint:
              LOGGER.info('%s endpoint already set as %s', self.name, endpoint)
              LOGGER.debug('BaseAnchor.send_endpoint <<< (%s already set for %s )')
              return
  
          attr_json = json.dumps({
              'endpoint': {
                  'endpoint': endpoint  # indy-sdk likes 'ha' here but won't map 'ha' to a URL, only ip:port
              }
          })
          req_json = await ledger.build_attrib_request(self.did, self.did, None, attr_json, None)
          await self._sign_submit(req_json)
  
          for _ in range(16):  # reasonable timeout
              if await self.get_endpoint(None, False) == endpoint:
                  break
              await asyncio.sleep(1)
              LOGGER.info('Sent endpoint %s to ledger, waiting 1s for its confirmation', endpoint)
          else:
              LOGGER.debug('BaseAnchor.send_endpoint <!< timed out waiting on send endpoint %s', endpoint)
              raise BadLedgerTxn('Timed out waiting on sent endpoint {}'.format(endpoint))
  
          LOGGER.debug('BaseAnchor.send_endpoint <<<')
docs: Send anchor's own endpoint attribute to ledger (and endpoint cache),
          if ledger does not yet have input value. Specify None to clear.
  
          Raise BadIdentifier on endpoint not formatted as '<ip-address>:<port>',
          BadLedgerTxn on failure, WalletState if wallet is closed.
  
          :param endpoint: value to set as endpoint attribute on ledger and cache:
              specify URL or None to clear.