Skip to main content

Generate a Signature with the Flow CLI

Generate a signature using the private key of the signer account.


_10
flow signatures generate <message>

⚠️ Make sure the account you want to use for signing is saved in the flow.json configuration. The address of the account is not important, just the private key.

Example Usage


_10
> flow signatures generate 'The quick brown fox jumps over the lazy dog' --signer alice
_10
_10
Signature b33eabfb05d374b...f09929da96f5beec167fd1f123ec
_10
Message The quick brown fox jumps over the lazy dog
_10
Public Key 0xc92a7c...042c4025d241fd430242368ce662d39636987
_10
Hash Algorithm SHA3_256
_10
Signature Algorithm ECDSA_P256

Arguments

Message

  • Name: message

Message used for signing.

Flags

Signer

  • Flag: --signer
  • Valid inputs: the name of an account defined in the configuration (flow.json)

Specify the name of the account that will be used to sign the transaction.

Filter

  • Flag: --filter
  • Short Flag: -x
  • Valid inputs: case-sensitive name of the result property.

Specify any property name from the result you want to return as the only value.

Output

  • Flag: --output
  • Short Flag: -o
  • Valid inputs: json, inline

Specify in which format you want to display the result.

Save

  • Flag: --save
  • Short Flag: -s
  • Valid inputs: valid filename

Specify the filename where you want the result to be saved.

Log

  • Flag: --log
  • Short Flag: -l
  • Valid inputs: none, error, debug
  • Default: info

Specify the log level. Control how much output you want to see while command execution.

Configuration

  • Flag: --config-path
  • Short Flag: -f
  • Valid inputs: valid filename

Specify a filename for the configuration files, you can provide multiple configuration files by using -f flag multiple times.

Version Check

  • Flag: --skip-version-check
  • Default: false

Skip version check during start up to speed up process for slow connections.