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

Feature request: stacking helper function for verify-signer-key-sig #1673

Closed
hstove opened this issue Apr 16, 2024 · 0 comments · Fixed by #1676
Closed

Feature request: stacking helper function for verify-signer-key-sig #1673

hstove opened this issue Apr 16, 2024 · 0 comments · Fixed by #1676
Assignees
Labels
feature Brand new functionality. New pages, workflows, endpoints, etc.

Comments

@hstove
Copy link
Contributor

hstove commented Apr 16, 2024

Problem

When a client wants to verify a Stacking payload, they can validate the signature by re-generating the PoX-4 message hash. This works for users that include a signer-signature, but that param is optional. When the signature is omitted, the pox-4 contract checks the signer-key-authorization map to ensure that an authorization was previously set.

There's a helper read-only function in pox-4 verify-signer-key-sig which essentially does both of these things (either verify the signature or verify that an authorization exists). It would be nice to expose this read-only function in the Stacking library, so that clients can validate a payload before submitting a transaction.

Solution

Add a verifySignerKey() (or similarly named) function that calls the read-only function verify-signer-key-sig.

@hstove hstove added the feature Brand new functionality. New pages, workflows, endpoints, etc. label Apr 16, 2024
@janniks janniks self-assigned this Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Brand new functionality. New pages, workflows, endpoints, etc.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants