pub struct KeysConfig {
pub directory: String,
pub default_key: String,
}Expand description
Key storage configuration for the TxGate signing service.
This struct defines where encrypted keys are stored and which key to use by default for signing operations.
§Directory Structure
Keys are stored as encrypted JSON files in the configured directory:
~/.txgate/keys/
├── default.json
├── backup.json
└── production.json§Security Considerations
- The keys directory should have restricted permissions (0700)
- Key files are encrypted with a password-derived key
- Key material is zeroed from memory after use
§Examples
use txgate_core::config::KeysConfig;
let config = KeysConfig::default();
assert_eq!(config.directory, "~/.txgate/keys");
assert_eq!(config.default_key, "default");Fields§
§directory: StringDirectory for encrypted key files.
The path supports ~ expansion for the home directory.
Default: ~/.txgate/keys
default_key: StringDefault key name to use for signing.
This key is used when no specific key is requested.
Default: "default"
Trait Implementations§
Source§impl Clone for KeysConfig
impl Clone for KeysConfig
Source§fn clone(&self) -> KeysConfig
fn clone(&self) -> KeysConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeysConfig
impl Debug for KeysConfig
Source§impl Default for KeysConfig
impl Default for KeysConfig
Source§impl<'de> Deserialize<'de> for KeysConfig
impl<'de> Deserialize<'de> for KeysConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for KeysConfig
impl PartialEq for KeysConfig
Source§impl Serialize for KeysConfig
impl Serialize for KeysConfig
impl Eq for KeysConfig
impl StructuralPartialEq for KeysConfig
Auto Trait Implementations§
impl Freeze for KeysConfig
impl RefUnwindSafe for KeysConfig
impl Send for KeysConfig
impl Sync for KeysConfig
impl Unpin for KeysConfig
impl UnwindSafe for KeysConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.