v0.5.2-pre.004

This commit is contained in:
2026-08-10 16:43:19 +02:00
parent ef630e3123
commit b8e6751747
15 changed files with 1489 additions and 89 deletions

View File

@@ -1,5 +1,5 @@
// file: ks-wallet/src/lib.rs
// version: 6
// version: 7
//! Wallet boundary for local key storage and transaction signing.
#![warn(missing_docs)]
@@ -9,6 +9,8 @@
mod constants;
mod manager;
mod native;
mod password;
mod unlocked;
mod wallet;
/// Native wallet file extension without the leading dot.
@@ -17,6 +19,10 @@ pub use self::constants::KSWALLET_FILE_EXTENSION;
pub use self::manager::WalletFileHandle;
/// Multi-wallet manager rooted at one configured wallet directory.
pub use self::manager::WalletManager;
/// Explicit non-clonable password supplied to native wallet operations.
pub use self::password::WalletPassword;
/// Authenticated signing capability for one unlocked persistent wallet.
pub use self::unlocked::UnlockedWallet;
/// Solana keypair kept private inside the wallet boundary.
pub use self::wallet::TemporaryWallet;
/// Filesystem-backed store for legacy development and integration-test wallets.
@@ -32,8 +38,16 @@ pub use self::wallet::WalletPolicy;
/// Backward-compatible name for a non-secret wallet identity.
pub use self::wallet::WalletSummary;
/// Encryption-key length required by XChaCha20-Poly1305.
pub(crate) use self::constants::KSWALLET_AEAD_KEY_LENGTH;
/// Version-one AEAD identifier for XChaCha20-Poly1305.
pub(crate) use self::constants::KSWALLET_AEAD_XCHACHA20_POLY1305;
/// Default Argon2id pass count for newly protected wallets.
pub(crate) use self::constants::KSWALLET_ARGON2_DEFAULT_ITERATIONS;
/// Default Argon2id memory cost for newly protected wallets.
pub(crate) use self::constants::KSWALLET_ARGON2_DEFAULT_MEMORY_KIB;
/// Default Argon2id parallelism for newly protected wallets.
pub(crate) use self::constants::KSWALLET_ARGON2_DEFAULT_PARALLELISM;
/// Maximum accepted Argon2id pass count.
pub(crate) use self::constants::KSWALLET_ARGON2_MAX_ITERATIONS;
/// Maximum accepted Argon2id memory cost in KiB.
@@ -76,5 +90,13 @@ pub(crate) use self::constants::SOLANA_KEYPAIR_LENGTH;
pub(crate) use self::constants::TRACING_TARGET;
/// Parsed version-one native wallet container.
pub(crate) use self::native::NativeWalletContainer;
/// Protects one exact keypair payload with the native password contract.
pub(crate) use self::native::protect_native_wallet_keypair;
/// Reads and strictly decodes one native wallet file.
pub(crate) use self::native::read_native_wallet_container;
/// Atomically replaces one native wallet after authenticated password rotation.
pub(crate) use self::native::replace_native_wallet_file_atomic;
/// Authenticates and decrypts one native wallet keypair.
pub(crate) use self::native::unlock_native_wallet_keypair;
/// Publishes one new native wallet atomically without overwrite.
pub(crate) use self::native::write_native_wallet_file_atomic;