mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
18 lines
359 B
Rust
18 lines
359 B
Rust
use std::sync::Arc;
|
|
|
|
use anyhow::Result;
|
|
use breez_sdk_core::*;
|
|
|
|
async fn buy(sdk: Arc<BreezServices>) -> Result<()> {
|
|
// ANCHOR: buy-btc
|
|
let res = sdk
|
|
.buy_bitcoin(BuyBitcoinRequest {
|
|
provider: BuyBitcoinProvider::Moonpay,
|
|
opening_fee_params: None,
|
|
})
|
|
.await?;
|
|
// ANCHOR_END: buy-btc
|
|
|
|
Ok(())
|
|
}
|