v0.2.6-pre.009

This commit is contained in:
2026-08-21 12:35:01 +02:00
parent 7d03825ec6
commit 2b7afab663
17 changed files with 970 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-wallet-desk/src/wallet_session.rs
// version: 3
// version: 4
//! Durable root-scoped Wallet session lifecycle for Wallet Desk.
@@ -149,6 +149,8 @@ pub(crate) enum WalletSession {
path: std::path::PathBuf,
/// Authorized VIEW handle retaining metadata capability only in Rust.
wallet: std::boxed::Box<ksp_wallet_lib::WalletView>,
/// Whether the authenticated Wallet currently exposes a VIEW slot.
view_enabled: bool,
},
/// One Wallet kept open with OWNER capability.
Owner {
@@ -158,6 +160,19 @@ pub(crate) enum WalletSession {
path: std::path::PathBuf,
/// Authorized OWNER handle retaining secret material only in Rust.
wallet: std::boxed::Box<ksp_wallet_lib::WalletOwner>,
/// Whether the authenticated Wallet currently exposes a VIEW slot.
view_enabled: bool,
},
/// One OWNER metadata mutation temporarily owns the authorized handle outside the session mutex.
OwnerOperation {
/// Native Wallet filename / root-scoped identifier.
wallet_id: String,
/// Full root-scoped filesystem path retained only in Rust.
path: std::path::PathBuf,
/// Authorized Solana identity used only to reject stale completion.
pubkey: ksp_core_lib::Pubkey,
/// Whether the authenticated Wallet currently exposes a VIEW slot.
view_enabled: bool,
},
}
@@ -200,6 +215,11 @@ impl WalletSession {
state: WalletSessionStateDto::OwnerOpen,
wallet_id: std::option::Option::Some(wallet_id.clone()),
},
Self::OwnerOperation { wallet_id, .. } => WalletSessionDto {
filename: std::option::Option::Some(wallet_id.clone()),
state: WalletSessionStateDto::PrivilegedOperation,
wallet_id: std::option::Option::Some(wallet_id.clone()),
},
};
}
}