Skip to content

persist the delegated credential in the offer for revocation purposes - #566

Merged
maycon-mello merged 5 commits into
masterfrom
feat/persists-delegated-credential-for-revocation-purposes
Jul 28, 2026
Merged

persist the delegated credential in the offer for revocation purposes#566
maycon-mello merged 5 commits into
masterfrom
feat/persists-delegated-credential-for-revocation-purposes

Conversation

@maycon-mello

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread packages/core/src/delegation/delegation-offer.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the delegation offer acceptance flow so the issuer persists the newly issued delegated credential on the DelegationOffer document, enabling later revocation operations that require access to the credential’s credentialStatus metadata.

Changes:

  • Persist the issued delegatedCredential onto the stored delegationOffer document.
  • Move the wallet.updateDocument(delegationOffer) call to occur after credential issuance so the stored offer includes the credential payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/core/src/delegation/delegation-offer.ts
Comment thread packages/core/src/delegation/delegation-offer.ts Outdated
Comment thread packages/core/src/delegation/delegation-offer.ts
// Persist revocation data on the delegation offer so the issuer can update it when revoking.
delegationOffer.credentialStatus = delegatedCredential.credentialStatus;
delegationOffer.credentialId = delegatedCredential.id;
delegationOffer.revocationData = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you add tests to validate this is being stored? If so, I'd expect them to fail after this refactor

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have revocation tests which is calling the revocation helpers directly and has access to the full credential. I just updated the test to ensure we assert the revocation data is there.

@maycon-mello
maycon-mello merged commit c28e678 into master Jul 28, 2026
7 checks passed
@maycon-mello
maycon-mello deleted the feat/persists-delegated-credential-for-revocation-purposes branch July 28, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants