Skip to content

Commit

Permalink
Trim signing section
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymcmackin committed Dec 8, 2023
1 parent a39e58a commit 02a1621
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions docs/dApps/unity/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,9 @@ private void onTokenBalances(IEnumerable<TokenBalance> tokenBalances)

You can also use the connection to the user's wallet to prompt them to sign messages.
Signing a message proves that it came from a specific user's wallet because the wallet encrypts the message with the user's account's key.
You can prompt users to sign messages for several reasons, including:

- Ensuring that a message came from them
- Ensuring that a user has the private key for a specific account
- Proving that they own a specific token, such as if they want to offer the token for sale
- Requiring operations to run only when multiple users sign messages
- Pre-signing transactions that another application can run later and pay the fees for on the signer's behalf

For example, this code prompts the user to sign the message "This message came from my account."
Then, the callback verifies that the signature is valid and that it came from the user's account:

```csharp
using Beacon.Sdk.Beacon.Sign;
Expand All @@ -289,10 +283,4 @@ private void OnPayloadSigned(SignResult obj)
}
```

The `RequestSignPayload` method sends the request to the user's wallet.
If the user approves the request, the wallet returns the signed payload, which includes encrypted information about the account that it came from.

The callback uses the `VerifySignedPayload` method to verify the signed payload.
This method compares the specified message to the most recent signature it received and returns true if the messages are the same and the signature matches the currently connected account.

For more examples of how to work with the SDK, see the scenes in the `TezosSDK/Examples` folder.

0 comments on commit 02a1621

Please sign in to comment.