Skip to content

delegation offer over didcomm #537

Merged
maycon-mello merged 11 commits into
masterfrom
DCKA-5127-delegation-of-credential-using-the-wallet
Jun 3, 2026
Merged

delegation offer over didcomm #537
maycon-mello merged 11 commits into
masterfrom
DCKA-5127-delegation-of-credential-using-the-wallet

Conversation

@maycon-mello
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a DIDComm-based delegation offer flow to the core SDK: an issuer can mint an OOB invitation URL pointing to a stored DelegationOffer, a holder can scan/decode it and emit a delegationOfferReceived event, request the credential, and the issuer then issues a delegated credential back over DIDComm. Also adds a delegateCredential helper that derives delegator key material from the wallet, renames the internal getAll DID helper to the exported getAllDIDs, and introduces a createFullWalletClient() test helper plus a two-wallet integration test exercising the full exchange.

Changes:

  • New delegation-offer.ts module with OOB encode/decode, two message handlers, and a dispatch entry point.
  • New delegateCredential in delegation-issuance.ts and supporting getAllDIDs / getDIDKeyPair exports in did-provider.ts.
  • New isolated-wallet helper and integration test covering issuer ↔ holder delegation offer exchange.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
packages/core/src/did-provider.ts Renames internal getAll to exported getAllDIDs, adds getDIDKeyPair, updates internal callers; public didProvider.getAll() API unchanged.
packages/core/src/delegation/delegation-issuance.ts Adds delegateCredential that picks a wallet DID/keypair and re-issues a delegated credential preserving root id.
packages/core/src/delegation/delegation-offer.ts New module: OOB invitation build/decode, handlers for invitation and credential-request, dispatcher, and acceptDelegationOffer.
integration-tests/helpers/wallet-helpers.ts Adds createFullWalletClient() that builds an in-memory wallet with its own DID/credential/message providers.
integration-tests/delegation-offer.test.ts Two-wallet end-to-end test for the delegation offer flow (invite → request → issuance).

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

Comment thread packages/core/src/delegation/delegation-issuance.ts Outdated
Comment thread packages/core/src/delegation/delegation-issuance.ts Outdated
Comment thread packages/core/src/delegation/delegation-issuance.ts Outdated
Comment thread packages/core/src/delegation/delegation-offer.ts Outdated
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 Outdated
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
The EDV server returns HTTP 404 on /query for vaults with no indices yet
(e.g. fresh vaults from wrong biometric credentials). ky now surfaces this
as 'Request failed with status code 404 Not Found' rather than the
legacy 'Not Found' message the universal-wallet catch handles, so
biometric authentication failures were leaking raw HTTP errors instead of
the domain-level 'Invalid identifier' error.
Comment thread packages/core/src/delegation/delegation-offer.ts
Comment thread packages/core/src/delegation/delegation-offer.ts Outdated
@maycon-mello maycon-mello merged commit 3de06b9 into master Jun 3, 2026
8 checks passed
@maycon-mello maycon-mello deleted the DCKA-5127-delegation-of-credential-using-the-wallet branch June 3, 2026 22:28
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