generate

Generates a x25519 or ed25519 Key

This can be used for generating an identity. Two files will be created output_file and output_file.pub. output_file will contain the private key encoded with the encoding and output_file.pub will contain the public key encoded with the encoding.

Usage

movement aptos key generate [OPTIONS] --output-file <OUTPUT_FILE>

Options

  • --key-type <KEY_TYPE> Key type to generate. Must be one of [x25519, ed25519, bls12381]. [default: ed25519] Possible values:

    • ed25519: Ed25519 key used for signing

    • x25519: X25519 key used for network handshakes and identity

    • bls12381: A BLS12381 key for consensus

  • --vanity-prefix <VANITY_PREFIX> Vanity prefix that resultant account address should start with, e.g. 0xaceface or d00d. Each additional character multiplies by a factor of 16 the computational difficulty associated with generating an address, so try out shorter prefixes first and be prepared to wait for longer ones

  • --vanity-multisig Use this flag when vanity prefix is for a multisig account. This mines a private key for a single signer account that can, as its first transaction, create a multisig account with the given vanity prefix

  • --random-seed <RANDOM_SEED> The seed used for key generation, should be a 64 character hex string and only used for testing. If a predictable random seed is used, the key that is produced will be insecure and easy to reproduce. Please do not use this unless sufficient randomness is put into the random seed.

  • --output-file <OUTPUT_FILE> Output file path

  • --assume-yes Assume yes for all yes/no prompts

  • --assume-no Assume no for all yes/no prompts

  • --encoding <ENCODING> Encoding of data as one of [base64, bcs, hex]. [default: hex] Possible values:

    • bcs: Binary Canonical Serialization

    • hex: Hex encoded e.g. 0xABCDE12345

    • base64: Base 64 encoded

Last updated