Skip to content

Commit

Permalink
docs: update sign-messages.md grammar, typos (#1562)
Browse files Browse the repository at this point in the history
* Update sign-messages.md: Grammar, Typos

Update sign-messages.md: Grammar, Typos

* Update sign-messages.md

---------

Co-authored-by: max-crawford <[email protected]>
  • Loading branch information
saralab and max-crawford authored Oct 5, 2023
1 parent 7bcaa93 commit 9b9231c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/feature-guides/sign-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import StacksProviderSection from '../includes/\_stacks.js-provider-section.mdx'

---

This guide explains how to prompt users to sign a message.
This guide explains how to prompt users to sign a message. Messaging signing can be used to have a user prove they control a particular address or to have a user authorize a particular action in your app.

The user will be prompted a popup from the Hiro Wallet showing the message you would like them to sign.
When signing a message, a user will be prompted via a popup from their wallet of choice, showing the message you want them to sign.

The user can then click on the Sign button which will return the signature data and the user's publicKey to your app. You can then verify the signature by passing the signature data and the public key to the [`stacks.js`](https://github.com/hirosystems/stacks.js) `verifySignature` method.
The user can then click on the 'Sign' button, which will return the signature data and the user's publicKey to your app. You can then verify the signature by passing the signature data and the public key to the [`stacks.js`](https://github.com/hirosystems/stacks.js) `verifySignature` method.

The message can be any utf-8 string.

Expand All @@ -29,9 +29,9 @@ npm install @stacks/connect

## Initiate session

Users must authenticate to an app before you request message signing. Users can install an authenticator like [the Hiro Wallet](https://www.hiro.so/wallet/install-web).
Users must be authenticated before they can sign a message from your app. Users can install an authenticator (e.g. a wallet) like [Leather](https://leather.io/) for that purpose.

See the [authentication guide](https://docs.hiro.so/build-apps/authentication) before proceeding to integrate the following message signing capabilities.
See the [authentication guide](https://docs.hiro.so/build-apps/authentication) before integrating the following message signing capabilities.

## Prompt to sign a message

Expand Down Expand Up @@ -79,7 +79,7 @@ interface SignatureRequestOptions {
The `openSignatureRequestPopup` signing method from `@stacks/connect` allows you to specify an `onFinish` callback.
This callback will be triggered after the user has successfully signed the message.

You can get the signature of the message via the arguments passed to `onFinish`. Your callback will be fired with a single argument, which is an object with the following properties:
You can get the message's signature via the arguments passed to `onFinish`. Your callback will be fired with a single argument, which is an object with the following properties:

```ts
export interface SignatureData {
Expand Down Expand Up @@ -127,7 +127,7 @@ import { StacksTestnet, StacksMainnet } from '@stacks/network';
const testnet = new StacksTestnet();
const mainnet = new StacksMainnet();

// use this in your messe signing method:
// use this in your message signing method:

openSignatureRequestPopup({
network: mainnet,
Expand Down

0 comments on commit 9b9231c

Please sign in to comment.