Files
breez-sdk-docs/snippets/react-native/connecting_lsp.ts
2023-11-20 13:51:24 +01:00

22 lines
538 B
TypeScript

import { connectLsp, listLsps, lspId, lspInfo } from '@breeztech/react-native-breez-sdk'
const exampleAutoConnect = async () => {
// ANCHOR: get-lsp-info
const id = await lspId()
const info = await lspInfo()
// ANCHOR_END: get-lsp-info
}
const exampleListLsps = async () => {
// ANCHOR: list-lsps
const availableLsps = await listLsps()
// ANCHOR_END: list-lsps
}
const exampleManualConnect = async () => {
// ANCHOR: connect-lsp
const id = 'your selected lsp id'
await connectLsp(id)
// ANCHOR_END: connect-lsp
}