code: async def get_nym(self, did: str) -> str:
          
  
          LOGGER.debug('_BaseAgent.get_nym >>> did: %s', did)
  
          rv = json.dumps({})
          get_nym_req = await ledger.build_get_nym_request(self.did, did)
          resp_json = await self._submit(get_nym_req)
  
          data_json = (json.loads(resp_json))['result']['data']  # it's double-encoded on the ledger
          if data_json:
              rv = data_json
  
          LOGGER.debug('_BaseAgent.get_nym <<< %s', rv)
          return rv
docs: Get json cryptonym (including current verification key) for input (agent) DID from ledger.
  
          Raise BadLedgerTxn on failure.
  
          :param did: DID of cryptonym to fetch
          :return: cryptonym json