pub struct ZebedeeClient { /* private fields */ }
Implementations§
Source§impl ZebedeeClient
impl ZebedeeClient
pub fn new<'a>(apikey: impl Into<Cow<'a, str>>) -> Self
pub fn reqw_cli(self, reqw_cli: Client) -> Self
pub fn oauth( self, client_id: String, secret: String, redirect_uri: String, state: String, scope: String, ) -> Self
Sourcepub async fn get_wallet_details(&self) -> Result<WalletInfoResponse>
pub async fn get_wallet_details(&self) -> Result<WalletInfoResponse>
Retrieves the total balance of a given Project Wallet.
Sourcepub async fn keysend(
&self,
keysend_payload: &Keysend,
) -> Result<KeysendResponse>
pub async fn keysend( &self, keysend_payload: &Keysend, ) -> Result<KeysendResponse>
Make payment directly to a Lightning Network node Public Key, without the need for a Payment Request / Charge.
Sourcepub async fn create_charge(
&self,
charge: &Charge,
) -> Result<FetchOneChargeResponse>
pub async fn create_charge( &self, charge: &Charge, ) -> Result<FetchOneChargeResponse>
Creates a new Charge / Payment Request in the Bitcoin Lightning Network, payable by any Lightning Network wallet. These payment requests are single-use, fixed-amount QR codes. If you’re looking for multi-use and multi-amount payment requests you want Static Charges.
pub async fn get_charges(&self) -> Result<FetchChargesResponse>
Sourcepub async fn get_charge<T>(
&self,
charge_id: T,
) -> Result<FetchOneChargeResponse>
pub async fn get_charge<T>( &self, charge_id: T, ) -> Result<FetchOneChargeResponse>
Retrieves all information relating a specific Charge / Payment Request.
Sourcepub async fn pay_gamertag(
&self,
payment: &GamertagPayment,
) -> Result<GamertagPayResponse>
pub async fn pay_gamertag( &self, payment: &GamertagPayment, ) -> Result<GamertagPayResponse>
Send Bitcoin payments directly to a user’s ZBD Gamertag
Sourcepub async fn fetch_charge_from_gamertag(
&self,
payment: &GamertagPayment,
) -> Result<GamertagChargeResponse>
pub async fn fetch_charge_from_gamertag( &self, payment: &GamertagPayment, ) -> Result<GamertagChargeResponse>
Create a bolt 11 invoice so you can pay a specified gamertag
Sourcepub async fn get_gamertag_tx<T>(
&self,
transaction_id: T,
) -> Result<GamertagTxResponse>
pub async fn get_gamertag_tx<T>( &self, transaction_id: T, ) -> Result<GamertagTxResponse>
Get data on payments sent to ZBD Gamertags. The data payload returned will inform you of the status of that transaction as well as any associated fees.
Sourcepub async fn get_userid_by_gamertag<T>(
&self,
gamertag: T,
) -> Result<IdFromGamertagResponse>
pub async fn get_userid_by_gamertag<T>( &self, gamertag: T, ) -> Result<IdFromGamertagResponse>
Get a given User’s ID when provided with a ZBD Gamertag.
Sourcepub async fn get_gamertag_by_userid<T>(
&self,
user_id: T,
) -> Result<GamertagUserIdResponse>
pub async fn get_gamertag_by_userid<T>( &self, user_id: T, ) -> Result<GamertagUserIdResponse>
Get a given user’s ZBD Gamertag from user id
Sourcepub async fn internal_transfer(
&self,
internal_transfer_payload: &InternalTransfer,
) -> Result<InternalTransferResponse>
pub async fn internal_transfer( &self, internal_transfer_payload: &InternalTransfer, ) -> Result<InternalTransferResponse>
Initiates a transfer of funds between two Project Wallets you own.
Sourcepub async fn pay_ln_address(
&self,
payment: &LnPayment,
) -> Result<PayLnAddressResponse>
pub async fn pay_ln_address( &self, payment: &LnPayment, ) -> Result<PayLnAddressResponse>
Send Bitcoin payments directly to a Lightning Address.
Sourcepub async fn fetch_charge_ln_address(
&self,
payment: &LnFetchCharge,
) -> Result<FetchLnChargeResponse>
pub async fn fetch_charge_ln_address( &self, payment: &LnFetchCharge, ) -> Result<FetchLnChargeResponse>
Create a Charge / Payment Request QR code for a Lightning Address
Sourcepub async fn validate_ln_address(
&self,
lightning_address: &LnAddress,
) -> Result<ValidateLnAddrResponse>
pub async fn validate_ln_address( &self, lightning_address: &LnAddress, ) -> Result<ValidateLnAddrResponse>
Validate whether a user’s entered Lightning Address is indeed a real Lightning Address
Sourcepub async fn pay_invoice(
&self,
payment: &Payment,
) -> Result<PaymentInvoiceResponse>
pub async fn pay_invoice( &self, payment: &Payment, ) -> Result<PaymentInvoiceResponse>
Pays a Charge / Payment Request in the Bitcoin Lightning Network
pub async fn get_payments(&self) -> Result<FetchPaymentsResponse>
Sourcepub async fn get_payment<T>(
&self,
payment_id: T,
) -> Result<FetchOnePaymentsResponse>
pub async fn get_payment<T>( &self, payment_id: T, ) -> Result<FetchOnePaymentsResponse>
Retrieves all the information related to a specific Payment
Sourcepub async fn get_is_supported_region_by_ip<T>(
&self,
ip: T,
) -> Result<SupportedIpResponse>
pub async fn get_is_supported_region_by_ip<T>( &self, ip: T, ) -> Result<SupportedIpResponse>
Check if provided ip address will be supported by Zebedee REST API
Sourcepub async fn get_prod_ips(&self) -> Result<ProdIpsResponse>
pub async fn get_prod_ips(&self) -> Result<ProdIpsResponse>
Check if callback response is from legit Zebedee ip address
Sourcepub async fn get_btc_usd(&self) -> Result<BtcToUsdResponse>
pub async fn get_btc_usd(&self) -> Result<BtcToUsdResponse>
Get the latest price for Bitcoin in US Dollars. The exchange rate feed is refreshed every 5 seconds and is based upon a combination of industry-leading partner exchange providers’s price feeds.
Sourcepub async fn create_withdrawal_request(
&self,
withdrawal_request: &WithdrawalReqest,
) -> Result<CreateWithdrawalResponse>
pub async fn create_withdrawal_request( &self, withdrawal_request: &WithdrawalReqest, ) -> Result<CreateWithdrawalResponse>
Withdrawal Requests can be thought of as exact opposites to Charges. Charges in the ZEBEDEE API are QR codes that represent Payment Requests in the Bitcoin Lightning Network. These QR codes expect that a payer will scan and perform a payment against it.
Charges
: Lightning QR codes that YOU SPEND
Withdrawal Requests
: Lightning QR codes that YOU RECEIVE
pub async fn get_withdrawal_requests(&self) -> Result<FetchWithdrawalsResponse>
Sourcepub async fn get_withdrawal_request<T>(
&self,
withdrawal_id: T,
) -> Result<FetchOneWithdrawalResponse>
pub async fn get_withdrawal_request<T>( &self, withdrawal_id: T, ) -> Result<FetchOneWithdrawalResponse>
Retrieves details about a specific Withdrawal Request.
Sourcepub async fn pay_email(
&self,
email_payment_request: &EmailPaymentReqest,
) -> Result<EmailPaymentResponse>
pub async fn pay_email( &self, email_payment_request: &EmailPaymentReqest, ) -> Result<EmailPaymentResponse>
Send instant Bitcoin payments to any email.
pub async fn create_auth_url<T>(&self, challenge: T) -> Result<String>
pub async fn fetch_token<A, B>( &self, code: A, verifier: B, ) -> Result<FetchAccessTokenRes>
Sourcepub async fn refresh_token<T>(&self, refresh_token: T) -> Result<FetchPostRes>
pub async fn refresh_token<T>(&self, refresh_token: T) -> Result<FetchPostRes>
In order to fetch a new accessToken for a given ZBD User, make sure to use the refreshToken using the token endpoint.
Sourcepub async fn fetch_user_data<T>(&self, token: T) -> Result<StdResp<ZBDUserData>>
pub async fn fetch_user_data<T>(&self, token: T) -> Result<StdResp<ZBDUserData>>
You can use this API endpoint to fetch information about a given ZBD User, granted you can pass the provided accessToken.
Sourcepub async fn fetch_user_wallet_data<T>(
&self,
token: T,
) -> Result<StdResp<ZBDUserWalletData>>
pub async fn fetch_user_wallet_data<T>( &self, token: T, ) -> Result<StdResp<ZBDUserWalletData>>
You can use this API endpoint to fetch information about a given ZBD User’s Wallet, granted you can pass the provided accessToken.
Trait Implementations§
Source§impl Clone for ZebedeeClient
impl Clone for ZebedeeClient
Source§fn clone(&self) -> ZebedeeClient
fn clone(&self) -> ZebedeeClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more