getwax / wax

Wallet Account eXperiments Monorepo
MIT License
26 stars 13 forks source link

Safe AnonAadhaar Plugin #223

Closed porco-rosso-j closed 4 months ago

porco-rosso-j commented 8 months ago

What is this PR doing?

Let me apologize first, as this may not be an appropriate PR. I created this PR not to expect to make any change to the current codebase but, by exhibiting the examples, to hear the WAX team's impression/opinions on adding AnonAadhaar, a zk solution developed by another PSE team, to the current Wax stack as a showcase of an additional "signature validation" scheme.

I've added two files in packages/plugins/src/safe that are SafeAnonAadhaarPlugin.sol and SafeAnonAadhaarFactory.sol. This plugin allows the owner of the Aadhaar card, a biometric identity card issued by the Indian government, to control 4337 wallets via the Safe plugin. Its recovery example can also be added for sure.

The functionality of this validation scheme has already been proven as I've built a 4337 wallet PoC with AnonAadhaar called Banganoir. Demo is here. Btw, I'm not from AnonAadhaar but an external contributor.

Let me know if you have any questions.

How can these changes be manually tested?

No test in this PR. But if Wax team finds this integration valuable, I can work on adding tests and other necessary improvements.

Checklist

Guidelines

porco-rosso-j commented 7 months ago

#40eb6b9: Working on SafeAnonAadhaarPlugin test. Currently, it still fails due to an on-chain verification error caused by a bug in @anon-aadhaar/core. This will be resolved after this PR is merged and a fixed version is released.

porco-rosso-j commented 7 months ago

Test completed & natspec added. Maybe ready to be merged once here if it looks fine and makes sense.

future work:

Note: it seems like some commits made unnecessary changes to files like .gitmodules and userOpUtils.ts. Please ignore them when merging.

jacque006 commented 5 months ago

Hey @porco-rosso-j , thanks for updating this contribution/PR, overall looks good :+1: Apologies for the extensive delay in reviewing again.

Before I can merge, need two things resolved: image

If you need help with either of these things, let me know I can PR into your fork branch.