async def send_schema(self, schema_data_json: str) -> str:
LOGGER.debug('<STR_LIT>', schema_data_json)<EOL>schema_data = json.loads(schema_data_json)<EOL>s_key = schema_key(schema_id(self.did, schema_data['<STR_LIT:name>'], schema_data['<STR_LIT:version>']))<EOL>with SCHEMA_CACHE.lock:<EOL><INDENT>try:<EOL><INDENT>rv_json = await self.get_schema(s_key)<EOL>LOGGER.error(<EOL>'<STR_LIT>',<EOL>schema_data['<STR_LIT:name>'],<EOL>schema_data['<STR_LIT:version>'],<EOL>self.did)<EOL><DEDENT>except AbsentSchema:  <EOL><INDENT>(_, schema_json) = await anoncreds.issuer_create_schema(<EOL>self.did,<EOL>schema_data['<STR_LIT:name>'],<EOL>schema_data['<STR_LIT:version>'],<EOL>json.dumps(schema_data['<STR_LIT>']))<EOL>req_json = await ledger.build_schema_request(self.did, schema_json)<EOL>resp_json = await self._sign_submit(req_json)<EOL>resp = json.loads(resp_json)<EOL>resp_result_txn = resp['<STR_LIT:result>']['<STR_LIT>']<EOL>rv_json = await self.get_schema(schema_key(schema_id(<EOL>resp_result_txn['<STR_LIT>']['<STR_LIT>'],<EOL>resp_result_txn['<STR_LIT:data>']['<STR_LIT:data>']['<STR_LIT:name>'],<EOL>resp_result_txn['<STR_LIT:data>']['<STR_LIT:data>']['<STR_LIT:version>'])))  <EOL><DEDENT><DEDENT>LOGGER.debug('<STR_LIT>', rv_json)<EOL>return rv_json<EOL>
Send schema to ledger, then retrieve it as written to the ledger and return it.
If schema already exists on ledger, log error and return schema.

:param schema_data_json: schema data json with name, version, attribute names; e.g.,

::

    {
        'name': 'my-schema',
        'version': '1.234',
        'attr_names': ['favourite_drink', 'height', 'last_visit_date']
    }

:return: schema json as written to ledger (or existed a priori)