Skip to main content

Module wallet_args

Module wallet_args 

Source
Expand description

Shared keystore + password resolution for post / settle / escrow.

All three subcommands accept the same triad (--keystore, --wallet-password-file, --wallet-address) and resolve the keystore via the same two-step process:

  1. Password: TASKFAST_WALLET_PASSWORD env wins (preserves CI); else read from --wallet-password-file, trim trailing newline, reject empty.
  2. Keystore: strip the optional file: scheme prefix (taskfast init writes that form to TEMPO_KEY_SOURCE), then keystore::load(File { path }, password).

Exposed as free functions (not a flattened clap struct) so each caller keeps its existing Args struct — renaming those would churn wiremock tests that import them by name.

Functions§

decode_0x_bytes
Decode a 0x-prefixed or bare hex string into raw bytes.
load_signer
Decrypt the keystore at keystore_path using the resolved password.
load_signer_and_validate
Decrypt the keystore at keystore_path and validate against the expected address.
resolve_keystore_path
Resolve the clean PathBuf for the keystore, stripping any file: prefix.
resolve_password
Resolve the keystore password: env var wins over file. Trims trailing \r/\n but rejects a file that is otherwise empty.
resolve_password_with_inline
Resolve the keystore password with an optional interactive/prompted inline password.
resolve_password_with_inline_and_missing_hint
Resolve password with inline precedence, using a custom missing-password message on failure.
resolve_proxy_rpc_url
Resolve the authenticated Tempo RPC URL for the deployment.
sign_and_send_submission_fee
Sign and broadcast an ERC-20 submission-fee transfer under the per-wallet lock.
validate_signer_address
Validate that the decrypted signer address matches an expected address string, if given.