Skip to content

feat: support KERIpy-style /delegate/request EXN sending#432

Open
kentbull wants to merge 3 commits into
WebOfTrust:mainfrom
kentbull:single-sig-delegate-request-support
Open

feat: support KERIpy-style /delegate/request EXN sending#432
kentbull wants to merge 3 commits into
WebOfTrust:mainfrom
kentbull:single-sig-delegate-request-support

Conversation

@kentbull

@kentbull kentbull commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

We need KERIpy-style /delegate/request EXN sending like line 199 in the Anchorer.partialWitnessEscrow in the main branch. This has been a missing feature in KERIA for a long time.

This delegation request EXN is sent from the delegate to the delegator in order for the delegator to get a notification that it can surface to a Signify UX where it shows the edge controller that a delegation request has come through.

In order for single sig delegation to have a KERIpy-style workflow this change is necessary.

I also added protocol, module, class, and function docs to clarify this change.

@kentbull kentbull requested review from iFergal and lenkan April 22, 2026 16:03
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.75%. Comparing base (2566d4c) to head (f015156).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/keria/app/delegating.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #432      +/-   ##
==========================================
+ Coverage   87.73%   87.75%   +0.02%     
==========================================
  Files          26       26              
  Lines        5823     5841      +18     
==========================================
+ Hits         5109     5126      +17     
- Misses        714      715       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/keria/app/delegating.py Outdated
exc.addHandler(delreq)


class DelegateRequestHandler:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All of these look identical to the keripy implementation - I think we should import them

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I agree, I'll just import it. Good catch.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@kentbull I also meant loadHandlers and delegateRequestExn - I don't see a reason to not import them

Comment thread docs/protocol.md Outdated
@kentbull kentbull force-pushed the single-sig-delegate-request-support branch 4 times, most recently from ac9cee9 to 21cf54e Compare May 7, 2026 18:03
@kentbull kentbull force-pushed the single-sig-delegate-request-support branch from 21cf54e to 3d000ff Compare May 11, 2026 20:49
@kentbull kentbull force-pushed the single-sig-delegate-request-support branch from 3d000ff to 6ad75f8 Compare May 26, 2026 22:21
@kentbull kentbull requested review from iFergal and removed request for lenkan May 26, 2026 22:21
@kentbull kentbull force-pushed the single-sig-delegate-request-support branch from 6ad75f8 to f015156 Compare May 26, 2026 22:39
- multisig signing
- credential issuance and presentation, single or multisig
- challenge response and verification
- identifier creation

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Notifications are generally driven by exchange message responses. What notification do we get for identifier creation that isn't multisig (mentioned above)?

hard-coding the inception case.

##### Inception
For delegated inception, `s` is `"0"` and `d` is usually the delegate prefix.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove usually

separately.

We should add at the very least an error message in the logs when receiving an approval request from
an unknown sender, though ideally that would be surfaced to the user in some visible way. Right now

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Surfacing every unknown message would be problematic in production imo

The `/delegate/request` EXN is signed by the sender's habitat selected by KERIA's delegation
`Anchorer`. For a Signify managed single-sig AID, that sender is normally the delegatee agent/proxy
AID, because Signify habitats do not sign inside KERIA. For a group delegated AID, the sender is
the local member habitat.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I presume we actually do this because the delegated AID won't be valid until it is approved, so the exn wouldn't surface to the delegator

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