mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-18 14:24:19 +01:00
move receive_payment docs to msat
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Receiving Lightning Payments
|
# Receiving Lightning Payments
|
||||||
|
|
||||||
With the Breez SDK you arn't required to open a channel and set up your inbound liquidity.
|
With the Breez SDK you aren't required to open a channel and set up your inbound liquidity.
|
||||||
The Breez SDK automatically connects your node to the LSP peer and you can now receive payments.
|
The Breez SDK automatically connects your node to the LSP peer and you can now receive payments.
|
||||||
|
|
||||||
<custom-tabs category="lang">
|
<custom-tabs category="lang">
|
||||||
@@ -10,7 +10,7 @@ The Breez SDK automatically connects your node to the LSP peer and you can now r
|
|||||||
```rust,ignore
|
```rust,ignore
|
||||||
let res = sdk.receive_payment(
|
let res = sdk.receive_payment(
|
||||||
ReceivePaymentRequest {
|
ReceivePaymentRequest {
|
||||||
amount_sats: 3000,
|
amount_msat: 3_000_000,
|
||||||
description: "Invoice for 3000 sats".into(),
|
description: "Invoice for 3000 sats".into(),
|
||||||
cltv: None,
|
cltv: None,
|
||||||
expiry: None,
|
expiry: None,
|
||||||
@@ -28,8 +28,8 @@ let res = sdk.receive_payment(
|
|||||||
```swift
|
```swift
|
||||||
do {
|
do {
|
||||||
let invoice = try sdk.receivePayment(
|
let invoice = try sdk.receivePayment(
|
||||||
reqData: ReceivePaymentRequest(
|
req: ReceivePaymentRequest(
|
||||||
amountSats: 3000,
|
amountMsat: 3_000_000,
|
||||||
description: "Invoice for 3000 sats"))
|
description: "Invoice for 3000 sats"))
|
||||||
} catch {
|
} catch {
|
||||||
// handle error
|
// handle error
|
||||||
@@ -43,7 +43,7 @@ do {
|
|||||||
```kotlin,ignore
|
```kotlin,ignore
|
||||||
try {
|
try {
|
||||||
val invoice = sdk.receivePayment(ReceivePaymentRequest(
|
val invoice = sdk.receivePayment(ReceivePaymentRequest(
|
||||||
3000L.toULong(),
|
3_000_000L.toULong(),
|
||||||
"Invoice for 3000 sats",
|
"Invoice for 3000 sats",
|
||||||
))
|
))
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
@@ -58,7 +58,7 @@ try {
|
|||||||
```typescript
|
```typescript
|
||||||
try {
|
try {
|
||||||
const invoice = await receivePayment({
|
const invoice = await receivePayment({
|
||||||
amountSats: 3000,
|
amountMsat: 3_000_000,
|
||||||
description: "Invoice for 3000 sats"
|
description: "Invoice for 3000 sats"
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -73,8 +73,8 @@ try {
|
|||||||
```dart
|
```dart
|
||||||
try {
|
try {
|
||||||
ReceivePaymentResponse invoice = await receivePayment(
|
ReceivePaymentResponse invoice = await receivePayment(
|
||||||
reqData: ReceivePaymentRequest(
|
req: ReceivePaymentRequest(
|
||||||
amountSats: 3000,
|
amountMsat: 3_000_000,
|
||||||
description: "Invoice for 3000 sats",
|
description: "Invoice for 3000 sats",
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -91,7 +91,7 @@ try {
|
|||||||
try:
|
try:
|
||||||
receive_payment_response = sdk_services.receive_payment(
|
receive_payment_response = sdk_services.receive_payment(
|
||||||
breez_sdk.ReceivePaymentRequest(
|
breez_sdk.ReceivePaymentRequest(
|
||||||
amount_sats=3000,
|
amount_msat=3_000_000,
|
||||||
description="Invoice for 3000 sats"))
|
description="Invoice for 3000 sats"))
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
# Handle error
|
# Handle error
|
||||||
@@ -103,7 +103,7 @@ except Exception as error:
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
receivePaymentRequest := breez_sdk.ReceivePaymentRequest{
|
receivePaymentRequest := breez_sdk.ReceivePaymentRequest{
|
||||||
AmountSats: 3000,
|
AmountMsat: 3_000_000,
|
||||||
Description: "Invoice for 3000 sats",
|
Description: "Invoice for 3000 sats",
|
||||||
}
|
}
|
||||||
if receivePaymentResponse, err := sdk.ReceivePayment(receivePaymentRequest); err == nil {
|
if receivePaymentResponse, err := sdk.ReceivePayment(receivePaymentRequest); err == nil {
|
||||||
@@ -119,7 +119,7 @@ if receivePaymentResponse, err := sdk.ReceivePayment(receivePaymentRequest); err
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var invoice = sdk.ReceivePayment(
|
var invoice = sdk.ReceivePayment(
|
||||||
new ReceivePaymentRequest(3000, "Invoice for 3000 sats"));
|
new ReceivePaymentRequest(3_000_000, "Invoice for 3000 sats"));
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user