Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharking committed Dec 13, 2024
1 parent 709567b commit 69b2465
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
9 changes: 7 additions & 2 deletions doc/service-agent-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" }, ...]
}
```

Expand Down
14 changes: 0 additions & 14 deletions packages/model/src/messages/CredentialRequestMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { MessageType } from './MessageType'

export interface CredentialRequestMessageOptions extends BaseMessageOptions {
credentialDefinitionId: string
revocationDefinitionId?: string
revocationRegistryIndex?: number
claims: ClaimOptions[]
}

Expand All @@ -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))
}
}
Expand All @@ -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()
Expand Down

0 comments on commit 69b2465

Please sign in to comment.