mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
19 lines
371 B
Go
19 lines
371 B
Go
package example
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/breez/breez-sdk-go/breez_sdk"
|
|
)
|
|
|
|
func BuyBitcoin() {
|
|
// ANCHOR: buy-btc
|
|
buyBitcoinRequest := breez_sdk.BuyBitcoinRequest{
|
|
Provider: breez_sdk.BuyBitcoinProviderMoonpay,
|
|
}
|
|
if buyBitcoinResponse, err := sdk.BuyBitcoin(buyBitcoinRequest); err == nil {
|
|
log.Printf("%#v", buyBitcoinResponse)
|
|
}
|
|
// ANCHOR_END: buy-btc
|
|
}
|