Revocable Anoncreds credentials cannot be issued under new didcomm module pattern
Describe the bug
When issuing revocable credentials in credo v0.6 using the didcomm pattern (agent.didcomm.offerCredential()), the credential never arrives on the mobile wallet, because the acceptRequest() method (triggered when credential state is request-received) cannot find the revocation status list. The revocation status list is created upon revocation registry creation & its existance is verified via logs and API calls. The problem is, it is created using the modules pattern ( agent.modules.annoncreds.registerRevocationStatusList()) which is separate to the didcomm pattern.
I have tried to reconfigure the agent, but was not able to find the correct way to put the register methods using the didcomm module.
Steps to reproduce
- Register revocable credential definition, revocation registry definition and revocation status list
- Offer revocable credential
- Accept credential offer on mobile wallet
- error is shown in the console + mobile wallet application.
Expected behavior
Once credential offer is created for given connection, it should be accepted and received on the mobile wallet, with the correct state transitions.
Actual behavior
As soon as credential offer is accepted on mobile wallet, the backend agent cannot find the revocation status list and fails the issuance.
Screenshots or logs
Log output from the problem :
ERROR: Failed to process message
"error": {
"serialized": "CredoError: Could not retrieve revocation status list for revocation registry did:indy:bcovrin:test:GkUjPLWej9zXDMMXC9dFjV/anoncreds/v0/REV_REG_DEF/93/default/REV_TAG: undefined",
"message": "Could not retrieve revocation status list for revocation registry did:indy:bcovrin:test:GkUjPLWej9zXDMMXC9dFjV/anoncreds/v0/REV_REG_DEF/93/default/REV_TAG: undefined",
"name": "CredoError",
"stack": "CredoError: Could not retrieve revocation status list for revocation registry did:indy:bcovrin:test:GkUjPLWej9zXDMMXC9dFjV/anoncreds/v0/REV_REG_DEF/93/default/REV_TAG: undefined
at Function.run (.../node_modules/@credo-ts/didcomm/src/handlers/DidCommMessageHandlerMiddleware.ts:29:5)
at async .../node_modules/@credo-ts/didcomm/src/handlers/DidCommMessageHandlerMiddleware.ts:24:9
at async dispatch (.../node_modules/@credo-ts/didcomm/src/handlers/DidCommMessageHandlerMiddleware.ts:22:11)
at async DidCommDispatcher.defaultHandlerMiddleware (.../node_modules/@credo-ts/didcomm/src/DidCommDispatcher.ts:56:29)
at async DidCommRequestCredentialV2Handler.handle (.../node_modules/@credo-ts/didcomm/src/modules/credentials/protocol/v2/handlers/DidCommRequestCredentialV2Handler.ts:27:14)
at async DidCommRequestCredentialV2Handler.acceptRequest (.../node_modules/@credo-ts/didcomm/src/modules/credentials/protocol/v2/handlers/DidCommRequestCredentialV2Handler.ts:45:25)
at async DidCommCredentialV2Protocol.acceptRequest (.../node_modules/@credo-ts/didcomm/src/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.ts:806:21)
at async DidCommCredentialFormatCoordinator.acceptRequest (.../node_modules/@credo-ts/didcomm/src/modules/credentials/protocol/v2/DidCommCredentialFormatCoordinator.ts:543:38)
at async AnonCredsDidCommCredentialFormatService.acceptRequest (.../node_modules/@credo-ts/anoncreds/src/formats/AnonCredsDidCommCredentialFormatService.ts:337:42)
at fetchRevocationStatusList (.../node_modules/@credo-ts/anoncreds/src/utils/anonCredsObjects.ts:88:11)"
Environment
- Version: @credo-ts/core -> 0.6.0
- Nodejs: 20.19.5
Additional context
Method used for revocation status list creation
const revStatusList= await this.agent.modules.anoncreds.registerRevocationStatusList(
{
revocationStatusList: {
issuerId: this.did,
revocationRegistryDefinitionId: revocationRegistryDefinitionId
},
options: {}
// endorserDid: this.did, // same output as before, even though they are included.
// endorserMode: 'internal'
}
);
Agent configuration:
function getAskarAnonCredsIndyModules(name: string, endpoint: string, port: number, dbConfig?: AskarPostgresStorageConfig) {
const legacyIndyCredentialFormatService = new LegacyIndyDidCommCredentialFormatService();
const legacyIndyProofFormatService = new LegacyIndyDidCommProofFormatService();
return {
didcomm: new DidCommModule({
endpoints: [endpoint],
transports: {
inbound: [new DidCommHttpInboundTransport({ port })],
outbound: [new DidCommHttpOutboundTransport(), new DidCommWsOutboundTransport()],
},
connections: {
autoAcceptConnections: true,
},
mediator: {
autoAcceptMediationRequests: true,
},
credentials: {
autoAcceptCredentials: DidCommAutoAcceptCredential.ContentApproved,
credentialProtocols: [
new DidCommCredentialV1Protocol({
indyCredentialFormat: new LegacyIndyDidCommCredentialFormatService(),
}),
new DidCommCredentialV2Protocol({
credentialFormats: [legacyIndyCredentialFormatService, new AnonCredsDidCommCredentialFormatService()],
}),
],
},
proofs: {
autoAcceptProofs: DidCommAutoAcceptProof.ContentApproved,
proofProtocols: [
new DidCommProofV1Protocol({
indyProofFormat: new LegacyIndyDidCommProofFormatService(),
}),
new DidCommProofV2Protocol({
proofFormats: [legacyIndyProofFormatService, new AnonCredsDidCommProofFormatService()],
}),
],
},
}),
anoncreds: new AnonCredsModule({
registries: [new IndyVdrAnonCredsRegistry()],
anoncreds,
tailsFileService: new FullTailsFileService({
tailsServerBaseUrl: TAILS_SERVER_URL,
tailsServerAccessKey: TAILS_ACCESS_KEY
})
}),
indyVdr: new IndyVdrModule({
indyVdr,
networks: [indyNetworkConfig]
}),
dids: new DidsModule({
resolvers: [new IndyVdrIndyDidResolver()],
registrars: [new IndyVdrIndyDidRegistrar()]
}),
askar: ...
}
Revocable Anoncreds credentials cannot be issued under new didcomm module pattern
Describe the bug
When issuing revocable credentials in credo v0.6 using the didcomm pattern (agent.didcomm.offerCredential()), the credential never arrives on the mobile wallet, because the acceptRequest() method (triggered when credential state is request-received) cannot find the revocation status list. The revocation status list is created upon revocation registry creation & its existance is verified via logs and API calls. The problem is, it is created using the modules pattern ( agent.modules.annoncreds.registerRevocationStatusList()) which is separate to the didcomm pattern.
I have tried to reconfigure the agent, but was not able to find the correct way to put the register methods using the didcomm module.
Steps to reproduce
Expected behavior
Once credential offer is created for given connection, it should be accepted and received on the mobile wallet, with the correct state transitions.
Actual behavior
As soon as credential offer is accepted on mobile wallet, the backend agent cannot find the revocation status list and fails the issuance.
Screenshots or logs
Log output from the problem :
ERROR: Failed to process message
Environment
Additional context
Method used for revocation status list creation
Agent configuration: