Refactor event processing#246
Merged
Merged
Conversation
- Refactor event processing logic to use discriminated unions and reduce type assertions
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors ERC-1056 event processing in the EthrDidResolver to correctly handle revocations (notably ensuring keyAgreement relationships don’t retain dangling references) and to improve type safety by modeling registry events as a discriminated union.
Changes:
- Refactors event handling in
wrapDidDocumentto explicitly process owner/delegate/attribute events and to clean up references on revocation (includingkeyAgreement). - Introduces discriminated union typings for ERC-1056 events and renames the secp256k1→JWK helper.
- Removes deprecated network references (e.g.
linea:goerli) from configuration/deployments and updates related tests.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/resolver.ts | Refactors event processing logic; fixes revocation cleanup for keyAgreement references. |
| src/helpers.ts | Replaces generic event interface with a discriminated union; renames secp256k1 JWK helper. |
| src/configuration.ts | Removes deprecated Infura network name from the known list. |
| src/config/deployments.ts | Comments out deprecated deployments and annotates deprecated entries. |
| src/tests/resolve.unregistered.test.ts | Updates helper import to the renamed secp256k1ToJwk. |
| src/tests/config.test.ts | Updates expected configured networks and modernizes toThrow usage. |
| .gitignore | Ignores /planning/ directory. |
| .github/workflows/release.yml | Renames the Node setup step label (no behavior change). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
uport-automation-bot
pushed a commit
that referenced
this pull request
Jun 2, 2026
## [13.0.1](13.0.0...13.0.1) (2026-06-02) ### Bug Fixes * revoke keyAgreement key removes dangling references ([#246](#246)) ([100bd48](100bd48))
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.
fix: revocation of keyAgreement keys was leaving dangling references in the
keyAgreementrelationship.Now, more type safety and hopefully easier to understand code.