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

stacks-signer generate-stacking-signature CLI parses BTC address incorrectly #4596

Closed
hstove opened this issue Mar 27, 2024 · 0 comments · Fixed by #4600
Closed

stacks-signer generate-stacking-signature CLI parses BTC address incorrectly #4596

hstove opened this issue Mar 27, 2024 · 0 comments · Fixed by #4600
Assignees

Comments

@hstove
Copy link
Contributor

hstove commented Mar 27, 2024

The generate-stacking-signature command in stacks-signer uses PoxAddress::from_b58(), which is actually designed to convert a BTC address into a STX address. What I mean is that it converts a mainnet p2pkh address (aka version 0) into a PoX address with the Stacks mainnet p2pkh version (aka 22).

The problem is that I'm converting this to a Clarity tuple, for use with Stacking, which results in incorrect values.

I'm working on a fix that adds a new function to convert a BTC address string into a PoX address that can be used with pox-4, similar to this function in stacks.js

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

Successfully merging a pull request may close this issue.

1 participant