Skip to content

Conversation

@derekpierre
Copy link
Member

@derekpierre derekpierre commented Oct 23, 2025

Type of PR:

  • Bugfix
  • Feature
  • Documentation
  • Other

Required reviews:

  • 1
  • 2
  • 3

What this does:

Depends on nucypher/nucypher-core#113

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:

  • Ignore failing CI integration tests for now (other tests pass) - this is because lynx nodes aren't running the latest changes from Common signing objects from nucypher-core nucypher#3646. If they did, then current signing flows would fail. My plan is to update lynx nodes, porter, contracts, latest nucypher/taco npm package all within a single maintenance day - that day is currently undecided.
  • Since this is related to SigningCoordinator changes (Signing Request key nucypher-contracts#438) - I also need to regenerate agents code based on updated contract before merging.

@derekpierre derekpierre self-assigned this Oct 23, 2025
…e to specify their corresponding UserOperation.

Convert `UserOperationToSign` to `nucypher-core`:UserOperation when crafting signature request.
Use latest types from Porter for sending signature requests and processing signature response.
Add/update tests.
@derekpierre derekpierre force-pushed the common-signing-objects branch from 2d2ec86 to bca94ca Compare October 24, 2025 12:27
…now includes signer address.

Modify Porter response to handle SignatureResponse and not a tuple of signer address and SignatureResponse.
Update tests.
…ore object).

Add type guard for PackedUserOperationToSign.
Add helper methods for converting number values to bigint, and data values to Uint8Array.
@derekpierre derekpierre mentioned this pull request Oct 28, 2025
30 tasks
@derekpierre derekpierre requested a review from Copilot October 30, 2025 00:49
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 migrates from using a published NPM package version of @nucypher/nucypher-core (v0.14.5) to a local link dependency, and refactors UserOperation signing to use native WASM types instead of JSON serialization. The changes improve type safety and leverage the WASM core library's built-in types and serialization.

Key Changes:

  • Replace @nucypher/nucypher-core: ^0.14.5 with link:../nucypher-core/nucypher-core-wasm-bundler across all packages
  • Refactor UserOperation/PackedUserOperation handling to use native UserOperationSignatureRequest and PackedUserOperationSignatureRequest from nucypher-core
  • Add converter functions (toCoreUserOperation, toCorePackedUserOperation) to bridge between TypeScript types and WASM types
  • Update test mocks to use SignatureResponse class instead of JSON-based signatures
  • Add validator index parameter to Validator constructor

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-lock.yaml Updated dependency references from NPM version to local link
package.json Changed nucypher-core dependency to local link
packages/*/package.json Updated nucypher-core dependencies across all packages
packages/shared/src/types.ts Replaced UserOperation type with UserOperationToSign and PackedUserOperationToSign, added converter functions
packages/shared/src/porter.ts Refactored signUserOp to use SignatureResponse instead of JSON decoding
packages/taco/src/sign.ts Updated to use native WASM signature request types
packages/test-utils/src/utils.ts Added index parameter to Validator constructor
packages/taco/test/*.ts Updated tests to use new types and serverAggregate.publicKey
packages/shared/test/porter.test.ts Refactored tests to use SignatureResponse objects
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@derekpierre derekpierre changed the title [WIP] Common Signing Objects from nucypher-core. Common Signing Objects from nucypher-core. Oct 30, 2025
@derekpierre derekpierre marked this pull request as ready for review October 30, 2025 00:56
Copy link
Contributor

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

LGTM! Nothing to add. Huge work the three PRs 🙌

@derekpierre derekpierre changed the title Common Signing Objects from nucypher-core. Common Signing Objects from nucypher-core Nov 3, 2025
@derekpierre
Copy link
Member Author

Subsumed by #737

@derekpierre derekpierre closed this Nov 7, 2025
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