Skip to content

Refactor event processing#246

Merged
mirceanis merged 3 commits into
masterfrom
refactor-event-processing
Jun 2, 2026
Merged

Refactor event processing#246
mirceanis merged 3 commits into
masterfrom
refactor-event-processing

Conversation

@mirceanis
Copy link
Copy Markdown
Member

fix: revocation of keyAgreement keys was leaving dangling references in the keyAgreement relationship.

Now, more type safety and hopefully easier to understand code.

mirceanis added 2 commits June 2, 2026 10:32
- Refactor event processing logic to use discriminated unions and reduce type assertions
Copilot AI review requested due to automatic review settings June 2, 2026 11:21
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

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 wrapDidDocument to explicitly process owner/delegate/attribute events and to clean up references on revocation (including keyAgreement).
  • 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.

Comment thread src/helpers.ts
Comment thread src/config/deployments.ts
Comment thread src/config/deployments.ts
Comment thread src/resolver.ts
@mirceanis mirceanis merged commit 100bd48 into master Jun 2, 2026
1 check passed
@mirceanis mirceanis deleted the refactor-event-processing branch June 2, 2026 11:43
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))
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