mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
16 lines
515 B
Dart
16 lines
515 B
Dart
import 'package:breez_sdk/breez_sdk.dart';
|
|
import 'package:breez_sdk/bridge_generated.dart';
|
|
|
|
Future<ReceivePaymentResponse> receivePayment() async {
|
|
// ANCHOR: receive-payment
|
|
ReceivePaymentRequest req = const ReceivePaymentRequest(
|
|
amountMsat: 3000000,
|
|
description: "Invoice for 3000 sats",
|
|
);
|
|
ReceivePaymentResponse receivePaymentResponse = await BreezSDK().receivePayment(req: req);
|
|
|
|
print(receivePaymentResponse.lnInvoice);
|
|
// ANCHOR_END: receive-payment
|
|
return receivePaymentResponse;
|
|
}
|