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§

load_signer
Decrypt the keystore at keystore_ref using the resolved password.
resolve_password
Resolve the keystore password: env var wins over file. Trims trailing \r/\n but rejects a file that is otherwise empty.