-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds 'Get a Signature' guides. (#219)
* Adds TUI and CLI guides. * Removes Rust Testing Interface section.
- Loading branch information
1 parent
8fdc92c
commit 616d98a
Showing
1 changed file
with
112 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
--- | ||
title: "Get a signature" | ||
lead: "Getting a signature from the network is the primary purpose of Entropy. This page walks you through the different ways in which you can get a signature." | ||
--- | ||
|
||
{{< callout "info" >}} | ||
**Prepare your account**: The account you are using must be [registered]({{< relref "../guides/register-an-account.md" >}}) and have [funds]({{< relref "../guides/get-funds.md" >}}) in order to get a signature. | ||
{{< /callout >}} | ||
|
||
## Text-based interface | ||
|
||
An easy-to-understand way to get a signature is by using the text-based interface (TUI) within the [Entropy CLI]({{< relref "../reference/command-line-interface.md" >}}). | ||
|
||
1. Ensure that you have the CLI installed and start it up: | ||
|
||
```shell | ||
entropy | ||
``` | ||
|
||
```output | ||
@@@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@ | ||
@@@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@ | ||
@@@@@@@@@@ @@@@@@@@@@ @@@@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@ | ||
@@@@@ @@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ | ||
@@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ | ||
@@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ | ||
@@@@@@@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ | ||
@@@@@@@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ | ||
@@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ | ||
@@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ | ||
@@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ | ||
@@@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@ | ||
@@@@@@@@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@ | ||
@@@@@@@@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@ | ||
@@@@@@ TEST | ||
@@@@@@ *NET | ||
@@@@@@ ENTROPY-CLI | ||
@@@@@@ COREv0.1.0 | ||
? Select Action | ||
Manage Accounts | ||
Balance | ||
Register | ||
Sign | ||
Transfer | ||
Deploy Program | ||
User Programs | ||
❯ Exit | ||
``` | ||
|
||
1. Select the account you want to get a signature for by going to **Manage Accounts** and **Select Account**. | ||
1. Return to the main menu and select **Sign**. | ||
1. Select **Sign With Adapter**. | ||
1. The TUI needs to use an existing text editor on your computer to create the message. Select **Text Input** and press `ENTER` again to launch the default text editor in your terminal. | ||
1. Enter the message you want to get a signature for into the text editor. Save and quit the text editor once you have entered your message. | ||
1. The TUI will output your message along with the verifying key used and the signature for that message: | ||
|
||
```output | ||
verifying key: 0x023a21cf07207ed70da47f5a035a1b756ecb6a9eaeb5a1757a64b283fc53c98b3e | ||
signature: 0x75285f9e1f13b60629c83a8c9f184137b332cf7cd1cc2b02229cb59dc00e68946814fb4585a678a90c324ecdda347e24cf8a2a802ea72d6c1cbae17daa94339200 | ||
``` | ||
|
||
1. The **signature** value is _the_ signature generated by the signing committee for your chosen message. | ||
|
||
## Command-line interface | ||
|
||
You can get a signature programmatically by using the CLI directly through your terminal. | ||
|
||
1. Ensure that you have the CLI installed: | ||
|
||
```shell | ||
entropy --help | ||
``` | ||
|
||
```output | ||
CLI interface for interacting with entropy.xyz. Running without commands starts an interactive ui | ||
Options: | ||
-e, --endpoint <endpoint> | ||
... | ||
``` | ||
|
||
1. Request a signature by using the `sign` command with the address you want to use, and the message you want to sign: | ||
|
||
```shell | ||
entropy sign <address> <message> | ||
``` | ||
|
||
For example: | ||
|
||
```shell | ||
entropy sign '5CrFp9txcb5UECpNKsD6DTBsG4cj1z58DA43YikSVeeJqXJR' 'This is a message.' | ||
``` | ||
|
||
1. Assuming your account has been registered and has enough funds, the network will return your signature: | ||
|
||
```output | ||
{ | ||
"0": 117, | ||
"1": 89, | ||
"2": 128, | ||
... | ||
"62": 196, | ||
"63": 124, | ||
"64": 0 | ||
} | ||
``` | ||
|
||
Take a look at the [CLI reference page]({{< relref "../reference/command-line-interface.md" >}}) for more information on how to use the Entropy CLI programmatically. |