Struct ockam_entity::ProfileState [−][src]
pub struct ProfileState { /* fields omitted */ }
Expand description
Profile implementation
Implementations
Profile constructor
pub async fn create_key_static(
prev_id: EventIdentifier,
key_attributes: KeyAttributes,
attributes: ProfileEventAttributes,
root_key: Option<&Secret>,
vault: &mut VaultSync
) -> Result<ProfileChangeEvent>
pub async fn create_key_static(
prev_id: EventIdentifier,
key_attributes: KeyAttributes,
attributes: ProfileEventAttributes,
root_key: Option<&Secret>,
vault: &mut VaultSync
) -> Result<ProfileChangeEvent>
Create a new key
Trait Implementations
Get Secret
key. Key is uniquely identified by label in KeyAttributes
Generate Proof of possession of Profile
.
channel_state should be tied to channel’s cryptographical material (e.g. h value for Noise XX)
fn verify_auth_proof<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
channel_state: &'life1 [u8],
responder_contact_id: &'life2 ProfileIdentifier,
proof: &'life3 [u8]
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn verify_auth_proof<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
channel_state: &'life1 [u8],
responder_contact_id: &'life2 ProfileIdentifier,
proof: &'life3 [u8]
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Verify Proof of possession of Profile
with given ProfileIdentifier
.
channel_state should be tied to channel’s cryptographical material (e.g. h value for Noise XX)
Verify whole event chain of current Profile
fn identifier<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<ProfileIdentifier>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn identifier<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<ProfileIdentifier>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Return unique Profile
identifier, which is equal to sha256 of the root public key
Create new key.
Rotate existing key.
Get Secret
key.
Get PublicKey
.
Get PublicKey
.
fn add_change<'life0, 'async_trait>(
&'life0 mut self,
change_event: ProfileChangeEvent
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn add_change<'life0, 'async_trait>(
&'life0 mut self,
change_event: ProfileChangeEvent
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Add a change event.
Return change history chain
Return all known to this profile Contact
s
fn get_contact<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 ProfileIdentifier
) -> Pin<Box<dyn Future<Output = Result<Option<Contact>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_contact<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 ProfileIdentifier
) -> Pin<Box<dyn Future<Output = Result<Option<Contact>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Return Contact
with given ProfileIdentifier
Verify cryptographically whole event chain. Also verify sequence correctness
fn verify_and_update_contact<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
contact_id: &'life1 ProfileIdentifier,
change_events: &'life2 [ProfileChangeEvent]
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn verify_and_update_contact<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
contact_id: &'life1 ProfileIdentifier,
change_events: &'life2 [ProfileChangeEvent]
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Verify and update known Contact
with new ProfileChangeEvent
s
Auto Trait Implementations
impl !RefUnwindSafe for ProfileState
impl Send for ProfileState
impl Sync for ProfileState
impl Unpin for ProfileState
impl !UnwindSafe for ProfileState
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more