-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #193 from zavodil/signMessage
feat: Sign message This PR enables the use of the signMessage method from the wallet-selector. The user can sign a message with any of the connected wallets for further [signature verification](https://docs.near.org/build/web3-apps/backend/) on a third-party authentication server. - Add `Near.signMessage` function to sign arbitrary message with NEAR account. The message that the user needs to sign contains 4 fields: - `message`: The message that the user is signing. - `recipient`: The recipient of the message. - `nonce`: The challenge that the user is signing. - `callbackUrl`: The URL that the wallet will call with the signature. How to verify the signature: https://docs.near.org/build/web3-apps/backend/#3-verify-the-signature - Add get/set methods for `window.location.hash`. `Set` method only accepts an empty string as a value.
- Loading branch information
Showing
4 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters