mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
16 lines
480 B
Dart
16 lines
480 B
Dart
import 'package:breez_sdk/breez_sdk.dart';
|
|
import 'package:breez_sdk/bridge_generated.dart';
|
|
|
|
Future<SendPaymentResponse> sendSpontaneousPayment({
|
|
required String nodeId,
|
|
}) async {
|
|
// ANCHOR: send-spontaneous-payment
|
|
SendSpontaneousPaymentRequest req = SendSpontaneousPaymentRequest(
|
|
amountMsat: 3000000,
|
|
nodeId: nodeId,
|
|
);
|
|
SendPaymentResponse resp = await BreezSDK().sendSpontaneousPayment(req: req);
|
|
// ANCHOR_END: send-spontaneous-payment
|
|
return resp;
|
|
}
|