Skip to content
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

feat: add SRC-16 Typed Structured Data #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CatspersCoffee
Copy link

Type of change

  • New feature
  • Documentation

Changes

The following changes have been made:

  • Added SRC-16 standard for typed structured data hashing and signing
  • Implemented core encoding functions for primitive types
  • Added domain separator logic for cross-protocol signature safety
  • Created comprehensive test suite for encoders
  • Added example implementation with Mail struct
  • Included documentation for wallet integration

Notes

  • This standard enhances the Fuel ecosystem by providing a consistent way to handle structured data signing
  • Compatible with existing EVM wallet infrastructure through domain type flexibility
  • Designed to be extensible for future data types
  • Test coverage includes both single value and dynamic array encoding

Related Issues

Closes #

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
    • If my change requires substantial documentation changes, I have requested support from the DevRel team
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.
  • I have updated the changelog to reflect the changes on this PR.

@CatspersCoffee CatspersCoffee requested a review from a team as a code owner December 4, 2024 13:08
@fuel-cla-bot
Copy link

fuel-cla-bot bot commented Dec 4, 2024

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Antony <b***@g***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Fuel Labs Contributor License Agreement and this Pull Request will be revalidated.

@fuel-cla-bot
Copy link

fuel-cla-bot bot commented Dec 4, 2024

Thanks for the contribution! Before we can merge this, we need @CatspersCoffee to sign the Fuel Labs Contributor License Agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant