pub struct RecoveryPolicy {
pub threshold: u32,
pub guardians: Vec<RecoveryGuardian>,
pub window_secs: Option<u64>,
}Expand description
The owner precommits to a threshold over distinct dedicated guardian keys. Product policy defaults to threshold >= 2 and a device-independent co-factor whenever Weft is a guardian. A 1-of-1 Weft policy is custodial and is allowed only after the client obtains the separately reviewed explicit confirmation.
Fields§
§threshold: u32§guardians: Vec<RecoveryGuardian>§window_secs: Option<u64>Per-user veto window, in seconds, shared by account recovery and owner-key transitions. Absence selects the 7-day default (604800 seconds). ROTATE and RECOVER transitions preserve the current value. A RECOVERY_POLICY transition may change it only with the current owner authority authorization already required for that transition; lowering the value takes effect no earlier than the current window.
Implementations§
Source§impl RecoveryPolicy
impl RecoveryPolicy
Sourcepub fn window_secs(&self) -> u64
pub fn window_secs(&self) -> u64
Returns the value of window_secs, or the default value if window_secs is unset.
Trait Implementations§
Source§impl Clone for RecoveryPolicy
impl Clone for RecoveryPolicy
Source§fn clone(&self) -> RecoveryPolicy
fn clone(&self) -> RecoveryPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RecoveryPolicy
impl Debug for RecoveryPolicy
Source§impl Default for RecoveryPolicy
impl Default for RecoveryPolicy
Source§impl Message for RecoveryPolicy
impl Message for RecoveryPolicy
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.