Creates a credential with an offer.
        :param source_id: user defined id of object.
        :param credential_offer: JSON string representing the offer used as the basis of creation.
        :return: A created credential
        Example:
        offer = [{
           "msg_type": "CLAIM_OFFER",
           "version": "0.1",
           "to_did": "8XFh8yBzrpJQmNyZzgoTqB",
           "from_did": "8XFh8yBzrpJQmNyZzgoTqB",
           "libindy_offer": '{}',
           "credential_attrs": {
              "address1": [
                 "101 Tela Lane"
              ],
              "address2": [
                 "101 Wilson Lane"
              ],
              "city": [
                 "SLC"
              ],
              "state": [
                 "UT"
              ],
              "zip": [
                 "87121"
              ]
           },
           "schema_seq_no": 1487,
           "cred_def_id": "id1",
           "claim_name": "Credential",
           "claim_id": "defaultCredentialId",
           "msg_ref_id": None,
        }]
        credential = await Credential.create(source_id, offer)

async def create(source_id: str, credential_offer: str):
        """
        Creates a credential with an offer.
        :param source_id: user defined id of object.
        :param credential_offer: JSON string representing the offer used as the basis of creation.
        :return: A created credential
        Example:
        offer = [{
           "msg_type": "CLAIM_OFFER",
           "version": "0.1",
           "to_did": "8XFh8yBzrpJQmNyZzgoTqB",
           "from_did": "8XFh8yBzrpJQmNyZzgoTqB",
           "libindy_offer": '{}',
           "credential_attrs": {
              "address1": [
                 "101 Tela Lane"
              ],
              "address2": [
                 "101 Wilson Lane"
              ],
              "city": [
                 "SLC"
              ],
              "state": [
                 "UT"
              ],
              "zip": [
                 "87121"
              ]
           },
           "schema_seq_no": 1487,
           "cred_def_id": "id1",
           "claim_name": "Credential",
           "claim_id": "defaultCredentialId",
           "msg_ref_id": None,
        }]
        credential = await Credential.create(source_id, offer)
        """
        constructor_params = (source_id,)

        c_source_id = c_char_p(source_id.encode('utf-8'))
        c_offer = c_char_p(json.dumps(credential_offer).encode('utf-8'))
        c_params = (c_source_id, c_offer, )

        return await Credential._create("vcx_credential_create_with_offer",
                                        constructor_params,
                                        c_params)