DOCUMENTATION

import WalletOptionsRaw from "../../reference/common/wallet-options-rawx"; import WalletOptionsKeystore from "../../reference/common/wallet-options-keystorex"; import WalletOptionsHardware from "../../reference/common/wallet-options-hardwarex"; import CommonOptions from "./common-optionsx";

cast wallet sign


NAME

cast-wallet-sign - Sign a message.

SYNOPSIS

cast wallet sign [options] message

DESCRIPTION

Sign a message suitable for eth_sign. Note that signing prefixes the message with the Ethereum Signed Message header in accordance with EIP-191 unless --no-hash is provided.

OPTIONS

<WalletOptionsRaw /> <WalletOptionsKeystore /> <WalletOptionsHardware /> <CommonOptions />

EXAMPLES

  1. Sign a message using a keystore:

    cast wallet sign --keystore keystore.json --interactive "hello"
    
  2. Sign a message using a raw private key:

    cast wallet sign --private-key $PRIV_KEY "hello"
    

SEE ALSO

cast, cast wallet