-
Notifications
You must be signed in to change notification settings - Fork 159
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
Function to request wallet sign a message (a string, not a transaction). #318
Comments
Hi @phucloc8697, Thanks for raising this enhancement. I'd like to dig a little deeper into the use case of this. What's the intention for signing exactly? Will the message ever be sent to the blockchain or is maybe the idea to use this as a way to verify ownership of the message later on (as you mentioned by the backend)? I should set the expectation that we're at the mercy of what the wallets we support can do. Off the top of my head, this should be possible with Ledger and Math Wallet but I'm almost certain Sender for example doesn't provide low-level signing like this. It only exposes signing (and sending) Transactions |
Hi @lewis-sqa ,
|
@phucloc8697 thanks for providing some clarity on this 👍 I did some investigation with Sender as I realise it's since implemented the We've raised a ticket internally to address this enhancement. We'll keep you posted here on the progress 🙂 |
@lewis-sqa Nice one! Thanks for your support |
@phucloc8697 We've ran into a couple of problems regarding this feature:
|
@lewis-sqa Thanks for working around. I understand the issue. Btw, after some quick research, I found that the near-api-js does support method |
@phucloc8697 So I believe a The block on this feature for us with Wallet Selector is the lack of spec from NEAR around how a dedicated verify ownership method will work. We're hoping to get some clarity on this in the next week |
Few considerations: |
Looks like this might be a blocker for AstroDAO so need to consider for prioritization. |
@agileurbanite This should go out in today's release. cc @MaximusHaximus |
@phucloc8697 , @agileurbanite NEAR Wallet Selector v6.0.0 has been published on NPM. This issue has been addressed in this PR: #391 . To find out which wallets support this feature at the moment read the description of the mentioned PR. |
I disagree that this interface should be a string. Will this not limit the functionality if you want to sign binary data in the future? Am I misunderstanding JS types that Related #405 (I am blind and didn't notice this issue when I created) |
Also, it really does not make sense that the format of what is signed is inferred by the implementation of wallet selector, some examples: wallet-selector/packages/math-wallet/src/lib/math-wallet.ts Lines 108 to 144 in 5da1514
wallet-selector/packages/sender/src/lib/sender.ts Lines 202 to 209 in 5da1514
This can be restrictive if someone wanted to sign custom data. This will be restricting for certain use cases like signing data to be verified within a contract call. Right now, with this, it signs some custom data that is generated with the string provided. |
cc @MaximusHaximus please see above. @AmmarHumackicSQA let's track this in our board so we could discuss. The feature is requested by a few large project and we could improve the implementation if needed, thank you. |
Hey everyone, the NEP for |
Is there any progress on this? The community keeps asking for it on a monthly basis. |
☝️ Agree, this issue should take higher priority! |
As stated here ☝️, this is a work in progress. I see you guys @gagdiez @ToTeTo already posted some questions there. Thanks! |
@MaximusHaximus @lewis-sqa @AmmarHumackicSQA @austinabell, we have greatly advanced the NEP413, your feedback is appreciated. We are reaching consensus in the community, so maybe we could start readily implementing it in the wallet selector? |
Trentin Bergeron commented: Please see NEP → near/NEPs#413 |
Is your feature request related to a problem? Please describe. My application has a feature that require user to sign a message (a string of some data we defined ourself) using their wallet, and our backend will verify later.
Describe the solution you'd like Add function named "signMessage" (for example) took a string as parameter and return signed string.
Additional context Refer to similar function in EVM
/**
The text was updated successfully, but these errors were encountered: