MlsApi

Trait MlsApi 

Source
pub trait MlsApi:
    Send
    + Sync
    + 'static {
    type SubscribeGroupMessagesStream: Stream<Item = Result<GroupMessage, Status>> + Send + 'static;
    type SubscribeWelcomeMessagesStream: Stream<Item = Result<WelcomeMessage, Status>> + Send + 'static;

Show 14 methods // Required methods fn send_group_messages<'life0, 'async_trait>( &'life0 self, request: Request<SendGroupMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn send_welcome_messages<'life0, 'async_trait>( &'life0 self, request: Request<SendWelcomeMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn register_installation<'life0, 'async_trait>( &'life0 self, request: Request<RegisterInstallationRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RegisterInstallationResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn upload_key_package<'life0, 'async_trait>( &'life0 self, request: Request<UploadKeyPackageRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn fetch_key_packages<'life0, 'async_trait>( &'life0 self, request: Request<FetchKeyPackagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<FetchKeyPackagesResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn revoke_installation<'life0, 'async_trait>( &'life0 self, request: Request<RevokeInstallationRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_identity_updates<'life0, 'async_trait>( &'life0 self, request: Request<GetIdentityUpdatesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetIdentityUpdatesResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn query_group_messages<'life0, 'async_trait>( &'life0 self, request: Request<QueryGroupMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryGroupMessagesResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn query_welcome_messages<'life0, 'async_trait>( &'life0 self, request: Request<QueryWelcomeMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryWelcomeMessagesResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn subscribe_group_messages<'life0, 'async_trait>( &'life0 self, request: Request<SubscribeGroupMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeGroupMessagesStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn subscribe_welcome_messages<'life0, 'async_trait>( &'life0 self, request: Request<SubscribeWelcomeMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeWelcomeMessagesStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn batch_publish_commit_log<'life0, 'async_trait>( &'life0 self, request: Request<BatchPublishCommitLogRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn batch_query_commit_log<'life0, 'async_trait>( &'life0 self, request: Request<BatchQueryCommitLogRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BatchQueryCommitLogResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_newest_group_message<'life0, 'async_trait>( &'life0 self, request: Request<GetNewestGroupMessageRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetNewestGroupMessageResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with MlsApiServer.

Required Associated Types§

Source

type SubscribeGroupMessagesStream: Stream<Item = Result<GroupMessage, Status>> + Send + 'static

Server streaming response type for the SubscribeGroupMessages method.

Source

type SubscribeWelcomeMessagesStream: Stream<Item = Result<WelcomeMessage, Status>> + Send + 'static

Server streaming response type for the SubscribeWelcomeMessages method.

Required Methods§

Source

fn send_group_messages<'life0, 'async_trait>( &'life0 self, request: Request<SendGroupMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send a MLS payload, that would be validated before being stored to the network

Source

fn send_welcome_messages<'life0, 'async_trait>( &'life0 self, request: Request<SendWelcomeMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send a batch of welcome messages

Source

fn register_installation<'life0, 'async_trait>( &'life0 self, request: Request<RegisterInstallationRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RegisterInstallationResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Register a new installation, which would be validated before storage

Source

fn upload_key_package<'life0, 'async_trait>( &'life0 self, request: Request<UploadKeyPackageRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Upload a new KeyPackage, which would be validated before storage

Source

fn fetch_key_packages<'life0, 'async_trait>( &'life0 self, request: Request<FetchKeyPackagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<FetchKeyPackagesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get one or more Key Packages by installation_id

Source

fn revoke_installation<'life0, 'async_trait>( &'life0 self, request: Request<RevokeInstallationRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Would delete all key packages associated with the installation and mark the installation as having been revoked

Source

fn get_identity_updates<'life0, 'async_trait>( &'life0 self, request: Request<GetIdentityUpdatesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetIdentityUpdatesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Used to check for changes related to members of a group. Would return an array of any new installations associated with the wallet address, and any revocations that have happened.

Source

fn query_group_messages<'life0, 'async_trait>( &'life0 self, request: Request<QueryGroupMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryGroupMessagesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Query stored group messages

Source

fn query_welcome_messages<'life0, 'async_trait>( &'life0 self, request: Request<QueryWelcomeMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryWelcomeMessagesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Query stored group messages

Source

fn subscribe_group_messages<'life0, 'async_trait>( &'life0 self, request: Request<SubscribeGroupMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeGroupMessagesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe stream of new group messages

Source

fn subscribe_welcome_messages<'life0, 'async_trait>( &'life0 self, request: Request<SubscribeWelcomeMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeWelcomeMessagesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe stream of new welcome messages

Source

fn batch_publish_commit_log<'life0, 'async_trait>( &'life0 self, request: Request<BatchPublishCommitLogRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn batch_query_commit_log<'life0, 'async_trait>( &'life0 self, request: Request<BatchQueryCommitLogRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BatchQueryCommitLogResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_newest_group_message<'life0, 'async_trait>( &'life0 self, request: Request<GetNewestGroupMessageRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetNewestGroupMessageResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§