mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Create Dart snippets and reference them
Co-Authored-By: ok300 <106775972+ok300@users.noreply.github.com>
This commit is contained in:
15
snippets/dart_snippets/lib/send_spontaneous_payment.dart
Normal file
15
snippets/dart_snippets/lib/send_spontaneous_payment.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user