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

use case for account.verifyMessage() and .verifyMessageHash() #529

Open
PhilippeR26 opened this issue Feb 21, 2023 · 1 comment
Open

use case for account.verifyMessage() and .verifyMessageHash() #529

PhilippeR26 opened this issue Feb 21, 2023 · 1 comment
Labels
pending need update Type: bug Something isn't working Type: feature New feature or request

Comments

@PhilippeR26
Copy link
Collaborator

Describe the bug
I have some doubt about the use-case of 2 functions : account.verifyMessageHash() and account.verifyMessage().
I have been alerted by a user on Discord, who was lost on this subject.
For me, only people without the privKey have interest to use these functions.
But as they are not static methods, you need to create an account object to access to these functions. Create an account object needs the privKey.
It means that you need to have the privKey to access to functions useful for non privKey holders….

Expected behavior
ec.verify() function has sense, because it do not need a privKey.
My feeling is that these 2 functions should be shadowed in doc, because I see no practical use-case for DAPP devs.

Desktop (please complete the following information):

  • Browser & version : N/A
  • Node version N/A
  • Starknet.js version v4.17.1
  • Network N/A
@PhilippeR26 PhilippeR26 added the Type: bug Something isn't working label Feb 21, 2023
@tabaktoni
Copy link
Collaborator

But as they are not static methods, you need to create an account object to access to these functions. Creating an account object needs the privKey.
It means that you need to have the privKey to access functions useful for non-privKey holders….

You can create an Account object with a custom implementation of the Signer, as so using secondary privKey.
But you also have a point there regarding usage, I do not know what use cases are there.
@janek26 @dhruvkelawala Are you guys using these is wallets or what is the use-case here ?

@tabaktoni tabaktoni added the Type: feature New feature or request label Jul 12, 2023
@tabaktoni tabaktoni added the pending need update label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending need update Type: bug Something isn't working Type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants