Skip to content

Commit eaadeb3

Browse files
committed
Add optional esplora wallet setup for payjoin-cli backend
This adds a new esplora feature to use a bdk wallet as the supporting backend for payjoin-cli to reduce the need for a bitcoind rpc connection when testing against integrations. This does retain the bitcoind functionality so we can continue to run local e2e tests during the payjoin-cli CI tests.
1 parent 637f913 commit eaadeb3

File tree

13 files changed

+1738
-1169
lines changed

13 files changed

+1738
-1169
lines changed

Cargo-minimal.lock

Lines changed: 950 additions & 893 deletions
Large diffs are not rendered by default.

Cargo-recent.lock

Lines changed: 214 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ dependencies = [
395395
"bitcoin_hashes 0.14.0",
396396
]
397397

398+
[[package]]
399+
name = "base64"
400+
version = "0.12.3"
401+
source = "registry+https://github.com/rust-lang/crates.io-index"
402+
checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
403+
398404
[[package]]
399405
name = "base64"
400406
version = "0.13.1"
@@ -434,11 +440,11 @@ dependencies = [
434440
"bitcoin 0.30.2",
435441
"core-rpc",
436442
"electrum-client",
437-
"esplora-client",
443+
"esplora-client 0.6.0",
438444
"getrandom 0.2.15",
439445
"js-sys",
440446
"log",
441-
"miniscript",
447+
"miniscript 10.2.3",
442448
"rand 0.8.5",
443449
"serde",
444450
"serde_json",
@@ -457,6 +463,55 @@ dependencies = [
457463
"syn 1.0.109",
458464
]
459465

466+
[[package]]
467+
name = "bdk_chain"
468+
version = "0.23.3"
469+
source = "registry+https://github.com/rust-lang/crates.io-index"
470+
checksum = "c290eff038799a8ac0c5a82b6160a9ca456baa299a6f22b262c771342d2846c0"
471+
dependencies = [
472+
"bdk_core",
473+
"bitcoin 0.32.8",
474+
"miniscript 12.3.5",
475+
"serde",
476+
]
477+
478+
[[package]]
479+
name = "bdk_core"
480+
version = "0.6.3"
481+
source = "registry+https://github.com/rust-lang/crates.io-index"
482+
checksum = "cb3028782f6bf14a6df987244333d34e6b272b5a40a53e4879ec2dfd82275a3a"
483+
dependencies = [
484+
"bitcoin 0.32.8",
485+
"hashbrown 0.14.5",
486+
"serde",
487+
]
488+
489+
[[package]]
490+
name = "bdk_esplora"
491+
version = "0.22.2"
492+
source = "registry+https://github.com/rust-lang/crates.io-index"
493+
checksum = "83986307ea92997c3d051e8c306af8115a05add601e22acb7c1903008e6b614e"
494+
dependencies = [
495+
"async-trait",
496+
"bdk_core",
497+
"esplora-client 0.12.3",
498+
"futures",
499+
]
500+
501+
[[package]]
502+
name = "bdk_wallet"
503+
version = "3.0.0-rc.2"
504+
source = "registry+https://github.com/rust-lang/crates.io-index"
505+
checksum = "9b989a12f0398a844bf22b14a197e2676aea2775aabca52057627f596ad3a0ef"
506+
dependencies = [
507+
"bdk_chain",
508+
"bitcoin 0.32.8",
509+
"miniscript 12.3.5",
510+
"rand_core 0.6.4",
511+
"serde",
512+
"serde_json",
513+
]
514+
460515
[[package]]
461516
name = "bech32"
462517
version = "0.9.1"
@@ -1047,6 +1102,16 @@ dependencies = [
10471102
"unicode-segmentation",
10481103
]
10491104

1105+
[[package]]
1106+
name = "core-foundation"
1107+
version = "0.9.4"
1108+
source = "registry+https://github.com/rust-lang/crates.io-index"
1109+
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
1110+
dependencies = [
1111+
"core-foundation-sys",
1112+
"libc",
1113+
]
1114+
10501115
[[package]]
10511116
name = "core-foundation"
10521117
version = "0.10.1"
@@ -1425,6 +1490,22 @@ dependencies = [
14251490
"ureq",
14261491
]
14271492

1493+
[[package]]
1494+
name = "esplora-client"
1495+
version = "0.12.3"
1496+
source = "registry+https://github.com/rust-lang/crates.io-index"
1497+
checksum = "f19e3ea99dbfbef0c1ec26d83e69de0c579f6aa6aaac4f44597805fcc27e97af"
1498+
dependencies = [
1499+
"bitcoin 0.32.8",
1500+
"hex-conservative 0.2.2",
1501+
"log",
1502+
"minreq",
1503+
"reqwest",
1504+
"serde",
1505+
"serde_json",
1506+
"tokio",
1507+
]
1508+
14281509
[[package]]
14291510
name = "extend"
14301511
version = "1.2.0"
@@ -1488,6 +1569,21 @@ version = "0.1.5"
14881569
source = "registry+https://github.com/rust-lang/crates.io-index"
14891570
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
14901571

1572+
[[package]]
1573+
name = "foreign-types"
1574+
version = "0.3.2"
1575+
source = "registry+https://github.com/rust-lang/crates.io-index"
1576+
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
1577+
dependencies = [
1578+
"foreign-types-shared",
1579+
]
1580+
1581+
[[package]]
1582+
name = "foreign-types-shared"
1583+
version = "0.1.1"
1584+
source = "registry+https://github.com/rust-lang/crates.io-index"
1585+
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
1586+
14911587
[[package]]
14921588
name = "form_urlencoded"
14931589
version = "1.2.2"
@@ -1743,6 +1839,7 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
17431839
dependencies = [
17441840
"ahash",
17451841
"allocator-api2",
1842+
"serde",
17461843
]
17471844

17481845
[[package]]
@@ -1954,6 +2051,22 @@ dependencies = [
19542051
"webpki-roots 1.0.2",
19552052
]
19562053

2054+
[[package]]
2055+
name = "hyper-tls"
2056+
version = "0.6.0"
2057+
source = "registry+https://github.com/rust-lang/crates.io-index"
2058+
checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
2059+
dependencies = [
2060+
"bytes",
2061+
"http-body-util",
2062+
"hyper",
2063+
"hyper-util",
2064+
"native-tls",
2065+
"tokio",
2066+
"tokio-native-tls",
2067+
"tower-service",
2068+
]
2069+
19572070
[[package]]
19582071
name = "hyper-util"
19592072
version = "0.1.20"
@@ -2398,6 +2511,17 @@ dependencies = [
23982511
"serde",
23992512
]
24002513

2514+
[[package]]
2515+
name = "miniscript"
2516+
version = "12.3.5"
2517+
source = "registry+https://github.com/rust-lang/crates.io-index"
2518+
checksum = "487906208f38448e186e3deb02f2b8ef046a9078b0de00bdb28bf4fb9b76951c"
2519+
dependencies = [
2520+
"bech32 0.11.0",
2521+
"bitcoin 0.32.8",
2522+
"serde",
2523+
]
2524+
24012525
[[package]]
24022526
name = "miniz_oxide"
24032527
version = "0.8.9"
@@ -2414,6 +2538,7 @@ version = "2.12.0"
24142538
source = "registry+https://github.com/rust-lang/crates.io-index"
24152539
checksum = "763d142cdff44aaadd9268bebddb156ef6c65a0e13486bb81673cf2d8739f9b0"
24162540
dependencies = [
2541+
"base64 0.12.3",
24172542
"log",
24182543
"once_cell",
24192544
"rustls 0.21.12",
@@ -2459,6 +2584,23 @@ dependencies = [
24592584
"tokio",
24602585
]
24612586

2587+
[[package]]
2588+
name = "native-tls"
2589+
version = "0.2.14"
2590+
source = "registry+https://github.com/rust-lang/crates.io-index"
2591+
checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e"
2592+
dependencies = [
2593+
"libc",
2594+
"log",
2595+
"openssl",
2596+
"openssl-probe",
2597+
"openssl-sys",
2598+
"schannel",
2599+
"security-framework 2.11.1",
2600+
"security-framework-sys",
2601+
"tempfile",
2602+
]
2603+
24622604
[[package]]
24632605
name = "nix"
24642606
version = "0.26.4"
@@ -2563,12 +2705,50 @@ version = "0.3.1"
25632705
source = "registry+https://github.com/rust-lang/crates.io-index"
25642706
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
25652707

2708+
[[package]]
2709+
name = "openssl"
2710+
version = "0.10.76"
2711+
source = "registry+https://github.com/rust-lang/crates.io-index"
2712+
checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf"
2713+
dependencies = [
2714+
"bitflags 2.6.0",
2715+
"cfg-if",
2716+
"foreign-types",
2717+
"libc",
2718+
"once_cell",
2719+
"openssl-macros",
2720+
"openssl-sys",
2721+
]
2722+
2723+
[[package]]
2724+
name = "openssl-macros"
2725+
version = "0.1.1"
2726+
source = "registry+https://github.com/rust-lang/crates.io-index"
2727+
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
2728+
dependencies = [
2729+
"proc-macro2",
2730+
"quote",
2731+
"syn 2.0.106",
2732+
]
2733+
25662734
[[package]]
25672735
name = "openssl-probe"
25682736
version = "0.1.5"
25692737
source = "registry+https://github.com/rust-lang/crates.io-index"
25702738
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
25712739

2740+
[[package]]
2741+
name = "openssl-sys"
2742+
version = "0.9.112"
2743+
source = "registry+https://github.com/rust-lang/crates.io-index"
2744+
checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb"
2745+
dependencies = [
2746+
"cc",
2747+
"libc",
2748+
"pkg-config",
2749+
"vcpkg",
2750+
]
2751+
25722752
[[package]]
25732753
name = "opentelemetry"
25742754
version = "0.31.0"
@@ -2753,10 +2933,14 @@ version = "0.2.0"
27532933
dependencies = [
27542934
"anyhow",
27552935
"async-trait",
2936+
"bdk_esplora",
2937+
"bdk_wallet",
27562938
"bitcoind-async-client",
27572939
"clap 4.5.46",
27582940
"config",
27592941
"dirs",
2942+
"esplora-client 0.12.3",
2943+
"hex",
27602944
"http-body-util",
27612945
"hyper",
27622946
"hyper-util",
@@ -3384,9 +3568,11 @@ dependencies = [
33843568
"http-body-util",
33853569
"hyper",
33863570
"hyper-rustls",
3571+
"hyper-tls",
33873572
"hyper-util",
33883573
"js-sys",
33893574
"log",
3575+
"native-tls",
33903576
"percent-encoding",
33913577
"pin-project-lite",
33923578
"quinn",
@@ -3398,6 +3584,7 @@ dependencies = [
33983584
"serde_urlencoded",
33993585
"sync_wrapper",
34003586
"tokio",
3587+
"tokio-native-tls",
34013588
"tokio-rustls 0.26.2",
34023589
"tower",
34033590
"tower-http",
@@ -3538,7 +3725,7 @@ dependencies = [
35383725
"openssl-probe",
35393726
"rustls-pki-types",
35403727
"schannel",
3541-
"security-framework",
3728+
"security-framework 3.3.0",
35423729
]
35433730

35443731
[[package]]
@@ -3704,14 +3891,27 @@ dependencies = [
37043891
"cc",
37053892
]
37063893

3894+
[[package]]
3895+
name = "security-framework"
3896+
version = "2.11.1"
3897+
source = "registry+https://github.com/rust-lang/crates.io-index"
3898+
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
3899+
dependencies = [
3900+
"bitflags 2.6.0",
3901+
"core-foundation 0.9.4",
3902+
"core-foundation-sys",
3903+
"libc",
3904+
"security-framework-sys",
3905+
]
3906+
37073907
[[package]]
37083908
name = "security-framework"
37093909
version = "3.3.0"
37103910
source = "registry+https://github.com/rust-lang/crates.io-index"
37113911
checksum = "80fb1d92c5028aa318b4b8bd7302a5bfcf48be96a37fc6fc790f806b0004ee0c"
37123912
dependencies = [
37133913
"bitflags 2.6.0",
3714-
"core-foundation",
3914+
"core-foundation 0.10.1",
37153915
"core-foundation-sys",
37163916
"libc",
37173917
"security-framework-sys",
@@ -4289,6 +4489,16 @@ dependencies = [
42894489
"syn 2.0.106",
42904490
]
42914491

4492+
[[package]]
4493+
name = "tokio-native-tls"
4494+
version = "0.3.1"
4495+
source = "registry+https://github.com/rust-lang/crates.io-index"
4496+
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
4497+
dependencies = [
4498+
"native-tls",
4499+
"tokio",
4500+
]
4501+
42924502
[[package]]
42934503
name = "tokio-rustls"
42944504
version = "0.24.1"

0 commit comments

Comments
 (0)