Skip to content

Commit 8528bad

Browse files
committed
deps: bump bdk to beta-2
temp 2 impl wallet no persist enable default constructor on wallet type test: fix jvm tests add tx methods new errors feat: expose correct errors remove macros for in-memory connection tests(python): add in-memory connection tests(swift, kotlin): add tests with swift failures lib: bump to bdk-wallet 1.0.0-beta2 various fixes
1 parent 3454331 commit 8528bad

33 files changed

+521
-769
lines changed

bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveTxBuilderTest.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ class LiveTxBuilderTest {
2727

2828
@Test
2929
fun testTxBuilder() {
30-
val wallet = Wallet(descriptor, changeDescriptor, Network.SIGNET)
30+
var conn: Connection = Connection.newInMemory()
31+
val wallet = Wallet(descriptor, changeDescriptor, Network.SIGNET, conn)
3132
val esploraClient: EsploraClient = EsploraClient(SIGNET_ESPLORA_URL)
32-
val fullScanRequest: FullScanRequest = wallet.startFullScan()
33+
val fullScanRequest: FullScanRequest = wallet.startFullScan().build()
3334
val update = esploraClient.fullScan(fullScanRequest, 10uL, 1uL)
3435
wallet.applyUpdate(update)
3536
println("Balance: ${wallet.balance().total.toSat()}")
@@ -50,9 +51,10 @@ class LiveTxBuilderTest {
5051

5152
@Test
5253
fun complexTxBuilder() {
53-
val wallet = Wallet(descriptor, changeDescriptor, Network.SIGNET)
54+
var conn: Connection = Connection.newInMemory()
55+
val wallet = Wallet(descriptor, changeDescriptor, Network.SIGNET, conn)
5456
val esploraClient: EsploraClient = EsploraClient(SIGNET_ESPLORA_URL)
55-
val fullScanRequest: FullScanRequest = wallet.startFullScan()
57+
val fullScanRequest: FullScanRequest = wallet.startFullScan().build()
5658
val update = esploraClient.fullScan(fullScanRequest, 10uL, 1uL)
5759
wallet.applyUpdate(update)
5860

bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveWalletTest.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ class LiveWalletTest {
2828

2929
@Test
3030
fun testSyncedBalance() {
31-
val wallet: Wallet = Wallet(descriptor, changeDescriptor, Network.SIGNET)
31+
var conn: Connection = Connection.newInMemory()
32+
val wallet: Wallet = Wallet(descriptor, changeDescriptor, Network.SIGNET, conn)
3233
val esploraClient: EsploraClient = EsploraClient(SIGNET_ESPLORA_URL)
33-
val fullScanRequest: FullScanRequest = wallet.startFullScan()
34+
val fullScanRequest: FullScanRequest = wallet.startFullScan().build()
3435
val update = esploraClient.fullScan(fullScanRequest, 10uL, 1uL)
3536
wallet.applyUpdate(update)
3637
println("Balance: ${wallet.balance().total.toSat()}")
@@ -53,9 +54,10 @@ class LiveWalletTest {
5354

5455
@Test
5556
fun testBroadcastTransaction() {
56-
val wallet = Wallet(descriptor, changeDescriptor, Network.SIGNET)
57+
var conn: Connection = Connection.newInMemory()
58+
val wallet = Wallet(descriptor, changeDescriptor, Network.SIGNET, conn)
5759
val esploraClient = EsploraClient(SIGNET_ESPLORA_URL)
58-
val fullScanRequest: FullScanRequest = wallet.startFullScan()
60+
val fullScanRequest: FullScanRequest = wallet.startFullScan().build()
5961
val update = esploraClient.fullScan(fullScanRequest, 10uL, 1uL)
6062
wallet.applyUpdate(update)
6163
println("Balance: ${wallet.balance().total.toSat()}")

bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/OfflineWalletTest.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ class OfflineWalletTest {
3636

3737
@Test
3838
fun testNewAddress() {
39+
val conn = Connection.newInMemory()
3940
val wallet: Wallet = Wallet(
4041
descriptor,
4142
changeDescriptor,
42-
Network.TESTNET
43+
Network.TESTNET,
44+
conn
4345
)
4446
val addressInfo: AddressInfo = wallet.revealNextAddress(KeychainKind.EXTERNAL)
4547

@@ -56,10 +58,12 @@ class OfflineWalletTest {
5658

5759
@Test
5860
fun testBalance() {
61+
var conn: Connection = Connection.newInMemory()
5962
val wallet: Wallet = Wallet(
6063
descriptor,
6164
changeDescriptor,
62-
Network.TESTNET
65+
Network.TESTNET,
66+
conn
6367
)
6468

6569
assertEquals(

bdk-ffi/Cargo.lock

Lines changed: 53 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bdk-ffi/Cargo.toml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ path = "uniffi-bindgen.rs"
1818
default = ["uniffi/cli"]
1919

2020
[dependencies]
21-
bdk_wallet = { version = "1.0.0-alpha.13", features = ["all-keys", "keys-bip39"] }
22-
bdk_esplora = { version = "0.15.0", default-features = false, features = ["std", "blocking", "blocking-https-rustls"] }
23-
# NOTE: This is a temporary workaround to use the electrum-client with the use-rustls-ring feature. It points to a fork
24-
# of bdk in which the bdk_electrum library uses the electrum-client with the use-rustls-ring feature.
25-
bdk_electrum = { git = "https://github.com/thunderbiscuit/bdk/", package = "bdk_electrum", branch = "feature/electrum-client-ring-ffi-alpha13", default-features = false, features = ["use-rustls-ring"] }
26-
# bdk_electrum = { version = "0.15.0" }
27-
bdk_sqlite = { version = "0.2.0" }
28-
bdk_bitcoind_rpc = { version = "0.12.0" }
21+
bdk_wallet = { version = "1.0.0-beta.2", features = ["all-keys", "keys-bip39", "rusqlite"] }
22+
bdk_core = { version = "0.1.0" }
23+
bdk_esplora = { version = "0.17.0", default-features = false, features = ["std", "blocking", "blocking-https-rustls"] }
24+
bdk_electrum = { version = "0.17.0", default-features = false, features = ["use-rustls-ring"] }
25+
bdk_bitcoind_rpc = { version = "0.14.0" }
2926
bitcoin-internals = { version = "0.2.0", features = ["alloc"] }
3027

3128
uniffi = { version = "=0.28.0" }

0 commit comments

Comments
 (0)