pub struct SignatureRequest { /* private fields */ }Expand description
A signature request is meant to be sent over the FFI barrier (wrapped in a mutex) to platform SDKs.
xmtp_mls can add any InstallationKey signatures first, so that the platform SDK does not need to worry about those.
The platform SDK can then fill in any missing signatures and convert it to an IdentityUpdate that is ready to be published
to the network
Implementations§
Source§impl SignatureRequest
impl SignatureRequest
pub fn new( pending_actions: Vec<PendingIdentityAction>, signature_text: String, inbox_id: String, client_timestamp_ns: u64, ) -> Self
pub fn missing_signatures(&self) -> Vec<&MemberIdentifier>
pub fn missing_address_signatures(&self) -> Vec<&MemberIdentifier>
Sourcepub fn restrict_chains(&mut self, chains: Arc<[String]>)
pub fn restrict_chains(&mut self, chains: Arc<[String]>)
Often the front-end doesn’t know the current block number when adding a smart contract. This is for when you want to add a smart-contract wallet, and need the verifier to populate the latest block number for you. Restrict app-supplied smart contract wallet signatures to these chains (CFG-069, CFG-070). Set by the client from the snapshot it resolved, before the request is handed to the app.
Sourcepub fn accepted_chains(&self) -> Option<&[String]>
pub fn accepted_chains(&self) -> Option<&[String]>
The chains this request was restricted to, or None when nothing
restricted it. Some(&[]) is a deployment that accepts no chain
(CFG-070), which is not the same as no restriction.
pub async fn add_new_unverified_smart_contract_signature( &mut self, signature: NewUnverifiedSmartContractWalletSignature, scw_verifier: impl SmartContractSignatureVerifier, ) -> Result<(), SignatureRequestError>
pub async fn add_signature( &mut self, signature: UnverifiedSignature, scw_verifier: impl SmartContractSignatureVerifier, ) -> Result<(), SignatureRequestError>
pub fn is_ready(&self) -> bool
pub fn signature_text(&self) -> String
pub fn build_identity_update( self, ) -> Result<UnverifiedIdentityUpdate, SignatureRequestError>
pub fn inbox_id(&self) -> InboxIdRef<'_>
Trait Implementations§
Source§impl Clone for SignatureRequest
impl Clone for SignatureRequest
Source§fn clone(&self) -> SignatureRequest
fn clone(&self) -> SignatureRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SignatureRequest
impl RefUnwindSafe for SignatureRequest
impl Send for SignatureRequest
impl Sync for SignatureRequest
impl Unpin for SignatureRequest
impl UnsafeUnpin for SignatureRequest
impl UnwindSafe for SignatureRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> 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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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].