Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class AndroidLibTest {
}
}

private val descriptor =
"wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/0/*)"
private val descriptor = Descriptor("wpkh([c258d2e4/84h/1h/0h]tpubDDYkZojQFQjht8Tm4jsS3iuEmKjTiEGjG6KnuFNKKJb5A6ZUCUZKdvLdSDWofKi4ToRCwb9poe1XdqfUnP4jaJjCB2Zwv11ZLgSbnZSNecE/0/*)", Network.TESTNET)

private val databaseConfig = DatabaseConfig.Memory

Expand Down
4 changes: 3 additions & 1 deletion bdk-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ name = "bdkffi"

[dependencies]
bdk = { version = "0.25", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] }

uniffi_macros = { version = "0.21.0", features = ["builtin-bindgen"] }
uniffi = { version = "0.21.0", features = ["builtin-bindgen"] }

[build-dependencies]
uniffi_build = { version = "0.21.0", features = ["builtin-bindgen"] }

[dev-dependencies]
assert_matches = "1.5.0"
29 changes: 28 additions & 1 deletion bdk-ffi/src/bdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ dictionary ScriptAmount {

interface Wallet {
[Throws=BdkError]
constructor(string descriptor, string? change_descriptor, Network network, DatabaseConfig database_config);
constructor(Descriptor descriptor, Descriptor? change_descriptor, Network network, DatabaseConfig database_config);

[Throws=BdkError]
AddressInfo get_address(AddressIndex address_index);
Expand Down Expand Up @@ -357,6 +357,33 @@ interface DescriptorPublicKey {
string as_string();
};

interface Descriptor {
[Throws=BdkError]
constructor(string descriptor, Network network);

[Name=new_bip44]
constructor(DescriptorSecretKey secret_key, KeychainKind keychain, Network network);

[Name=new_bip44_public]
constructor(DescriptorPublicKey public_key, string fingerprint, KeychainKind keychain, Network network);

[Name=new_bip49]
constructor(DescriptorSecretKey secret_key, KeychainKind keychain, Network network);

[Name=new_bip49_public]
constructor(DescriptorPublicKey public_key, string fingerprint, KeychainKind keychain, Network network);

[Name=new_bip84]
constructor(DescriptorSecretKey secret_key, KeychainKind keychain, Network network);

[Name=new_bip84_public]
constructor(DescriptorPublicKey public_key, string fingerprint, KeychainKind keychain, Network network);

string as_string();

string as_string_private();
};

interface Address {
[Throws=BdkError]
constructor(string address);
Expand Down
Loading