Skip to main content

Module wallet

Module wallet 

Source

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ยง

TouchIdSidecarWire ๐Ÿ”’
Strict deserialization-only representation of the persisted sidecar format.

Enumsยง

TouchIdPolicyWire ๐Ÿ”’
The policy values currently recognised by this Cast release.
TouchIdSidecarState ๐Ÿ”’
Classification of a file at a .touchid path.
WalletSubcommands
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_available rejects --touch-id on this platform.
ensure_account_name_available ๐Ÿ”’
ensure_touch_id_available ๐Ÿ”’
ensure_touch_id_sidecar_available ๐Ÿ”’
existing_keystore_path ๐Ÿ”’
Validates account_name and resolves its existing keystore file in dir.
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 value is a bare keystore account name rather than a filesystem path.
is_touch_id_sidecar ๐Ÿ”’
new_keypairs ๐Ÿ”’
Generates number random keypairs, returning their JSON records in JSON mode.
new_keystores ๐Ÿ”’
Creates number encrypted keystores in dir, 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 password when 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 path with respect to the Touch ID sidecar schema.