code: async def send_nym(self, did: str, verkey: str = None, alias: str = None, role: Role = None) -> None:
          
  
          LOGGER.debug(
              'AnchorSmith.send_nym >>> did: %s, verkey: %s, alias: %s, role: %s', did, verkey, alias, role)
  
          if not ok_did(did):
              LOGGER.debug('AnchorSmith.send_nym <!< Bad DID %s', did)
              raise BadIdentifier('Bad DID {}'.format(did))
  
          req_json = await ledger.build_nym_request(self.did, did, verkey, alias, (role or Role.USER).token())
          await self._sign_submit(req_json)
  
          LOGGER.debug('AnchorSmith.send_nym <<<')
docs: Send input anchor's cryptonym (including DID, verification key, plus optional alias and role)
          to the distributed ledger.
  
          Raise BadLedgerTxn on failure, BadIdentifier for bad DID, or BadRole for bad role.
  
          :param did: anchor DID to send to ledger
          :param verkey: optional anchor verification key
          :param alias: optional alias
          :param role: anchor role on the ledger (default value of USER)