Skip to content

Commit e449942

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

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ 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

4847
uniffi::include_scaffolding!("bdk");

bdk-ffi/src/types.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ pub enum KeychainKind {
4848
Internal = 1,
4949
}
5050

51+
type WordCount = bdk_wallet::keys::bip39::WordCount;
52+
53+
#[uniffi::remote(Enum)]
54+
pub enum WordCount {
55+
Words12,
56+
Words15,
57+
Words18,
58+
Words21,
59+
Words24,
60+
}
61+
5162
/// Represents the observed position of some chain data.
5263
#[derive(Debug, uniffi::Enum, Clone)]
5364
pub enum ChainPosition {

0 commit comments

Comments
 (0)