Get a signature

Get a signature

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.

Prepare your account: The account you are using must be registered and have funds in order to get a signature.

Interactive CLI

An easy-to-understand way to get a signature is by using the text-based interface (TUI) within the Entropy CLI.

  1. Ensure that you have the CLI installed and start it up:

    entropy
      @@@@@@@@@@ @@@@@@@@@@ @@@@@   @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@
      @@@@@@@@@@ @@@@@@@@@@ @@@@@   @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@
      @@@@@@@@@@ @@@@@@@@@@ @@@@@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@@@@@@ @@@@@ @@@@@
      @@@@@ @@@@ @@@@@ @@@@ @@@@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@
      @@@@@ @@@@ @@@@@ @@@@ @@@@@   @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@
      @@@@@ @@@@ @@@@@ @@@@ @@@@@   @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@
      @@@@@@@@@@ @@@@@ @@@@ @@@@@   @@@@@       @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@
      @@@@@@@@@@ @@@@@ @@@@ @@@@@   @@@@@       @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@
      @@@@@      @@@@@ @@@@ @@@@@   @@@@@       @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@
      @@@@@ @@@@ @@@@@ @@@@ @@@@@   @@@@@       @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@
      @@@@@ @@@@ @@@@@ @@@@ @@@@@   @@@@@       @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@
      @@@@@ @@@@ @@@@@ @@@@ @@@@@   @@@@@       @@@@ @@@@ @@@@@ @@@@ @@@@@ @@@@@
      @@@@@@@@@@ @@@@@ @@@@ @@@@@@@ @@@@@       @@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@
      @@@@@@@@@@ @@@@@ @@@@ @@@@@@@ @@@@@       @@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@
                                                          @@@@@@            TEST
                                                          @@@@@@            *NET
                                                          @@@@@@     ENTROPY-CLI
                                                          @@@@@@     COREv0.1.0
    
    ? Select Action
      Manage Accounts
      Balance
      Register
      Sign
      Transfer
      Deploy Program
      User Programs
    ❯ Exit
  2. Select the account you want to get a signature for by going to Manage Accounts and Select Account.

  3. Return to the main menu and select Sign.

  4. Select Sign With Adapter.

  5. 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.

  6. 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.

  7. The TUI will output your message along with the verifying key used and the signature for that message:

    verifying key: 0x023a21cf07207ed70da47f5a035a1b756ecb6a9eaeb5a1757a64b283fc53c98b3e
    signature: 0x75285f9e1f13b60629c83a8c9f184137b332cf7cd1cc2b02229cb59dc00e68946814fb4585a678a90c324ecdda347e24cf8a2a802ea72d6c1cbae17daa94339200
  8. The signature value is the signature generated by the signing committee for your chosen message.

Programmatic CLI

You can get a signature programmatically by using the CLI directly through your terminal.

  1. Ensure that you have the CLI installed:

    entropy --help
    CLI interface for interacting with entropy.xyz. Running without commands starts an interactive ui
    
    Options:
        -e, --endpoint <endpoint>
    
    ...
  2. Request a signature by using the sign command with the address you want to use, and the message you want to sign:

    entropy sign <address> <message>

    For example:

    entropy sign '5CrFp9txcb5UECpNKsD6DTBsG4cj1z58DA43YikSVeeJqXJR' 'This is a message.'
  3. Assuming your account has been registered and has enough funds, the network will return your signature:

    {
      "0": 117,
      "1": 89,
      "2": 128,
    
    ...
    
      "62": 196,
      "63": 124,
      "64": 0
    }

Take a look at the CLI reference page for more information on how to use the Entropy CLI programmatically.