Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
76e1f3c
chore: migrate credo 0.6 phase 1 wiring and verified-drpc module API
rmlearney-digicatapult Feb 27, 2026
8db841c
chore: complete phase 2 wallet and didweb KMS migration
rmlearney-digicatapult Feb 27, 2026
048b93a
feat: complete phase 3 didcomm controller and event migration
rmlearney-digicatapult Feb 27, 2026
a3658f0
chore: complete Credo 0.6 migration and stabilize unit tests
rmlearney-digicatapult Feb 28, 2026
b28ad92
fix: pin node-addon-api for Node 24 Docker builds
rmlearney-digicatapult Feb 28, 2026
5ac9042
test: update credential test setup
rmlearney-digicatapult Feb 28, 2026
00b2253
test: align integration suite with credo v0.6 contracts
rmlearney-digicatapult Feb 28, 2026
9caec67
unit test for required label in oob
rmlearney-digicatapult Feb 28, 2026
5bd08cb
refactor(oob): enforce credo label contract across invitation paths
rmlearney-digicatapult Feb 28, 2026
a886776
docs: note OOB label requirement in v0.6 migration notes
rmlearney-digicatapult Feb 28, 2026
d86cc9e
Align v0.6 type contracts and consolidate migration docs
rmlearney-digicatapult Mar 1, 2026
7c7f71e
Refine controller type boundaries and naming consistency
rmlearney-digicatapult Mar 1, 2026
a7d64af
Converge DID resolution typing to Credo result model
rmlearney-digicatapult Mar 1, 2026
37a4c1e
Refactor DID create-state DTOs with shared base
rmlearney-digicatapult Mar 1, 2026
df5e2d7
Finalize Phase 9.3 docs and proof boundary notes
rmlearney-digicatapult Mar 1, 2026
d694e5a
chore: finalize credo v0.6 contract alignment and test updates
rmlearney-digicatapult Mar 1, 2026
c16ae9a
chore: patch credo loaders and pex via postinstall
rmlearney-digicatapult Mar 2, 2026
dee7775
fix: copy credo patch script before npm ci in docker
rmlearney-digicatapult Mar 2, 2026
11f1f17
test: stabilize did:web w3c credential flow on credo 0.6
rmlearney-digicatapult Mar 2, 2026
b38b3d4
Harden PEX accept-request input and redact PEX selections
rmlearney-digicatapult Mar 2, 2026
3e5d8b9
Add bootstrap idempotence tests and clarify Askar KMS migration notes
rmlearney-digicatapult Mar 2, 2026
954cb7d
migration documents
rmlearney-digicatapult Mar 2, 2026
2f4f59c
Add shape-based JSON-LD validation and document boundary policy
rmlearney-digicatapult Mar 2, 2026
fac810c
Align JSON-LD credential validation to 400 and sync docs/tests
rmlearney-digicatapult Mar 2, 2026
76b491f
version bump
rmlearney-digicatapult Mar 2, 2026
a6c4fbf
migration note
rmlearney-digicatapult Mar 2, 2026
a849ba2
test(unit): standardize v0.6 teardown and hook usage
rmlearney-digicatapult Mar 2, 2026
31e87e1
test(integration): normalize hooks and document migration notes
rmlearney-digicatapult Mar 2, 2026
c58b118
fix(api): surface jsonld validation details and harden drpc timeout c…
rmlearney-digicatapult Mar 2, 2026
1be444f
test(webhook): remove fixed teardown delay
rmlearney-digicatapult Mar 2, 2026
b8bfd14
refactor(wallet): centralize compact JWE base64url validation
rmlearney-digicatapult Mar 2, 2026
06f24e1
chore(migration): align agent config reads with credo v0.6
rmlearney-digicatapult Mar 2, 2026
f2ccce0
chore(esm): align tsconfig and migration notes
rmlearney-digicatapult Mar 2, 2026
b5ce92c
Align BadRequest contract and close remaining PR review items
rmlearney-digicatapult Mar 3, 2026
515c2f9
Fix verified-dRPC validation and enforce jsonrpc 2.0
rmlearney-digicatapult Mar 3, 2026
8a8988a
docs
rmlearney-digicatapult Mar 3, 2026
9e5196e
Refactor DidComm naming cleanup and document migration
rmlearney-digicatapult Mar 3, 2026
56f77ae
Restore UUID typing for credential connectionId fields
rmlearney-digicatapult Mar 3, 2026
570fd1a
migration docs
rmlearney-digicatapult Mar 3, 2026
4f65f76
Align error response objects with OpenAPI annotations
rmlearney-digicatapult Mar 3, 2026
0a548f0
chore: upgrade credo-ts to 0.6.3 and remove patch script
rmlearney-digicatapult Mar 10, 2026
592cb0a
doc cleanup
rmlearney-digicatapult Mar 10, 2026
faedfa0
remove patch from dockerfile
rmlearney-digicatapult Mar 11, 2026
926196b
Align 422 errors with UnprocessableEntityError
rmlearney-digicatapult Mar 11, 2026
2912c4e
remove patch
rmlearney-digicatapult Mar 11, 2026
d7aeff4
remove askar-shared
rmlearney-digicatapult Mar 12, 2026
533e573
refactor: unify error envelopes and typed controller responses
rmlearney-digicatapult Mar 23, 2026
6040f13
refactor: align error-object responses and tests
rmlearney-digicatapult Mar 23, 2026
d12727c
fix(drpc): remove cast now that credo-ts types timeout param on sendR…
rmlearney-digicatapult Mar 23, 2026
a5df6fe
version bump
rmlearney-digicatapult Mar 23, 2026
d0d8626
remove unnecessary error string codes
rmlearney-digicatapult Mar 23, 2026
e9e91d6
address review comments
rmlearney-digicatapult Mar 23, 2026
1faeabb
Merge branch 'feature/unify-errors' into chore/migrate-credo-0.6.x
rmlearney-digicatapult Mar 24, 2026
5284ef3
remove name casts in tests
rmlearney-digicatapult Mar 24, 2026
7852008
fix namespace
rmlearney-digicatapult Mar 24, 2026
e594b3d
remove unused devdependencies
rmlearney-digicatapult Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,14 @@ The generated DID:web document follows the W3C DID Core specification and includ

