v0.2.5-pre.008

This commit is contained in:
2026-08-19 18:47:06 +02:00
parent 518cc9257f
commit 1125ade4c1
17 changed files with 1104 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-wallet-lib/tests/dependency_boundary.rs
// version: 8
// version: 9
//! Wallet-specific dependency and ownership canaries.
@@ -60,6 +60,7 @@ fn wallet_manifest_preserves_dependency_firewall() -> std::io::Result<()> {
"tauri",
"tracing =",
"solana-pubkey",
"bs58",
] {
assert!(!manifest.contains(forbidden), "forbidden direct Wallet dependency detected: {forbidden}");
}

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-wallet-lib/tests/public_api.rs
// version: 7
// version: 8
//! Public API canaries for the Wallet foundation.
@@ -122,3 +122,43 @@ fn public_pre_007_owner_signing_and_administration_surface_is_available() {
let _ = sign_method;
assert_eq!(ksp_wallet_lib::KSPWALLET_SOLANA_SIGNATURE_BYTES, 64);
}
#[test]
fn public_pre_008_transfer_adapters_are_available_from_crate_root() {
let formats = ksp_wallet_lib::WalletTransferFormat::supported();
assert_eq!(formats.len(), 2);
assert_eq!(formats[0].code(), "solana_cli_json");
assert_eq!(formats[1].code(), "solana_keypair_base58");
assert_eq!(ksp_wallet_lib::KSPWALLET_TRANSFER_MAX_SOLANA_CLI_JSON_BYTES, 1024);
assert_eq!(ksp_wallet_lib::KSPWALLET_TRANSFER_MAX_BASE58_BYTES, 128);
let export_method: fn(&ksp_wallet_lib::WalletOwner, ksp_wallet_lib::WalletTransferFormat) -> ksp_core_lib::Result<std::vec::Vec<u8>> =
ksp_wallet_lib::WalletOwner::export_transfer;
let _ = export_method;
let inspect_method: fn(&[u8], ksp_wallet_lib::WalletTransferFormat) -> ksp_core_lib::Result<ksp_wallet_lib::WalletTransferInspection> =
ksp_wallet_lib::inspect_wallet_transfer;
let _ = inspect_method;
let path = std::path::Path::new("not-polled-transfer");
let inspect_file_future = ksp_wallet_lib::inspect_wallet_transfer_file(path, formats[0]);
drop(inspect_file_future);
let owner_password = ksp_wallet_lib::OwnerPassword::new(std::string::String::from("public-pre008-owner-password"));
let import_future = ksp_wallet_lib::import_wallet_transfer_v1(
path,
b"[1,2,3]",
formats[0],
owner_password,
std::option::Option::None,
ksp_wallet_lib::WalletCreateMetadataV1::default(),
);
drop(import_future);
let owner_password = ksp_wallet_lib::OwnerPassword::new(std::string::String::from("public-pre008-owner-password"));
let import_file_future = ksp_wallet_lib::import_wallet_transfer_file_v1(
path,
path,
formats[0],
owner_password,
std::option::Option::None,
ksp_wallet_lib::WalletCreateMetadataV1::default(),
);
drop(import_file_future);
}