Creates a new CredentialDef object that is written to the ledger

        :param source_id: Institution's unique ID for the credential definition
        :param name: Name of credential definition
        :param schema_id: The schema ID given during the creation of the schema
        :param payment_handle: NYI - payment of ledger fee is taken from wallet automatically
        Example:
        source_id = 'foobar123'
        schema_name = 'Schema Name'
        payment_handle = 0
        credential_def1 = await CredentialDef.create(source_id, name, schema_id, payment_handle)
        :return: credential_def object, written to ledger

async def create(source_id: str, name: str, schema_id: str, payment_handle: int):
        """
        Creates a new CredentialDef object that is written to the ledger

        :param source_id: Institution's unique ID for the credential definition
        :param name: Name of credential definition
        :param schema_id: The schema ID given during the creation of the schema
        :param payment_handle: NYI - payment of ledger fee is taken from wallet automatically
        Example:
        source_id = 'foobar123'
        schema_name = 'Schema Name'
        payment_handle = 0
        credential_def1 = await CredentialDef.create(source_id, name, schema_id, payment_handle)
        :return: credential_def object, written to ledger
        """
        constructor_params = (source_id, name, schema_id)

        c_source_id = c_char_p(source_id.encode('utf-8'))
        c_schema_id = c_char_p(schema_id.encode('utf-8'))
        c_name = c_char_p(name.encode('utf-8'))
        # default institution_did in config is used as issuer_did
        c_issuer_did = None
        c_payment = c_uint32(payment_handle)
        # Todo: add params for tag and config
        c_tag = c_char_p('tag1'.encode('utf-8'))
        c_config = c_char_p('{"support_revocation":false}'.encode('utf-8'))
        c_params = (c_source_id, c_name, c_schema_id, c_issuer_did, c_tag, c_config, c_payment)

        return await CredentialDef._create("vcx_credentialdef_create",
                                           constructor_params,
                                           c_params)