Skip to content

Commit

Permalink
Temp 10: Add DescriptorSecretKey and DescriptorPublicKey
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Sep 26, 2023
1 parent 04e1879 commit f251eb9
Show file tree
Hide file tree
Showing 3 changed files with 376 additions and 313 deletions.
44 changes: 44 additions & 0 deletions bdk-ffi/src/bdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,51 @@ enum WordCount {
"Words24",
};

interface Mnemonic {
constructor(WordCount word_count);

[Name=from_string, Throws=BdkError]
constructor(string mnemonic);

[Name=from_entropy, Throws=BdkError]
constructor(sequence<u8> entropy);

string as_string();
};

interface DerivationPath {
[Throws=BdkError]
constructor(string path);
};

interface DescriptorSecretKey {
constructor(Network network, Mnemonic mnemonic, string? password);

[Name=from_string, Throws=BdkError]
constructor(string secret_key);

[Throws=BdkError]
DescriptorSecretKey derive(DerivationPath path);

[Throws=BdkError]
DescriptorSecretKey extend(DerivationPath path);

DescriptorPublicKey as_public();

sequence<u8> secret_bytes();

string as_string();
};

interface DescriptorPublicKey {
[Name=from_string, Throws=BdkError]
constructor(string public_key);

[Throws=BdkError]
DescriptorPublicKey derive(DerivationPath path);

[Throws=BdkError]
DescriptorPublicKey extend(DerivationPath path);

string as_string();
};
Loading

0 comments on commit f251eb9

Please sign in to comment.