pub struct BridgingClient { /* private fields */ }Expand description
Creates bridges: orders that pay a recipient from another chain or over
Lightning, with no funds moving through the SDK. Get one with
new_bridging_client, or from a connected SDK with
get_bridging_client. Only available on mainnet.
Implementations§
Source§impl BridgingClient
impl BridgingClient
Sourcepub async fn get_routes(
&self,
request: GetBridgeRoutesRequest,
) -> Result<GetBridgeRoutesResponse, SdkError>
pub async fn get_routes( &self, request: GetBridgeRoutesRequest, ) -> Result<GetBridgeRoutesResponse, SdkError>
Lists the routes that can pay recipient.
Sourcepub async fn create_bridge(
&self,
request: CreateBridgeRequest,
) -> Result<CreateBridgeResponse, SdkError>
pub async fn create_bridge( &self, request: CreateBridgeRequest, ) -> Result<CreateBridgeResponse, SdkError>
Creates a bridge and returns what the payer pays. Once paid, the
provider delivers to the recipient, or refunds refund_address if it
can’t. Track it with Self::get_bridge_status.
Sourcepub async fn get_bridge_status(
&self,
request: GetBridgeStatusRequest,
) -> Result<GetBridgeStatusResponse, SdkError>
pub async fn get_bridge_status( &self, request: GetBridgeStatusRequest, ) -> Result<GetBridgeStatusResponse, SdkError>
Reads a bridge’s status from the provider.
Sourcepub async fn bridge_from_cash_app(
&self,
request: CreateBridgeRequest,
) -> Result<CreateBridgeResponse, SdkError>
pub async fn bridge_from_cash_app( &self, request: CreateBridgeRequest, ) -> Result<CreateBridgeResponse, SdkError>
Pays a recipient on another chain from Cash App. Takes a route for the
address that the payer funds over Lightning, and returns the bridge
with the Cash App link as its payment_request.
Sourcepub async fn bridge_to_cash_app(
&self,
request: CreateBridgeRequest,
) -> Result<CreateBridgeResponse, SdkError>
pub async fn bridge_to_cash_app( &self, request: CreateBridgeRequest, ) -> Result<CreateBridgeResponse, SdkError>
Pays a Cash App user from another chain. The recipient is their
username, as $alice, or their alice@cash.app Lightning address, as
given to Self::get_routes.
Auto Trait Implementations§
impl Freeze for BridgingClient
impl !RefUnwindSafe for BridgingClient
impl Send for BridgingClient
impl Sync for BridgingClient
impl Unpin for BridgingClient
impl UnsafeUnpin for BridgingClient
impl !UnwindSafe for BridgingClient
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
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request