pub struct IdentityUpdates<Context> { /* private fields */ }Implementations§
Source§impl<Context> IdentityUpdates<Context>
impl<Context> IdentityUpdates<Context>
Source§impl<'a, Context> IdentityUpdates<Context>where
Context: XmtpSharedContext,
impl<'a, Context> IdentityUpdates<Context>where
Context: XmtpSharedContext,
Sourcepub async fn batch_get_association_state(
&self,
conn: &impl DbQuery,
identifiers: &[(impl AsIdRef, Option<i64>)],
) -> Result<Vec<AssociationState>, ClientError>
pub async fn batch_get_association_state( &self, conn: &impl DbQuery, identifiers: &[(impl AsIdRef, Option<i64>)], ) -> Result<Vec<AssociationState>, ClientError>
Get the association state for all provided inbox_id/optional sequence_id tuples, using the cache when available
If the association state is not available in the cache, this falls back to reconstructing the association state
from Identity Updates in the network.
Sourcepub async fn get_latest_association_state(
&self,
conn: &DbConnection<<Context::Db as XmtpDb>::Connection>,
inbox_id: InboxIdRef<'a>,
) -> Result<AssociationState, ClientError>
pub async fn get_latest_association_state( &self, conn: &DbConnection<<Context::Db as XmtpDb>::Connection>, inbox_id: InboxIdRef<'a>, ) -> Result<AssociationState, ClientError>
Get the latest association state available on the network for the given inbox_id
Sourcepub async fn get_association_state(
&self,
conn: &impl DbQuery,
inbox_id: InboxIdRef<'_>,
to_sequence_id: Option<i64>,
) -> Result<AssociationState, ClientError>
pub async fn get_association_state( &self, conn: &impl DbQuery, inbox_id: InboxIdRef<'_>, to_sequence_id: Option<i64>, ) -> Result<AssociationState, ClientError>
Get the association state for a given inbox_id up to the (and inclusive of) the to_sequence_id
If no to_sequence_id is provided, use the latest value in the database
Sourcepub async fn create_inbox(
&self,
identifier: Identifier,
maybe_nonce: Option<u64>,
) -> Result<SignatureRequest, ClientError>
pub async fn create_inbox( &self, identifier: Identifier, maybe_nonce: Option<u64>, ) -> Result<SignatureRequest, ClientError>
Generate a CreateInbox signature request for the given wallet address.
If no nonce is provided, use 0
Sourcepub async fn associate_identity(
&self,
new_identifier: Identifier,
) -> Result<SignatureRequest, ClientError>
pub async fn associate_identity( &self, new_identifier: Identifier, ) -> Result<SignatureRequest, ClientError>
Generate a AssociateWallet signature request using an existing wallet and a new wallet address
Sourcepub async fn revoke_identities(
&self,
identities_to_revoke: Vec<Identifier>,
) -> Result<SignatureRequest, ClientError>
pub async fn revoke_identities( &self, identities_to_revoke: Vec<Identifier>, ) -> Result<SignatureRequest, ClientError>
Revoke the given identities from the association state for the client’s inbox
Sourcepub async fn revoke_installations(
&self,
installation_ids: Vec<Vec<u8>>,
) -> Result<SignatureRequest, ClientError>
pub async fn revoke_installations( &self, installation_ids: Vec<Vec<u8>>, ) -> Result<SignatureRequest, ClientError>
Revoke the given installations from the association state for the client’s inbox
Sourcepub async fn change_recovery_identifier(
&self,
new_recovery_identifier: Identifier,
) -> Result<SignatureRequest, ClientError>
pub async fn change_recovery_identifier( &self, new_recovery_identifier: Identifier, ) -> Result<SignatureRequest, ClientError>
Generate a ChangeRecoveryAddress signature request using a new identifier
Sourcepub async fn apply_signature_request(
&self,
signature_request: SignatureRequest,
) -> Result<(), ClientError>
pub async fn apply_signature_request( &self, signature_request: SignatureRequest, ) -> Result<(), ClientError>
Apply a signature request to the client’s inbox by publishing the identity update to the network.
This will error if the signature request is missing signatures, if the signatures are invalid, if the update fails other verifications, or if the update fails to be published to the network.
Sourcepub async fn get_installation_diff(
&self,
conn: &impl DbQuery,
group_id: &GroupId,
old_group_membership: &GroupMembership,
new_group_membership: &GroupMembership,
membership_diff: &MembershipDiff<'_>,
) -> Result<InstallationDiff, InstallationDiffError>
pub async fn get_installation_diff( &self, conn: &impl DbQuery, group_id: &GroupId, old_group_membership: &GroupMembership, new_group_membership: &GroupMembership, membership_diff: &MembershipDiff<'_>, ) -> Result<InstallationDiff, InstallationDiffError>
Given two group memberships and the diff, get the list of installations that were added or removed between the two membership states.
Auto Trait Implementations§
impl<Context> Freeze for IdentityUpdates<Context>where
Context: Freeze,
impl<Context> RefUnwindSafe for IdentityUpdates<Context>where
Context: RefUnwindSafe,
impl<Context> Send for IdentityUpdates<Context>where
Context: Send,
impl<Context> Sync for IdentityUpdates<Context>where
Context: Sync,
impl<Context> Unpin for IdentityUpdates<Context>where
Context: Unpin,
impl<Context> UnsafeUnpin for IdentityUpdates<Context>where
Context: UnsafeUnpin,
impl<Context> UnwindSafe for IdentityUpdates<Context>where
Context: UnwindSafe,
Blanket Implementations§
§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read more§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read more§fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more