-
Notifications
You must be signed in to change notification settings - Fork 87
feat(wrapped-keys): add EIP-712 signTypedData functionality #979
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
base: master
Are you sure you want to change the base?
feat(wrapped-keys): add EIP-712 signTypedData functionality #979
Conversation
…hereum key - Introduced signTypedDataWithEncryptedEthereumKey function for signing typed data using an encrypted Ethereum key. - Updated API to include signTypedDataWithEncryptedKey. - Enhanced types to support signTypedData message parameters. - Updated constants and code repositories to include new signTypedData actions. - Added tests for signTypedData functionality in the lit actions client.
|
Hi @kouraf, thanks for the PR! Could you please also add tests in Thanks! |
|
Hi @Ansonhkg do you have an up to date readme for running tests ? the one in |
Yea sorry for the outdated docs, been busy on Naga!
You can do: // datil-dev for Dev, datil-test for Test, datil for Mainnet
NETWORK=datil-dev yarn test:local --filter=<your_test_name>You must also have the PRIVATE_KEYS="0x...1, 0x...2"If you still can't run the tests, just commit the changes for the tests and we will take a look :) |
- Introduced tests for signing typed data with both wrapped and generated Ethereum keys. - Added failure tests for invalid parameters and decryption scenarios. - Updated utility functions to derive Ethereum addresses from generated public keys. - Enhanced existing test suite to include new test cases for Ethereum typed data signing.
…t parameters - Updated the TypedData message structure to use more specific types for domain, types, and value fields. - Simplified the test parameters in the Ethereum signing test to directly use wallet addresses. - Updated related interfaces and types for consistency across the codebase.
|
Hi @Ansonhkg , I’ve added the tests and ran them on datil-dev with my keys. I also added some types. |
Description
This PR adds signTypedData functionality to the wrapped-keys package, enabling users to sign EIP-712 typed data using encrypted Ethereum keys. The implementation includes both the API layer and the underlying Lit Action functionality.
Key Changes:
Note: I'm unsure if this implementation meets your standards, but I needed this functionality ASAP for my project and it's working a 100% as expected. I'm happy to make any required changes to make it production-ready. I also have a signRawMessage implementation that I didn't include here to keep the PR cleaner.
Type of change
How Has This Been Tested?