Struct ockam_entity::ProfileState [−][src]
pub struct ProfileState { /* fields omitted */ }
Expand description
Profile implementation
Implementations
pub fn new(
identifier: ProfileIdentifier,
change_events: Changes,
contacts: Contacts,
vault: VaultSync,
key_attribs: KeyAttributes
) -> Self
pub fn new(
identifier: ProfileIdentifier,
change_events: Changes,
contacts: Contacts,
vault: VaultSync,
key_attribs: KeyAttributes
) -> Self
Profile constructor
pub fn create_key_static(
prev_id: EventIdentifier,
key_attributes: KeyAttributes,
attributes: ProfileEventAttributes,
root_key: Option<&Secret>,
vault: &mut VaultSync
) -> Result<ProfileChangeEvent>
pub 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)
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
]
Return unique [Profile
] identifier, which is equal to sha256 of the root public key
Rotate existing key.
Get PublicKey
.
Add a change event.
Return change history chain
Convert [Profile
] to Contact
Return Contact
with given ProfileIdentifier
Verify cryptographically whole event chain. Also verify sequence correctness
Verify and add new Contact
to [Profile
]’s Contact list
fn verify_and_update_contact<C: AsRef<[ProfileChangeEvent]>>(
&mut self,
contact_id: &ProfileIdentifier,
change_events: C
) -> Result<bool>
fn verify_and_update_contact<C: AsRef<[ProfileChangeEvent]>>(
&mut self,
contact_id: &ProfileIdentifier,
change_events: C
) -> Result<bool>
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V