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

Add an endpoint to map a PoX Bitcoin address to its stackers #2183

Open
obycode opened this issue Dec 11, 2024 · 0 comments
Open

Add an endpoint to map a PoX Bitcoin address to its stackers #2183

obycode opened this issue Dec 11, 2024 · 0 comments

Comments

@obycode
Copy link
Member

obycode commented Dec 11, 2024

Is your feature request related to a problem? Please describe.
I don't believe there is currently an easy way to map from a Bitcoin address to the corresponding stacker(s). This would be especially useful when counting SIP votes that are cast on Bitcoin, because we need to map the Bitcoin address to a Stacks address to determine the voting power of that account. The API's event observer is likely already seeing the events with the necessary information to track this.

Describe the solution you'd like
I would like an endpoint that takes in a Bitcoin address as a parameter and returns a list of Stacks addresses receiving PoX rewards to this address. In the case of a solo-stacker, there will be a one-to-one mapping that can be obtained from the stack-stx event. In the case of a delegated stacker, there may be more than one Stacks address mapping to a PoX Bitcoin address. This info can be extracted from the stack-aggregation-commit-indexed events.

Describe alternatives you've considered
The alternative is for anyone who needs this information to either track these events on their own as they come in, or query the API for all of the events from the pox-4 contract and search for the address they need. Tracking it in our API would be more efficient.

If there are better options that you can think of, please let me know.

@github-project-automation github-project-automation bot moved this to 🆕 New in API Board Dec 11, 2024
@zone117x zone117x moved this from 🆕 New to 📋 Backlog in API Board Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant