diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4487c80..83d989c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -105,8 +105,8 @@ jobs: # Set up the flutter environment and run checks - uses: subosito/flutter-action@v2 with: - flutter-version: '3.13.9' channel: 'stable' + cache: true - uses: actions/download-artifact@v3 with: diff --git a/snippets/csharp/ClosedChannel.cs b/snippets/csharp/ClosedChannel.cs new file mode 100644 index 0000000..b42cdc2 --- /dev/null +++ b/snippets/csharp/ClosedChannel.cs @@ -0,0 +1,43 @@ +using Breez.Sdk; + +public class ClosedChannelSnippets +{ + public void PrepareRedeemOnchainFunds(BlockingBreezServices sdk, uint feeRate) + { + // ANCHOR: prepare-redeem-onchain-funds + var destinationAddress = "bc1.."; + var satPerVbyte = feeRate; + try + { + var prepareRedeemOnchainFundsResp = sdk.PrepareRedeemOnchainFunds( + new PrepareRedeemOnchainFundsRequest( + destinationAddress, + satPerVbyte + )); + } + catch (Exception) + { + // Handle error + } + // ANCHOR_END: prepare-redeem-onchain-funds + } + + public void RedeemOnchainFunds(BlockingBreezServices sdk, uint satPerVbyte, string toAddress) + { + // ANCHOR: redeem-onchain-funds + try + { + var redeemOnchainFundsResp = sdk.RedeemOnchainFunds( + new RedeemOnchainFundsRequest( + toAddress, + satPerVbyte + )); + } + catch (Exception) + { + // Handle error + } + // ANCHOR_END: redeem-onchain-funds + } + +} \ No newline at end of file diff --git a/snippets/dart_snippets/lib/closed_channel.dart b/snippets/dart_snippets/lib/closed_channel.dart new file mode 100644 index 0000000..89967b1 --- /dev/null +++ b/snippets/dart_snippets/lib/closed_channel.dart @@ -0,0 +1,26 @@ +import 'package:breez_sdk/breez_sdk.dart'; +import 'package:breez_sdk/bridge_generated.dart'; + +Future prepareRedeemOnchainFunds( + {required int satPerVbyte}) async { + // ANCHOR: prepare-redeem-onchain-funds + PrepareRedeemOnchainFundsRequest req = PrepareRedeemOnchainFundsRequest( + toAddress: "bc1..", + satPerVbyte: satPerVbyte, + ); + final resp = await BreezSDK().prepareRedeemOnchainFunds(req: req); + // ANCHOR_END: prepare-redeem-onchain-funds + return resp; +} + +Future redeemOnchainFunds( + {required int satPerVbyte, required String toAddress}) async { + // ANCHOR: redeem-onchain-funds + RedeemOnchainFundsRequest req = RedeemOnchainFundsRequest( + toAddress: "bc1..", + satPerVbyte: satPerVbyte, + ); + final resp = await BreezSDK().redeemOnchainFunds(req: req); + // ANCHOR_END: redeem-onchain-funds + return resp; +} diff --git a/snippets/go/closed_channel.go b/snippets/go/closed_channel.go new file mode 100644 index 0000000..2696ba3 --- /dev/null +++ b/snippets/go/closed_channel.go @@ -0,0 +1,27 @@ +package example + +import ( + "log" + + "github.com/breez/breez-sdk-go/breez_sdk" +) + +func PrepareRedeemOnchainFunds(feeRate uint32) { + // ANCHOR: prepare-redeem-onchain-funds + satPerVbyte := feeRate + destinationAddress := "bc1.." + req := breez_sdk.PrepareRedeemOnchainFundsRequest{SatPerVbyte: satPerVbyte, ToAddress: destinationAddress} + if prepareRedeemOnchainFundsResponse, err := sdk.PrepareRedeemOnchainFunds(req); err == nil { + log.Printf("PrepareRedeemOnchainFundsRequest is %#v", prepareRedeemOnchainFundsResponse) + } + // ANCHOR_END: prepare-redeem-onchain-funds +} + +func RedeemOnchainFunds(satPerVbyte uint32, toAddress string) { + // ANCHOR: redeem-onchain-funds + req := breez_sdk.RedeemOnchainFundsRequest{SatPerVbyte: satPerVbyte, ToAddress: toAddress} + if redeemOnchainFundsResponse, err := sdk.RedeemOnchainFunds(req); err == nil { + log.Printf("RedeemOnchainFunds error %#v", redeemOnchainFundsResponse) + } + // ANCHOR_END: redeem-onchain-funds +} diff --git a/snippets/kotlin_mpp_lib/shared/src/commonMain/kotlin/com/example/kotlinmpplib/ClosedChannel.kt b/snippets/kotlin_mpp_lib/shared/src/commonMain/kotlin/com/example/kotlinmpplib/ClosedChannel.kt new file mode 100644 index 0000000..a0e8c59 --- /dev/null +++ b/snippets/kotlin_mpp_lib/shared/src/commonMain/kotlin/com/example/kotlinmpplib/ClosedChannel.kt @@ -0,0 +1,30 @@ +package com.example.kotlinmpplib + +import breez_sdk.* +class ClosedChannel { + fun prepareRedeemOnchainFunds(sdk: BlockingBreezServices, feeRate: UInt) { + // ANCHOR: prepare-redeem-onchain-funds + val satPerVbyte = feeRate + var destinationAddress = "bc1.." + try { + val req = PrepareRedeemOnchainFundsRequest(destinationAddress, satPerVbyte) + val prepareRedeemOnchainFundsResp = sdk.prepareRedeemOnchainFunds(req) + } + catch (e: Exception) { + // handle error + } + // ANCHOR_END: prepare-redeem-onchain-funds + } + + fun redeemOnchainFunds(sdk: BlockingBreezServices, satPerVbyte: UInt, toAddress: String) { + // ANCHOR: redeem-onchain-funds + try { + val req = RedeemOnchainFundsRequest(toAddress, satPerVbyte) + val redeemOnchainFundsResp = sdk.redeemOnchainFunds(req) + } + catch (e: Exception) { + // handle error + } + // ANCHOR_END: redeem-onchain-funds + } +} \ No newline at end of file diff --git a/snippets/python/src/closed_channel.py b/snippets/python/src/closed_channel.py new file mode 100644 index 0000000..aca3008 --- /dev/null +++ b/snippets/python/src/closed_channel.py @@ -0,0 +1,26 @@ +import breez_sdk + +def prepare_redeem_onchain_funds(sdk_services, fee_rate): + + try: + # ANCHOR: prepare-redeem-onchain-funds + destination_address = "bc1.." + sat_per_vbyte = fee_rate + req = breez_sdk.PrepareRedeemOnchainFundsRequest(destination_address, sat_per_vbyte) + result = sdk_services.prepare_redeem_onchain_funds(req) + # ANCHOR_END: prepare-redeem-onchain-funds + return result + except Exception as error: + print(error) + raise + +def redeem_onchain_funds(sdk_services, to_address, fee_rate): + try: + # ANCHOR: redeem-onchain-funds + req = breez_sdk.RedeemOnchainFundsRequest(to_address, fee_rate) + result = sdk_services.redeem_onchain_funds(req) + # ANCHOR_END: redeem-onchain-funds + return result + except Exception as error: + print(error) + raise \ No newline at end of file diff --git a/snippets/python/src/send_spontaneous_payment.py b/snippets/python/src/send_spontaneous_payment.py index 4e5d68b..47f4bad 100644 --- a/snippets/python/src/send_spontaneous_payment.py +++ b/snippets/python/src/send_spontaneous_payment.py @@ -3,13 +3,14 @@ import breez_sdk def send_spontaneous_payment(sdk_services): - # ANCHOR: send-spontaneous-payment - node_id = "..." - amount_msat = 300000 try: - req = breez_sdk.SendSpontaneousPaymentRequest(node_id, amount_msat) - result = sdk_services.send_spontaneous_payment(req) # ANCHOR: send-spontaneous-payment + node_id = "..." + amount_msat = 3000000 + + req = breez_sdk.SendSpontaneousPaymentRequest(node_id,amount_msat) + result = sdk_services.send_spontaneous_payment(req) + # ANCHOR_END: send-spontaneous-payment return result except Exception as error: print(error) diff --git a/snippets/react-native/closed_channel.ts b/snippets/react-native/closed_channel.ts new file mode 100644 index 0000000..f26bf3d --- /dev/null +++ b/snippets/react-native/closed_channel.ts @@ -0,0 +1,19 @@ +import { + prepareRedeemOnchainFunds, + redeemOnchainFunds +} from '@breeztech/react-native-breez-sdk' + +const examplePrepareRedeemOnchainFunds = async (feeRate: number) => { + // ANCHOR: prepare-redeem-onchain-funds + const toAddress = 'bc1..' + const satPerVbyte = feeRate + + const prepareRedeemOnchainFundsResp = await prepareRedeemOnchainFunds({ toAddress, satPerVbyte }) + // ANCHOR_END: prepare-redeem-onchain-funds +} + +const exampleRedeemOnchainFunds = async (satPerVbyte: number, toAddress: string) => { + // ANCHOR: redeem-onchain-funds + const redeemOnchainFundsResp = await redeemOnchainFunds({ toAddress, satPerVbyte }) + // ANCHOR_END: redeem-onchain-funds +} diff --git a/snippets/rust/Cargo.lock b/snippets/rust/Cargo.lock index a2fa7a7..b04bb38 100644 --- a/snippets/rust/Cargo.lock +++ b/snippets/rust/Cargo.lock @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", @@ -60,29 +60,30 @@ checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] name = "allo-isolate" -version = "0.1.19" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c258c1a017ecaccfb34c8fa46ecbb2f5402584e31082c12b5caf0be82ac5ac44" +checksum = "f2f5a5fd28223e6f3cafb7d9cd685f51eafdd71d33ca1229f8316925d5957240" dependencies = [ "anyhow", "atomic", @@ -113,9 +114,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" dependencies = [ "backtrace", ] @@ -128,9 +129,9 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "as-any" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3419eecc9f5967e6f0f29a0c3fefe22bda6ea34b15798f3c452cb81f2c3fa7" +checksum = "5b8a30a44e99a1c83ccb2a6298c563c888952a1c9134953db26876528f84c93a" [[package]] name = "asn1-rs" @@ -190,18 +191,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -295,9 +296,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.4" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bech32" @@ -305,6 +306,12 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +[[package]] +name = "bech32" +version = "0.10.0-beta" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98f7eed2b2781a6f0b5c903471d48e15f56fb4e1165df8a9a2337fd1a59d45ea" + [[package]] name = "bip21" version = "0.2.0" @@ -340,7 +347,7 @@ version = "0.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3" dependencies = [ - "bech32", + "bech32 0.9.1", "bitcoin_hashes 0.11.0", "bitcoinconsensus", "secp256k1 0.24.3", @@ -349,11 +356,11 @@ dependencies = [ [[package]] name = "bitcoin" -version = "0.30.1" +version = "0.30.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e99ff7289b20a7385f66a0feda78af2fc119d28fb56aea8886a9cd0a4abdd75" +checksum = "1945a5048598e4189e239d3f809b19bdad4845c4b2ba400d304d2dcf26d2c462" dependencies = [ - "bech32", + "bech32 0.9.1", "bitcoin-private", "bitcoin_hashes 0.12.0", "hex_lit", @@ -361,6 +368,20 @@ dependencies = [ "serde", ] +[[package]] +name = "bitcoin" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd00f3c09b5f21fb357abe32d29946eb8bb7a0862bae62c0b5e4a692acbbe73c" +dependencies = [ + "bech32 0.10.0-beta", + "bitcoin-internals", + "bitcoin_hashes 0.13.0", + "hex-conservative", + "hex_lit", + "secp256k1 0.28.1", +] + [[package]] name = "bitcoin-consensus-derive" version = "0.1.0" @@ -372,6 +393,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bitcoin-internals" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9425c3bf7089c983facbae04de54513cce73b41c7f9ff8c845b54e7bc64ebbfb" + [[package]] name = "bitcoin-private" version = "0.1.0" @@ -407,6 +434,16 @@ dependencies = [ "serde", ] +[[package]] +name = "bitcoin_hashes" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" +dependencies = [ + "bitcoin-internals", + "hex-conservative", +] + [[package]] name = "bitcoinconsensus" version = "0.20.2-0.5.0" @@ -425,9 +462,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "block-buffer" @@ -472,7 +509,7 @@ dependencies = [ "chrono", "const_format", "ecies", - "env_logger 0.10.0", + "env_logger 0.10.2", "flutter_rust_bridge", "futures", "gl-client", @@ -494,7 +531,7 @@ dependencies = [ "rusqlite_migration", "serde", "serde_json", - "serde_with 3.3.0", + "serde_with 3.5.1", "strum", "strum_macros", "tempfile", @@ -515,15 +552,15 @@ checksum = "832133bbabbbaa9fbdba793456a2827627a7d2b8fb96032fa1e7666d7895832b" [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" [[package]] name = "bytes" @@ -581,9 +618,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.30" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" +checksum = "41daef31d7a747c5c847246f36de49ced6f7403b4cdabc807a97b5cc184cda7a" dependencies = [ "android-tzdata", "iana-time-zone", @@ -591,9 +628,15 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets", + "windows-targets 0.52.0", ] +[[package]] +name = "chunked-buffer" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa622bd314835eb026b776af471344d0dba94705c937900656a31d0407e53689" + [[package]] name = "cipher" version = "0.4.4" @@ -612,7 +655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e745ebc04340d421c7bc8305942a60d3dd8531d94df24f1b8c3906942735f0d" dependencies = [ "anyhow", - "bitcoin 0.30.1", + "bitcoin 0.30.2", "hex", "log", "prost", @@ -632,18 +675,18 @@ dependencies = [ [[package]] name = "const_format" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c990efc7a285731f9a4378d81aff2f0e85a2c8781a05ef0f8baa8dac54d0ff48" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e026b6ce194a874cb9cf32cd5772d1ef9767cc8fcb5765948d74f37a9d8b2bf6" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" dependencies = [ "proc-macro2", "quote", @@ -652,9 +695,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -662,15 +705,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -722,7 +765,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -733,7 +776,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -747,9 +790,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "der-parser" @@ -767,10 +810,11 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ + "powerfmt", "serde", ] @@ -808,7 +852,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -865,9 +909,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -884,23 +928,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -917,9 +950,9 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fixedbitset" @@ -964,9 +997,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "1.81.0" +version = "1.82.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949f115a15199789eb73bc7ed7dd8f5b0cb0e035b77d2197a284857c5ca93aff" +checksum = "a7fe743d921bedf4578b9472346d03a9643a01cd565ca7df7961baebad534ba5" [[package]] name = "fnv" @@ -991,9 +1024,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1006,9 +1039,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -1021,9 +1054,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1031,15 +1064,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -1048,38 +1081,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -1105,9 +1138,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -1128,9 +1161,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gl-client" @@ -1139,9 +1172,9 @@ source = "git+https://github.com/Blockstream/greenlight.git?rev=556eedf47a837b71 dependencies = [ "anyhow", "async-trait", - "base64 0.21.4", - "bech32", - "bitcoin 0.29.2", + "base64 0.21.7", + "bech32 0.9.1", + "bitcoin 0.31.1", "bytes", "chacha20poly1305", "cln-grpc", @@ -1157,7 +1190,7 @@ dependencies = [ "rand", "rcgen", "reqwest", - "ring", + "ring 0.16.20", "rustls-pemfile", "secp256k1 0.26.0", "serde", @@ -1181,9 +1214,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -1191,7 +1224,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -1216,11 +1249,11 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "allocator-api2", ] @@ -1230,7 +1263,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] @@ -1250,9 +1283,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -1260,6 +1293,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-conservative" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ed443af458ccb6d81c1e7e661545f94d3176752fb1df2f543b902a1e0f51e2" + [[package]] name = "hex_lit" version = "0.1.1" @@ -1268,9 +1307,9 @@ checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -1286,18 +1325,18 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1306,9 +1345,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -1335,9 +1374,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -1350,7 +1389,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "socket2", "tokio", "tower-service", "tracing", @@ -1359,14 +1398,14 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http", "hyper", - "rustls 0.21.7", + "rustls 0.21.10", "tokio", "tokio-rustls 0.24.1", ] @@ -1398,16 +1437,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -1427,9 +1466,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1448,12 +1487,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "serde", ] @@ -1469,19 +1508,19 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.4", "rustix", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1495,15 +1534,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -1516,9 +1555,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libsecp256k1" @@ -1602,7 +1641,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4e44b0e2822c8811470137d2339fdfe67a699b3248bb1606d1d02eb6a1e9f0a" dependencies = [ - "bech32", + "bech32 0.9.1", "bitcoin 0.29.2", "bitcoin_hashes 0.11.0", "lightning 0.0.115", @@ -1616,7 +1655,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eb24878b0f4ef75f020976c886d9ad1503867802329cc963e0ab4623ea3b25c" dependencies = [ - "bech32", + "bech32 0.9.1", "bitcoin 0.29.2", "bitcoin_hashes 0.11.0", "lightning 0.0.118", @@ -1626,15 +1665,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1648,15 +1687,15 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "matchit" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "memchr" -version = "2.6.3" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mime" @@ -1681,13 +1720,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1780,9 +1819,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -1793,15 +1832,15 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.4", "libc", ] [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -1817,9 +1856,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -1829,11 +1868,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.2", "cfg-if", "foreign-types", "libc", @@ -1850,7 +1889,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -1861,18 +1900,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.1.3+3.1.2" +version = "300.2.1+3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd2c101a165fff9935e34def4669595ab1c7847943c42be86e21503e482be107" +checksum = "3fe476c29791a5ca0d1273c697e96085bbabbbea2ef7afd5617e78a4b40332d3" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -1893,15 +1932,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -1924,9 +1963,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "percent-encoding-rfc3986" @@ -1941,7 +1980,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap 2.1.0", ] [[package]] @@ -1961,7 +2000,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -1978,9 +2017,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "poly1305" @@ -2005,6 +2044,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2053,9 +2098,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -2122,9 +2167,9 @@ checksum = "9318ead08c799aad12a55a3e78b82e0b6167271ffd1f627b758891282f739187" [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -2166,7 +2211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", + "ring 0.16.20", "time", "x509-parser", "yasna", @@ -2174,18 +2219,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "regex" -version = "1.9.5" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -2195,9 +2240,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" dependencies = [ "aho-corasick", "memchr", @@ -2206,17 +2251,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.20" +version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "base64 0.21.4", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -2235,12 +2280,13 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.7", + "rustls 0.21.10", "rustls-native-certs", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", @@ -2261,12 +2307,26 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "ripemd" version = "0.1.3" @@ -2282,7 +2342,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.2", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -2324,15 +2384,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -2342,19 +2402,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct", "webpki", ] [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring", + "ring 0.17.7", "rustls-webpki", "sct", ] @@ -2373,21 +2433,21 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.4", + "base64 0.21.7", ] [[package]] name = "rustls-webpki" -version = "0.101.5" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -2398,17 +2458,17 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -2419,12 +2479,12 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -2470,6 +2530,16 @@ dependencies = [ "serde", ] +[[package]] +name = "secp256k1" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" +dependencies = [ + "bitcoin_hashes 0.13.0", + "secp256k1-sys 0.9.2", +] + [[package]] name = "secp256k1-sys" version = "0.6.1" @@ -2488,6 +2558,15 @@ dependencies = [ "cc", ] +[[package]] +name = "secp256k1-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" +dependencies = [ + "cc", +] + [[package]] name = "security-framework" version = "2.9.2" @@ -2513,9 +2592,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.188" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] @@ -2533,31 +2612,32 @@ dependencies = [ [[package]] name = "serde_bolt" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3ddb862d94a73280b5b6faa3c9bc37db242f6a495d49f0ffb85f040dbb9bca" +checksum = "54f634eeb988ab754b0711815e13e6ad983bfc52f76e0af342d492c6cad4f681" dependencies = [ "bitcoin 0.29.2", "bitcoin-consensus-derive", + "chunked-buffer", "hex", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.106" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -2593,18 +2673,18 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.3.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" +checksum = "f5c9fdb6b00a489875b22efd4b78fe2b363b72265cc5f6eb2e2b9ee270e6140c" dependencies = [ - "base64 0.21.4", + "base64 0.21.7", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.0", + "indexmap 2.1.0", "serde", "serde_json", - "serde_with_macros 3.3.0", + "serde_with_macros 3.5.1", "time", ] @@ -2617,26 +2697,26 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "serde_with_macros" -version = "3.3.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c" +checksum = "dbff351eb4b33600a2e138dfa0b10b65a238ea8ff8fb2387c422c5022a3e8298" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2645,9 +2725,9 @@ dependencies = [ [[package]] name = "sha256" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7895c8ae88588ccead14ff438b939b0c569cd619116f14b4d13fdff7b8333386" +checksum = "18278f6a914fa3070aa316493f7d2ddfb9ac86ebc06fa3b83bffda487e9065b0" dependencies = [ "async-trait", "bytes", @@ -2676,28 +2756,18 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" -version = "0.4.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" -dependencies = [ - "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2706,6 +2776,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "strsim" version = "0.10.0" @@ -2728,7 +2804,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -2750,9 +2826,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.32" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -2778,23 +2854,44 @@ dependencies = [ ] [[package]] -name = "tempfile" -version = "3.8.0" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", "fastrand", "redox_syscall", "rustix", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -2807,22 +2904,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -2836,12 +2933,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -2849,15 +2947,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] @@ -2898,9 +2996,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", @@ -2910,9 +3008,9 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.4", + "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2927,13 +3025,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] @@ -2963,7 +3061,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.7", + "rustls 0.21.10", "tokio", ] @@ -2980,9 +3078,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -3075,11 +3173,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -3088,20 +3185,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] @@ -3118,38 +3215,39 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "txoo" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b35482e5bf458fa43996535afbca884b2562ab6419e20686340bb19f5305b30" +checksum = "67d7f813b11b656c950f66dd1ea293d147e2e2c3567d4246b3d682916dc19a5c" dependencies = [ "bitcoin 0.29.2", "log", "serde", + "serde_bolt 0.3.4", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3183,10 +3281,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] -name = "url" -version = "2.4.1" +name = "untrusted" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -3195,9 +3299,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.4.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "serde", ] @@ -3235,7 +3339,7 @@ dependencies = [ "log", "scopeguard", "serde", - "serde_bolt 0.3.1", + "serde_bolt 0.3.4", "serde_derive", "serde_with 2.3.3", "txoo", @@ -3266,7 +3370,7 @@ dependencies = [ "bolt-derive", "hex", "log", - "serde_bolt 0.3.1", + "serde_bolt 0.3.4", ] [[package]] @@ -3298,9 +3402,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3308,24 +3412,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -3335,9 +3439,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3345,28 +3449,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -3374,12 +3478,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -3421,9 +3525,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -3435,12 +3539,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets", + "windows-targets 0.52.0", ] [[package]] @@ -3449,7 +3553,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -3458,13 +3571,28 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -3473,42 +3601,84 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winreg" version = "0.50.0" @@ -3516,7 +3686,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3532,7 +3702,7 @@ dependencies = [ "lazy_static", "nom", "oid-registry", - "ring", + "ring 0.16.20", "rusticata-macros", "thiserror", "time", @@ -3554,10 +3724,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f9079049688da5871a7558ddacb7f04958862c703e68258594cb7a862b5e33f" [[package]] -name = "zeroize" -version = "1.6.0" +name = "zerocopy" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -3570,5 +3760,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.48", ] diff --git a/snippets/rust/Cargo.toml b/snippets/rust/Cargo.toml index 839b036..12e4ee0 100644 --- a/snippets/rust/Cargo.toml +++ b/snippets/rust/Cargo.toml @@ -8,4 +8,4 @@ anyhow = "1" bip39 = { version = "2", features = ["rand"] } breez-sdk-core = { git = "https://github.com/breez/breez-sdk", tag = "0.2.15" } log = "0.4" -tokio = "1.29" \ No newline at end of file +tokio = "1.29" diff --git a/snippets/rust/src/closed_channel.rs b/snippets/rust/src/closed_channel.rs new file mode 100644 index 0000000..b26d8b9 --- /dev/null +++ b/snippets/rust/src/closed_channel.rs @@ -0,0 +1,32 @@ +use std::sync::Arc; + +use anyhow::Result; +use breez_sdk_core::*; + +async fn prepare_redeem_onchain_funds(sdk: Arc, fee_rate: u32) -> Result<()> { + // ANCHOR: prepare-redeem-onchain-funds + let sat_per_vbyte = fee_rate; + let destination_address = String::from("bc1.."); + sdk.prepare_redeem_onchain_funds(PrepareRedeemOnchainFundsRequest { + sat_per_vbyte, + to_address: destination_address, + }) + .await?; + // ANCHOR_END: prepare-redeem-onchain-funds + Ok(()) +} + +async fn redeem_onchain_funds( + sdk: Arc, + sat_per_vbyte: u32, + to_address: String, +) -> Result<()> { + // ANCHOR: redeem-onchain-funds + sdk.redeem_onchain_funds(RedeemOnchainFundsRequest { + sat_per_vbyte, + to_address, + }) + .await?; + // ANCHOR_END: redeem-onchain-funds + Ok(()) +} diff --git a/snippets/rust/src/main.rs b/snippets/rust/src/main.rs index af4326f..3cd3df2 100644 --- a/snippets/rust/src/main.rs +++ b/snippets/rust/src/main.rs @@ -1,4 +1,5 @@ mod buy_btc; +mod closed_channel; mod connecting_lsp; mod fiat_currencies; mod getting_started; diff --git a/snippets/swift/BreezSDKExamples/Package.swift b/snippets/swift/BreezSDKExamples/Package.swift index 6a774d4..77c13a1 100644 --- a/snippets/swift/BreezSDKExamples/Package.swift +++ b/snippets/swift/BreezSDKExamples/Package.swift @@ -5,7 +5,7 @@ import PackageDescription let package = Package( name: "BreezSDKDocs", - platforms: [.macOS(.v12)], + platforms: [.macOS(.v13)], dependencies: [ .package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.3"), .package(url: "https://github.com/breez/breez-sdk-swift", from:"0.2.15") @@ -16,8 +16,9 @@ let package = Package( .executableTarget( name: "BreezSDKDocs", dependencies: [ - .product(name: "ArgumentParser", package: "swift-argument-parser"), .product(name: "BreezSDK", package: "breez-sdk-swift"), + // use a local version of breez-sdk + // .product(name: "BreezSDK", package: "bindings-swift"), ], path: "Sources"), ] diff --git a/snippets/swift/BreezSDKExamples/Sources/BuyBtc.swift b/snippets/swift/BreezSDKExamples/Sources/BuyBtc.swift index b59e14e..94f62a0 100644 --- a/snippets/swift/BreezSDKExamples/Sources/BuyBtc.swift +++ b/snippets/swift/BreezSDKExamples/Sources/BuyBtc.swift @@ -5,8 +5,8 @@ // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK +import Foundation func buy(sdk: BlockingBreezServices) -> BuyBitcoinResponse? { // ANCHOR: buy-btc diff --git a/snippets/swift/BreezSDKExamples/Sources/ClosedChannel.swift b/snippets/swift/BreezSDKExamples/Sources/ClosedChannel.swift new file mode 100644 index 0000000..8ffd128 --- /dev/null +++ b/snippets/swift/BreezSDKExamples/Sources/ClosedChannel.swift @@ -0,0 +1,27 @@ +// +// ClosedChannel.swift +// +// +// Created by ruben on 12/12/2023. +// +import Foundation + +import BreezSDK + +func prepareRedeemOnchainFunds(sdk: BlockingBreezServices, feeRate: UInt32) -> PrepareRedeemOnchainFundsResponse? { + // ANCHOR: prepare-redeem-onchain-funds + let satPerVbyte = feeRate + let req = PrepareRedeemOnchainFundsRequest(toAddress: "bc1..", satPerVbyte: satPerVbyte) + let prepareRedeemOnchainFundsResponse = try? sdk.prepareRedeemOnchainFunds(req: req) + // ANCHOR_END: prepare-redeem-onchain-funds + return prepareRedeemOnchainFundsResponse +} + +func redeemOnchainFunds(sdk: BlockingBreezServices, toAddress _: String, feeRate: UInt32) -> RedeemOnchainFundsResponse? { + // ANCHOR: redeem-onchain-funds + let satPerVbyte = feeRate + let req = RedeemOnchainFundsRequest(toAddress: "bc1..", satPerVbyte: satPerVbyte) + let redeemOnchainFundsResponse = try? sdk.redeemOnchainFunds(req: req) + // ANCHOR_END: redeem-onchain-funds + return redeemOnchainFundsResponse +} diff --git a/snippets/swift/BreezSDKExamples/Sources/ConnectingLsp.swift b/snippets/swift/BreezSDKExamples/Sources/ConnectingLsp.swift index 6315e7f..c187d89 100644 --- a/snippets/swift/BreezSDKExamples/Sources/ConnectingLsp.swift +++ b/snippets/swift/BreezSDKExamples/Sources/ConnectingLsp.swift @@ -1,14 +1,14 @@ // // ConnectingLsp.swift -// +// // // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK +import Foundation -func getLspInfo(sdk: BlockingBreezServices) -> LspInformation?{ +func getLspInfo(sdk: BlockingBreezServices) -> LspInformation? { // ANCHOR: get-lsp-info let lspId = try? sdk.lspId() let lspInfo = try? sdk.lspInfo() diff --git a/snippets/swift/BreezSDKExamples/Sources/FiatCurrencies.swift b/snippets/swift/BreezSDKExamples/Sources/FiatCurrencies.swift index 792f560..a17dcc5 100644 --- a/snippets/swift/BreezSDKExamples/Sources/FiatCurrencies.swift +++ b/snippets/swift/BreezSDKExamples/Sources/FiatCurrencies.swift @@ -5,8 +5,8 @@ // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK +import Foundation func listSupportedFiatCurrencies(sdk: BlockingBreezServices) -> [FiatCurrency]? { // ANCHOR: list-fiat-currencies @@ -15,7 +15,7 @@ func listSupportedFiatCurrencies(sdk: BlockingBreezServices) -> [FiatCurrency]? return supportedFiatCurrencies } -func getCurrentRates(sdk:BlockingBreezServices) -> [Rate]? { +func getCurrentRates(sdk: BlockingBreezServices) -> [Rate]? { // ANCHOR: fetch-fiat-rates let fiatRates = try? sdk.fetchFiatRates() // ANCHOR_END: fetch-fiat-rates diff --git a/snippets/swift/BreezSDKExamples/Sources/GettingStarted.swift b/snippets/swift/BreezSDKExamples/Sources/GettingStarted.swift index a8ccd6d..4ec4ffc 100644 --- a/snippets/swift/BreezSDKExamples/Sources/GettingStarted.swift +++ b/snippets/swift/BreezSDKExamples/Sources/GettingStarted.swift @@ -1,6 +1,6 @@ // // GettingStarted.swift -// +// // // Created by ruben on 13/11/2023. // @@ -10,33 +10,33 @@ import BreezSDK // ANCHOR: init-sdk // SDK events listener class SDKListener: EventListener { - func onEvent(e: BreezEvent) { - print("received event ", e) - } + func onEvent(e: BreezEvent) { + print("received event ", e) + } } func gettingStarted() throws -> BlockingBreezServices? { // Create the default config let seed = try? mnemonicToSeed(phrase: "") - + let inviteCode = "" let apiKey = "" var config = defaultConfig(envType: EnvironmentType.production, apiKey: apiKey, - nodeConfig: NodeConfig.greenlight( - config: GreenlightNodeConfig(partnerCredentials: nil, inviteCode: inviteCode))) + nodeConfig: NodeConfig.greenlight( + config: GreenlightNodeConfig(partnerCredentials: nil, inviteCode: inviteCode))) // Customize the config object according to your needs config.workingDir = "path to an existing directory" - // Connect to the Breez SDK make it ready for use guard seed != nil else { return nil } let sdk = try? connect(config: config, seed: seed!, listener: SDKListener()) - + return sdk } + // ANCHOR_END: init-sdk func gettingStartedNodeInfo(sdk: BlockingBreezServices) { // ANCHOR: fetch-balance @@ -48,5 +48,3 @@ func gettingStartedNodeInfo(sdk: BlockingBreezServices) { } // ANCHOR_END: fetch-balance } - - diff --git a/snippets/swift/BreezSDKExamples/Sources/ListPayments.swift b/snippets/swift/BreezSDKExamples/Sources/ListPayments.swift index ae5b9ec..b7191fd 100644 --- a/snippets/swift/BreezSDKExamples/Sources/ListPayments.swift +++ b/snippets/swift/BreezSDKExamples/Sources/ListPayments.swift @@ -5,8 +5,8 @@ // Created by ruben on 13/11/2023. // -import Foundation import BreezSDK +import Foundation func ListPayments(sdk: BlockingBreezServices) -> [Payment]? { // ANCHOR: list-payments @@ -20,8 +20,9 @@ func ListPaymentsFiltered(sdk: BlockingBreezServices) -> [Payment]? { let payments = try? sdk.listPayments( req: ListPaymentsRequest( filters: [.sent], - fromTimestamp: 1696880000, - includeFailures: true)) + fromTimestamp: 1_696_880_000, + includeFailures: true + )) // ANCHOR_END: list-payments-filtered return payments } diff --git a/snippets/swift/BreezSDKExamples/Sources/LnurlAuth.swift b/snippets/swift/BreezSDKExamples/Sources/LnurlAuth.swift index dbc3074..9d704e7 100644 --- a/snippets/swift/BreezSDKExamples/Sources/LnurlAuth.swift +++ b/snippets/swift/BreezSDKExamples/Sources/LnurlAuth.swift @@ -1,12 +1,12 @@ // // LnurlAuth.swift -// +// // // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK +import Foundation func auth(sdk: BlockingBreezServices) { // ANCHOR: lnurl-withdraw @@ -14,14 +14,13 @@ func auth(sdk: BlockingBreezServices) { // keyauth://domain.com/auth?key=val let lnurlAuthUrl = "lnurl1dp68gurn8ghj7mr0vdskc6r0wd6z7mrww4excttvdankjm3lw3skw0tvdankjm3xdvcn6vtp8q6n2dfsx5mrjwtrxdjnqvtzv56rzcnyv3jrxv3sxqmkyenrvv6kve3exv6nqdtyv43nqcmzvdsnvdrzx33rsenxx5unqc3cxgeqgntfgu" - if let inputType = try? parseInput(s: lnurlAuthUrl) { - if case .lnUrlAuth(let `data`) = inputType { + if case let .lnUrlAuth(data) = inputType { let result = try? sdk.lnurlAuth(reqData: data) switch result { case .ok: print("Successfully authenticated") - case .errorStatus(let error): + case let .errorStatus(error): print("Failed to authenticate: \(error)") case .none: print("Failed to authenticate") diff --git a/snippets/swift/BreezSDKExamples/Sources/LnurlPay.swift b/snippets/swift/BreezSDKExamples/Sources/LnurlPay.swift index 40104d9..295b5e3 100644 --- a/snippets/swift/BreezSDKExamples/Sources/LnurlPay.swift +++ b/snippets/swift/BreezSDKExamples/Sources/LnurlPay.swift @@ -5,8 +5,8 @@ // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK +import Foundation func pay(sdk: BlockingBreezServices) -> LnUrlPayResult? { // ANCHOR: lnurl-pay @@ -16,7 +16,7 @@ func pay(sdk: BlockingBreezServices) -> LnUrlPayResult? { var response: LnUrlPayResult? let lnurlPayUrl = "lightning@address.com" if let inputType = try? parseInput(s: lnurlPayUrl) { - if case.lnUrlPay(let `data`) = inputType { + if case let .lnUrlPay(data) = inputType { let amountMSat = data.minSendable response = try? sdk.payLnurl(req: LnUrlPayRequest(data: data, amountMsat: amountMSat, comment: "comment")) } diff --git a/snippets/swift/BreezSDKExamples/Sources/LnurlWithdraw.swift b/snippets/swift/BreezSDKExamples/Sources/LnurlWithdraw.swift index 38b846d..0099fdb 100644 --- a/snippets/swift/BreezSDKExamples/Sources/LnurlWithdraw.swift +++ b/snippets/swift/BreezSDKExamples/Sources/LnurlWithdraw.swift @@ -5,8 +5,8 @@ // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK +import Foundation func withdraw(sdk: BlockingBreezServices) -> LnUrlWithdrawResult? { // ANCHOR: lnurl-withdraw @@ -15,8 +15,8 @@ func withdraw(sdk: BlockingBreezServices) -> LnUrlWithdrawResult? { var response: LnUrlWithdrawResult? let lnurlWithdrawUrl = "lnurl1dp68gurn8ghj7mr0vdskc6r0wd6z7mrww4exctthd96xserjv9mn7um9wdekjmmw843xxwpexdnxzen9vgunsvfexq6rvdecx93rgdmyxcuxverrvcursenpxvukzv3c8qunsdecx33nzwpnvg6ryc3hv93nzvecxgcxgwp3h33lxk" - if let inputType = try? parseInput(s: lnurlWithdrawUrl){ - if case.lnUrlWithdraw(let `data`) = inputType { + if let inputType = try? parseInput(s: lnurlWithdrawUrl) { + if case let .lnUrlWithdraw(data) = inputType { let amountMsat = data.maxWithdrawable let description = "Test withdraw" response = try? sdk.withdrawLnurl( diff --git a/snippets/swift/BreezSDKExamples/Sources/Production.swift b/snippets/swift/BreezSDKExamples/Sources/Production.swift index 03d99c4..3759b5b 100644 --- a/snippets/swift/BreezSDKExamples/Sources/Production.swift +++ b/snippets/swift/BreezSDKExamples/Sources/Production.swift @@ -1,6 +1,6 @@ // // Production.swift -// +// // // Created by dangeross on 29/11/2023. // @@ -15,7 +15,7 @@ func productionNodeConfig() -> NodeConfig { let greenlightCredentials = GreenlightCredentials(deviceKey: deviceKey, deviceCert: deviceCert) let nodeConfig = NodeConfig.greenlight( - config: GreenlightNodeConfig(partnerCredentials: greenlightCredentials, inviteCode: nil)) + config: GreenlightNodeConfig(partnerCredentials: greenlightCredentials, inviteCode: nil)) // ANCHOR_END: moving-to-production return nodeConfig } diff --git a/snippets/swift/BreezSDKExamples/Sources/ReceiveOnchain.swift b/snippets/swift/BreezSDKExamples/Sources/ReceiveOnchain.swift index 1e553ae..aaf63cc 100644 --- a/snippets/swift/BreezSDKExamples/Sources/ReceiveOnchain.swift +++ b/snippets/swift/BreezSDKExamples/Sources/ReceiveOnchain.swift @@ -5,8 +5,8 @@ // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK +import Foundation func generateReceiveOnchainAddress(sdk: BlockingBreezServices) -> String? { // ANCHOR: generate-receive-onchain-address @@ -17,7 +17,7 @@ func generateReceiveOnchainAddress(sdk: BlockingBreezServices) -> String? { print("Minimum amount allowed to deposit in sats: \(swapInfo!.minAllowedDeposit)") print("Maximum amount allowed to deposit in sats: \(swapInfo!.maxAllowedDeposit)") // ANCHOR_END: generate-receive-onchain-address - + return address } @@ -28,13 +28,14 @@ func getSwapInProgress(sdk: BlockingBreezServices) -> SwapInfo? { return swapInfo } -func listRefundables(sdk:BlockingBreezServices) -> [SwapInfo]? { +func listRefundables(sdk: BlockingBreezServices) -> [SwapInfo]? { // ANCHOR: list-refundables let refundables = try? sdk.listRefundables() // ANCHOR_END: list-refundables return refundables } -func executeRefund(sdk: BlockingBreezServices, refundables: SwapInfo,satPerVbyte: UInt32) -> RefundResponse? { + +func executeRefund(sdk: BlockingBreezServices, refundables: SwapInfo, satPerVbyte: UInt32) -> RefundResponse? { // ANCHOR: execute-refund let destinationAddress = "..." let response = try? sdk.refund(req: RefundRequest(swapAddress: refundables.bitcoinAddress, toAddress: destinationAddress, satPerVbyte: satPerVbyte)) diff --git a/snippets/swift/BreezSDKExamples/Sources/ReceivePayment.swift b/snippets/swift/BreezSDKExamples/Sources/ReceivePayment.swift index 93ad925..1442472 100644 --- a/snippets/swift/BreezSDKExamples/Sources/ReceivePayment.swift +++ b/snippets/swift/BreezSDKExamples/Sources/ReceivePayment.swift @@ -1,6 +1,6 @@ // // ReceivePayment.swift -// +// // // Created by ruben on 13/11/2023. // diff --git a/snippets/swift/BreezSDKExamples/Sources/SendOnchain.swift b/snippets/swift/BreezSDKExamples/Sources/SendOnchain.swift index 87f2776..2305ea6 100644 --- a/snippets/swift/BreezSDKExamples/Sources/SendOnchain.swift +++ b/snippets/swift/BreezSDKExamples/Sources/SendOnchain.swift @@ -5,12 +5,12 @@ // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK +import Foundation func GetCurrentFees(sdk: BlockingBreezServices) -> ReverseSwapPairInfo? { // ANCHOR: estimate-current-reverse-swap-total-fees - let sendAmountSat:UInt64 = 50_000 + let sendAmountSat: UInt64 = 50_000 let currentFees = try? sdk.fetchReverseSwapFees(req: ReverseSwapFeesRequest(sendAmountSat: sendAmountSat)) print("Total estimated fees for reverse swap: \(String(describing: currentFees?.totalEstimatedFees))") // ANCHOR_END: estimate-current-reverse-swap-total-fees @@ -25,7 +25,7 @@ func ListCurrentFees(currentFees: ReverseSwapPairInfo) { } func maxReverseSwapAmount(sdk: BlockingBreezServices) -> MaxReverseSwapAmountResponse? { - // ANCHOR: max-reverse-swap-amount + // ANCHOR: max-reverse-swap-amount let maxAmount = try? sdk.maxReverseSwapAmount() print("Max reverse swap amount: \(String(describing: maxAmount?.totalSat))") // ANCHOR_END: max-reverse-swap-amount @@ -37,7 +37,7 @@ func StartReverseSwap(sdk: BlockingBreezServices, currentFees: ReverseSwapPairIn let destinationAddress = "bc1.." let amountSat = currentFees.min let satPerVbyte: UInt32 = 5 - + let response = try? sdk.sendOnchain(req: SendOnchainRequest(amountSat: amountSat, onchainRecipientAddress: destinationAddress, pairHash: currentFees.feesHash, satPerVbyte: satPerVbyte)) // ANCHOR_END: start-reverse-swap return response diff --git a/snippets/swift/BreezSDKExamples/Sources/SendPayment.swift b/snippets/swift/BreezSDKExamples/Sources/SendPayment.swift index 6bdcb99..569c26c 100644 --- a/snippets/swift/BreezSDKExamples/Sources/SendPayment.swift +++ b/snippets/swift/BreezSDKExamples/Sources/SendPayment.swift @@ -15,6 +15,4 @@ func sendPayment(sdk: BlockingBreezServices) -> SendPaymentResponse? { let response = try? sdk.sendPayment(req: req) // ANCHOR_END: send-payment return response - - } diff --git a/snippets/swift/BreezSDKExamples/Sources/SendSpontaneous.swift b/snippets/swift/BreezSDKExamples/Sources/SendSpontaneous.swift index 173a7f5..8dc2f10 100644 --- a/snippets/swift/BreezSDKExamples/Sources/SendSpontaneous.swift +++ b/snippets/swift/BreezSDKExamples/Sources/SendSpontaneous.swift @@ -5,16 +5,16 @@ // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK - +import Foundation func sendSpontaneousPayment(sdk: BlockingBreezServices) -> SendPaymentResponse? { // ANCHOR: send-spontaneous-payment let response = try? sdk.sendSpontaneousPayment( req: SendSpontaneousPaymentRequest( nodeId: "...", - amountMsat: 3_000_000)) + amountMsat: 3_000_000 + )) // ANCHOR_END: send-spontaneous-payment return response } diff --git a/snippets/swift/BreezSDKExamples/Sources/ServiceStatus.swift b/snippets/swift/BreezSDKExamples/Sources/ServiceStatus.swift index 50b2ece..7edeec7 100644 --- a/snippets/swift/BreezSDKExamples/Sources/ServiceStatus.swift +++ b/snippets/swift/BreezSDKExamples/Sources/ServiceStatus.swift @@ -1,12 +1,12 @@ // // ServiceStatus.swift -// +// // // Created by dangeross on 27/11/2023. // -import Foundation import BreezSDK +import Foundation func getServiceStatus(sdk: BlockingBreezServices) { // ANCHOR: health-check-status diff --git a/snippets/swift/BreezSDKExamples/Sources/StaticChannelBackup.swift b/snippets/swift/BreezSDKExamples/Sources/StaticChannelBackup.swift index f6ca235..bd8c583 100644 --- a/snippets/swift/BreezSDKExamples/Sources/StaticChannelBackup.swift +++ b/snippets/swift/BreezSDKExamples/Sources/StaticChannelBackup.swift @@ -5,12 +5,12 @@ // Created by ruben on 14/11/2023. // -import Foundation import BreezSDK +import Foundation func retrieveBackupFiles() -> StaticBackupResponse? { // ANCHOR: static-channel-backup - let backupData = try? staticBackup(req:StaticBackupRequest(workingDir: "")) + let backupData = try? staticBackup(req: StaticBackupRequest(workingDir: "")) // ANCHOR_END: static-channel-backup return backupData } diff --git a/snippets/swift/BreezSDKExamples/Sources/main.swift b/snippets/swift/BreezSDKExamples/Sources/main.swift index 6dc3d9d..b392e85 100644 --- a/snippets/swift/BreezSDKExamples/Sources/main.swift +++ b/snippets/swift/BreezSDKExamples/Sources/main.swift @@ -2,12 +2,11 @@ // https://docs.swift.org/swift-book print("Hello, tester!") -if let sdk = try gettingStarted(){ - if let fiatRates = getCurrentRates(sdk: sdk) { +if let sdk = try gettingStarted() { + if let fiatRates = getCurrentRates(sdk: sdk) { for rate in fiatRates { print("rate \(rate)\n") print("------------------------") } } } - diff --git a/src/SUMMARY.md b/src/SUMMARY.md index a2abc7d..57c9db1 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -13,8 +13,9 @@ - [iOS](guide/ios_notification_service_extension.md) - [Android](guide/android_notification_foreground_service.md) - [Connecting to an LSP](guide/connecting_lsp.md) -- [Receiving an on-chain transaction](guide/receive_onchain.md) -- [Sending an on-chain transaction](guide/send_onchain.md) +- [Receiving an On-Chain Transaction](guide/receive_onchain.md) +- [Sending an On-Chain Transaction](guide/send_onchain.md) + - [Closed channels](guide/closed_channels.md) - [Using LNURL & Lightning addresses](guide/lnurl.md) - [Sending payments using LNURL-Pay/Lightning address](guide/lnurl_pay.md) diff --git a/src/guide/closed_channels.md b/src/guide/closed_channels.md new file mode 100644 index 0000000..e06b4eb --- /dev/null +++ b/src/guide/closed_channels.md @@ -0,0 +1,143 @@ +# Closed channels + +On channel close the remaining funds will be sent to an onchain address. In order to redeem those funds you may do the following. + +## Prepare Redeem Onchain Funds + +First you may want to call prepare the transaction in order to get the transaction weight as well as the calculated fees before eventually broadcasting it. + + +
Rust
+
+ +```rust,ignore +{{#include ../../snippets/rust/src/closed_channel.rs:prepare-redeem-onchain-funds}} +``` +
+ +
Swift
+
+ +```swift,ignore +{{#include ../../snippets/swift/BreezSDKExamples/Sources/ClosedChannel.swift:prepare-redeem-onchain-funds}} +``` +
+ +
Kotlin
+
+ +```kotlin,ignore +{{#include ../../snippets/kotlin_mpp_lib/shared/src/commonMain/kotlin/com/example/kotlinmpplib/ClosedChannel.kt:prepare-redeem-onchain-funds}} +``` +
+ +
React Native
+
+ +```typescript +{{#include ../../snippets/react-native/closed_channel.ts:prepare-redeem-onchain-funds}} +``` +
+ +
Dart
+
+ +```dart,ignore +{{#include ../../snippets/dart_snippets/lib/closed_channel.dart:prepare-redeem-onchain-funds}} +``` +
+ +
Python
+
+ +```python,ignore +{{#include ../../snippets/python/src/closed_channel.py:prepare-redeem-onchain-funds}} +``` +
+ +
Go
+
+ +```go,ignore +{{#include ../../snippets/go/closed_channel.go:prepare-redeem-onchain-funds}} +``` +
+ +
C#
+
+ +```cs,ignore +{{#include ../../snippets/csharp/ClosedChannel.cs:prepare-redeem-onchain-funds}} +``` +
+
+ +## Redeem Onchain Funds + +In order to broadcast the redeem transaction do the following. + + +
Rust
+
+ +```rust,ignore +{{#include ../../snippets/rust/src/closed_channel.rs:redeem-onchain-funds}} +``` +
+ +
Swift
+
+ +```swift,ignore +{{#include ../../snippets/swift/BreezSDKExamples/Sources/ClosedChannel.swift:redeem-onchain-funds}} +``` +
+ +
Kotlin
+
+ +```kotlin,ignore +{{#include ../../snippets/kotlin_mpp_lib/shared/src/commonMain/kotlin/com/example/kotlinmpplib/ClosedChannel.kt:redeem-onchain-funds}} +``` +
+ +
React Native
+
+ +```typescript +{{#include ../../snippets/react-native/closed_channel.ts:redeem-onchain-funds}} +``` +
+ +
Dart
+
+ +```dart,ignore +{{#include ../../snippets/dart_snippets/lib/closed_channel.dart:redeem-onchain-funds}} +``` +
+ +
Python
+
+ +```python,ignore +{{#include ../../snippets/python/src/closed_channel.py:redeem-onchain-funds}} +``` +
+ +
Go
+
+ +```go,ignore +{{#include ../../snippets/go/closed_channel.go:redeem-onchain-funds}} +``` +
+ +
C#
+
+ +```cs,ignore +{{#include ../../snippets/csharp/ClosedChannel.cs:redeem-onchain-funds}} +``` +
+
\ No newline at end of file diff --git a/src/guide/receive_onchain.md b/src/guide/receive_onchain.md index d5c1d92..eded494 100644 --- a/src/guide/receive_onchain.md +++ b/src/guide/receive_onchain.md @@ -373,5 +373,4 @@ To calculate the fees for a channel being opened by the LSP: - [^1]: For more details on these fees, see [Channel Opening Fees](connecting_lsp.md#channel-opening-fees)