- **@context**: Standard DID contexts
- **id**: The DID identifier
- **verificationMethod**: Cryptographic key material
- **authentication**: Authentication methods
- **assertionMethod**: Assertion methods
- **service**: Service endpoints for communication
- **verificationMethod**: Canonical Credo v0.6 methods (`Ed25519VerificationKey2020` for `#auth-key`/`#assertion-key`, `X25519KeyAgreementKey2019` for `#agreement-key`)
- **authentication**: References `#auth-key`
- **assertionMethod**: References `#assertion-key`
- **keyAgreement**: References `#agreement-key`
- **capabilityInvocation**: References `#auth-key`
- **service**: DIDComm v1-compatible `did-communication` service with `recipientKeys` referencing `#auth-key`

For migration details from the legacy generated shape (`#owner`/`#encryption`, multibase/base58 keys), see `docs/credo-v0.6-migration-release-notes.md` (DID:web generated document shape section).

### Loading `did:web`s

Expand Down
16 changes: 13 additions & 3 deletions docs/credentials-and-proofs.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ W3C credentials in this service use JSON-LD format. Verification uses Presentati
}
```

Policy note: `POST /v1/proofs/{proofRecordId}/accept-request` currently rejects client-supplied `proofFormats.presentationExchange.credentials` with `422`. PEX credential selection is server-side/agent-side only.

---

## AnonCreds Credential Flow
Expand Down Expand Up @@ -193,15 +195,23 @@ For detailed documentation on how to control creating proofs with specific crede

## Developer Notes: Type Safety & Internal Casts

In the controller layer (`src/controllers/`), we use the `satisfies` keyword at the DTO boundary to align API types with the agent's internal method parameter types, with a small number of explicit casts where needed (e.g., proof accept-request formats).
In the controller layer (`src/controllers/`), we use the `satisfies` keyword at the DTO boundary to align API types with the agent's internal method parameter types, with a small number of explicit casts where needed (for example, proof format adaptation in utility helpers).

### Why is this necessary?

The codebase bridges two distinct type systems:

1. **Rest API Types (TSOA):** Defined in `src/controllers/types.ts`. These are "Plain Old JavaScript Objects" (POJOs) optimized for generating clean OpenAPI/Swagger documentation. They explicitly list fields for supported protocols (like `anoncreds` and `w3c` in `credentialFormats`).
1. **Rest API Types (TSOA):** Defined under `src/controllers/types/`. These are "Plain Old JavaScript Objects" (POJOs) optimized for generating clean OpenAPI/Swagger documentation. They explicitly list fields for supported protocols (for example `anoncreds` and `jsonld` in `credentialFormats`).
2. **Internal Framework Types (Credo-TS):** Defined dynamically throughout `@credo-ts/core`. These types often rely on complex TypeScript generics to support extensible modules (e.g., `CredentialFormatPayload<CredentialFormats[], 'acceptOffer'>`).

While the API type and the internal type are structurally compatible (they hold the same data), the TypeScript compiler cannot easily verify that the explicit TSOA object satisfies the complex generic constraints of the extensible agent modules.

Using `satisfies` and explicit casts only where necessary acts as a verified bridge. It confirms to the compiler that the API input conforms to the internal module requirements without circumventing type safety (which using `as unknown` would do). This ensures we can support polymorphic endpoints—handling both AnonCreds and W3C formats simultaneously—while maintaining strict compilation checks.
Using `satisfies` and explicit casts only where necessary acts as a verified bridge. It confirms to the compiler that the API input conforms to the internal module requirements without circumventing type safety (which using `as unknown` would do). This ensures we can support polymorphic endpoints—handling both AnonCreds and W3C JSON-LD formats simultaneously—while maintaining strict compilation checks.

### Current v0.6.x boundary rules

* Prefer explicit local DTO interfaces at TSOA controller boundaries.
* Avoid `Pick`/`Omit` utility-type composition in controller request/response models.
* Prefer upstream naming directly (including `...Options`) when semantics match.
* Keep proof/PEX DTOs local intentionally to avoid Sphereon/PEX graph instability in OpenAPI generation.
* Reuse direct Credo type re-exports where proven stable (for example DID request/resolution option types).
22 changes: 22 additions & 0 deletions docs/credo-did-documents-v0.5-v0.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,25 @@ Keys are selected by **relationship + algorithm compatibility**, not inferred.

Credo-TS v0.5.x treats the DID Document as a **key container**.
Credo-TS v0.6.x treats it as a **cryptographic contract**.

---

## 8. Implemented Cloudagent Profile (2026-02-27)

`veritable-cloudagent` now generates DID:web documents using canonical v0.6 key semantics:

- `verificationMethod` uses canonical v0.6 key types:
- `#auth-key` and `#assertion-key`: `Ed25519VerificationKey2020`
- `#agreement-key`: `X25519KeyAgreementKey2019`
- Relationships are explicit:
- `authentication: [#auth-key]`
- `assertionMethod: [#assertion-key]`
- `keyAgreement: [#agreement-key]`
- `capabilityInvocation: [#auth-key]`
- DID service remains DIDComm v1-compatible (`did-communication`) for current interoperability.

Implementation references:

- `src/utils/didWebGenerator.ts`
- `src/controllers/v1/wallet/WalletController.ts` (JWK-compatible key-id resolution)
- `tests/unit/didWebGenerator.test.ts`
199 changes: 0 additions & 199 deletions docs/credo-v0.6-migration-pex.md

This file was deleted.

Loading
Loading