Major refactor of the Esplora client

Now we're back to using regular bdk types, which is a big advantage.
This commit is contained in:
Dave Hrycyszyn
2024-07-25 19:54:37 +01:00
parent e4e8298fcd
commit 4b63245bfe
11 changed files with 133 additions and 536 deletions

260
Cargo.lock generated
View File

@@ -347,16 +347,10 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c8d66485a3a2ea485c1913c4572ce0256067a5377ac8c75c4960e1cda98605f"
dependencies = [
"bitcoin-internals",
"bitcoin-internals 0.3.0",
"bitcoin_hashes 0.14.0",
]
[[package]]
name = "base64"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
[[package]]
name = "base64"
version = "0.13.1"
@@ -392,14 +386,15 @@ dependencies = [
"bip39",
"bitcoin 0.30.2",
"electrum-client 0.18.0",
"esplora-client",
"futures",
"getrandom 0.2.15",
"js-sys",
"log",
"miniscript 10.0.0",
"miniscript",
"rand 0.8.5",
"serde",
"serde_json",
"sled",
"tokio",
]
@@ -414,59 +409,6 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "bdk_chain"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "163b064557cee078e8ee5dd2c88944204506f7b2b1524f78e8fcba38c346da7b"
dependencies = [
"bitcoin 0.32.2",
"miniscript 12.0.0",
"serde",
]
[[package]]
name = "bdk_esplora"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "089babab213bbb32518bad79a7313ebb4c85a52c18c8b558402dfa810c27de3f"
dependencies = [
"async-trait",
"bdk_chain",
"esplora-client",
"futures",
"miniscript 12.0.0",
]
[[package]]
name = "bdk_sqlite"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0926dc5778fb3c5afaf7def9ed9b9c9d9fe9e3ba499e09cb816d3de43211be71"
dependencies = [
"bdk_chain",
"rusqlite",
"serde",
"serde_json",
]
[[package]]
name = "bdk_wallet"
version = "1.0.0-alpha.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2926afdbfc54ebf7df2caa51af5be4435b90c01c6fbe5578b51b7c2c0a264bd9"
dependencies = [
"bdk_chain",
"bip39",
"bitcoin 0.32.2",
"getrandom 0.2.15",
"js-sys",
"miniscript 12.0.0",
"rand 0.8.5",
"serde",
"serde_json",
]
[[package]]
name = "bech32"
version = "0.9.1"
@@ -573,9 +515,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea507acc1cd80fc084ace38544bbcf7ced7c2aa65b653b102de0ce718df668f6"
dependencies = [
"base58ck",
"base64 0.21.7",
"bech32 0.11.0",
"bitcoin-internals",
"bitcoin-internals 0.3.0",
"bitcoin-io",
"bitcoin-units",
"bitcoin_hashes 0.14.0",
@@ -585,6 +526,12 @@ dependencies = [
"serde",
]
[[package]]
name = "bitcoin-internals"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f9997f8650dd818369931b5672a18dbef95324d0513aa99aae758de8ce86e5b"
[[package]]
name = "bitcoin-internals"
version = "0.3.0"
@@ -612,7 +559,7 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb54da0b28892f3c52203a7191534033e051b6f4b52bc15480681b57b7e036f5"
dependencies = [
"bitcoin-internals",
"bitcoin-internals 0.3.0",
"serde",
]
@@ -942,15 +889,6 @@ dependencies = [
"libc",
]
[[package]]
name = "crc32fast"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
"cfg-if",
]
[[package]]
name = "criterion"
version = "0.4.0"
@@ -1336,14 +1274,13 @@ dependencies = [
[[package]]
name = "esplora-client"
version = "0.8.0"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69c6d27ef4ff21019edd98aa92199757e10a88065bbfcef6bb750ca6ec5e4a45"
checksum = "0cb1f7f2489cce83bc3bd92784f9ba5271eeb6e729b975895fc541f78cbfcdca"
dependencies = [
"bitcoin 0.32.2",
"hex-conservative",
"bitcoin 0.30.2",
"bitcoin-internals 0.1.0",
"log",
"minreq",
"reqwest",
"serde",
]
@@ -1390,18 +1327,6 @@ dependencies = [
"wasmtimer",
]
[[package]]
name = "fallible-iterator"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
[[package]]
name = "fallible-streaming-iterator"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
[[package]]
name = "fastcrypto"
version = "0.1.8"
@@ -1512,16 +1437,6 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fs2"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "fs_extra"
version = "1.3.0"
@@ -1617,15 +1532,6 @@ dependencies = [
"slab",
]
[[package]]
name = "fxhash"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
dependencies = [
"byteorder",
]
[[package]]
name = "generic-array"
version = "0.14.7"
@@ -1734,18 +1640,6 @@ name = "hashbrown"
version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
dependencies = [
"ahash",
]
[[package]]
name = "hashlink"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af"
dependencies = [
"hashbrown 0.14.5",
]
[[package]]
name = "heck"
@@ -1960,15 +1854,6 @@ dependencies = [
"serde",
]
[[package]]
name = "instant"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
dependencies = [
"cfg-if",
]
[[package]]
name = "ipnet"
version = "2.9.0"
@@ -2070,17 +1955,6 @@ dependencies = [
"libc",
]
[[package]]
name = "libsqlite3-sys"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f"
dependencies = [
"cc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "linux-raw-sys"
version = "0.4.14"
@@ -2141,17 +2015,6 @@ dependencies = [
"serde",
]
[[package]]
name = "miniscript"
version = "12.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b59c67956fd276ceec0cf194fbf80754ef4d88a496d5cf5e4fdf33561466183d"
dependencies = [
"bech32 0.11.0",
"bitcoin 0.32.2",
"serde",
]
[[package]]
name = "miniz_oxide"
version = "0.7.4"
@@ -2161,22 +2024,6 @@ dependencies = [
"adler",
]
[[package]]
name = "minreq"
version = "2.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fdef521c74c2884a4f3570bcdb6d2a77b3c533feb6b27ac2ae72673cc221c64"
dependencies = [
"base64 0.12.3",
"log",
"once_cell",
"rustls 0.21.12",
"rustls-webpki 0.101.7",
"serde",
"serde_json",
"webpki-roots 0.25.4",
]
[[package]]
name = "mio"
version = "0.8.11"
@@ -2405,17 +2252,6 @@ dependencies = [
"sha2 0.10.8",
]
[[package]]
name = "parking_lot"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
dependencies = [
"instant",
"lock_api",
"parking_lot_core 0.8.6",
]
[[package]]
name = "parking_lot"
version = "0.12.3"
@@ -2423,21 +2259,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
dependencies = [
"lock_api",
"parking_lot_core 0.9.10",
]
[[package]]
name = "parking_lot_core"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
dependencies = [
"cfg-if",
"instant",
"libc",
"redox_syscall 0.2.16",
"smallvec",
"winapi",
"parking_lot_core",
]
[[package]]
@@ -2448,7 +2270,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if",
"libc",
"redox_syscall 0.5.2",
"redox_syscall",
"smallvec",
"windows-targets 0.52.5",
]
@@ -2741,15 +2563,6 @@ dependencies = [
"syn 2.0.67",
]
[[package]]
name = "redox_syscall"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [
"bitflags 1.3.2",
]
[[package]]
name = "redox_syscall"
version = "0.5.2"
@@ -2901,20 +2714,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "rusqlite"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae"
dependencies = [
"bitflags 2.5.0",
"fallible-iterator",
"fallible-streaming-iterator",
"hashlink",
"libsqlite3-sys",
"smallvec",
]
[[package]]
name = "rustc-demangle"
version = "0.1.24"
@@ -3364,9 +3163,6 @@ dependencies = [
"anyhow",
"async-trait",
"bdk",
"bdk_esplora",
"bdk_sqlite",
"bdk_wallet",
"bft-crdt-derive",
"bft-json-crdt",
"bitcoin 0.32.2",
@@ -3427,22 +3223,6 @@ dependencies = [
"autocfg",
]
[[package]]
name = "sled"
version = "0.34.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935"
dependencies = [
"crc32fast",
"crossbeam-epoch",
"crossbeam-utils",
"fs2",
"fxhash",
"libc",
"log",
"parking_lot 0.11.2",
]
[[package]]
name = "smallvec"
version = "1.13.2"
@@ -3699,7 +3479,7 @@ dependencies = [
"libc",
"mio",
"num_cpus",
"parking_lot 0.12.3",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",
@@ -4120,7 +3900,7 @@ checksum = "5f656cd8858a5164932d8a90f936700860976ec21eb00e0fe2aa8cab13f6b4cf"
dependencies = [
"futures",
"js-sys",
"parking_lot 0.12.3",
"parking_lot",
"pin-utils",
"slab",
"wasm-bindgen",