Closed regcs closed 1 week ago
Not sure why is not implemented @regcs , I'm gonna ping @hgraphql , in the meantime you could get that value doing a fetch to the MirrorNode with the account logged.
Thanks, Adrian. I am using the mirror node as a workaround already now. It's not super urgent, I just saw it's not implemented and thought it might just have been forgotten. Thanks for pinging @hgraphql 😊
hey @regcs, would you be willing to make a PR to implement this function?
Hi @tmctl, I have already worked on this and obtained some more understanding on the matter. I probably ran into the same issues as the initial developer who decided to not implement the method. Since we cannot derive the public key from the account ID, there are five options I can imagine:
1) Query the account information from a consensus node (requires user interaction & costs the user $0.0001)
2) Query the account information from a mirror node (requires no user interaction, but a mirror node provider input)
3) Send a sign()
request to the wallet and extract the public key from the signature (requires user interaction)
4) Change the CAIP definition for hedera to include the public key of the account
5) Implement a separate mechanism to exchange the information between dApps and wallet providers
IMO, options 1 to 3 are not really beneficial and can be handled by the developers themselves. Options 4 to 5 would require more efforts and maybe not an efficient time investment to solve this small issue.
What are your opinions on that?
@regcs could you clarify the need here, I'm unsure what exactly you're looking for, is it
Feel free to expand with user stories such as the below, these are often useful in helping others understand what you have in mind
@gregscullard Thanks, there is not much to expand on from my side. It's exactly what you wrote as a user stories.
The origin was, that the DAppSigner
has a method prepared for that and I expected that wallet connect would be able to output the public key of the connected account without querying a mirror or consensus node.
Given the current architecture and the target solution being out of reach right now, it makes more sense to pursue this functionality as we are exploring the v2 upgrade to Reown. I will be closing this issue for now.
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I wanted to extract the public key of the connected account via the
getAccountKey()
method. However, I encountered aError: Method not Implemented
. Obviously, this method is not implemented here:https://github.com/hashgraph/hedera-wallet-connect/blob/88a34824452c4ce28c079d1ad119a998944c5262/src/lib/dapp/DAppSigner.ts#L114
Describe the solution you'd like A clear and concise description of what you want to happen.
I would like to have this implemented and wonder what reason there is, that this was not implemented initially. Anyone, who can comment on this?
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
None
Additional context Add any other context or screenshots about the feature request here.
None