react-native-bdk-sdk 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ import { type UniffiByteArray, type UniffiGcObject, type UniffiHandle, FfiConver
4
4
  * Returns a descriptor like "wpkh([fingerprint/84'/0'/0']xprv.../0/*)" for BIP84.
5
5
  * Uses Bip44/49/84/86 descriptor templates.
6
6
  */
7
- export declare function createDescriptor(mnemonic: MnemonicInterface, template: DescriptorTemplate, keychain: KeychainKind, network: Network): string;
7
+ export declare function createDescriptor(mnemonic: MnemonicLike, template: DescriptorTemplate, keychain: KeychainKind, network: Network): string;
8
8
  /**
9
9
  * Generate a public (watch-only) descriptor from an xpub string using a standard BIP template.
10
10
  * Returns a descriptor like "wpkh([fingerprint/84'/0'/0']xpub.../0/*)" for BIP84.
@@ -20,7 +20,7 @@ export declare function createSingleKeyDescriptor(key: string, template: SingleK
20
20
  * Export a wallet in FullyNoded-compatible JSON format for backup.
21
21
  * Mirrors bdk_wallet::export::FullyNodedExport.
22
22
  */
23
- export declare function exportWallet(wallet: WalletInterface, label: string, includeBlockHeight: boolean): string;
23
+ export declare function exportWallet(wallet: WalletLike, label: string, includeBlockHeight: boolean): string;
24
24
  /**
25
25
  * Returns true if the address string is valid for the given network.
26
26
  */
@@ -46,19 +46,8 @@ export type AddressInfo = {
46
46
  * Generated factory for {@link AddressInfo} record objects.
47
47
  */
48
48
  export declare const AddressInfo: Readonly<{
49
- /**
50
- * Create a frozen instance of {@link AddressInfo}, with defaults specified
51
- * in Rust, in the {@link bdk_ffi} crate.
52
- */
53
49
  create: (partial: Partial<AddressInfo> & Required<Omit<AddressInfo, never>>) => AddressInfo;
54
- /**
55
- * Create a frozen instance of {@link AddressInfo}, with defaults specified
56
- * in Rust, in the {@link bdk_ffi} crate.
57
- */
58
50
  new: (partial: Partial<AddressInfo> & Required<Omit<AddressInfo, never>>) => AddressInfo;
59
- /**
60
- * Defaults specified in the {@link bdk_ffi} crate.
61
- */
62
51
  defaults: () => Partial<AddressInfo>;
63
52
  }>;
64
53
  /**
@@ -95,19 +84,8 @@ export type Balance = {
95
84
  * Generated factory for {@link Balance} record objects.
96
85
  */
97
86
  export declare const Balance: Readonly<{
98
- /**
99
- * Create a frozen instance of {@link Balance}, with defaults specified
100
- * in Rust, in the {@link bdk_ffi} crate.
101
- */
102
87
  create: (partial: Partial<Balance> & Required<Omit<Balance, never>>) => Balance;
103
- /**
104
- * Create a frozen instance of {@link Balance}, with defaults specified
105
- * in Rust, in the {@link bdk_ffi} crate.
106
- */
107
88
  new: (partial: Partial<Balance> & Required<Omit<Balance, never>>) => Balance;
108
- /**
109
- * Defaults specified in the {@link bdk_ffi} crate.
110
- */
111
89
  defaults: () => Partial<Balance>;
112
90
  }>;
113
91
  /**
@@ -121,19 +99,8 @@ export type BlockId = {
121
99
  * Generated factory for {@link BlockId} record objects.
122
100
  */
123
101
  export declare const BlockId: Readonly<{
124
- /**
125
- * Create a frozen instance of {@link BlockId}, with defaults specified
126
- * in Rust, in the {@link bdk_ffi} crate.
127
- */
128
102
  create: (partial: Partial<BlockId> & Required<Omit<BlockId, never>>) => BlockId;
129
- /**
130
- * Create a frozen instance of {@link BlockId}, with defaults specified
131
- * in Rust, in the {@link bdk_ffi} crate.
132
- */
133
103
  new: (partial: Partial<BlockId> & Required<Omit<BlockId, never>>) => BlockId;
134
- /**
135
- * Defaults specified in the {@link bdk_ffi} crate.
136
- */
137
104
  defaults: () => Partial<BlockId>;
138
105
  }>;
139
106
  /**
@@ -155,19 +122,8 @@ export type ConfirmationBlockTime = {
155
122
  * Generated factory for {@link ConfirmationBlockTime} record objects.
156
123
  */
157
124
  export declare const ConfirmationBlockTime: Readonly<{
158
- /**
159
- * Create a frozen instance of {@link ConfirmationBlockTime}, with defaults specified
160
- * in Rust, in the {@link bdk_ffi} crate.
161
- */
162
125
  create: (partial: Partial<ConfirmationBlockTime> & Required<Omit<ConfirmationBlockTime, never>>) => ConfirmationBlockTime;
163
- /**
164
- * Create a frozen instance of {@link ConfirmationBlockTime}, with defaults specified
165
- * in Rust, in the {@link bdk_ffi} crate.
166
- */
167
126
  new: (partial: Partial<ConfirmationBlockTime> & Required<Omit<ConfirmationBlockTime, never>>) => ConfirmationBlockTime;
168
- /**
169
- * Defaults specified in the {@link bdk_ffi} crate.
170
- */
171
127
  defaults: () => Partial<ConfirmationBlockTime>;
172
128
  }>;
173
129
  /**
@@ -181,19 +137,8 @@ export type DerivationInfo = {
181
137
  * Generated factory for {@link DerivationInfo} record objects.
182
138
  */
183
139
  export declare const DerivationInfo: Readonly<{
184
- /**
185
- * Create a frozen instance of {@link DerivationInfo}, with defaults specified
186
- * in Rust, in the {@link bdk_ffi} crate.
187
- */
188
140
  create: (partial: Partial<DerivationInfo> & Required<Omit<DerivationInfo, never>>) => DerivationInfo;
189
- /**
190
- * Create a frozen instance of {@link DerivationInfo}, with defaults specified
191
- * in Rust, in the {@link bdk_ffi} crate.
192
- */
193
141
  new: (partial: Partial<DerivationInfo> & Required<Omit<DerivationInfo, never>>) => DerivationInfo;
194
- /**
195
- * Defaults specified in the {@link bdk_ffi} crate.
196
- */
197
142
  defaults: () => Partial<DerivationInfo>;
198
143
  }>;
199
144
  /**
@@ -210,19 +155,8 @@ export type KeychainInfo = {
210
155
  * Generated factory for {@link KeychainInfo} record objects.
211
156
  */
212
157
  export declare const KeychainInfo: Readonly<{
213
- /**
214
- * Create a frozen instance of {@link KeychainInfo}, with defaults specified
215
- * in Rust, in the {@link bdk_ffi} crate.
216
- */
217
158
  create: (partial: Partial<KeychainInfo> & Required<Omit<KeychainInfo, never>>) => KeychainInfo;
218
- /**
219
- * Create a frozen instance of {@link KeychainInfo}, with defaults specified
220
- * in Rust, in the {@link bdk_ffi} crate.
221
- */
222
159
  new: (partial: Partial<KeychainInfo> & Required<Omit<KeychainInfo, never>>) => KeychainInfo;
223
- /**
224
- * Defaults specified in the {@link bdk_ffi} crate.
225
- */
226
160
  defaults: () => Partial<KeychainInfo>;
227
161
  }>;
228
162
  /**
@@ -237,25 +171,14 @@ export type LocalOutput = {
237
171
  /**
238
172
  * None when the output is unconfirmed.
239
173
  */
240
- confirmationBlockTime: ConfirmationBlockTime | undefined;
174
+ confirmationBlockTime?: ConfirmationBlockTime;
241
175
  };
242
176
  /**
243
177
  * Generated factory for {@link LocalOutput} record objects.
244
178
  */
245
179
  export declare const LocalOutput: Readonly<{
246
- /**
247
- * Create a frozen instance of {@link LocalOutput}, with defaults specified
248
- * in Rust, in the {@link bdk_ffi} crate.
249
- */
250
- create: (partial: Partial<LocalOutput> & Required<Omit<LocalOutput, never>>) => LocalOutput;
251
- /**
252
- * Create a frozen instance of {@link LocalOutput}, with defaults specified
253
- * in Rust, in the {@link bdk_ffi} crate.
254
- */
255
- new: (partial: Partial<LocalOutput> & Required<Omit<LocalOutput, never>>) => LocalOutput;
256
- /**
257
- * Defaults specified in the {@link bdk_ffi} crate.
258
- */
180
+ create: (partial: Partial<LocalOutput> & Required<Omit<LocalOutput, "confirmationBlockTime">>) => LocalOutput;
181
+ new: (partial: Partial<LocalOutput> & Required<Omit<LocalOutput, "confirmationBlockTime">>) => LocalOutput;
259
182
  defaults: () => Partial<LocalOutput>;
260
183
  }>;
261
184
  /**
@@ -269,19 +192,8 @@ export type OutPoint = {
269
192
  * Generated factory for {@link OutPoint} record objects.
270
193
  */
271
194
  export declare const OutPoint: Readonly<{
272
- /**
273
- * Create a frozen instance of {@link OutPoint}, with defaults specified
274
- * in Rust, in the {@link bdk_ffi} crate.
275
- */
276
195
  create: (partial: Partial<OutPoint> & Required<Omit<OutPoint, never>>) => OutPoint;
277
- /**
278
- * Create a frozen instance of {@link OutPoint}, with defaults specified
279
- * in Rust, in the {@link bdk_ffi} crate.
280
- */
281
196
  new: (partial: Partial<OutPoint> & Required<Omit<OutPoint, never>>) => OutPoint;
282
- /**
283
- * Defaults specified in the {@link bdk_ffi} crate.
284
- */
285
197
  defaults: () => Partial<OutPoint>;
286
198
  }>;
287
199
  /**
@@ -298,19 +210,8 @@ export type Recipient = {
298
210
  * Generated factory for {@link Recipient} record objects.
299
211
  */
300
212
  export declare const Recipient: Readonly<{
301
- /**
302
- * Create a frozen instance of {@link Recipient}, with defaults specified
303
- * in Rust, in the {@link bdk_ffi} crate.
304
- */
305
213
  create: (partial: Partial<Recipient> & Required<Omit<Recipient, never>>) => Recipient;
306
- /**
307
- * Create a frozen instance of {@link Recipient}, with defaults specified
308
- * in Rust, in the {@link bdk_ffi} crate.
309
- */
310
214
  new: (partial: Partial<Recipient> & Required<Omit<Recipient, never>>) => Recipient;
311
- /**
312
- * Defaults specified in the {@link bdk_ffi} crate.
313
- */
314
215
  defaults: () => Partial<Recipient>;
315
216
  }>;
316
217
  /**
@@ -330,19 +231,8 @@ export type SentAndReceived = {
330
231
  * Generated factory for {@link SentAndReceived} record objects.
331
232
  */
332
233
  export declare const SentAndReceived: Readonly<{
333
- /**
334
- * Create a frozen instance of {@link SentAndReceived}, with defaults specified
335
- * in Rust, in the {@link bdk_ffi} crate.
336
- */
337
234
  create: (partial: Partial<SentAndReceived> & Required<Omit<SentAndReceived, never>>) => SentAndReceived;
338
- /**
339
- * Create a frozen instance of {@link SentAndReceived}, with defaults specified
340
- * in Rust, in the {@link bdk_ffi} crate.
341
- */
342
235
  new: (partial: Partial<SentAndReceived> & Required<Omit<SentAndReceived, never>>) => SentAndReceived;
343
- /**
344
- * Defaults specified in the {@link bdk_ffi} crate.
345
- */
346
236
  defaults: () => Partial<SentAndReceived>;
347
237
  }>;
348
238
  /**
@@ -361,11 +251,11 @@ export type TxDetails = {
361
251
  /**
362
252
  * Fee paid in satoshis. None if some inputs are unknown.
363
253
  */
364
- fee: /*u64*/ bigint | undefined;
254
+ fee?: bigint;
365
255
  /**
366
256
  * Fee rate in sat/vbyte. None if some inputs are unknown.
367
257
  */
368
- feeRate: /*f64*/ number | undefined;
258
+ feeRate?: number;
369
259
  /**
370
260
  * Net change to wallet balance in satoshis (positive = received more than sent).
371
261
  */
@@ -373,7 +263,7 @@ export type TxDetails = {
373
263
  /**
374
264
  * None when unconfirmed.
375
265
  */
376
- confirmationBlockTime: ConfirmationBlockTime | undefined;
266
+ confirmationBlockTime?: ConfirmationBlockTime;
377
267
  /**
378
268
  * The full serialized transaction as hex.
379
269
  */
@@ -383,19 +273,8 @@ export type TxDetails = {
383
273
  * Generated factory for {@link TxDetails} record objects.
384
274
  */
385
275
  export declare const TxDetails: Readonly<{
386
- /**
387
- * Create a frozen instance of {@link TxDetails}, with defaults specified
388
- * in Rust, in the {@link bdk_ffi} crate.
389
- */
390
- create: (partial: Partial<TxDetails> & Required<Omit<TxDetails, never>>) => TxDetails;
391
- /**
392
- * Create a frozen instance of {@link TxDetails}, with defaults specified
393
- * in Rust, in the {@link bdk_ffi} crate.
394
- */
395
- new: (partial: Partial<TxDetails> & Required<Omit<TxDetails, never>>) => TxDetails;
396
- /**
397
- * Defaults specified in the {@link bdk_ffi} crate.
398
- */
276
+ create: (partial: Partial<TxDetails> & Required<Omit<TxDetails, "confirmationBlockTime" | "fee" | "feeRate">>) => TxDetails;
277
+ new: (partial: Partial<TxDetails> & Required<Omit<TxDetails, "confirmationBlockTime" | "fee" | "feeRate">>) => TxDetails;
399
278
  defaults: () => Partial<TxDetails>;
400
279
  }>;
401
280
  /**
@@ -415,19 +294,8 @@ export type TxOut = {
415
294
  * Generated factory for {@link TxOut} record objects.
416
295
  */
417
296
  export declare const TxOut: Readonly<{
418
- /**
419
- * Create a frozen instance of {@link TxOut}, with defaults specified
420
- * in Rust, in the {@link bdk_ffi} crate.
421
- */
422
297
  create: (partial: Partial<TxOut> & Required<Omit<TxOut, never>>) => TxOut;
423
- /**
424
- * Create a frozen instance of {@link TxOut}, with defaults specified
425
- * in Rust, in the {@link bdk_ffi} crate.
426
- */
427
298
  new: (partial: Partial<TxOut> & Required<Omit<TxOut, never>>) => TxOut;
428
- /**
429
- * Defaults specified in the {@link bdk_ffi} crate.
430
- */
431
299
  defaults: () => Partial<TxOut>;
432
300
  }>;
433
301
  export declare enum BdkError_Tags {
@@ -2755,7 +2623,7 @@ export declare enum WordCount {
2755
2623
  * BIP-39 mnemonic phrase for key generation.
2756
2624
  * Backed by bdk_wallet::keys::bip39::Mnemonic (requires `keys-bip39` feature).
2757
2625
  */
2758
- export interface MnemonicInterface {
2626
+ export interface MnemonicLike {
2759
2627
  /**
2760
2628
  * The language of this mnemonic.
2761
2629
  */
@@ -2777,11 +2645,15 @@ export interface MnemonicInterface {
2777
2645
  */
2778
2646
  words(): Array<string>;
2779
2647
  }
2648
+ /**
2649
+ * @deprecated Use `MnemonicLike` instead.
2650
+ */
2651
+ export type MnemonicInterface = MnemonicLike;
2780
2652
  /**
2781
2653
  * BIP-39 mnemonic phrase for key generation.
2782
2654
  * Backed by bdk_wallet::keys::bip39::Mnemonic (requires `keys-bip39` feature).
2783
2655
  */
2784
- export declare class Mnemonic extends UniffiAbstractObject implements MnemonicInterface {
2656
+ export declare class Mnemonic extends UniffiAbstractObject implements MnemonicLike {
2785
2657
  readonly [uniffiTypeNameSymbol] = "Mnemonic";
2786
2658
  readonly [destructorGuardSymbol]: UniffiGcObject;
2787
2659
  readonly [pointerLiteralSymbol]: UniffiHandle;
@@ -2792,19 +2664,19 @@ export declare class Mnemonic extends UniffiAbstractObject implements MnemonicIn
2792
2664
  /**
2793
2665
  * Create a mnemonic from raw entropy bytes (16–32 bytes).
2794
2666
  */
2795
- static fromEntropy(entropy: Array</*u8*/ number>): MnemonicInterface;
2667
+ static fromEntropy(entropy: Array</*u8*/ number>): MnemonicLike;
2796
2668
  /**
2797
2669
  * Create a mnemonic from raw entropy bytes in a specific language.
2798
2670
  */
2799
- static fromEntropyIn(entropy: Array</*u8*/ number>, language: Language): MnemonicInterface;
2671
+ static fromEntropyIn(entropy: Array</*u8*/ number>, language: Language): MnemonicLike;
2800
2672
  /**
2801
2673
  * Parse an existing mnemonic string (auto-detects language).
2802
2674
  */
2803
- static fromString(mnemonic: string): MnemonicInterface;
2675
+ static fromString(mnemonic: string): MnemonicLike;
2804
2676
  /**
2805
2677
  * Parse a mnemonic string in a specific language.
2806
2678
  */
2807
- static fromStringIn(mnemonic: string, language: Language): MnemonicInterface;
2679
+ static fromStringIn(mnemonic: string, language: Language): MnemonicLike;
2808
2680
  /**
2809
2681
  * The language of this mnemonic.
2810
2682
  */
@@ -2835,7 +2707,7 @@ export declare class Mnemonic extends UniffiAbstractObject implements MnemonicIn
2835
2707
  * A Partially Signed Bitcoin Transaction (BIP-174 / BIP-370).
2836
2708
  * Mirrors bitcoin::Psbt with added PsbtUtils trait methods.
2837
2709
  */
2838
- export interface PsbtInterface {
2710
+ export interface PsbtLike {
2839
2711
  /**
2840
2712
  * Extract the fully-signed transaction as raw hex.
2841
2713
  * Only valid after all inputs are finalized.
@@ -2865,11 +2737,15 @@ export interface PsbtInterface {
2865
2737
  */
2866
2738
  txid(): string;
2867
2739
  }
2740
+ /**
2741
+ * @deprecated Use `PsbtLike` instead.
2742
+ */
2743
+ export type PsbtInterface = PsbtLike;
2868
2744
  /**
2869
2745
  * A Partially Signed Bitcoin Transaction (BIP-174 / BIP-370).
2870
2746
  * Mirrors bitcoin::Psbt with added PsbtUtils trait methods.
2871
2747
  */
2872
- export declare class Psbt extends UniffiAbstractObject implements PsbtInterface {
2748
+ export declare class Psbt extends UniffiAbstractObject implements PsbtLike {
2873
2749
  readonly [uniffiTypeNameSymbol] = "Psbt";
2874
2750
  readonly [destructorGuardSymbol]: UniffiGcObject;
2875
2751
  readonly [pointerLiteralSymbol]: UniffiHandle;
@@ -2916,7 +2792,7 @@ export declare class Psbt extends UniffiAbstractObject implements PsbtInterface
2916
2792
  * Create one, configure it, then call finish(wallet) to produce a PSBT.
2917
2793
  * Mirrors bdk_wallet::TxBuilder (without lifetime / generic coin selection).
2918
2794
  */
2919
- export interface TxBuilderInterface {
2795
+ export interface TxBuilderLike {
2920
2796
  /**
2921
2797
  * Attach OP_RETURN data to the transaction.
2922
2798
  */
@@ -2993,7 +2869,7 @@ export interface TxBuilderInterface {
2993
2869
  * Build the transaction into a PSBT. The wallet is used for coin
2994
2870
  * selection and script resolution — the PSBT is NOT signed here.
2995
2871
  */
2996
- finish(wallet: WalletInterface): PsbtInterface;
2872
+ finish(wallet: WalletLike): PsbtLike;
2997
2873
  /**
2998
2874
  * Include the redeemScript / witnessScript in PSBT outputs.
2999
2875
  */
@@ -3044,12 +2920,16 @@ export interface TxBuilderInterface {
3044
2920
  */
3045
2921
  unspendable(outpoints: Array<OutPoint>): void;
3046
2922
  }
2923
+ /**
2924
+ * @deprecated Use `TxBuilderLike` instead.
2925
+ */
2926
+ export type TxBuilderInterface = TxBuilderLike;
3047
2927
  /**
3048
2928
  * Fluent builder for constructing Bitcoin transactions.
3049
2929
  * Create one, configure it, then call finish(wallet) to produce a PSBT.
3050
2930
  * Mirrors bdk_wallet::TxBuilder (without lifetime / generic coin selection).
3051
2931
  */
3052
- export declare class TxBuilder extends UniffiAbstractObject implements TxBuilderInterface {
2932
+ export declare class TxBuilder extends UniffiAbstractObject implements TxBuilderLike {
3053
2933
  readonly [uniffiTypeNameSymbol] = "TxBuilder";
3054
2934
  readonly [destructorGuardSymbol]: UniffiGcObject;
3055
2935
  readonly [pointerLiteralSymbol]: UniffiHandle;
@@ -3130,7 +3010,7 @@ export declare class TxBuilder extends UniffiAbstractObject implements TxBuilder
3130
3010
  * Build the transaction into a PSBT. The wallet is used for coin
3131
3011
  * selection and script resolution — the PSBT is NOT signed here.
3132
3012
  */
3133
- finish(wallet: WalletInterface): PsbtInterface;
3013
+ finish(wallet: WalletLike): PsbtLike;
3134
3014
  /**
3135
3015
  * Include the redeemScript / witnessScript in PSBT outputs.
3136
3016
  */
@@ -3186,22 +3066,24 @@ export declare class TxBuilder extends UniffiAbstractObject implements TxBuilder
3186
3066
  uniffiDestroy(): void;
3187
3067
  static instanceOf(obj: any): obj is TxBuilder;
3188
3068
  }
3189
- export interface WalletInterface {
3069
+ export interface WalletLike {
3190
3070
  /**
3191
3071
  * Broadcast a finalized PSBT via Electrum. Returns the txid.
3192
3072
  */
3193
- broadcastWithElectrum(url: string, psbt: PsbtInterface): string;
3073
+ broadcastWithElectrum(url: string, psbt: PsbtLike, asyncOpts_?: {
3074
+ signal: AbortSignal;
3075
+ }): Promise<string>;
3194
3076
  /**
3195
3077
  * Broadcast a finalized PSBT via Esplora. Returns the txid.
3196
3078
  */
3197
- broadcastWithEsplora(url: string, psbt: PsbtInterface, asyncOpts_?: {
3079
+ broadcastWithEsplora(url: string, psbt: PsbtLike, asyncOpts_?: {
3198
3080
  signal: AbortSignal;
3199
3081
  }): Promise<string>;
3200
3082
  /**
3201
3083
  * Build an RBF fee-bump PSBT for an unconfirmed transaction.
3202
3084
  * Mirrors Wallet::build_fee_bump().
3203
3085
  */
3204
- buildFeeBump(txid: string, newFeeRate: number): PsbtInterface;
3086
+ buildFeeBump(txid: string, newFeeRate: number): PsbtLike;
3205
3087
  /**
3206
3088
  * Calculate the fee paid by a raw transaction (hex). Returns satoshis.
3207
3089
  * Mirrors Wallet::calculate_fee().
@@ -3249,11 +3131,13 @@ export interface WalletInterface {
3249
3131
  * Returns true if fully finalized.
3250
3132
  * Mirrors Wallet::finalize_psbt() with default SignOptions.
3251
3133
  */
3252
- finalizePsbt(psbt: PsbtInterface): boolean;
3134
+ finalizePsbt(psbt: PsbtLike): boolean;
3253
3135
  /**
3254
3136
  * Full scan via an Electrum TCP/TLS server.
3255
3137
  */
3256
- fullScanWithElectrum(url: string, stopGap: bigint): void;
3138
+ fullScanWithElectrum(url: string, stopGap: bigint, asyncOpts_?: {
3139
+ signal: AbortSignal;
3140
+ }): Promise<void>;
3257
3141
  /**
3258
3142
  * Full scan via an Esplora HTTP server (discovers all used addresses).
3259
3143
  * Uses Wallet::start_full_scan() + bdk_esplora client internally.
@@ -3377,11 +3261,13 @@ export interface WalletInterface {
3377
3261
  * Returns true if the PSBT is fully finalized after signing.
3378
3262
  * Mirrors Wallet::sign() with default SignOptions.
3379
3263
  */
3380
- sign(psbt: PsbtInterface): boolean;
3264
+ sign(psbt: PsbtLike): boolean;
3381
3265
  /**
3382
3266
  * Incremental sync via Electrum.
3383
3267
  */
3384
- syncWithElectrum(url: string, stopGap: bigint): void;
3268
+ syncWithElectrum(url: string, stopGap: bigint, asyncOpts_?: {
3269
+ signal: AbortSignal;
3270
+ }): Promise<void>;
3385
3271
  /**
3386
3272
  * Incremental sync via Esplora (only checks revealed SPKs + UTXOs + unconfirmed).
3387
3273
  * Uses Wallet::start_sync_with_revealed_spks() + bdk_esplora client internally.
@@ -3405,7 +3291,11 @@ export interface WalletInterface {
3405
3291
  */
3406
3292
  unmarkUsed(keychain: KeychainKind, index: number): boolean;
3407
3293
  }
3408
- export declare class Wallet extends UniffiAbstractObject implements WalletInterface {
3294
+ /**
3295
+ * @deprecated Use `WalletLike` instead.
3296
+ */
3297
+ export type WalletInterface = WalletLike;
3298
+ export declare class Wallet extends UniffiAbstractObject implements WalletLike {
3409
3299
  readonly [uniffiTypeNameSymbol] = "Wallet";
3410
3300
  readonly [destructorGuardSymbol]: UniffiGcObject;
3411
3301
  readonly [pointerLiteralSymbol]: UniffiHandle;
@@ -3418,18 +3308,20 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3418
3308
  /**
3419
3309
  * Broadcast a finalized PSBT via Electrum. Returns the txid.
3420
3310
  */
3421
- broadcastWithElectrum(url: string, psbt: PsbtInterface): string;
3311
+ broadcastWithElectrum(url: string, psbt: PsbtLike, asyncOpts_?: {
3312
+ signal: AbortSignal;
3313
+ }): Promise<string>;
3422
3314
  /**
3423
3315
  * Broadcast a finalized PSBT via Esplora. Returns the txid.
3424
3316
  */
3425
- broadcastWithEsplora(url: string, psbt: PsbtInterface, asyncOpts_?: {
3317
+ broadcastWithEsplora(url: string, psbt: PsbtLike, asyncOpts_?: {
3426
3318
  signal: AbortSignal;
3427
3319
  }): Promise<string>;
3428
3320
  /**
3429
3321
  * Build an RBF fee-bump PSBT for an unconfirmed transaction.
3430
3322
  * Mirrors Wallet::build_fee_bump().
3431
3323
  */
3432
- buildFeeBump(txid: string, newFeeRate: number): PsbtInterface;
3324
+ buildFeeBump(txid: string, newFeeRate: number): PsbtLike;
3433
3325
  /**
3434
3326
  * Calculate the fee paid by a raw transaction (hex). Returns satoshis.
3435
3327
  * Mirrors Wallet::calculate_fee().
@@ -3477,11 +3369,13 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3477
3369
  * Returns true if fully finalized.
3478
3370
  * Mirrors Wallet::finalize_psbt() with default SignOptions.
3479
3371
  */
3480
- finalizePsbt(psbt: PsbtInterface): boolean;
3372
+ finalizePsbt(psbt: PsbtLike): boolean;
3481
3373
  /**
3482
3374
  * Full scan via an Electrum TCP/TLS server.
3483
3375
  */
3484
- fullScanWithElectrum(url: string, stopGap: bigint): void;
3376
+ fullScanWithElectrum(url: string, stopGap: bigint, asyncOpts_?: {
3377
+ signal: AbortSignal;
3378
+ }): Promise<void>;
3485
3379
  /**
3486
3380
  * Full scan via an Esplora HTTP server (discovers all used addresses).
3487
3381
  * Uses Wallet::start_full_scan() + bdk_esplora client internally.
@@ -3605,11 +3499,13 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3605
3499
  * Returns true if the PSBT is fully finalized after signing.
3606
3500
  * Mirrors Wallet::sign() with default SignOptions.
3607
3501
  */
3608
- sign(psbt: PsbtInterface): boolean;
3502
+ sign(psbt: PsbtLike): boolean;
3609
3503
  /**
3610
3504
  * Incremental sync via Electrum.
3611
3505
  */
3612
- syncWithElectrum(url: string, stopGap: bigint): void;
3506
+ syncWithElectrum(url: string, stopGap: bigint, asyncOpts_?: {
3507
+ signal: AbortSignal;
3508
+ }): Promise<void>;
3613
3509
  /**
3614
3510
  * Incremental sync via Esplora (only checks revealed SPKs + UTXOs + unconfirmed).
3615
3511
  * Uses Wallet::start_sync_with_revealed_spks() + bdk_esplora client internally.
@@ -3736,7 +3632,7 @@ declare const _default: Readonly<{
3736
3632
  lift(value: UniffiByteArray): LocalOutput;
3737
3633
  lower(value: LocalOutput): UniffiByteArray;
3738
3634
  };
3739
- FfiConverterTypeMnemonic: FfiConverterObject<MnemonicInterface>;
3635
+ FfiConverterTypeMnemonic: FfiConverterObject<MnemonicLike>;
3740
3636
  FfiConverterTypeNetwork: {
3741
3637
  read(from: RustBuffer): Network;
3742
3638
  write(value: Network, into: RustBuffer): void;
@@ -3751,7 +3647,7 @@ declare const _default: Readonly<{
3751
3647
  lift(value: UniffiByteArray): OutPoint;
3752
3648
  lower(value: OutPoint): UniffiByteArray;
3753
3649
  };
3754
- FfiConverterTypePsbt: FfiConverterObject<PsbtInterface>;
3650
+ FfiConverterTypePsbt: FfiConverterObject<PsbtLike>;
3755
3651
  FfiConverterTypeRecipient: {
3756
3652
  read(from: RustBuffer): Recipient;
3757
3653
  write(value: Recipient, into: RustBuffer): void;
@@ -3773,7 +3669,7 @@ declare const _default: Readonly<{
3773
3669
  lift(value: UniffiByteArray): SingleKeyDescriptorTemplate;
3774
3670
  lower(value: SingleKeyDescriptorTemplate): UniffiByteArray;
3775
3671
  };
3776
- FfiConverterTypeTxBuilder: FfiConverterObject<TxBuilderInterface>;
3672
+ FfiConverterTypeTxBuilder: FfiConverterObject<TxBuilderLike>;
3777
3673
  FfiConverterTypeTxDetails: {
3778
3674
  read(from: RustBuffer): TxDetails;
3779
3675
  write(value: TxDetails, into: RustBuffer): void;
@@ -3795,7 +3691,7 @@ declare const _default: Readonly<{
3795
3691
  lift(value: UniffiByteArray): TxOut;
3796
3692
  lower(value: TxOut): UniffiByteArray;
3797
3693
  };
3798
- FfiConverterTypeWallet: FfiConverterObject<WalletInterface>;
3694
+ FfiConverterTypeWallet: FfiConverterObject<WalletLike>;
3799
3695
  FfiConverterTypeWalletEvent: {
3800
3696
  read(from: RustBuffer): WalletEvent;
3801
3697
  write(value: WalletEvent, into: RustBuffer): void;