Add React Native snippets

This commit is contained in:
Ross Savage
2023-10-24 22:38:52 +02:00
parent cd3e85d92a
commit 07b55775cf
32 changed files with 4227 additions and 199 deletions

View File

@@ -0,0 +1,15 @@
import { connectLsp, 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 exampleManualConnect = async () => {
// ANCHOR: connect-lsp
const id = "your selected lsp id"
await connectLsp(id)
// ANCHOR_END: connect-lsp
}