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 support for more starknet signature format #1040

Merged
merged 13 commits into from
Jul 25, 2024

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jul 24, 2024

Fixing snapshot-labs/sx-monorepo#383 (comment)

SDK currently only support Argent x signature format: [r, s] (2 items array)

This PR:

  • add support for signature returned by Braavos wallet: [r,s,v] (3 items array)
  • throw an error when the contract is not deployed
  • validate the results return by is_valid_signature before returning

@wa0x6e wa0x6e changed the title chore: add tests chore: add support for more starknet signature format Jul 25, 2024
@wa0x6e wa0x6e marked this pull request as ready for review July 25, 2024 05:57
@wa0x6e wa0x6e requested a review from ChaituVR July 25, 2024 05:58
@wa0x6e wa0x6e changed the title chore: add support for more starknet signature format feat: add support for more starknet signature format Jul 25, 2024
src/verify/starknet.ts Outdated Show resolved Hide resolved
@wa0x6e wa0x6e requested a review from ChaituVR July 25, 2024 06:10
src/verify/starknet.ts Show resolved Hide resolved
src/verify/starknet.ts Outdated Show resolved Hide resolved
Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tAck

@ChaituVR ChaituVR merged commit 04b881d into master Jul 25, 2024
4 checks passed
@ChaituVR ChaituVR deleted the fix-add-support-for-more-starknet-signature-format branch July 25, 2024 11:00
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