-
Notifications
You must be signed in to change notification settings - Fork 12
Encrypted Signature Request/Response #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #116 +/- ##
==========================================
+ Coverage 59.77% 63.51% +3.74%
==========================================
Files 19 20 +1
Lines 4097 4498 +401
==========================================
+ Hits 2449 2857 +408
+ Misses 1648 1641 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f495be7 to
afc4e24
Compare
b5b6c81 to
71c90d8
Compare
There was a problem hiding this 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 introduces comprehensive support for ERC-4337 Account Abstraction signature requests by adding UserOperation and PackedUserOperation types along with their signature request/response structures. The changes also refactor session-related encryption/decryption functionality into a dedicated module for better code organization.
Key changes:
- New signature request types (
UserOperation,PackedUserOperation) with EIP-712 formatting support - Session module extracted from DKG for encryption/decryption utilities
- Bindings for Python and WebAssembly with comprehensive test coverage
Reviewed Changes
Copilot reviewed 21 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| nucypher-core/src/signature_request.rs | New file implementing signature request/response types and EIP-712 formatting |
| nucypher-core/src/session.rs | Extracted session encryption/decryption from DKG module |
| nucypher-core/src/dkg.rs | Refactored to use session module for encryption utilities |
| nucypher-core/src/address.rs | Added EIP-55 checksum and FromStr implementations |
| nucypher-core-python/src/lib.rs | Python bindings for new signature types |
| nucypher-core-wasm/src/lib.rs | WASM bindings for new signature types |
| nucypher-core/Cargo.toml | Added ethers and serde_json dependencies |
Files not reviewed (1)
- nucypher-core-wasm-bundler/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ccce351 to
8af3175
Compare
… shared between dkg encrypted requests/responses and the eventual encrypted signing requests/responses.
8af3175 to
fd2f36a
Compare
manumonti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard to review because my [rusty] skills (hehe), but at least I didn't see any obvious error.
|
|
||
| /// Utility function to deserialize any signature request from bytes - returns specific type directly | ||
| #[pyfunction] | ||
| pub fn deserialize_signature_request(data: &[u8]) -> PyResult<PyObject> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't that be better handled in user code?
Also pyo3 supports Python union types.
Type of PR:
Required reviews:
What this does:
Based over #113.
Encrypt requests/responses for end-to-end encrypted functionality for signing.
Issues fixed/closed:
Why it's needed:
Notes for reviewers: