@secondts/bark-react-native 0.3.3 → 0.4.1

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.
Files changed (27) hide show
  1. package/BarkReactNative.podspec +3 -3
  2. package/README.md +1 -1
  3. package/cpp/generated/bark.cpp +36 -0
  4. package/cpp/generated/bark.hpp +2 -0
  5. package/lib/commonjs/generated/bark-ffi.js.map +1 -1
  6. package/lib/commonjs/generated/bark.js +143 -355
  7. package/lib/commonjs/generated/bark.js.map +1 -1
  8. package/lib/module/generated/bark-ffi.js.map +1 -1
  9. package/lib/module/generated/bark.js +143 -355
  10. package/lib/module/generated/bark.js.map +1 -1
  11. package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +2 -0
  12. package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
  13. package/lib/typescript/commonjs/src/generated/bark.d.ts +105 -316
  14. package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
  15. package/lib/typescript/module/src/generated/bark-ffi.d.ts +2 -0
  16. package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
  17. package/lib/typescript/module/src/generated/bark.d.ts +105 -316
  18. package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
  19. package/package.json +11 -5
  20. package/src/generated/bark-ffi.ts +5 -0
  21. package/src/generated/bark.ts +596 -722
  22. package/ios/generated/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -2321
  23. package/ios/generated/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h +0 -2761
  24. package/ios/generated/build/generated/ios/FBReactNativeSpecJSI-generated.cpp +0 -2923
  25. package/ios/generated/build/generated/ios/FBReactNativeSpecJSI.h +0 -7718
  26. package/ios/generated/build/generated/ios/RCTModulesConformingToProtocolsProvider.h +0 -18
  27. package/ios/generated/build/generated/ios/RCTModulesConformingToProtocolsProvider.mm +0 -33
@@ -111,19 +111,8 @@ export type AddressWithIndex = {
111
111
  * Generated factory for {@link AddressWithIndex} record objects.
112
112
  */
113
113
  export declare const AddressWithIndex: Readonly<{
114
- /**
115
- * Create a frozen instance of {@link AddressWithIndex}, with defaults specified
116
- * in Rust, in the {@link bark} crate.
117
- */
118
114
  create: (partial: Partial<AddressWithIndex> & Required<Omit<AddressWithIndex, never>>) => AddressWithIndex;
119
- /**
120
- * Create a frozen instance of {@link AddressWithIndex}, with defaults specified
121
- * in Rust, in the {@link bark} crate.
122
- */
123
115
  new: (partial: Partial<AddressWithIndex> & Required<Omit<AddressWithIndex, never>>) => AddressWithIndex;
124
- /**
125
- * Defaults specified in the {@link bark} crate.
126
- */
127
116
  defaults: () => Partial<AddressWithIndex>;
128
117
  }>;
129
118
  /**
@@ -165,7 +154,7 @@ export type ArkInfo = {
165
154
  /**
166
155
  * Maximum amount of a VTXO in sats (null if no limit)
167
156
  */
168
- maxVtxoAmountSats: /*u64*/ bigint | undefined;
157
+ maxVtxoAmountSats?: bigint;
169
158
  /**
170
159
  * The number of confirmations required to register a board vtxo
171
160
  */
@@ -197,19 +186,8 @@ export type ArkInfo = {
197
186
  * Generated factory for {@link ArkInfo} record objects.
198
187
  */
199
188
  export declare const ArkInfo: Readonly<{
200
- /**
201
- * Create a frozen instance of {@link ArkInfo}, with defaults specified
202
- * in Rust, in the {@link bark} crate.
203
- */
204
- create: (partial: Partial<ArkInfo> & Required<Omit<ArkInfo, never>>) => ArkInfo;
205
- /**
206
- * Create a frozen instance of {@link ArkInfo}, with defaults specified
207
- * in Rust, in the {@link bark} crate.
208
- */
209
- new: (partial: Partial<ArkInfo> & Required<Omit<ArkInfo, never>>) => ArkInfo;
210
- /**
211
- * Defaults specified in the {@link bark} crate.
212
- */
189
+ create: (partial: Partial<ArkInfo> & Required<Omit<ArkInfo, "maxVtxoAmountSats">>) => ArkInfo;
190
+ new: (partial: Partial<ArkInfo> & Required<Omit<ArkInfo, "maxVtxoAmountSats">>) => ArkInfo;
213
191
  defaults: () => Partial<ArkInfo>;
214
192
  }>;
215
193
  /**
@@ -247,19 +225,8 @@ export type Balance = {
247
225
  * Generated factory for {@link Balance} record objects.
248
226
  */
249
227
  export declare const Balance: Readonly<{
250
- /**
251
- * Create a frozen instance of {@link Balance}, with defaults specified
252
- * in Rust, in the {@link bark} crate.
253
- */
254
228
  create: (partial: Partial<Balance> & Required<Omit<Balance, never>>) => Balance;
255
- /**
256
- * Create a frozen instance of {@link Balance}, with defaults specified
257
- * in Rust, in the {@link bark} crate.
258
- */
259
229
  new: (partial: Partial<Balance> & Required<Omit<Balance, never>>) => Balance;
260
- /**
261
- * Defaults specified in the {@link bark} crate.
262
- */
263
230
  defaults: () => Partial<Balance>;
264
231
  }>;
265
232
  /**
@@ -273,19 +240,8 @@ export type BlockRef = {
273
240
  * Generated factory for {@link BlockRef} record objects.
274
241
  */
275
242
  export declare const BlockRef: Readonly<{
276
- /**
277
- * Create a frozen instance of {@link BlockRef}, with defaults specified
278
- * in Rust, in the {@link bark} crate.
279
- */
280
243
  create: (partial: Partial<BlockRef> & Required<Omit<BlockRef, never>>) => BlockRef;
281
- /**
282
- * Create a frozen instance of {@link BlockRef}, with defaults specified
283
- * in Rust, in the {@link bark} crate.
284
- */
285
244
  new: (partial: Partial<BlockRef> & Required<Omit<BlockRef, never>>) => BlockRef;
286
- /**
287
- * Defaults specified in the {@link bark} crate.
288
- */
289
245
  defaults: () => Partial<BlockRef>;
290
246
  }>;
291
247
  /**
@@ -296,26 +252,30 @@ export type Config = {
296
252
  * Ark server address
297
253
  */
298
254
  serverAddress: string;
255
+ /**
256
+ * Access token for private Ark servers (sent as `ark-access-token` HTTP header)
257
+ */
258
+ serverAccessToken?: string;
299
259
  /**
300
260
  * Esplora HTTP REST server address
301
261
  */
302
- esploraAddress: string | undefined;
262
+ esploraAddress?: string;
303
263
  /**
304
264
  * Bitcoind RPC server address
305
265
  */
306
- bitcoindAddress: string | undefined;
266
+ bitcoindAddress?: string;
307
267
  /**
308
268
  * Bitcoind RPC cookie file path
309
269
  */
310
- bitcoindCookiefile: string | undefined;
270
+ bitcoindCookiefile?: string;
311
271
  /**
312
272
  * Bitcoind RPC username
313
273
  */
314
- bitcoindUser: string | undefined;
274
+ bitcoindUser?: string;
315
275
  /**
316
276
  * Bitcoind RPC password
317
277
  */
318
- bitcoindPass: string | undefined;
278
+ bitcoindPass?: string;
319
279
  /**
320
280
  * Bitcoin network
321
281
  */
@@ -323,49 +283,38 @@ export type Config = {
323
283
  /**
324
284
  * Number of blocks before expiration to refresh VTXOs
325
285
  */
326
- vtxoRefreshExpiryThreshold: /*u32*/ number | undefined;
286
+ vtxoRefreshExpiryThreshold?: number;
327
287
  /**
328
288
  * Upper limit of blocks needed to safely exit VTXOs
329
289
  */
330
- vtxoExitMargin: /*u16*/ number | undefined;
290
+ vtxoExitMargin?: number;
331
291
  /**
332
292
  * Number of blocks to claim a HTLC-recv VTXO
333
293
  */
334
- htlcRecvClaimDelta: /*u16*/ number | undefined;
294
+ htlcRecvClaimDelta?: number;
335
295
  /**
336
296
  * Fallback fee rate in sat/kWu
337
297
  */
338
- fallbackFeeRate: /*u64*/ bigint | undefined;
298
+ fallbackFeeRate?: bigint;
339
299
  /**
340
300
  * Confirmations required before considering a round tx fully confirmed
341
301
  */
342
- roundTxRequiredConfirmations: /*u32*/ number | undefined;
302
+ roundTxRequiredConfirmations?: number;
343
303
  /**
344
304
  * Fast sync interval for daemon tasks (lightning sync) in seconds
345
305
  */
346
- daemonFastSyncIntervalSecs: /*u64*/ bigint | undefined;
306
+ daemonFastSyncIntervalSecs?: bigint;
347
307
  /**
348
308
  * Slow sync interval for daemon tasks (onchain, exits, boards, etc.) in seconds
349
309
  */
350
- daemonSlowSyncIntervalSecs: /*u64*/ bigint | undefined;
310
+ daemonSlowSyncIntervalSecs?: bigint;
351
311
  };
352
312
  /**
353
313
  * Generated factory for {@link Config} record objects.
354
314
  */
355
315
  export declare const Config: Readonly<{
356
- /**
357
- * Create a frozen instance of {@link Config}, with defaults specified
358
- * in Rust, in the {@link bark} crate.
359
- */
360
- create: (partial: Partial<Config> & Required<Omit<Config, never>>) => Config;
361
- /**
362
- * Create a frozen instance of {@link Config}, with defaults specified
363
- * in Rust, in the {@link bark} crate.
364
- */
365
- new: (partial: Partial<Config> & Required<Omit<Config, never>>) => Config;
366
- /**
367
- * Defaults specified in the {@link bark} crate.
368
- */
316
+ create: (partial: Partial<Config> & Required<Omit<Config, "serverAccessToken" | "esploraAddress" | "bitcoindAddress" | "bitcoindCookiefile" | "bitcoindUser" | "bitcoindPass" | "vtxoRefreshExpiryThreshold" | "vtxoExitMargin" | "htlcRecvClaimDelta" | "fallbackFeeRate" | "roundTxRequiredConfirmations" | "daemonFastSyncIntervalSecs" | "daemonSlowSyncIntervalSecs">>) => Config;
317
+ new: (partial: Partial<Config> & Required<Omit<Config, "serverAccessToken" | "esploraAddress" | "bitcoindAddress" | "bitcoindCookiefile" | "bitcoindUser" | "bitcoindPass" | "vtxoRefreshExpiryThreshold" | "vtxoExitMargin" | "htlcRecvClaimDelta" | "fallbackFeeRate" | "roundTxRequiredConfirmations" | "daemonFastSyncIntervalSecs" | "daemonSlowSyncIntervalSecs">>) => Config;
369
318
  defaults: () => Partial<Config>;
370
319
  }>;
371
320
  /**
@@ -387,25 +336,14 @@ export type CpfpParams = {
387
336
  /**
388
337
  * Current package fee in sats (only required for RBF)
389
338
  */
390
- currentPackageFeeSats: /*u64*/ bigint | undefined;
339
+ currentPackageFeeSats?: bigint;
391
340
  };
392
341
  /**
393
342
  * Generated factory for {@link CpfpParams} record objects.
394
343
  */
395
344
  export declare const CpfpParams: Readonly<{
396
- /**
397
- * Create a frozen instance of {@link CpfpParams}, with defaults specified
398
- * in Rust, in the {@link bark} crate.
399
- */
400
- create: (partial: Partial<CpfpParams> & Required<Omit<CpfpParams, never>>) => CpfpParams;
401
- /**
402
- * Create a frozen instance of {@link CpfpParams}, with defaults specified
403
- * in Rust, in the {@link bark} crate.
404
- */
405
- new: (partial: Partial<CpfpParams> & Required<Omit<CpfpParams, never>>) => CpfpParams;
406
- /**
407
- * Defaults specified in the {@link bark} crate.
408
- */
345
+ create: (partial: Partial<CpfpParams> & Required<Omit<CpfpParams, "currentPackageFeeSats">>) => CpfpParams;
346
+ new: (partial: Partial<CpfpParams> & Required<Omit<CpfpParams, "currentPackageFeeSats">>) => CpfpParams;
409
347
  defaults: () => Partial<CpfpParams>;
410
348
  }>;
411
349
  /**
@@ -419,19 +357,8 @@ export type Destination = {
419
357
  * Generated factory for {@link Destination} record objects.
420
358
  */
421
359
  export declare const Destination: Readonly<{
422
- /**
423
- * Create a frozen instance of {@link Destination}, with defaults specified
424
- * in Rust, in the {@link bark} crate.
425
- */
426
360
  create: (partial: Partial<Destination> & Required<Omit<Destination, never>>) => Destination;
427
- /**
428
- * Create a frozen instance of {@link Destination}, with defaults specified
429
- * in Rust, in the {@link bark} crate.
430
- */
431
361
  new: (partial: Partial<Destination> & Required<Omit<Destination, never>>) => Destination;
432
- /**
433
- * Defaults specified in the {@link bark} crate.
434
- */
435
362
  defaults: () => Partial<Destination>;
436
363
  }>;
437
364
  /**
@@ -451,19 +378,8 @@ export type ExitClaimTransaction = {
451
378
  * Generated factory for {@link ExitClaimTransaction} record objects.
452
379
  */
453
380
  export declare const ExitClaimTransaction: Readonly<{
454
- /**
455
- * Create a frozen instance of {@link ExitClaimTransaction}, with defaults specified
456
- * in Rust, in the {@link bark} crate.
457
- */
458
381
  create: (partial: Partial<ExitClaimTransaction> & Required<Omit<ExitClaimTransaction, never>>) => ExitClaimTransaction;
459
- /**
460
- * Create a frozen instance of {@link ExitClaimTransaction}, with defaults specified
461
- * in Rust, in the {@link bark} crate.
462
- */
463
382
  new: (partial: Partial<ExitClaimTransaction> & Required<Omit<ExitClaimTransaction, never>>) => ExitClaimTransaction;
464
- /**
465
- * Defaults specified in the {@link bark} crate.
466
- */
467
383
  defaults: () => Partial<ExitClaimTransaction>;
468
384
  }>;
469
385
  /**
@@ -481,25 +397,14 @@ export type ExitProgressStatus = {
481
397
  /**
482
398
  * Error if any occurred
483
399
  */
484
- error: string | undefined;
400
+ error?: string;
485
401
  };
486
402
  /**
487
403
  * Generated factory for {@link ExitProgressStatus} record objects.
488
404
  */
489
405
  export declare const ExitProgressStatus: Readonly<{
490
- /**
491
- * Create a frozen instance of {@link ExitProgressStatus}, with defaults specified
492
- * in Rust, in the {@link bark} crate.
493
- */
494
- create: (partial: Partial<ExitProgressStatus> & Required<Omit<ExitProgressStatus, never>>) => ExitProgressStatus;
495
- /**
496
- * Create a frozen instance of {@link ExitProgressStatus}, with defaults specified
497
- * in Rust, in the {@link bark} crate.
498
- */
499
- new: (partial: Partial<ExitProgressStatus> & Required<Omit<ExitProgressStatus, never>>) => ExitProgressStatus;
500
- /**
501
- * Defaults specified in the {@link bark} crate.
502
- */
406
+ create: (partial: Partial<ExitProgressStatus> & Required<Omit<ExitProgressStatus, "error">>) => ExitProgressStatus;
407
+ new: (partial: Partial<ExitProgressStatus> & Required<Omit<ExitProgressStatus, "error">>) => ExitProgressStatus;
503
408
  defaults: () => Partial<ExitProgressStatus>;
504
409
  }>;
505
410
  /**
@@ -517,7 +422,7 @@ export type ExitTransactionStatus = {
517
422
  /**
518
423
  * State history (if requested)
519
424
  */
520
- history: Array<string> | undefined;
425
+ history?: Array<string>;
521
426
  /**
522
427
  * Number of transactions
523
428
  */
@@ -527,19 +432,8 @@ export type ExitTransactionStatus = {
527
432
  * Generated factory for {@link ExitTransactionStatus} record objects.
528
433
  */
529
434
  export declare const ExitTransactionStatus: Readonly<{
530
- /**
531
- * Create a frozen instance of {@link ExitTransactionStatus}, with defaults specified
532
- * in Rust, in the {@link bark} crate.
533
- */
534
- create: (partial: Partial<ExitTransactionStatus> & Required<Omit<ExitTransactionStatus, never>>) => ExitTransactionStatus;
535
- /**
536
- * Create a frozen instance of {@link ExitTransactionStatus}, with defaults specified
537
- * in Rust, in the {@link bark} crate.
538
- */
539
- new: (partial: Partial<ExitTransactionStatus> & Required<Omit<ExitTransactionStatus, never>>) => ExitTransactionStatus;
540
- /**
541
- * Defaults specified in the {@link bark} crate.
542
- */
435
+ create: (partial: Partial<ExitTransactionStatus> & Required<Omit<ExitTransactionStatus, "history">>) => ExitTransactionStatus;
436
+ new: (partial: Partial<ExitTransactionStatus> & Required<Omit<ExitTransactionStatus, "history">>) => ExitTransactionStatus;
543
437
  defaults: () => Partial<ExitTransactionStatus>;
544
438
  }>;
545
439
  /**
@@ -567,19 +461,8 @@ export type ExitVtxo = {
567
461
  * Generated factory for {@link ExitVtxo} record objects.
568
462
  */
569
463
  export declare const ExitVtxo: Readonly<{
570
- /**
571
- * Create a frozen instance of {@link ExitVtxo}, with defaults specified
572
- * in Rust, in the {@link bark} crate.
573
- */
574
464
  create: (partial: Partial<ExitVtxo> & Required<Omit<ExitVtxo, never>>) => ExitVtxo;
575
- /**
576
- * Create a frozen instance of {@link ExitVtxo}, with defaults specified
577
- * in Rust, in the {@link bark} crate.
578
- */
579
465
  new: (partial: Partial<ExitVtxo> & Required<Omit<ExitVtxo, never>>) => ExitVtxo;
580
- /**
581
- * Defaults specified in the {@link bark} crate.
582
- */
583
466
  defaults: () => Partial<ExitVtxo>;
584
467
  }>;
585
468
  /**
@@ -609,19 +492,8 @@ export type FeeEstimate = {
609
492
  * Generated factory for {@link FeeEstimate} record objects.
610
493
  */
611
494
  export declare const FeeEstimate: Readonly<{
612
- /**
613
- * Create a frozen instance of {@link FeeEstimate}, with defaults specified
614
- * in Rust, in the {@link bark} crate.
615
- */
616
495
  create: (partial: Partial<FeeEstimate> & Required<Omit<FeeEstimate, never>>) => FeeEstimate;
617
- /**
618
- * Create a frozen instance of {@link FeeEstimate}, with defaults specified
619
- * in Rust, in the {@link bark} crate.
620
- */
621
496
  new: (partial: Partial<FeeEstimate> & Required<Omit<FeeEstimate, never>>) => FeeEstimate;
622
- /**
623
- * Defaults specified in the {@link bark} crate.
624
- */
625
497
  defaults: () => Partial<FeeEstimate>;
626
498
  }>;
627
499
  /**
@@ -641,19 +513,8 @@ export type LightningInvoice = {
641
513
  * Generated factory for {@link LightningInvoice} record objects.
642
514
  */
643
515
  export declare const LightningInvoice: Readonly<{
644
- /**
645
- * Create a frozen instance of {@link LightningInvoice}, with defaults specified
646
- * in Rust, in the {@link bark} crate.
647
- */
648
516
  create: (partial: Partial<LightningInvoice> & Required<Omit<LightningInvoice, never>>) => LightningInvoice;
649
- /**
650
- * Create a frozen instance of {@link LightningInvoice}, with defaults specified
651
- * in Rust, in the {@link bark} crate.
652
- */
653
517
  new: (partial: Partial<LightningInvoice> & Required<Omit<LightningInvoice, never>>) => LightningInvoice;
654
- /**
655
- * Defaults specified in the {@link bark} crate.
656
- */
657
518
  defaults: () => Partial<LightningInvoice>;
658
519
  }>;
659
520
  /**
@@ -685,19 +546,8 @@ export type LightningReceive = {
685
546
  * Generated factory for {@link LightningReceive} record objects.
686
547
  */
687
548
  export declare const LightningReceive: Readonly<{
688
- /**
689
- * Create a frozen instance of {@link LightningReceive}, with defaults specified
690
- * in Rust, in the {@link bark} crate.
691
- */
692
549
  create: (partial: Partial<LightningReceive> & Required<Omit<LightningReceive, never>>) => LightningReceive;
693
- /**
694
- * Create a frozen instance of {@link LightningReceive}, with defaults specified
695
- * in Rust, in the {@link bark} crate.
696
- */
697
550
  new: (partial: Partial<LightningReceive> & Required<Omit<LightningReceive, never>>) => LightningReceive;
698
- /**
699
- * Defaults specified in the {@link bark} crate.
700
- */
701
551
  defaults: () => Partial<LightningReceive>;
702
552
  }>;
703
553
  /**
@@ -719,25 +569,14 @@ export type LightningSend = {
719
569
  /**
720
570
  * Payment preimage (only present if payment completed)
721
571
  */
722
- preimage: string | undefined;
572
+ preimage?: string;
723
573
  };
724
574
  /**
725
575
  * Generated factory for {@link LightningSend} record objects.
726
576
  */
727
577
  export declare const LightningSend: Readonly<{
728
- /**
729
- * Create a frozen instance of {@link LightningSend}, with defaults specified
730
- * in Rust, in the {@link bark} crate.
731
- */
732
- create: (partial: Partial<LightningSend> & Required<Omit<LightningSend, never>>) => LightningSend;
733
- /**
734
- * Create a frozen instance of {@link LightningSend}, with defaults specified
735
- * in Rust, in the {@link bark} crate.
736
- */
737
- new: (partial: Partial<LightningSend> & Required<Omit<LightningSend, never>>) => LightningSend;
738
- /**
739
- * Defaults specified in the {@link bark} crate.
740
- */
578
+ create: (partial: Partial<LightningSend> & Required<Omit<LightningSend, "preimage">>) => LightningSend;
579
+ new: (partial: Partial<LightningSend> & Required<Omit<LightningSend, "preimage">>) => LightningSend;
741
580
  defaults: () => Partial<LightningSend>;
742
581
  }>;
743
582
  /**
@@ -807,25 +646,14 @@ export type Movement = {
807
646
  /**
808
647
  * Completed at timestamp (null if not completed)
809
648
  */
810
- completedAt: string | undefined;
649
+ completedAt?: string;
811
650
  };
812
651
  /**
813
652
  * Generated factory for {@link Movement} record objects.
814
653
  */
815
654
  export declare const Movement: Readonly<{
816
- /**
817
- * Create a frozen instance of {@link Movement}, with defaults specified
818
- * in Rust, in the {@link bark} crate.
819
- */
820
- create: (partial: Partial<Movement> & Required<Omit<Movement, never>>) => Movement;
821
- /**
822
- * Create a frozen instance of {@link Movement}, with defaults specified
823
- * in Rust, in the {@link bark} crate.
824
- */
825
- new: (partial: Partial<Movement> & Required<Omit<Movement, never>>) => Movement;
826
- /**
827
- * Defaults specified in the {@link bark} crate.
828
- */
655
+ create: (partial: Partial<Movement> & Required<Omit<Movement, "completedAt">>) => Movement;
656
+ new: (partial: Partial<Movement> & Required<Omit<Movement, "completedAt">>) => Movement;
829
657
  defaults: () => Partial<Movement>;
830
658
  }>;
831
659
  /**
@@ -841,19 +669,8 @@ export type OffboardResult = {
841
669
  * Generated factory for {@link OffboardResult} record objects.
842
670
  */
843
671
  export declare const OffboardResult: Readonly<{
844
- /**
845
- * Create a frozen instance of {@link OffboardResult}, with defaults specified
846
- * in Rust, in the {@link bark} crate.
847
- */
848
672
  create: (partial: Partial<OffboardResult> & Required<Omit<OffboardResult, never>>) => OffboardResult;
849
- /**
850
- * Create a frozen instance of {@link OffboardResult}, with defaults specified
851
- * in Rust, in the {@link bark} crate.
852
- */
853
673
  new: (partial: Partial<OffboardResult> & Required<Omit<OffboardResult, never>>) => OffboardResult;
854
- /**
855
- * Defaults specified in the {@link bark} crate.
856
- */
857
674
  defaults: () => Partial<OffboardResult>;
858
675
  }>;
859
676
  /**
@@ -877,19 +694,8 @@ export type OnchainBalance = {
877
694
  * Generated factory for {@link OnchainBalance} record objects.
878
695
  */
879
696
  export declare const OnchainBalance: Readonly<{
880
- /**
881
- * Create a frozen instance of {@link OnchainBalance}, with defaults specified
882
- * in Rust, in the {@link bark} crate.
883
- */
884
697
  create: (partial: Partial<OnchainBalance> & Required<Omit<OnchainBalance, never>>) => OnchainBalance;
885
- /**
886
- * Create a frozen instance of {@link OnchainBalance}, with defaults specified
887
- * in Rust, in the {@link bark} crate.
888
- */
889
698
  new: (partial: Partial<OnchainBalance> & Required<Omit<OnchainBalance, never>>) => OnchainBalance;
890
- /**
891
- * Defaults specified in the {@link bark} crate.
892
- */
893
699
  defaults: () => Partial<OnchainBalance>;
894
700
  }>;
895
701
  /**
@@ -903,19 +709,8 @@ export type OutPoint = {
903
709
  * Generated factory for {@link OutPoint} record objects.
904
710
  */
905
711
  export declare const OutPoint: Readonly<{
906
- /**
907
- * Create a frozen instance of {@link OutPoint}, with defaults specified
908
- * in Rust, in the {@link bark} crate.
909
- */
910
712
  create: (partial: Partial<OutPoint> & Required<Omit<OutPoint, never>>) => OutPoint;
911
- /**
912
- * Create a frozen instance of {@link OutPoint}, with defaults specified
913
- * in Rust, in the {@link bark} crate.
914
- */
915
713
  new: (partial: Partial<OutPoint> & Required<Omit<OutPoint, never>>) => OutPoint;
916
- /**
917
- * Defaults specified in the {@link bark} crate.
918
- */
919
714
  defaults: () => Partial<OutPoint>;
920
715
  }>;
921
716
  /**
@@ -939,19 +734,8 @@ export type PendingBoard = {
939
734
  * Generated factory for {@link PendingBoard} record objects.
940
735
  */
941
736
  export declare const PendingBoard: Readonly<{
942
- /**
943
- * Create a frozen instance of {@link PendingBoard}, with defaults specified
944
- * in Rust, in the {@link bark} crate.
945
- */
946
737
  create: (partial: Partial<PendingBoard> & Required<Omit<PendingBoard, never>>) => PendingBoard;
947
- /**
948
- * Create a frozen instance of {@link PendingBoard}, with defaults specified
949
- * in Rust, in the {@link bark} crate.
950
- */
951
738
  new: (partial: Partial<PendingBoard> & Required<Omit<PendingBoard, never>>) => PendingBoard;
952
- /**
953
- * Defaults specified in the {@link bark} crate.
954
- */
955
739
  defaults: () => Partial<PendingBoard>;
956
740
  }>;
957
741
  /**
@@ -971,19 +755,8 @@ export type RoundState = {
971
755
  * Generated factory for {@link RoundState} record objects.
972
756
  */
973
757
  export declare const RoundState: Readonly<{
974
- /**
975
- * Create a frozen instance of {@link RoundState}, with defaults specified
976
- * in Rust, in the {@link bark} crate.
977
- */
978
758
  create: (partial: Partial<RoundState> & Required<Omit<RoundState, never>>) => RoundState;
979
- /**
980
- * Create a frozen instance of {@link RoundState}, with defaults specified
981
- * in Rust, in the {@link bark} crate.
982
- */
983
759
  new: (partial: Partial<RoundState> & Required<Omit<RoundState, never>>) => RoundState;
984
- /**
985
- * Defaults specified in the {@link bark} crate.
986
- */
987
760
  defaults: () => Partial<RoundState>;
988
761
  }>;
989
762
  /**
@@ -1015,19 +788,8 @@ export type Vtxo = {
1015
788
  * Generated factory for {@link Vtxo} record objects.
1016
789
  */
1017
790
  export declare const Vtxo: Readonly<{
1018
- /**
1019
- * Create a frozen instance of {@link Vtxo}, with defaults specified
1020
- * in Rust, in the {@link bark} crate.
1021
- */
1022
791
  create: (partial: Partial<Vtxo> & Required<Omit<Vtxo, never>>) => Vtxo;
1023
- /**
1024
- * Create a frozen instance of {@link Vtxo}, with defaults specified
1025
- * in Rust, in the {@link bark} crate.
1026
- */
1027
792
  new: (partial: Partial<Vtxo> & Required<Omit<Vtxo, never>>) => Vtxo;
1028
- /**
1029
- * Defaults specified in the {@link bark} crate.
1030
- */
1031
793
  defaults: () => Partial<Vtxo>;
1032
794
  }>;
1033
795
  /**
@@ -1041,19 +803,8 @@ export type WalletProperties = {
1041
803
  * Generated factory for {@link WalletProperties} record objects.
1042
804
  */
1043
805
  export declare const WalletProperties: Readonly<{
1044
- /**
1045
- * Create a frozen instance of {@link WalletProperties}, with defaults specified
1046
- * in Rust, in the {@link bark} crate.
1047
- */
1048
806
  create: (partial: Partial<WalletProperties> & Required<Omit<WalletProperties, never>>) => WalletProperties;
1049
- /**
1050
- * Create a frozen instance of {@link WalletProperties}, with defaults specified
1051
- * in Rust, in the {@link bark} crate.
1052
- */
1053
807
  new: (partial: Partial<WalletProperties> & Required<Omit<WalletProperties, never>>) => WalletProperties;
1054
- /**
1055
- * Defaults specified in the {@link bark} crate.
1056
- */
1057
808
  defaults: () => Partial<WalletProperties>;
1058
809
  }>;
1059
810
  export declare enum BarkError_Tags {
@@ -2424,7 +2175,7 @@ export type WalletNotification = InstanceType<(typeof WalletNotification)[keyof
2424
2175
  * Each call to `Wallet.notifications()` creates an independent stream backed
2425
2176
  * by a new broadcast receiver. Only one consumer loop per holder is assumed.
2426
2177
  */
2427
- export interface NotificationHolderInterface {
2178
+ export interface NotificationHolderLike {
2428
2179
  /**
2429
2180
  * Cancel the currently pending `next_notification()` wait.
2430
2181
  *
@@ -2450,6 +2201,10 @@ export interface NotificationHolderInterface {
2450
2201
  signal: AbortSignal;
2451
2202
  }): Promise<WalletNotification | undefined>;
2452
2203
  }
2204
+ /**
2205
+ * @deprecated Use `NotificationHolderLike` instead.
2206
+ */
2207
+ export type NotificationHolderInterface = NotificationHolderLike;
2453
2208
  /**
2454
2209
  * Pull-based handle for consuming wallet notifications.
2455
2210
  *
@@ -2460,7 +2215,7 @@ export interface NotificationHolderInterface {
2460
2215
  * Each call to `Wallet.notifications()` creates an independent stream backed
2461
2216
  * by a new broadcast receiver. Only one consumer loop per holder is assumed.
2462
2217
  */
2463
- export declare class NotificationHolder extends UniffiAbstractObject implements NotificationHolderInterface {
2218
+ export declare class NotificationHolder extends UniffiAbstractObject implements NotificationHolderLike {
2464
2219
  readonly [uniffiTypeNameSymbol] = "NotificationHolder";
2465
2220
  readonly [destructorGuardSymbol]: UniffiGcObject;
2466
2221
  readonly [pointerLiteralSymbol]: UniffiHandle;
@@ -2502,7 +2257,7 @@ export declare class NotificationHolder extends UniffiAbstractObject implements
2502
2257
  * - Default: BDK-based wallet (built-in)
2503
2258
  * - Custom: Your own wallet implementation via callbacks
2504
2259
  */
2505
- export interface OnchainWalletInterface {
2260
+ export interface OnchainWalletLike {
2506
2261
  /**
2507
2262
  * Get the onchain wallet balance
2508
2263
  */
@@ -2530,6 +2285,10 @@ export interface OnchainWalletInterface {
2530
2285
  signal: AbortSignal;
2531
2286
  }): Promise</*u64*/ bigint>;
2532
2287
  }
2288
+ /**
2289
+ * @deprecated Use `OnchainWalletLike` instead.
2290
+ */
2291
+ export type OnchainWalletInterface = OnchainWalletLike;
2533
2292
  /**
2534
2293
  * Onchain Bitcoin wallet for boarding and exits
2535
2294
  *
@@ -2537,7 +2296,7 @@ export interface OnchainWalletInterface {
2537
2296
  * - Default: BDK-based wallet (built-in)
2538
2297
  * - Custom: Your own wallet implementation via callbacks
2539
2298
  */
2540
- export declare class OnchainWallet extends UniffiAbstractObject implements OnchainWalletInterface {
2299
+ export declare class OnchainWallet extends UniffiAbstractObject implements OnchainWalletLike {
2541
2300
  readonly [uniffiTypeNameSymbol] = "OnchainWallet";
2542
2301
  readonly [destructorGuardSymbol]: UniffiGcObject;
2543
2302
  readonly [pointerLiteralSymbol]: UniffiHandle;
@@ -2549,7 +2308,7 @@ export declare class OnchainWallet extends UniffiAbstractObject implements Oncha
2549
2308
  * (Dart/Swift/Kotlin) and want to integrate it with Bark for boarding and exits.
2550
2309
  * Your implementation must handle all wallet operations via the callbacks interface.
2551
2310
  */
2552
- static custom(callbacks: CustomOnchainWalletCallbacks): OnchainWalletInterface;
2311
+ static custom(callbacks: CustomOnchainWalletCallbacks): OnchainWalletLike;
2553
2312
  /**
2554
2313
  * Create or load an onchain wallet using a default BDK implementation shipped with Bark
2555
2314
  *
@@ -2558,7 +2317,7 @@ export declare class OnchainWallet extends UniffiAbstractObject implements Oncha
2558
2317
  */
2559
2318
  static default_(mnemonic: string, config: Config, datadir: string, asyncOpts_?: {
2560
2319
  signal: AbortSignal;
2561
- }): Promise<OnchainWalletInterface>;
2320
+ }): Promise<OnchainWalletLike>;
2562
2321
  /**
2563
2322
  * Get the onchain wallet balance
2564
2323
  */
@@ -2594,7 +2353,7 @@ export declare class OnchainWallet extends UniffiAbstractObject implements Oncha
2594
2353
  /**
2595
2354
  * The main Bark wallet interface for Ark operations
2596
2355
  */
2597
- export interface WalletInterface {
2356
+ export interface WalletLike {
2598
2357
  /**
2599
2358
  * Get earliest block height when all exits will be claimable
2600
2359
  *
@@ -2621,13 +2380,13 @@ export interface WalletInterface {
2621
2380
  /**
2622
2381
  * Board all funds from onchain wallet into Ark
2623
2382
  */
2624
- boardAll(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
2383
+ boardAll(onchainWallet: OnchainWalletLike, asyncOpts_?: {
2625
2384
  signal: AbortSignal;
2626
2385
  }): Promise<PendingBoard>;
2627
2386
  /**
2628
2387
  * Board a specific amount from onchain wallet into Ark
2629
2388
  */
2630
- boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint, asyncOpts_?: {
2389
+ boardAmount(onchainWallet: OnchainWalletLike, amountSats: bigint, asyncOpts_?: {
2631
2390
  signal: AbortSignal;
2632
2391
  }): Promise<PendingBoard>;
2633
2392
  bolt11Invoice(amountSats: bigint, asyncOpts_?: {
@@ -2654,6 +2413,19 @@ export interface WalletInterface {
2654
2413
  cancelAllPendingRounds(asyncOpts_?: {
2655
2414
  signal: AbortSignal;
2656
2415
  }): Promise<void>;
2416
+ /**
2417
+ * Cancel a pending lightning receive by payment hash
2418
+ *
2419
+ * Server will refuse if HTLCs already granted, preimage already revealed,
2420
+ * or receive already finished.
2421
+ *
2422
+ * # Arguments
2423
+ *
2424
+ * * `payment_hash` - Payment hash as hex string
2425
+ */
2426
+ cancelLightningReceive(paymentHash: string, asyncOpts_?: {
2427
+ signal: AbortSignal;
2428
+ }): Promise<void>;
2657
2429
  /**
2658
2430
  * Cancel a specific pending round
2659
2431
  */
@@ -2938,13 +2710,13 @@ export interface WalletInterface {
2938
2710
  *
2939
2711
  * More thorough than maintenance() - also syncs onchain wallet and exits.
2940
2712
  */
2941
- maintenanceWithOnchain(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
2713
+ maintenanceWithOnchain(onchainWallet: OnchainWalletLike, asyncOpts_?: {
2942
2714
  signal: AbortSignal;
2943
2715
  }): Promise<void>;
2944
2716
  /**
2945
2717
  * Perform maintenance with onchain wallet in delegated mode
2946
2718
  */
2947
- maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
2719
+ maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletLike, asyncOpts_?: {
2948
2720
  signal: AbortSignal;
2949
2721
  }): Promise<void>;
2950
2722
  /**
@@ -2984,7 +2756,7 @@ export interface WalletInterface {
2984
2756
  * Call `cancel_next_notification_wait()` to unblock a pending wait without
2985
2757
  * destroying the stream.
2986
2758
  */
2987
- notifications(): NotificationHolderInterface;
2759
+ notifications(): NotificationHolderLike;
2988
2760
  offboardAll(bitcoinAddress: string, asyncOpts_?: {
2989
2761
  signal: AbortSignal;
2990
2762
  }): Promise<OffboardResult>;
@@ -3082,7 +2854,7 @@ export interface WalletInterface {
3082
2854
  * * `onchain_wallet` - Onchain wallet for building exit transactions
3083
2855
  * * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
3084
2856
  */
3085
- progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
2857
+ progressExits(onchainWallet: OnchainWalletLike, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
3086
2858
  signal: AbortSignal;
3087
2859
  }): Promise<Array<ExitProgressStatus>>;
3088
2860
  /**
@@ -3173,7 +2945,7 @@ export interface WalletInterface {
3173
2945
  /**
3174
2946
  * Sync exit state (checks status but doesn't progress)
3175
2947
  */
3176
- syncExits(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
2948
+ syncExits(onchainWallet: OnchainWalletLike, asyncOpts_?: {
3177
2949
  signal: AbortSignal;
3178
2950
  }): Promise<void>;
3179
2951
  /**
@@ -3210,10 +2982,14 @@ export interface WalletInterface {
3210
2982
  signal: AbortSignal;
3211
2983
  }): Promise<Array<Vtxo>>;
3212
2984
  }
2985
+ /**
2986
+ * @deprecated Use `WalletLike` instead.
2987
+ */
2988
+ export type WalletInterface = WalletLike;
3213
2989
  /**
3214
2990
  * The main Bark wallet interface for Ark operations
3215
2991
  */
3216
- export declare class Wallet extends UniffiAbstractObject implements WalletInterface {
2992
+ export declare class Wallet extends UniffiAbstractObject implements WalletLike {
3217
2993
  readonly [uniffiTypeNameSymbol] = "Wallet";
3218
2994
  readonly [destructorGuardSymbol]: UniffiGcObject;
3219
2995
  readonly [pointerLiteralSymbol]: UniffiHandle;
@@ -3223,25 +2999,25 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3223
2999
  */
3224
3000
  static create(mnemonic: string, config: Config, datadir: string, forceRescan: boolean, asyncOpts_?: {
3225
3001
  signal: AbortSignal;
3226
- }): Promise<WalletInterface>;
3002
+ }): Promise<WalletLike>;
3227
3003
  /**
3228
3004
  * Create a new Bark wallet WITH onchain capabilities
3229
3005
  */
3230
- static createWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface, forceRescan: boolean, asyncOpts_?: {
3006
+ static createWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletLike, forceRescan: boolean, asyncOpts_?: {
3231
3007
  signal: AbortSignal;
3232
- }): Promise<WalletInterface>;
3008
+ }): Promise<WalletLike>;
3233
3009
  /**
3234
3010
  * Open an existing Bark wallet
3235
3011
  */
3236
3012
  static open(mnemonic: string, config: Config, datadir: string, asyncOpts_?: {
3237
3013
  signal: AbortSignal;
3238
- }): Promise<WalletInterface>;
3014
+ }): Promise<WalletLike>;
3239
3015
  /**
3240
3016
  * Open an existing Bark wallet WITH onchain capabilities
3241
3017
  */
3242
- static openWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3018
+ static openWithOnchain(mnemonic: string, config: Config, datadir: string, onchainWallet: OnchainWalletLike, asyncOpts_?: {
3243
3019
  signal: AbortSignal;
3244
- }): Promise<WalletInterface>;
3020
+ }): Promise<WalletLike>;
3245
3021
  /**
3246
3022
  * Get earliest block height when all exits will be claimable
3247
3023
  *
@@ -3268,13 +3044,13 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3268
3044
  /**
3269
3045
  * Board all funds from onchain wallet into Ark
3270
3046
  */
3271
- boardAll(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3047
+ boardAll(onchainWallet: OnchainWalletLike, asyncOpts_?: {
3272
3048
  signal: AbortSignal;
3273
3049
  }): Promise<PendingBoard>;
3274
3050
  /**
3275
3051
  * Board a specific amount from onchain wallet into Ark
3276
3052
  */
3277
- boardAmount(onchainWallet: OnchainWalletInterface, amountSats: bigint, asyncOpts_?: {
3053
+ boardAmount(onchainWallet: OnchainWalletLike, amountSats: bigint, asyncOpts_?: {
3278
3054
  signal: AbortSignal;
3279
3055
  }): Promise<PendingBoard>;
3280
3056
  bolt11Invoice(amountSats: bigint, asyncOpts_?: {
@@ -3301,6 +3077,19 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3301
3077
  cancelAllPendingRounds(asyncOpts_?: {
3302
3078
  signal: AbortSignal;
3303
3079
  }): Promise<void>;
3080
+ /**
3081
+ * Cancel a pending lightning receive by payment hash
3082
+ *
3083
+ * Server will refuse if HTLCs already granted, preimage already revealed,
3084
+ * or receive already finished.
3085
+ *
3086
+ * # Arguments
3087
+ *
3088
+ * * `payment_hash` - Payment hash as hex string
3089
+ */
3090
+ cancelLightningReceive(paymentHash: string, asyncOpts_?: {
3091
+ signal: AbortSignal;
3092
+ }): Promise<void>;
3304
3093
  /**
3305
3094
  * Cancel a specific pending round
3306
3095
  */
@@ -3585,13 +3374,13 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3585
3374
  *
3586
3375
  * More thorough than maintenance() - also syncs onchain wallet and exits.
3587
3376
  */
3588
- maintenanceWithOnchain(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3377
+ maintenanceWithOnchain(onchainWallet: OnchainWalletLike, asyncOpts_?: {
3589
3378
  signal: AbortSignal;
3590
3379
  }): Promise<void>;
3591
3380
  /**
3592
3381
  * Perform maintenance with onchain wallet in delegated mode
3593
3382
  */
3594
- maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3383
+ maintenanceWithOnchainDelegated(onchainWallet: OnchainWalletLike, asyncOpts_?: {
3595
3384
  signal: AbortSignal;
3596
3385
  }): Promise<void>;
3597
3386
  /**
@@ -3631,7 +3420,7 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3631
3420
  * Call `cancel_next_notification_wait()` to unblock a pending wait without
3632
3421
  * destroying the stream.
3633
3422
  */
3634
- notifications(): NotificationHolderInterface;
3423
+ notifications(): NotificationHolderLike;
3635
3424
  offboardAll(bitcoinAddress: string, asyncOpts_?: {
3636
3425
  signal: AbortSignal;
3637
3426
  }): Promise<OffboardResult>;
@@ -3729,7 +3518,7 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3729
3518
  * * `onchain_wallet` - Onchain wallet for building exit transactions
3730
3519
  * * `fee_rate_sat_per_vb` - Optional fee rate override in sats/vB
3731
3520
  */
3732
- progressExits(onchainWallet: OnchainWalletInterface, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
3521
+ progressExits(onchainWallet: OnchainWalletLike, feeRateSatPerVb: /*u64*/ bigint | undefined, asyncOpts_?: {
3733
3522
  signal: AbortSignal;
3734
3523
  }): Promise<Array<ExitProgressStatus>>;
3735
3524
  /**
@@ -3820,7 +3609,7 @@ export declare class Wallet extends UniffiAbstractObject implements WalletInterf
3820
3609
  /**
3821
3610
  * Sync exit state (checks status but doesn't progress)
3822
3611
  */
3823
- syncExits(onchainWallet: OnchainWalletInterface, asyncOpts_?: {
3612
+ syncExits(onchainWallet: OnchainWalletLike, asyncOpts_?: {
3824
3613
  signal: AbortSignal;
3825
3614
  }): Promise<void>;
3826
3615
  /**
@@ -4002,7 +3791,7 @@ declare const _default: Readonly<{
4002
3791
  lift(value: Uint8Array): Network;
4003
3792
  lower(value: Network): Uint8Array;
4004
3793
  };
4005
- FfiConverterTypeNotificationHolder: FfiConverterObject<NotificationHolderInterface>;
3794
+ FfiConverterTypeNotificationHolder: FfiConverterObject<NotificationHolderLike>;
4006
3795
  FfiConverterTypeOffboardResult: {
4007
3796
  read(from: RustBuffer): OffboardResult;
4008
3797
  write(value: OffboardResult, into: RustBuffer): void;
@@ -4017,7 +3806,7 @@ declare const _default: Readonly<{
4017
3806
  lift(value: Uint8Array): OnchainBalance;
4018
3807
  lower(value: OnchainBalance): Uint8Array;
4019
3808
  };
4020
- FfiConverterTypeOnchainWallet: FfiConverterObject<OnchainWalletInterface>;
3809
+ FfiConverterTypeOnchainWallet: FfiConverterObject<OnchainWalletLike>;
4021
3810
  FfiConverterTypeOutPoint: {
4022
3811
  read(from: RustBuffer): OutPoint;
4023
3812
  write(value: OutPoint, into: RustBuffer): void;
@@ -4046,7 +3835,7 @@ declare const _default: Readonly<{
4046
3835
  lift(value: Uint8Array): Vtxo;
4047
3836
  lower(value: Vtxo): Uint8Array;
4048
3837
  };
4049
- FfiConverterTypeWallet: FfiConverterObject<WalletInterface>;
3838
+ FfiConverterTypeWallet: FfiConverterObject<WalletLike>;
4050
3839
  FfiConverterTypeWalletNotification: {
4051
3840
  read(from: RustBuffer): WalletNotification;
4052
3841
  write(value: WalletNotification, into: RustBuffer): void;