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: query_account() should return pub_key alongside account_number and sequence #339

Open
3 tasks done
mperklin opened this issue Mar 23, 2023 · 0 comments
Open
3 tasks done

Comments

@mperklin
Copy link
Contributor

Prerequisites

  • I checked the documentation and made sure this feature does not already exist.
  • I checked the existing issues to make sure this feature has not already been requested.
  • I have read the code of conduct before creating this issue.

Problem

There are cases where the user of cosmpy needs to retrieve the public key of an address from a cosmos blockchain daemon.

To enable this, cosmos blockchain daemons have the /cosmos/auth/v1beta1/accounts/cosmos1yaddayaddayadda query which retrieves the pub_key, account_number, and sequence values of the specified account.

Unfortunately, the aerial client's query_account function only returns the account_number and sequence values and does not return the pub_key.

Feature / Solution

A solution is to alter the query_account function to return the pub_key value that it is already retrieving from the server instead of discarding it.

Alternatives

At the moment, the only alternative I can find for a cosmpy dev to retrieve pub_keys from Cosmos daemons is to do it outside of cosmpy and use direct comms with the daemons instead.

Additional Context

The current implementation of query_account returns an instance of Account() which does not have the pub_key field defined.

A proper solution would require either one of the following to accomplish the goal:

  1. Altering the existing Account() definition to make a pub_key field available
  2. Creating a definition of a new data structure that has all fields returned from the /cosmos/auth/v1beta1/accounts/{account} call
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

No branches or pull requests

1 participant