Creating the same CredentialDef for the same schema multiple times returns the same ID , but it cannot be used to offer another OCM/PCM
Steps:
- Create a connection between 2 OCMs
- On OCM 1 create new schema with 1 field.
- On OCM 1 create a Credential Definition for the Schemaid from step 2.
- Repeat step 3 with the same
schemaId
andTag
- You can see that on both 3 and 4 steps the ID of the created credentialDefinition is the same.
- Try to offer that credential to OCM2.
- Error is shown:
{
"statusCode": 400,
"message": "AnonCredsCredentialDefinitionRecord: Multiple records found for given query '{\"$or\":[{\"credentialDefinitionId\":\"did:indy:bcovrin:test:14DAdeYcnbYpiqbf9VBuyP/anoncreds/v0/CLAIM_DEF/193265/tag1\"},{\"unqualifiedCredentialDefinitionId\":\"did:indy:bcovrin:test:14DAdeYcnbYpiqbf9VBuyP/anoncreds/v0/CLAIM_DEF/193265/tag1\"}]}'"
}