v0.2.5-pre.006

This commit is contained in:
2026-08-19 17:31:29 +02:00
parent dcd23abb92
commit 6094d33120
12 changed files with 649 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-wallet-lib/tests/dependency_boundary.rs
// version: 7
// version: 8
//! Wallet-specific dependency and ownership canaries.
@@ -49,6 +49,7 @@ fn wallet_manifest_preserves_dependency_firewall() -> std::io::Result<()> {
assert!(manifest.contains("serde_json.workspace = true"));
assert!(manifest.contains("solana-keypair.workspace = true"));
assert!(manifest.contains("tokio = { workspace = true, features = [\"rt\"] }"));
assert!(manifest.contains("tempfile.workspace = true"));
assert!(manifest.contains("zeroize.workspace = true"));
for forbidden in [
"ksp-config-lib",

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-wallet-lib/tests/public_api.rs
// version: 4
// version: 5
//! Public API canaries for the Wallet foundation.
@@ -92,3 +92,23 @@ fn public_pre_005_create_open_and_calibrated_defaults_are_available_from_crate_r
assert_eq!(ksp_wallet_lib::KSPWALLET_V1_DEFAULT_ARGON2_PARALLELISM, 1);
assert_eq!(ksp_wallet_lib::KSPWALLET_V1_DEFAULT_KDF_SALT_BYTES, 32);
}
#[test]
fn public_pre_006_file_persistence_surface_is_available_from_crate_root() {
let path = std::path::Path::new("not-polled.kspwallet");
let owner_password = ksp_wallet_lib::OwnerPassword::new("public-pre006-owner-password").expect("public test OWNER password must be valid");
let create_future =
ksp_wallet_lib::create_wallet_file_v1(path, owner_password, std::option::Option::None, ksp_wallet_lib::WalletCreateMetadataV1::default());
drop(create_future);
let view_password = ksp_wallet_lib::ViewPassword::new("public-pre006-view-password").expect("public test VIEW password must be valid");
let view_future = ksp_wallet_lib::open_wallet_view_file_v1(path, view_password);
drop(view_future);
let owner_password = ksp_wallet_lib::OwnerPassword::new("public-pre006-owner-password").expect("public test OWNER password must be valid");
let owner_future = ksp_wallet_lib::open_wallet_owner_file_v1(path, owner_password);
drop(owner_future);
let inspect_future = ksp_wallet_lib::inspect_locked_wallet_file_v1(path);
drop(inspect_future);
}