You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(key-wallet)!: remove MnemonicWithPassphrase wallet type (#747)
* refactor(key-wallet)!: remove `MnemonicWithPassphrase` wallet type
Drops the entire passphrase-as-callback feature: callers can no longer
construct a wallet that retains a mnemonic and applies a BIP39 passphrase
on-demand. Removed across the workspace:
- `WalletType::MnemonicWithPassphrase` variant + Zeroize arm
- `Wallet::from_mnemonic_with_passphrase` constructor
- `add_account_with_passphrase`, `add_bls_account_with_passphrase`,
`add_eddsa_account_with_passphrase` on `Wallet`
- `derive_extended_private_key_with_passphrase`,
`create_accounts_with_passphrase_from_options`,
`create_special_purpose_accounts_with_passphrase`,
`needs_passphrase`, and `root_extended_priv_key_with_callback` helpers
- `add_managed_*_with_passphrase` on `ManagedAccountOperations`
- `passphrase` parameter from `WalletManager::create_wallet_from_mnemonic`
and `create_wallet_from_mnemonic_return_serialized_bytes`
- `passphrase` parameter from FFI `wallet_create_from_mnemonic*`,
`wallet_manager_add_wallet_from_mnemonic*`,
`wallet_manager_add_wallet_from_mnemonic_return_serialized_bytes`
- All passphrase-only tests (`test_wallet_with_passphrase`,
`test_passphrase_edge_cases`, the `passphrase_test` module, FFI
`test_passphrase_wallets.rs`, etc.)
Breaking change: serialized wallets containing the
`MnemonicWithPassphrase` variant can no longer be deserialized, and the
FFI `passphrase` parameter is gone — callers must update their code.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(key-wallet-ffi): regenerate FFI_API.md after passphrase removal
Auto-generated docs were stale after removing the `passphrase` parameter
from `wallet_create_from_mnemonic*` and `wallet_manager_add_wallet_from_mnemonic*`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor: address review comments after passphrase removal
- Distinguish ExternalSignable from WatchOnly in
derive_extended_private_key error path so callers see why each variant
rejects the request.
- Drop the stale "passphrase 'pass1'" debug prints in
debug_wallet_add.rs that no longer reflect what the test does.
- Remove the obsolete bug-comment and "// No passphrase" annotation in
wallet_manager_tests.rs — the bug and the parameter both no longer
exist.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a wallet from mnemonic to the manager (backward compatibility) # Safety - `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
456
+
Add a wallet from mnemonic to the manager (backward compatibility) # Safety - `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
457
457
458
458
**Safety:**
459
-
- `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
459
+
- `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
460
460
461
461
**Module:** `wallet_manager`
462
462
@@ -465,7 +465,7 @@ Add a wallet from mnemonic to the manager (backward compatibility) # Safety -
Add a wallet from mnemonic to the manager with options # Safety - `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
482
+
Add a wallet from mnemonic to the manager with options # Safety - `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
483
483
484
484
**Safety:**
485
-
- `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
485
+
- `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
486
486
487
487
**Module:** `wallet_manager`
488
488
@@ -1333,14 +1333,14 @@ Check if a transaction belongs to the wallet using ManagedWalletInfo # Safety
Create a new wallet from mnemonic (backward compatibility - single network) # Safety - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1340
+
Create a new wallet from mnemonic (backward compatibility - single network) # Safety - `mnemonic` must be a valid pointer to a null-terminated C string - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1341
1341
1342
1342
**Safety:**
1343
-
- `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1343
+
- `mnemonic` must be a valid pointer to a null-terminated C string - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1344
1344
1345
1345
**Module:** `wallet`
1346
1346
@@ -1349,14 +1349,14 @@ Create a new wallet from mnemonic (backward compatibility - single network) # S
Create a new wallet from mnemonic with options # Safety - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1356
+
Create a new wallet from mnemonic with options # Safety - `mnemonic` must be a valid pointer to a null-terminated C string - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1357
1357
1358
1358
**Safety:**
1359
-
- `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1359
+
- `mnemonic` must be a valid pointer to a null-terminated C string - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
0 commit comments