mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Correct indentation issues
This commit is contained in:
committed by
Erdem Yerebasmaz
parent
1aa91aab17
commit
baa365e926
@@ -12,6 +12,6 @@ Future<void> getLspInfo() async {
|
|||||||
|
|
||||||
Future<void> connectLsp(String lspId) async {
|
Future<void> connectLsp(String lspId) async {
|
||||||
// ANCHOR: connect-lsp
|
// ANCHOR: connect-lsp
|
||||||
return await BreezSDK().connectLSP(lspId);
|
await BreezSDK().connectLSP(lspId);
|
||||||
// ANCHOR_END: connect-lsp
|
// ANCHOR_END: connect-lsp
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"github.com/breez/breez-sdk-go/breez_sdk"
|
"github.com/breez/breez-sdk-go/breez_sdk"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ANCHOR: init-sdk-requirements
|
// ANCHOR: init-sdk
|
||||||
// SDK events listener
|
// SDK events listener
|
||||||
type BreezListener struct{}
|
type BreezListener struct{}
|
||||||
|
|
||||||
@@ -14,10 +14,7 @@ func (BreezListener) OnEvent(e breez_sdk.BreezEvent) {
|
|||||||
log.Printf("received event %#v", e)
|
log.Printf("received event %#v", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ANCHOR_END: init-sdk-requirements
|
|
||||||
|
|
||||||
func GettingStarted() {
|
func GettingStarted() {
|
||||||
// ANCHOR: init-sdk
|
|
||||||
// Create the default config
|
// Create the default config
|
||||||
seed, err := breez_sdk.MnemonicToSeed("<mnemonic words>")
|
seed, err := breez_sdk.MnemonicToSeed("<mnemonic words>")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -41,7 +38,10 @@ func GettingStarted() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Connect failed: %#v", err)
|
log.Fatalf("Connect failed: %#v", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ANCHOR_END: init-sdk
|
// ANCHOR_END: init-sdk
|
||||||
|
func FetchBalance() {
|
||||||
// ANCHOR: fetch-balance
|
// ANCHOR: fetch-balance
|
||||||
if nodeInfo, err := sdk.NodeInfo(); err != nil {
|
if nodeInfo, err := sdk.NodeInfo(); err != nil {
|
||||||
lnBalance := nodeInfo.ChannelsBalanceMsat
|
lnBalance := nodeInfo.ChannelsBalanceMsat
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ const exampleReceiveLightningPayment = async () => {
|
|||||||
amountMsat: 3000000,
|
amountMsat: 3000000,
|
||||||
description: "Invoice for 3000 sats"
|
description: "Invoice for 3000 sats"
|
||||||
})
|
})
|
||||||
// ANCHOR: receive-payment
|
// ANCHOR_END: receive-payment
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ except Exception as error:
|
|||||||
<section>
|
<section>
|
||||||
|
|
||||||
```go
|
```go
|
||||||
{{#include ../../snippets/go/getting_started.go:init-sdk-requirements}}
|
|
||||||
{{#include ../../snippets/go/getting_started.go:init-sdk}}
|
{{#include ../../snippets/go/getting_started.go:init-sdk}}
|
||||||
```
|
```
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user