pub struct IdentifierController {
    pub id: IdentifierPrefix,
    pub source: Arc<Controller>,
    pub registry_id: Option<IdentifierPrefix>,
    /* private fields */
}

Fields§

§id: IdentifierPrefix§source: Arc<Controller>§registry_id: Option<IdentifierPrefix>

Implementations§

source§

impl IdentifierController

source

pub fn sign( &self, signature: SelfSigningPrefix, key_index: u16 ) -> Result<Signature, ControllerError>

source

pub fn to_cesr_signature( &self, sig: SelfSigningPrefix, index: u16 ) -> Result<String, ControllerError>

source

pub fn sign_to_cesr( &self, data: &str, signature: SelfSigningPrefix, key_index: u16 ) -> Result<String, ControllerError>

source§

impl IdentifierController

source

pub fn incept_registry( &mut self ) -> Result<(IdentifierPrefix, Vec<u8>), ControllerError>

Generate vcp event and ixn event with seal to vcp. To finalize the process, ixn need to be signed confirmed with finalize_event function.

source

pub fn issue( &self, credential_digest: SelfAddressingIdentifier ) -> Result<(IdentifierPrefix, Vec<u8>), ControllerError>

Generate iss event and ixn event with seal to iss. To finalize the process, ixn need to be signed confirmed with finalize_event function.

source

pub fn revoke( &self, credential_sai: &SelfAddressingIdentifier ) -> Result<Vec<u8>, ControllerError>

Generate rev event and ixn event with seal to rev. To finalize the process, ixn need to be signed confirmed with finalize_event function.

source

pub fn query_tel( &self, registry_id: IdentifierPrefix, vc_identifier: IdentifierPrefix ) -> Result<TelQueryEvent, ControllerError>

source

pub async fn notify_backers(&self) -> Result<(), ControllerError>

source§

impl IdentifierController

source

pub fn new( id: IdentifierPrefix, kel: Arc<Controller>, registry_id: Option<IdentifierPrefix> ) -> Self

source

pub fn get_kel(&self) -> Result<String, ControllerError>

source

pub fn get_last_establishment_event_seal( &self ) -> Result<EventSeal, ControllerError>

source

pub async fn rotate( &self, current_keys: Vec<BasicPrefix>, new_next_keys: Vec<BasicPrefix>, witness_to_add: Vec<LocationScheme>, witness_to_remove: Vec<BasicPrefix>, witness_threshold: u64 ) -> Result<String, ControllerError>

source

pub fn anchor( &self, payload: &[SelfAddressingIdentifier] ) -> Result<String, ControllerError>

source

pub fn delegate( &self, delegated_event: &KeriEvent<KeyEvent> ) -> Result<(KeriEvent<KeyEvent>, ExchangeMessage), ControllerError>

Generates delegating event (ixn) and exchange event that contains delegated event which will be send to delegate after ixn finalization.

source

pub fn anchor_with_seal( &self, seal_list: &[Seal] ) -> Result<KeriEvent<KeyEvent>, ControllerError>

source

pub fn anchor_group( &self, group_id: &IdentifierPrefix, seal_list: &[Seal] ) -> Result<KeriEvent<KeyEvent>, ControllerError>

source

pub fn add_watcher( &self, watcher_id: IdentifierPrefix ) -> Result<String, ControllerError>

Generates reply event with end_role_add route.

source

pub fn remove_watcher( &self, watcher_id: IdentifierPrefix ) -> Result<String, ControllerError>

Generates reply event with end_role_cut route.

source

pub fn add_messagebox( &self, message_box_id: IdentifierPrefix ) -> Result<String, ControllerError>

Generates reply event with end_role_add route and messagebox as a role..

source

pub async fn finalize_event( &self, event: &[u8], sig: SelfSigningPrefix ) -> Result<(), ControllerError>

Checks signatures and updates database. Must call IdentifierController::notify_witnesses after calling this function if event is a key event.

source

pub fn incept_group( &self, participants: Vec<IdentifierPrefix>, signature_threshold: u64, initial_witness: Option<Vec<BasicPrefix>>, witness_threshold: Option<u64>, delegator: Option<IdentifierPrefix> ) -> Result<(String, Vec<String>), ControllerError>

Init group identifier

Returns serialized group icp and list of exchange messages to sign. Exchanges are meant to be send to witness and forwarded to group participants. If delegator parameter is provided, it will generate delegated inception and append delegation request to exchange messages.

source

pub async fn finalize_exchange( &self, exchange: &[u8], exn_signature: SelfSigningPrefix, data_signature: IndexedSignature ) -> Result<(), ControllerError>

source

pub async fn finalize_group_incept( &mut self, group_event: &[u8], sig: SelfSigningPrefix, exchanges: Vec<(Vec<u8>, SelfSigningPrefix)> ) -> Result<IdentifierPrefix, ControllerError>

Finalizes group identifier. Joins event with signature and verifies them. Must call IdentifierController::notify_witnesses after calling this function to send signed exn messages to witness to be forwarded to group participants.

source

pub async fn notify_witnesses(&self) -> Result<usize, ControllerError>

source

pub fn query_mailbox( &self, identifier: &IdentifierPrefix, witnesses: &[BasicPrefix] ) -> Result<Vec<QueryEvent>, ControllerError>

Generates query message of route mbx to query own identifier mailbox.

source

pub fn query_watcher( &self, identifier: &IdentifierPrefix, watcher: IdentifierPrefix ) -> Result<QueryEvent, ControllerError>

source

pub fn query_own_watchers( &self, about_who: &IdentifierPrefix ) -> Result<Vec<QueryEvent>, ControllerError>

source

pub async fn finalize_query( &self, queries: Vec<(QueryEvent, SelfSigningPrefix)> ) -> Result<Vec<ActionRequired>, ControllerError>

Joins query events with their signatures, sends it to witness and process its response. If user action is needed to finalize process, returns proper notification.

source

pub async fn finalize_tel_query( &self, issuer_id: &IdentifierPrefix, qry: TelQueryEvent, sig: SelfSigningPrefix ) -> Result<(), ControllerError>

source

pub async fn broadcast_receipts( &mut self, dest_wit_ids: &[IdentifierPrefix] ) -> Result<usize, ControllerError>

Send new receipts obtained via Self::finalize_query to specified witnesses. Returns number of new receipts sent per witness or first error.

source

pub async fn verify_stream(&self, stream: &str) -> Result<(), ControllerError>

Splits input string into oobis to resolve and signed data, sends oobi to watchers and verify provided credentials.

source§

impl IdentifierController

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more