mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-06-29 10:29:32 +00:00
Wallet consumers (e.g. the Qt module and apps built on it) currently have to reconstruct LEZ's wallet path layout themselves to call create/open, which duplicates the logic in `wallet::helperfunctions` and silently drifts if the default home or filenames change. Add functions that resolve everything from LEZ's canonical home (`LEE_WALLET_HOME_DIR` or `~/.lee/wallet`): - `wallet_ffi_create_new_default(password)` — create at the default home (resolves paths, creates the directory), path-free `wallet_ffi_create_new`. - `wallet_ffi_open_default()` — open the default wallet via `WalletCore::from_env`. - `wallet_ffi_default_config_path()` / `wallet_ffi_default_storage_path()` — return the resolved paths (caller frees with `wallet_ffi_free_string`). - `wallet_ffi_wallet_exists_default()` — whether a wallet already exists at the default home, for choosing between an open and a create flow. Together these let consumers drop their own path handling entirely. The C header (`wallet_ffi.h`) is regenerated by the cbindgen build step.