Files
breez-sdk-docs/snippets/swift/BreezSDKExamples/Sources/ConnectingLsp.swift
Ruben b541595840 move swift examples (#100)
* move swift examples

* swift workflow

* fixup

* rewirte gettingStarted

* add README for swift

* update fiat examples and addresss feedback
2023-11-17 13:15:26 +01:00

26 lines
487 B
Swift

//
// ConnectingLsp.swift
//
//
// Created by ruben on 14/11/2023.
//
import Foundation
import BreezSDK
func getLspInfo(sdk: BlockingBreezServices) -> LspInformation?{
// ANCHOR: get-lsp-info
let lspId = try? sdk.lspId()
let lspInfo = try? sdk.lspInfo()
// ANCHOR_END: get-lsp-info
return lspInfo
}
func connectLsp(sdk: BlockingBreezServices, lspId: String) {
// ANCHOR: connect-lsp
try? sdk.connectLsp(lspId: lspId)
// ANCHOR_END: connect-lsp
}