Skip to content

Conversation

@yasincaliskan
Copy link
Collaborator

@yasincaliskan yasincaliskan commented Jan 12, 2026

Description

This PR extends the signing API with built-in signature validation.

  • Added a public verifySignature function to validate signatures for arbitrary data
  • Added a validateSignature option to signData to enable automatic verification after signing
  • When verifySignature: true is passed to signData, it checks whether the signer address is rekeyed and, if so, sends the signing request using the auth address

@yasincaliskan yasincaliskan requested a review from wjbeau January 12, 2026 13:37
@yasincaliskan yasincaliskan self-assigned this Jan 12, 2026
@yasincaliskan yasincaliskan marked this pull request as draft January 12, 2026 14:48
@yasincaliskan yasincaliskan removed the request for review from wjbeau January 12, 2026 14:48
@yasincaliskan yasincaliskan marked this pull request as ready for review January 13, 2026 09:52
@yasincaliskan yasincaliskan requested a review from wjbeau January 13, 2026 09:57
Copy link

@wjbeau wjbeau left a comment

Choose a reason for hiding this comment

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

Just one comment about the MX prefix

**Parameters:**
- `data`: Array of arbitrary data to sign
- `signer`: Algorand address that will sign the data
- `verifySignature` (optional): If `true`, automatically detects if the account is rekeyed (has `authAddr`) and uses the `authAddr` as the signer. After signing, verifies each signature against the original data. Defaults to `false`.
Copy link

Choose a reason for hiding this comment

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

We might want to explain the 'MX' prefix requirement? I.e. our verification is consistent with algosdk's verification? Or maybe we should verify both (i.e. prepend MX, check it, if it fails try verifying without MX prefix?)

@yasincaliskan yasincaliskan requested a review from wjbeau January 14, 2026 11:54
@yasincaliskan yasincaliskan mentioned this pull request Jan 21, 2026
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.

3 participants