ava-labs / hypersdk

Opinionated Framework for Building Hyper-Scalable Blockchains on Avalanche
https://hypersdk.xyz/
Other
194 stars 100 forks source link

PoC: Retrofit for EIP-712 Transaction Signing #1114 #1114

Closed containerman17 closed 1 month ago

containerman17 commented 1 month ago

Most blockchain applications generate transactions through JavaScript browser-based clients. I expect the same for HyperSDK.

EIP-712 allows structured data to be signed in Core wallet, Metamask, and other mainstream EVM-compatible wallets. We can use it as a temporary solution to sign transactions in HyperSDK.

Drawbacks:

Anticipated steps for PoC:

The goal is not to implement but rather to decide if this is implementable and worth implementing.

containerman17 commented 1 month ago

Prototype implementation of EIP712 integration in MorpheusVM

containerman17 commented 1 month ago

This bug https://github.com/MetaMask/metamask-extension/issues/13675 prevents us from using the full uint256 chain IDs. For now, we'll have to use chainId % 4503599627370476 instead of the actual chain ID in EIP712. This issue requires further investigation.

containerman17 commented 1 month ago

PR https://github.com/ava-labs/hypersdk/pull/1162 and branch containerman17/delegate-digest-to-auth