Skip to content

feat(vc): signature suite registration - #2887

Open
rmlearney-digicatapult wants to merge 11 commits into
openwallet-foundation:mainfrom
rmlearney-digicatapult:feat/signature-suite-registration
Open

feat(vc): signature suite registration#2887
rmlearney-digicatapult wants to merge 11 commits into
openwallet-foundation:mainfrom
rmlearney-digicatapult:feat/signature-suite-registration

Conversation

@rmlearney-digicatapult

@rmlearney-digicatapult rmlearney-digicatapult commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Address TODO in SignatureSuiteRegistry.ts by registering SignatureSuitesRegistry on W3cCredentialsModule.ts and constructor-style registration of both signature suites within the registry.

Backwards-compatible token registration with deprecation marker for removal in v0.8.

Necessary change for simplifying final fix for json-ld strict parsing requirements when using ed25519-2020 suite (next PR after merge).

Required updates throughout multiple test suites, mostly basic changes.

Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
@rmlearney-digicatapult
rmlearney-digicatapult requested a review from a team as a code owner July 29, 2026 19:22
@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 78094a9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot

dosubot Bot commented Jul 29, 2026

Copy link
Copy Markdown

📄 Knowledge review

Dosu skipped reviewing this PR because your organization has used its 200 included credits for the month. Your usage will reset on 2026-08-01. To have Dosu review this PR before then, ask your organization admin to upgrade to a pro account.


Leave Feedback Ask Dosu about credo-ts Add Dosu to your team


const LinkedDataSignature = suites.LinkedDataSignature

export const SignatureSuiteToken = Symbol('SignatureSuiteToken')

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.

If we want to make this a non-breaking addition, we should keep the token for now and still inject them (external registration outside of core repo). We can mark it as deprecated, and remove it in 0.8

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done :)

verificationMethodTypes: [VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020],
supportedPublicJwkTypes: [Ed25519PublicJwk],
} satisfies SuiteInfo)
const signatureSuiteRegistry = dependencyManager.resolve(SignatureSuiteRegistry)

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.

I think we need to register this first as a singleton before we can register it. Since we always use agent scoped registraiotn ,we don't use @singleton from tsyringe, but then we first need to registerSingleton on the dependency manager.

So it would need to happen in the base agent then as we need to make sure it runs before any code calls resolve on the SignatureSuiteRegistry. This is the reason it has this kinda hacky approach.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we're safe to register inside W3cCredentialsModule and not on the base agent.

Registration order on the base agent is:

  • EventEmitter
  • JwsService
  • StorageVersionRepository
  • StorageUpdateService
  • AgentConfig
  • AgentDependencies
  • Stop$
  • Filesystem

Then default modules:

  • dcql <- resolves SignatureSuiteRegistry lazily from request-handling method, not during DcqlModule.register()
  • genericRecords
  • dids
  • w3cCredentials <- SignatureSuiteRegistry singleton registered here and Ed25519 suites populated

Unless a user passes an alternative w3cCredentials overriding the default and forgets to call registerSingleton(SignatureSuiteRegistry) we should be safe.

Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
@rmlearney-digicatapult

Copy link
Copy Markdown
Contributor Author

Conformance test issue #2888

@rmlearney-digicatapult

Copy link
Copy Markdown
Contributor Author

@TimoGlastra the goal with this is to allow signature suites to pass their compatible @context at registration, so that JSON-LD credential composition can easily match @context to pass the strict parsing requirement. I'm current facing issues with strict mode because context for Eddsa25519-2020 is not compatible with the DID Core context (which was finalised in 2018 and only contains the context for the Eddsa25519-2018 suite)

@rmlearney-digicatapult
rmlearney-digicatapult force-pushed the feat/signature-suite-registration branch from 270f8d1 to 97364c1 Compare September 8, 2026 08:54
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
@rmlearney-digicatapult
rmlearney-digicatapult force-pushed the feat/signature-suite-registration branch from 447ac85 to 78094a9 Compare September 8, 2026 15:37
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.

2 participants