Skip to content

Conversation

@derekpierre
Copy link
Member

Type of PR:

  • Bugfix
  • Feature
  • Documentation
  • Other

Required reviews:

  • 1
  • 2
  • 3

What this does:
Based over #113.

Encrypt requests/responses for end-to-end encrypted functionality for signing.

Issues fixed/closed:

  • Fixes #...

Why it's needed:

Explain how this PR fits in the greater context of the NuCypher Network.
E.g., if this PR address a nucypher/productdev issue, let reviewers know!

Notes for reviewers:

What should reviewers focus on?
Is there a particular commit/function/section of your PR that requires more attention from reviewers?

@derekpierre derekpierre self-assigned this Oct 30, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 91.29771% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.51%. Comparing base (293403e) to head (367e9f4).

Files with missing lines Patch % Lines
nucypher-core/src/session.rs 84.21% 36 Missing ⚠️
nucypher-core-python/src/lib.rs 93.44% 15 Missing ⚠️
nucypher-core/src/signature_request.rs 96.96% 6 Missing ⚠️
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.
📢 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.

@derekpierre derekpierre changed the title [WIP] Encrypted Signing Request/Response [WIP] Encrypted Signature Request/Response Oct 30, 2025
@derekpierre derekpierre requested a review from Copilot October 31, 2025 17:57
Copy link

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 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.

@derekpierre derekpierre force-pushed the encrypted-signing branch 5 times, most recently from ccce351 to 8af3175 Compare November 5, 2025 21:44
@derekpierre derekpierre changed the base branch from signing to main November 5, 2025 21:56
@derekpierre derekpierre changed the title [WIP] Encrypted Signature Request/Response Encrypted Signature Request/Response Nov 5, 2025
@derekpierre derekpierre marked this pull request as ready for review November 5, 2025 21:59
@derekpierre derekpierre requested a review from theref November 6, 2025 14:13
Copy link
Member

@manumonti manumonti left a 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.

@derekpierre derekpierre merged commit 806bc81 into nucypher:main Nov 7, 2025
13 checks passed

/// Utility function to deserialize any signature request from bytes - returns specific type directly
#[pyfunction]
pub fn deserialize_signature_request(data: &[u8]) -> PyResult<PyObject> {
Copy link
Collaborator

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.

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.

5 participants