Skip to content

Add seed option to ConnectRequest #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
workflow_dispatch:
inputs:
sdk-ref:
description: 'sdk commit/tag/branch reference. Defaults to 0.7.0-rc5'
description: 'sdk commit/tag/branch reference. Defaults to 0.7.2'
required: false
type: string
default: 0.7.0-rc5
default: 0.7.2

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -26,9 +26,9 @@ jobs:
runs-on: ubuntu-latest
outputs:
# Used only for Rust snippets
sdk-ref: ${{ inputs.sdk-ref || '0.7.0-rc5' }}
sdk-ref: ${{ inputs.sdk-ref || '0.7.2' }}
# Used for RN and Flutter snippets
package-version: '0.7.0-rc5'
package-version: '0.7.2'
steps:
- run: echo "set pre-setup output variables"

Expand Down
2 changes: 1 addition & 1 deletion examples/python/cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.8.1"
breez-sdk-liquid = "0.7.0-rc5"
breez-sdk-liquid = "0.7.2"
argparse = "^1.4.0"
qrcode = "^7.4.2"
colorama = "^0.4.6"
Expand Down
18 changes: 10 additions & 8 deletions snippets/csharp/LnurlPay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ public void PrepareLnurlPay(BindingLiquidSdk sdk)
var amount = new PayAmount.Bitcoin(5000);
var optionalComment = "<comment>";
var optionalValidateSuccessActionUrl = true;

var req = new PrepareLnUrlPayRequest(
lnurlp.data,
amount,
optionalComment,
lnurlp.data,
amount,
lnurlp.bip353Address,
optionalComment,
optionalValidateSuccessActionUrl);
var prepareResponse = sdk.PrepareLnurlPay(req);

Expand All @@ -45,11 +46,12 @@ public void PrepareLnurlPayDrain(BindingLiquidSdk sdk, LnUrlPayRequestData data)
var amount = new PayAmount.Drain();
var optionalComment = "<comment>";
var optionalValidateSuccessActionUrl = true;

var req = new PrepareLnUrlPayRequest(
data,
amount,
optionalComment,
data,
amount,
null,
optionalComment,
optionalValidateSuccessActionUrl);
var prepareResponse = sdk.PrepareLnurlPay(req);
}
Expand Down
4 changes: 2 additions & 2 deletions snippets/csharp/ParsingInputs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void ParseInput(BindingLiquidSdk sdk)

case InputType.LnUrlPay lnUrlPay:
Console.WriteLine(
$"Input is LNURL-Pay/Lightning address accepting min/max {lnUrlPay.data.minSendable}/{lnUrlPay.data.maxSendable} msats"
$"Input is LNURL-Pay/Lightning address accepting min/max {lnUrlPay.data.minSendable}/{lnUrlPay.data.maxSendable} msats - BIP353 was used: {lnUrlPay.bip353Address != null}"
);
break;

