Re-exportsยง
use crate::cmd::confirm_continue;๐use crate::cmd::rpc_provider;๐use alloy_chains::Chain;๐use alloy_dyn_abi::TypedData;๐use alloy_primitives::Address;๐use alloy_primitives::B256;๐use alloy_primitives::Signature;๐use alloy_primitives::U256;๐use alloy_primitives::hex;๐use alloy_primitives::hex;๐use alloy_provider::Provider;๐use alloy_rpc_types::Authorization;๐use alloy_signer::Signer;๐use alloy_signer_local::MnemonicBuilder;๐use alloy_signer_local::PrivateKeySigner;๐use alloy_signer_local::coins_bip39::English;๐use alloy_signer_local::coins_bip39::Entropy;๐use alloy_signer_local::coins_bip39::Mnemonic;๐use clap::Parser;๐use eyre::Context;๐use eyre::Result;๐use foundry_cli::json::print_json_success;๐use foundry_cli::json::print_scalar;๐use foundry_cli::opts::RpcOpts;๐use foundry_cli::utils::parse_json;๐use foundry_common::errors::FsPathError;๐use foundry_common::fs;๐use foundry_common::fs::canonicalize_path;๐use foundry_common::sh_println;๐use foundry_common::shell;๐use foundry_config::Config;๐use foundry_wallets::BrowserWalletOpts;๐use foundry_wallets::RawWalletOpts;๐use foundry_wallets::WalletOpts;๐use foundry_wallets::WalletSigner;๐use rand_08::thread_rng;๐use serde_json::Value;๐use serde_json::json;๐use std::ffi::OsString;๐use std::path::Path;๐use std::path::PathBuf;๐use yansi::Paint;๐use vanity::VanityArgs;๐use list::ListArgs;๐use session::SessionArgs;๐use touch_id::TouchIdArgs;๐
Modulesยง
- list
- process_
tree ๐ - session
- touch_
id ๐ - vanity
Structsยง
- Touch
IdSidecar ๐Wire - Strict deserialization-only representation of the persisted sidecar format.
Enumsยง
- Touch
IdPolicy ๐Wire - The policy values currently recognised by this Cast release.
- Touch
IdSidecar ๐State - Classification of a file at a
.touchidpath. - Wallet
Subcommands - CLI arguments for
cast wallet.
Constantsยง
- TOUCH_
ID_ ๐ENROLLED_ STATUS - TOUCH_
ID_ ๐SEALED_ PASSWORD_ MIN_ LEN - Minimum encoded ciphertext payload: 65-byte P-256 X9.63 public key + 12-byte ChaChaPoly nonce + 16-byte tag.
- TOUCH_
ID_ ๐SIDECAR_ SUFFIX - TOUCH_
ID_ ๐SIDECAR_ VERSION - The only sidecar version this Cast release understands.
- TOUCH_
ID_ ๐X963_ UNCOMPRESSED_ PREFIX - X9.63 prefix for an uncompressed P-256 public key.
Functionsยง
- enroll_
new_ ๐keystore Not (macOS and touch-id) - Unreachable in practice:
ensure_touch_id_availablerejects--touch-idon this platform. - ensure_
account_ ๐name_ available - ensure_
touch_ ๐id_ available - ensure_
touch_ ๐id_ sidecar_ available - existing_
keystore_ ๐path - Validates
account_nameand resolves its existing keystore file indir. - hex_
str_ ๐to_ bytes - Strips the 0x prefix from a hex string and decodes it to bytes.
- indexed_
account_ ๐name - is_
bare_ ๐account_ name - Returns true when
valueis a bare keystore account name rather than a filesystem path. - is_
touch_ ๐id_ sidecar - new_
keypairs ๐ - Generates
numberrandom keypairs, returning their JSON records in JSON mode. - new_
keystores ๐ - Creates
numberencrypted keystores indir, returning their JSON records in JSON mode. - parse_
typed_ ๐data - Parses EIP-712 typed data from a JSON string, or from the file it names when
from_file. - password_
or_ ๐prompt - Returns
passwordwhen given, otherwise prompts for it on the terminal. - raw_
wallet ๐ - recover_
signer ๐ - Recovers the signer of
message, interpreted as EIP-712 typed data (data), a prehashed digest (no_hash) or a plain message. - remove_
touch_ ๐id_ sidecar - resolve_
keystore_ ๐dir - Resolves the keystore directory, defaulting to
~/.foundry/keystores. - resolve_
new_ ๐dir - Resolves the directory for
cast wallet new. - touch_
id_ ๐sidecar_ path - touch_
id_ ๐sidecar_ policy - touch_
id_ ๐sidecar_ state - Returns the state of the file at
pathwith respect to the Touch ID sidecar schema.