diff --git a/doc/service-agent-api.md b/doc/service-agent-api.md index 3486bec..16938a9 100644 --- a/doc/service-agent-api.md +++ b/doc/service-agent-api.md @@ -149,16 +149,21 @@ By sending this message, a Verifiable Credential is effectively issued and sent This message could be sent as a response to a Credential Request. In such case, `threadId` is used to identify credential details. But it can also start a new Credential Issuance flow, and specify Parameters: - - (optional) Credential Definition ID +- (optional) Revocation Definition ID +- (optional) Revocation Index - (optional) Claims +> **Note:** When using revocation parameters (`revocationDefinitionId` and `revocationRegistryIndex`), it is essential to ensure the `id` was preserved from the time it was generated with the credential. The `revocationRegistryIndex` serves as a reference to the specific credential in the revocation registry. + ```json { ... "type": "credential-issuance", "credentialDefinitionId": "id", - "claims": [{ "name": "claim-name", "mimeType": "mime-type", "value": "claim-value" }, ...] + "revocationDefinitionId": "id", + "revocationRegistryIndex": 1, + "claims": [{ "name": "claim-name", "mimeType": "mime-type", "value": "claim-value" }, ...] } ``` diff --git a/packages/model/src/messages/CredentialRequestMessage.ts b/packages/model/src/messages/CredentialRequestMessage.ts index bd07194..295a311 100644 --- a/packages/model/src/messages/CredentialRequestMessage.ts +++ b/packages/model/src/messages/CredentialRequestMessage.ts @@ -7,8 +7,6 @@ import { MessageType } from './MessageType' export interface CredentialRequestMessageOptions extends BaseMessageOptions { credentialDefinitionId: string - revocationDefinitionId?: string - revocationRegistryIndex?: number claims: ClaimOptions[] } @@ -22,8 +20,6 @@ export class CredentialRequestMessage extends BaseMessage { this.timestamp = options.timestamp ?? new Date() this.connectionId = options.connectionId this.credentialDefinitionId = options.credentialDefinitionId - this.revocationDefinitionId = options.revocationDefinitionId - this.revocationRegistryIndex = options.revocationRegistryIndex this.claims = options.claims.map(item => new Claim(item)) } } @@ -35,16 +31,6 @@ export class CredentialRequestMessage extends BaseMessage { @IsString() public credentialDefinitionId!: string - @Expose() - @IsString() - @IsOptional() - public revocationDefinitionId?: string - - @Expose() - @IsNumber() - @IsOptional() - public revocationRegistryIndex?: number - @Expose() @Type(() => Claim) @IsArray()