Skip to content

Eip712 typed data signing playground#201

Open
1evi7eo wants to merge 2 commits intobnb-chain:mainfrom
1evi7eo:eip712-typed-data-signing-playground
Open

Eip712 typed data signing playground#201
1evi7eo wants to merge 2 commits intobnb-chain:mainfrom
1evi7eo:eip712-typed-data-signing-playground

Conversation

@1evi7eo
Copy link

@1evi7eo 1evi7eo commented Jan 24, 2026

Description

eip712-typed-data-signing-playground

This PR updates the EIP-712 Typed Data Signing Playground, a BNBChain Cookbook demo that enables EIP-712 typed structured data hashing and signing on BNB Smart Chain (BSC). The playground provides an interactive web interface where users can connect their Web3 wallet (e.g. MetaMask), load sample EIP-712 structured data (BSC Mail example), view computed EIP-712 hashes (domain separator, struct hash, and full message digest), sign typed data via eth_signTypedData_v4, and verify signatures to recover the signer address.

The project demonstrates domain separation, struct hashing, and signature verification using ethers v6, built with TypeScript and Vite. This serves as both a learning tool and a reference implementation for EIP-712 typed data signing on BSC.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • Ran unit tests with npm test to verify EIP-712 hash calculations and signature verification
  • Tested wallet connection and signing flow in browser with MetaMask on BSC
  • Verified EIP-712 domain separator, struct hash, and full message digest match expected values
  • Tested signature verification and signer recovery functionality
  • Built and previewed production build with npm run build && npm run preview

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@vivixu-cmd
Copy link

Congratulations! You have received a Cookbook reward. Please reply with your BSC wallet address.Thanks

@1evi7eo
Copy link
Author

1evi7eo commented Jan 27, 2026

Congratulations! You have received a Cookbook reward. Please reply with your BSC wallet address.Thanks

Thank you for the opportunity to contribute!
0x23b23556c3CAA3C582EeE23Fc0D972352FB2a62c

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