pub struct SiwxClientExtension { /* private fields */ }Available on crate features
server and siwx only.Expand description
Client extension that signs HTTP SIWX challenges for compatible wallets.
Signers are tried in registration order until one matches a declared chain and produces a header. Failures are skipped (payment retry still proceeds).
Implementations§
Source§impl SiwxClientExtension
impl SiwxClientExtension
Sourcepub const fn new() -> SiwxClientExtension
pub const fn new() -> SiwxClientExtension
Empty signer list.
Sourcepub fn with_signer(
self,
signer: impl SiwxSigner + 'static,
) -> SiwxClientExtension
pub fn with_signer( self, signer: impl SiwxSigner + 'static, ) -> SiwxClientExtension
Appends a wallet signer.
Trait Implementations§
Source§impl ClientExtension for SiwxClientExtension
impl ClientExtension for SiwxClientExtension
Source§async fn on_payment_required(
&self,
payment_required: &PaymentRequired,
request_url: &str,
) -> HeaderMap
async fn on_payment_required( &self, payment_required: &PaymentRequired, request_url: &str, ) -> HeaderMap
Official
transportHooks.http.onPaymentRequired. Default empty. Read moreSource§fn enrich_payment_payload<'a>(
&'a self,
payload_b64: &'a str,
_payment_required: &'a PaymentRequired,
) -> impl Future<Output = Result<String, ClientError>> + Send + 'a
fn enrich_payment_payload<'a>( &'a self, payload_b64: &'a str, _payment_required: &'a PaymentRequired, ) -> impl Future<Output = Result<String, ClientError>> + Send + 'a
Called after scheme signing. Default is a no-op (returns
payload_b64). Read moreSource§impl Debug for SiwxClientExtension
impl Debug for SiwxClientExtension
Source§impl Default for SiwxClientExtension
impl Default for SiwxClientExtension
Source§fn default() -> SiwxClientExtension
fn default() -> SiwxClientExtension
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SiwxClientExtension
impl !UnwindSafe for SiwxClientExtension
impl Freeze for SiwxClientExtension
impl Send for SiwxClientExtension
impl Sync for SiwxClientExtension
impl Unpin for SiwxClientExtension
impl UnsafeUnpin for SiwxClientExtension
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DynClientExtension for Twhere
T: ClientExtension + ?Sized,
impl<T> DynClientExtension for Twhere
T: ClientExtension + ?Sized,
Source§fn key(&self) -> &'static str
fn key(&self) -> &'static str
See
ClientExtension::key.Source§fn enrich_payment_payload<'a>(
&'a self,
payload_b64: &'a str,
payment_required: &'a PaymentRequired,
) -> Pin<Box<dyn Future<Output = Result<String, ClientError>> + Send + 'a>>
fn enrich_payment_payload<'a>( &'a self, payload_b64: &'a str, payment_required: &'a PaymentRequired, ) -> Pin<Box<dyn Future<Output = Result<String, ClientError>> + Send + 'a>>
Source§fn on_payment_required<'a>(
&'a self,
payment_required: &'a PaymentRequired,
request_url: &'a str,
) -> Pin<Box<dyn Future<Output = HeaderMap> + Send + 'a>>
fn on_payment_required<'a>( &'a self, payment_required: &'a PaymentRequired, request_url: &'a str, ) -> Pin<Box<dyn Future<Output = HeaderMap> + Send + 'a>>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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