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§
Sourcetype SubscribeGroupMessagesStream: Stream<Item = Result<GroupMessage, Status>> + Send + 'static
type SubscribeGroupMessagesStream: Stream<Item = Result<GroupMessage, Status>> + Send + 'static
Server streaming response type for the SubscribeGroupMessages method.
Sourcetype SubscribeWelcomeMessagesStream: Stream<Item = Result<WelcomeMessage, Status>> + Send + 'static
type SubscribeWelcomeMessagesStream: Stream<Item = Result<WelcomeMessage, Status>> + Send + 'static
Server streaming response type for the SubscribeWelcomeMessages method.
Required Methods§
Sourcefn 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_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
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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 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.
Sourcefn 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_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
Sourcefn 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 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
Sourcefn 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_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
Sourcefn 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 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