Skip to content

Commit

Permalink
Temp 11: Add Descriptor and Mnemonic types
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Sep 27, 2023
1 parent f251eb9 commit 5c2bbfb
Show file tree
Hide file tree
Showing 8 changed files with 354 additions and 254 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ cargo update -p hashlink --precise "0.8.1"
cargo update -p tokio --precise "1.29.1"
# flate2 1.0.27 and up do not work with Rust 1.61.0, but 1.0.26 does
cargo update -p flate2 --precise "1.0.26"
# clap 4.4.4 has MSRV 1.70, so we must keep it at 4.4.3
cargo update -p clap --precise 4.4.3
# anstyle 1.0.3 has MSRV 1.70.0, so we must keep it at 1.0.2
cargo update -p anstyle --precise 1.0.2
cargo update -p clap_builder --precise 4.4.1
cargo update -p clap_lex --precise 0.5.1
```

## Contributing
Expand Down
38 changes: 38 additions & 0 deletions bdk-ffi/src/bdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,41 @@ interface DescriptorPublicKey {

string as_string();
};

enum KeychainKind {
"External",
"Internal",
};

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);

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

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

string as_string();

string as_string_private();
};
Loading

0 comments on commit 5c2bbfb

Please sign in to comment.