Expand Down Expand Up @@ -67,7 +67,7 @@ public void ConfigureParsers()
parserUrl: "https://parser-domain.com/parser?input=<input>"
),
new(
providerId: "provider_b",
providerId: "provider_b",
inputRegex: "^provider_b",
parserUrl: "https://parser-domain.com/parser?input=<input>"
)
Expand Down
1 change: 1 addition & 0 deletions snippets/dart_snippets/lib/lnurl_pay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Future<void> prepareLnurlPay() async {
PrepareLnUrlPayRequest req = PrepareLnUrlPayRequest(
data: inputType.data,
amount: amount,
bip353Address: inputType.bip353Address,
comment: optionalComment,
validateSuccessActionUrl: optionalValidateSuccessActionUrl,
);
Expand Down
2 changes: 1 addition & 1 deletion snippets/dart_snippets/lib/parsing_inputs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Future<void> parseInput() async {
print("Input is BOLT11 invoice for $amountStr msats");
} else if (inputType is InputType_LnUrlPay) {
print(
"Input is LNURL-Pay/Lightning address accepting min/max ${inputType.data.minSendable}/${inputType.data.maxSendable} msats");
"Input is LNURL-Pay/Lightning address accepting min/max ${inputType.data.minSendable}/${inputType.data.maxSendable} msats - BIP353 was used: ${inputType.bip353Address != null}");
} else if (inputType is InputType_LnUrlWithdraw) {
print(
"Input is LNURL-Withdraw for min/max ${inputType.data.minWithdrawable}/${inputType.data.maxWithdrawable} msats");
Expand Down
1 change: 0 additions & 1 deletion snippets/dart_snippets/lib/sdk_instance.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ extension ConfigCopyWith on liquid_sdk.Config {
workingDir: workingDir ?? this.workingDir,
network: network ?? this.network,
paymentTimeoutSec: paymentTimeoutSec ?? this.paymentTimeoutSec,
zeroConfMinFeeRateMsat: zeroConfMinFeeRateMsat ?? this.zeroConfMinFeeRateMsat,
syncServiceUrl: syncServiceUrl ?? this.syncServiceUrl,
useDefaultExternalInputParsers: useDefaultExternalInputParsers ?? this.useDefaultExternalInputParsers,
externalInputParsers: externalInputParsers ?? this.externalInputParsers,
Expand Down
8 changes: 4 additions & 4 deletions snippets/dart_snippets/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ packages:
description:
path: "."
ref: HEAD
resolved-ref: "0647370f6a2dc26a52f609b942cb3d93f765adae"
resolved-ref: "3111663fbc91aa918a9b44f7deadaf97f94462b9"
url: "https://github.com/breez/breez-sdk-liquid-dart"
source: git
version: "0.7.0-rc5"
version: "0.7.2"
build_cli_annotations:
dependency: transitive
description:
Expand Down Expand Up @@ -140,10 +140,10 @@ packages:
description:
path: "."
ref: HEAD
resolved-ref: "22538ed87b3ad34faeb4c60f0defa10b56235093"
resolved-ref: "3635ca4abebd2ccd5455e1112eaa46cee10888d6"
url: "https://github.com/breez/breez-sdk-liquid-flutter"
source: git
version: "0.7.0-rc5"
version: "0.7.2"
flutter_rust_bridge:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions snippets/dart_snippets/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ dependencies:
breez_liquid:
git:
url: https://github.com/breez/breez-sdk-liquid-dart
tag: 0.7.0-rc5
tag: 0.7.2
flutter_breez_liquid:
git:
url: https://github.com/breez/breez-sdk-liquid-flutter
tag: 0.7.0-rc5
tag: 0.7.2
rxdart: ^0.28.0

dependency_overrides:
Expand Down
2 changes: 1 addition & 1 deletion snippets/go/getting_started.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func Start() (*breez_sdk_liquid.BindingLiquidSdk, error) {

connectRequest := breez_sdk_liquid.ConnectRequest{
Config: config,
Mnemonic: mnemonic,
Mnemonic: &mnemonic,
}

sdk, err := breez_sdk_liquid.Connect(connectRequest)
Expand Down
2 changes: 1 addition & 1 deletion snippets/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module main

go 1.19

require github.com/breez/breez-sdk-liquid-go v0.7.0-rc5
require github.com/breez/breez-sdk-liquid-go v0.7.2

// Comment out to use published module
replace github.com/breez/breez-sdk-liquid-go => ./packages/breez-sdk-liquid-go
1 change: 1 addition & 0 deletions snippets/go/lnurl_pay.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func PrepareLnurlPay(sdk *breez_sdk_liquid.BindingLiquidSdk) {
req := breez_sdk_liquid.PrepareLnUrlPayRequest{
Data: inputType.Data,
Amount: amount,
Bip353Address: inputType.Bip353Address,
Comment: &optionalComment,
ValidateSuccessActionUrl: &optionalValidateSuccessActionUrl,
}
Expand Down
6 changes: 3 additions & 3 deletions snippets/go/parsing_inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ func ParseInput(sdk *breez_sdk_liquid.BindingLiquidSdk) {
log.Printf("Input is BOLT11 invoice for %s msats", amount)

case breez_sdk_liquid.InputTypeLnUrlPay:
log.Printf("Input is LNURL-Pay/Lightning address accepting min/max %d/%d msats",
inputType.Data.MinSendable, inputType.Data.MaxSendable)
log.Printf("Input is LNURL-Pay/Lightning address accepting min/max %d/%d msats - BIP353 was used: %t",
inputType.Data.MinSendable, inputType.Data.MaxSendable, inputType.Bip353Address != nil)

case breez_sdk_liquid.InputTypeLnUrlWithdraw:
log.Printf("Input is LNURL-Withdraw for min/max %d/%d msats",
Expand Down Expand Up @@ -66,7 +66,7 @@ func ConfigureParsers() (*breez_sdk_liquid.BindingLiquidSdk, error) {

connectRequest := breez_sdk_liquid.ConnectRequest{
Config: config,
Mnemonic: mnemonic,
Mnemonic: &mnemonic,
}

sdk, err := breez_sdk_liquid.Connect(connectRequest)
Expand Down
2 changes: 1 addition & 1 deletion snippets/kotlin_mpp_lib/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ kotlin {
}
val commonMain by getting {
dependencies {
implementation("technology.breez.liquid:breez-sdk-liquid-kmp:0.7.0-rc5")
implementation("technology.breez.liquid:breez-sdk-liquid-kmp:0.7.2")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class LnurlPay {

val req = PrepareLnUrlPayRequest(
lnurlData,
amount,
amount,
inputType.bip353Address,
optionalComment,
optionalValidateSuccessActionUrl)
val prepareResponse = sdk.prepareLnurlPay(req)
Expand All @@ -42,7 +43,8 @@ class LnurlPay {

val req = PrepareLnUrlPayRequest(
lnurlData,
amount,
amount,
null,
optionalComment,
optionalValidateSuccessActionUrl)
val prepareResponse = sdk.prepareLnurlPay(req)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ParsingInputs {
}
is InputType.LnUrlPay -> {
println("Input is LNURL-Pay/Lightning address accepting min/max " +
"${inputType.data.minSendable}/${inputType.data.maxSendable} msats")
"${inputType.data.minSendable}/${inputType.data.maxSendable} msats - BIP353 was used: ${inputType.bip353Address != null}")
}
is InputType.LnUrlWithdraw -> {
println("Input is LNURL-Withdraw for min/max " +
Expand Down
5 changes: 3 additions & 2 deletions snippets/python/src/lnurl_pay.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ def prepare_pay(sdk: BindingLiquidSdk):
optional_validate_success_action_url = True

req = PrepareLnUrlPayRequest(parsed_input.data,
amount,
optional_comment,
amount,
parsed_input.bip353_address,
optional_comment,
optional_validate_success_action_url)
prepare_response = sdk.prepare_lnurl_pay(req)

Expand Down
2 changes: 1 addition & 1 deletion snippets/python/src/parsing_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def parse_input(sdk: BindingLiquidSdk):
amount = str(parsed_input.invoice.amount_msat)
logging.debug(f"Input is BOLT11 invoice for {amount} msats")
elif parsed_input.type == InputType.LN_URL_PAY:
logging.debug(f"Input is LNURL-Pay/Lightning address accepting min/max {parsed_input.data.min_sendable}/{parsed_input.data.max_sendable} msats")
logging.debug(f"Input is LNURL-Pay/Lightning address accepting min/max {parsed_input.data.min_sendable}/{parsed_input.data.max_sendable} msats - BIP353 was used: {parsed_input.bip353_address is not None}")
elif parsed_input.type == InputType.LN_URL_WITHDRAW:
logging.debug(f"Input is LNURL-Withdraw for min/max {parsed_input.data.min_withdrawable}/{parsed_input.data.max_withdrawable} msats")
# Other input types are available
Expand Down
1 change: 1 addition & 0 deletions snippets/react-native/lnurl_pay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const examplePrepareLnurlPay = async () => {
const prepareResponse = await prepareLnurlPay({
data: input.data,
amount,
bip353Address: input.bip353Address,
comment: optionalComment,
validateSuccessActionUrl: optionalValidateSuccessActionUrl
})
Expand Down
2 changes: 1 addition & 1 deletion snippets/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"compile": "tsc"
},
"dependencies": {
"@breeztech/react-native-breez-sdk-liquid": "^0.7.0-rc5",
"@breeztech/react-native-breez-sdk-liquid": "^0.7.2",
"react": "18.1.0",
"react-native": "0.70.6"
},
Expand Down
2 changes: 1 addition & 1 deletion snippets/react-native/parsing_inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const parseInputs = async () => {

case InputTypeVariant.LN_URL_PAY:
console.log(
`Input is LNURL-Pay/Lightning address accepting min/max ${parsed.data.minSendable}/${parsed.data.maxSendable} msats`
`Input is LNURL-Pay/Lightning address accepting min/max ${parsed.data.minSendable}/${parsed.data.maxSendable} msats - BIP353 was used: ${parsed.bip353Address != null}`
)
break

Expand Down
8 changes: 4 additions & 4 deletions snippets/react-native/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,10 @@
"@babel/helper-string-parser" "^7.25.9"
"@babel/helper-validator-identifier" "^7.25.9"

"@breeztech/react-native-breez-sdk-liquid@^0.7.0-rc5":
version "0.7.0-rc5"
resolved "https://registry.yarnpkg.com/@breeztech/react-native-breez-sdk-liquid/-/react-native-breez-sdk-liquid-0.7.0-rc5.tgz#17182ccd7b942f79d2fded76d11e363aaab2fdd4"
integrity sha512-asVf9YCjZLwV+ao9/80yhdrecPAvHd4SQt1/5uMQj7B08FLMU3fXppe8HAIyz2bsLULs2vqah5D5P7Dc4sEg9Q==
"@breeztech/react-native-breez-sdk-liquid@^0.7.2":
version "0.7.2"
resolved "https://registry.yarnpkg.com/@breeztech/react-native-breez-sdk-liquid/-/react-native-breez-sdk-liquid-0.7.2.tgz#cb5dfe2fccbe8fe413640d2a2aaf55b613ff13f1"
integrity sha512-sPQ0J1wnOm3m7cHXpbxiSUL+xCT4BWCtT4Y/WdWXrQQFIXi/FUYkUnxpS4EMkFTPrvj7OjQSvrevSjL3X2lwWw==

"@esbuild/android-arm64@0.18.20":
version "0.18.20"
Expand Down
Loading
Loading