Skip to content

Commit 8af61b5

Browse files
committed
refactor: use macros for WordCount
1 parent e433fe9 commit 8af61b5

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

bdk-ffi/src/bdk.udl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,6 @@ typedef record Condition;
333333
// bdk_wallet crate - bitcoin re-exports
334334
// ------------------------------------------------------------------------
335335

336-
[Remote]
337-
enum WordCount {
338-
"Words12",
339-
"Words15",
340-
"Words18",
341-
"Words21",
342-
"Words24",
343-
};
344336

345337
typedef interface Script;
346338

bdk-ffi/src/lib.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,17 @@ use crate::types::SyncRequestBuilder;
4242
use crate::types::SyncScriptInspector;
4343

4444
use bdk_wallet::bitcoin::Network;
45-
use bdk_wallet::keys::bip39::WordCount;
4645
use bdk_wallet::KeychainKind;
4746

47+
type WordCount = bdk_wallet::keys::bip39::WordCount;
48+
49+
#[uniffi::remote(Enum)]
50+
pub enum WordCount {
51+
Words12,
52+
Words15,
53+
Words18,
54+
Words21,
55+
Words24,
56+
}
57+
4858
uniffi::include_scaffolding!("bdk");

0 commit comments

Comments
 (0)