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:
17
snippets/dart_snippets/lib/connecting_lsp.dart
Normal file
17
snippets/dart_snippets/lib/connecting_lsp.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:breez_sdk/breez_sdk.dart';
|
||||
import 'package:breez_sdk/bridge_generated.dart';
|
||||
|
||||
Future<void> getLspInfo() async {
|
||||
// ANCHOR: get-lsp-info
|
||||
String? lspId = await BreezSDK().lspId();
|
||||
LspInformation? lspInfo = await BreezSDK().lspInfo();
|
||||
print(lspId);
|
||||
print(lspInfo);
|
||||
// ANCHOR_END: get-lsp-info
|
||||
}
|
||||
|
||||
Future<void> connectLsp(String lspId) async {
|
||||
// ANCHOR: connect-lsp
|
||||
return await BreezSDK().connectLSP(lspId);
|
||||
// ANCHOR_END: connect-lsp
|
||||
}
|
||||
Reference in New Issue
Block a user