Skip to content

Commit 2931312

Browse files
committed
refactor: use macros for LockTime and PkOrF
1 parent 0c18032 commit 2931312

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

bdk-ffi/src/bdk.udl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -283,18 +283,6 @@ typedef interface Policy;
283283

284284
typedef enum SatisfiableItem;
285285

286-
[Enum]
287-
interface PkOrF {
288-
Pubkey(string value);
289-
XOnlyPubkey(string value);
290-
Fingerprint(string value);
291-
};
292-
293-
[Enum]
294-
interface LockTime {
295-
Blocks(u32 height);
296-
Seconds(u32 consensus_time);
297-
};
298286

299287
typedef enum Satisfaction;
300288

bdk-ffi/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ use crate::error::PsbtFinalizeError;
3131
use crate::error::PsbtParseError;
3232
use crate::error::RequestBuilderError;
3333
use crate::error::TransactionError;
34-
use crate::types::LockTime;
35-
use crate::types::PkOrF;
3634

3735
use bdk_wallet::bitcoin::Network;
3836
use bdk_wallet::keys::bip39::WordCount;

bdk-ffi/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl From<BdkSatisfiableItem> for SatisfiableItem {
486486
}
487487
}
488488

489-
#[derive(Debug, Clone)]
489+
#[derive(Debug, Clone, uniffi::Enum)]
490490
pub enum PkOrF {
491491
Pubkey { value: String },
492492
XOnlyPubkey { value: String },
@@ -509,7 +509,7 @@ impl From<BdkPkOrF> for PkOrF {
509509
}
510510
}
511511

512-
#[derive(Debug, Clone)]
512+
#[derive(Debug, Clone, uniffi::Enum)]
513513
pub enum LockTime {
514514
Blocks { height: u32 },
515515
Seconds { consensus_time: u32 },

0 commit comments

Comments
 (0)