Feature/negotiate proof proposal#481
Open
rmlearney-digicatapult wants to merge 3 commits intofix/ipfs-stabilityfrom
Open
Feature/negotiate proof proposal#481rmlearney-digicatapult wants to merge 3 commits intofix/ipfs-stabilityfrom
rmlearney-digicatapult wants to merge 3 commits intofix/ipfs-stabilityfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds proof negotiation capability to the Veritable CloudAgent by introducing a new POST /v1/proofs/{proofRecordId}/negotiate-proposal endpoint. This enables a Verifier to counter-propose modified proof requests in response to Holder-initiated proof proposals, supporting both AnonCreds and Presentation Exchange (PEX) formats. The PR also includes comprehensive test refactoring that extracts common integration test helpers and fixtures into a centralized utilities module (from PR #480).
Changes:
- New negotiate-proposal endpoint allows Verifiers to modify and send counter-requests based on Holder proposals
- Integration test helpers extracted to reusable utilities for connection, credential, and proof state polling
- Docker testnet configuration updated to require manual proof acceptance (AUTO_ACCEPT_PROOFS=never) for more realistic testing
- Documentation enhanced with proof negotiation workflow examples
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/controllers/v1/proofs/ProofController.ts | Added negotiateProposal endpoint with PEX validation and proof format transformation |
| src/controllers/types/proof.ts | Added NegotiateProofProposalOptions interface defining the API contract |
| tests/unit/proof.test.ts | Added unit tests for negotiate-proposal covering AnonCreds restriction transformation and PEX validation |
| tests/integration/e2e.negotiateProposal.test.ts | New comprehensive integration tests for both AnonCreds and PEX negotiation flows |
| tests/integration/utils/helpers.ts | Extracted reusable polling helpers (waitForConnectionByOob, waitForCredentialRecord, waitForProofState, etc.) |
| tests/integration/utils/fixtures.ts | Centralized test configuration constants (base URLs, DIDs, invitation payloads) |
| tests/integration/e2e.onboardingAndVerification.test.ts | Refactored to use centralized fixtures and helper functions, reducing code duplication |
| tests/integration/e2e.didKey_w3c.test.ts | Refactored to use test helpers and added explicit accept-presentation calls |
| tests/integration/e2e.didWeb_w3c.test.ts | Refactored to use test helpers for cleaner async state waiting |
| tests/integration/e2e.media-sharing.test.ts | Refactored to use fixtures and waitForConnectionByOob helper |
| tests/integration/e2e.media-sharing.events.test.ts | Refactored to use fixtures and sleep helper |
| tests/integration/e2e.makeAuthorisation.test.ts | Refactored to import ISSUER_DID_KEY from fixtures |
| tests/integration/e2e.didwebServer.test.ts | Refactored to import DID constants from fixtures |
| docs/credentials-and-proofs.md | Added detailed proof negotiation section with workflow examples for both Holder proposals and Verifier negotiation |
| docker-compose-testnet.yml | Changed AUTO_ACCEPT_PROOFS from always/contentApproved to never to enable manual proof flow testing |
| package.json | Version bump to 0.18.1 |
| package-lock.json | Updated lockfile to reflect version change |
a583b7c to
2f1cd49
Compare
2f1cd49 to
48198a5
Compare
48198a5 to
9eb7fa4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Checklist
PR Type
Please delete options that are irrelevant.
Linked tickets
https://digicatapult.atlassian.net/browse/VR-555
High level description
New
POST /v1/proofs/{proofRecordId}/negotiate-proposalendpoint for negotiating proofs during proof exchange (supports Anoncreds and PEX) and testsDetailed description
Added new endpoint logic, unit test, integration test (Anoncreds + PEX)
Deactivate automatic proof acceptance in
docker-compose-testnetand add manual acceptance step into affected test suites (e2e.didKey_w3c.test.ts,e2e.onboardingAndVerification.test.ts)Updated documentation
Describe alternatives you've considered
Operational impact
Enables
verifierto insist on restrictions (e.g. your proof must contain issuer ID) after being presented with aproof-proposalmessageAdditional context
Requires #484 to be merged first