pub struct AccountKeyManager { /* private fields */ }Expand description
Holds exactly the caller-unlocked keys for a session, never reference-derived credentials. Private keys and the guarded wrapping key are dropped on clear.
Implementations§
Source§impl AccountKeyManager
impl AccountKeyManager
pub fn get_signing_key(&self, key_id: &PublicKey) -> Option<&PrivateKey>
Sourcepub fn add_key(&mut self, metadata: AccountKey) -> Result<()>
pub fn add_key(&mut self, metadata: AccountKey) -> Result<()>
Update public metadata only for an actual held signer.
pub fn clear(&mut self)
Sourcepub fn list_key_ids(&self) -> Vec<PublicKey>
pub fn list_key_ids(&self) -> Vec<PublicKey>
Public key IDs sorted by creation time, then key ID for ties.
pub fn get_key_metadata(&self, key_id: &PublicKey) -> Option<&AccountKey>
pub fn get_default_key_id(&self) -> Option<PublicKey>
Trait Implementations§
Source§impl Drop for AccountKeyManager
impl Drop for AccountKeyManager
Source§impl Zeroize for AccountKeyManager
impl Zeroize for AccountKeyManager
impl ZeroizeOnDrop for AccountKeyManager
Auto Trait Implementations§
impl Freeze for AccountKeyManager
impl RefUnwindSafe for AccountKeyManager
impl Send for AccountKeyManager
impl Sync for AccountKeyManager
impl Unpin for AccountKeyManager
impl UnsafeUnpin for AccountKeyManager
impl UnwindSafe for AccountKeyManager
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more