You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Altering the existing Account() definition to make a pub_key field available
Creating a definition of a new data structure that has all fields returned from the /cosmos/auth/v1beta1/accounts/{account} call
The text was updated successfully, but these errors were encountered:
Prerequisites
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 thepub_key
,account_number
, andsequence
values of the specifiedaccount
.Unfortunately, the aerial client's query_account function only returns the
account_number
andsequence
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 ofAccount()
which does not have thepub_key
field defined.A proper solution would require either one of the following to accomplish the goal:
Account()
definition to make apub_key
field available/cosmos/auth/v1beta1/accounts/{account}
callThe text was updated successfully, but these errors were encountered: