@secondts/bark-react-native 0.15.0 → 0.16.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.
- package/README.md +1 -1
- package/cpp/generated/bark.cpp +140 -0
- package/cpp/generated/bark.hpp +8 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +2023 -202
- package/lib/commonjs/generated/bark.js.map +1 -1
- package/lib/module/generated/bark-ffi.js.map +1 -1
- package/lib/module/generated/bark.js +2022 -201
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +8 -0
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +1561 -127
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +8 -0
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +1561 -127
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/bark-ffi.ts +10 -0
- package/src/generated/bark.ts +2678 -212
|
@@ -73,9 +73,9 @@ export type ArkInfo = {
|
|
|
73
73
|
minBoardAmountSats: bigint;
|
|
74
74
|
lnReceiveAntiDosRequired: boolean;
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* The server's fee schedule (board, offboard, refresh, lightning fees).
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
feeSchedule: FeeSchedule;
|
|
79
79
|
/**
|
|
80
80
|
* Maximum exit depth (genesis chain length) allowed for a VTXO before the
|
|
81
81
|
* server refuses to cosign further OOR transactions spending it.
|
|
@@ -121,6 +121,25 @@ export declare const BlockRef: Readonly<{
|
|
|
121
121
|
new: (partial: Partial<BlockRef> & Required<Omit<BlockRef, never>>) => BlockRef;
|
|
122
122
|
defaults: () => Partial<BlockRef>;
|
|
123
123
|
}>;
|
|
124
|
+
/**
|
|
125
|
+
* Fees for boarding onchain funds into the Ark.
|
|
126
|
+
*/
|
|
127
|
+
export type BoardFees = {
|
|
128
|
+
minFeeSats: bigint;
|
|
129
|
+
baseFeeSats: bigint;
|
|
130
|
+
/**
|
|
131
|
+
* Parts-per-million fee rate on the boarded amount.
|
|
132
|
+
*/
|
|
133
|
+
ppm: bigint;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Generated factory for {@link BoardFees} record objects.
|
|
137
|
+
*/
|
|
138
|
+
export declare const BoardFees: Readonly<{
|
|
139
|
+
create: (partial: Partial<BoardFees> & Required<Omit<BoardFees, never>>) => BoardFees;
|
|
140
|
+
new: (partial: Partial<BoardFees> & Required<Omit<BoardFees, never>>) => BoardFees;
|
|
141
|
+
defaults: () => Partial<BoardFees>;
|
|
142
|
+
}>;
|
|
124
143
|
export type Config = {
|
|
125
144
|
serverAddress: string;
|
|
126
145
|
serverAccessToken?: string;
|
|
@@ -200,7 +219,7 @@ export declare const ExitClaimTransaction: Readonly<{
|
|
|
200
219
|
*/
|
|
201
220
|
export type ExitProgressStatus = {
|
|
202
221
|
vtxoId: string;
|
|
203
|
-
state:
|
|
222
|
+
state: ExitState;
|
|
204
223
|
error?: string;
|
|
205
224
|
};
|
|
206
225
|
/**
|
|
@@ -216,8 +235,8 @@ export declare const ExitProgressStatus: Readonly<{
|
|
|
216
235
|
*/
|
|
217
236
|
export type ExitTransactionStatus = {
|
|
218
237
|
vtxoId: string;
|
|
219
|
-
state:
|
|
220
|
-
history?: Array<
|
|
238
|
+
state: ExitState;
|
|
239
|
+
history?: Array<ExitState>;
|
|
221
240
|
transactionCount: number;
|
|
222
241
|
};
|
|
223
242
|
/**
|
|
@@ -228,13 +247,28 @@ export declare const ExitTransactionStatus: Readonly<{
|
|
|
228
247
|
new: (partial: Partial<ExitTransactionStatus> & Required<Omit<ExitTransactionStatus, "history">>) => ExitTransactionStatus;
|
|
229
248
|
defaults: () => Partial<ExitTransactionStatus>;
|
|
230
249
|
}>;
|
|
250
|
+
/**
|
|
251
|
+
* One transaction in an exit's unilateral broadcast chain.
|
|
252
|
+
*/
|
|
253
|
+
export type ExitTx = {
|
|
254
|
+
txid: string;
|
|
255
|
+
status: ExitTxStatus;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Generated factory for {@link ExitTx} record objects.
|
|
259
|
+
*/
|
|
260
|
+
export declare const ExitTx: Readonly<{
|
|
261
|
+
create: (partial: Partial<ExitTx> & Required<Omit<ExitTx, never>>) => ExitTx;
|
|
262
|
+
new: (partial: Partial<ExitTx> & Required<Omit<ExitTx, never>>) => ExitTx;
|
|
263
|
+
defaults: () => Partial<ExitTx>;
|
|
264
|
+
}>;
|
|
231
265
|
/**
|
|
232
266
|
* A VTXO that is being unilaterally exited
|
|
233
267
|
*/
|
|
234
268
|
export type ExitVtxo = {
|
|
235
269
|
vtxoId: string;
|
|
236
270
|
amountSats: bigint;
|
|
237
|
-
state:
|
|
271
|
+
state: ExitState;
|
|
238
272
|
isClaimable: boolean;
|
|
239
273
|
};
|
|
240
274
|
/**
|
|
@@ -259,6 +293,43 @@ export declare const FeeEstimate: Readonly<{
|
|
|
259
293
|
new: (partial: Partial<FeeEstimate> & Required<Omit<FeeEstimate, never>>) => FeeEstimate;
|
|
260
294
|
defaults: () => Partial<FeeEstimate>;
|
|
261
295
|
}>;
|
|
296
|
+
/**
|
|
297
|
+
* Network fee rates by urgency, mirroring `bark::chain::FeeRates`.
|
|
298
|
+
*
|
|
299
|
+
* Rates are in sat/kwu (satoshis per 1000 weight units) — divide by 250 for
|
|
300
|
+
* sat/vB.
|
|
301
|
+
*/
|
|
302
|
+
export type FeeRates = {
|
|
303
|
+
fastSatPerKwu: bigint;
|
|
304
|
+
regularSatPerKwu: bigint;
|
|
305
|
+
slowSatPerKwu: bigint;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Generated factory for {@link FeeRates} record objects.
|
|
309
|
+
*/
|
|
310
|
+
export declare const FeeRates: Readonly<{
|
|
311
|
+
create: (partial: Partial<FeeRates> & Required<Omit<FeeRates, never>>) => FeeRates;
|
|
312
|
+
new: (partial: Partial<FeeRates> & Required<Omit<FeeRates, never>>) => FeeRates;
|
|
313
|
+
defaults: () => Partial<FeeRates>;
|
|
314
|
+
}>;
|
|
315
|
+
/**
|
|
316
|
+
* The Ark server's complete fee schedule, mirroring `ark::fees::FeeSchedule`.
|
|
317
|
+
*/
|
|
318
|
+
export type FeeSchedule = {
|
|
319
|
+
board: BoardFees;
|
|
320
|
+
offboard: OffboardFees;
|
|
321
|
+
refresh: RefreshFees;
|
|
322
|
+
lightningReceive: LightningReceiveFees;
|
|
323
|
+
lightningSend: LightningSendFees;
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* Generated factory for {@link FeeSchedule} record objects.
|
|
327
|
+
*/
|
|
328
|
+
export declare const FeeSchedule: Readonly<{
|
|
329
|
+
create: (partial: Partial<FeeSchedule> & Required<Omit<FeeSchedule, never>>) => FeeSchedule;
|
|
330
|
+
new: (partial: Partial<FeeSchedule> & Required<Omit<FeeSchedule, never>>) => FeeSchedule;
|
|
331
|
+
defaults: () => Partial<FeeSchedule>;
|
|
332
|
+
}>;
|
|
262
333
|
export type LightningInvoice = {
|
|
263
334
|
invoice: string;
|
|
264
335
|
paymentHash: string;
|
|
@@ -305,6 +376,24 @@ export declare const LightningReceive: Readonly<{
|
|
|
305
376
|
new: (partial: Partial<LightningReceive> & Required<Omit<LightningReceive, "paymentPreimage" | "settledAt" | "claimDestination">>) => LightningReceive;
|
|
306
377
|
defaults: () => Partial<LightningReceive>;
|
|
307
378
|
}>;
|
|
379
|
+
/**
|
|
380
|
+
* Fees for receiving over lightning.
|
|
381
|
+
*/
|
|
382
|
+
export type LightningReceiveFees = {
|
|
383
|
+
baseFeeSats: bigint;
|
|
384
|
+
/**
|
|
385
|
+
* Parts-per-million fee rate on the received amount.
|
|
386
|
+
*/
|
|
387
|
+
ppm: bigint;
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* Generated factory for {@link LightningReceiveFees} record objects.
|
|
391
|
+
*/
|
|
392
|
+
export declare const LightningReceiveFees: Readonly<{
|
|
393
|
+
create: (partial: Partial<LightningReceiveFees> & Required<Omit<LightningReceiveFees, never>>) => LightningReceiveFees;
|
|
394
|
+
new: (partial: Partial<LightningReceiveFees> & Required<Omit<LightningReceiveFees, never>>) => LightningReceiveFees;
|
|
395
|
+
defaults: () => Partial<LightningReceiveFees>;
|
|
396
|
+
}>;
|
|
308
397
|
export type LightningSend = {
|
|
309
398
|
invoice: string;
|
|
310
399
|
/**
|
|
@@ -333,6 +422,22 @@ export declare const LightningSend: Readonly<{
|
|
|
333
422
|
new: (partial: Partial<LightningSend> & Required<Omit<LightningSend, never>>) => LightningSend;
|
|
334
423
|
defaults: () => Partial<LightningSend>;
|
|
335
424
|
}>;
|
|
425
|
+
/**
|
|
426
|
+
* Fees for sending over lightning.
|
|
427
|
+
*/
|
|
428
|
+
export type LightningSendFees = {
|
|
429
|
+
minFeeSats: bigint;
|
|
430
|
+
baseFeeSats: bigint;
|
|
431
|
+
ppmExpiryTable: Array<PpmExpiryFeeEntry>;
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* Generated factory for {@link LightningSendFees} record objects.
|
|
435
|
+
*/
|
|
436
|
+
export declare const LightningSendFees: Readonly<{
|
|
437
|
+
create: (partial: Partial<LightningSendFees> & Required<Omit<LightningSendFees, never>>) => LightningSendFees;
|
|
438
|
+
new: (partial: Partial<LightningSendFees> & Required<Omit<LightningSendFees, never>>) => LightningSendFees;
|
|
439
|
+
defaults: () => Partial<LightningSendFees>;
|
|
440
|
+
}>;
|
|
336
441
|
export type Movement = {
|
|
337
442
|
id: number;
|
|
338
443
|
status: string;
|
|
@@ -362,6 +467,25 @@ export declare const Movement: Readonly<{
|
|
|
362
467
|
new: (partial: Partial<Movement> & Required<Omit<Movement, "paymentHash" | "completedAt" | "lightningInvoice" | "lightningOffer">>) => Movement;
|
|
363
468
|
defaults: () => Partial<Movement>;
|
|
364
469
|
}>;
|
|
470
|
+
/**
|
|
471
|
+
* Fees for offboarding VTXOs to an onchain address.
|
|
472
|
+
*/
|
|
473
|
+
export type OffboardFees = {
|
|
474
|
+
baseFeeSats: bigint;
|
|
475
|
+
/**
|
|
476
|
+
* Fixed number of virtual bytes charged on top of the output size.
|
|
477
|
+
*/
|
|
478
|
+
fixedAdditionalVb: bigint;
|
|
479
|
+
ppmExpiryTable: Array<PpmExpiryFeeEntry>;
|
|
480
|
+
};
|
|
481
|
+
/**
|
|
482
|
+
* Generated factory for {@link OffboardFees} record objects.
|
|
483
|
+
*/
|
|
484
|
+
export declare const OffboardFees: Readonly<{
|
|
485
|
+
create: (partial: Partial<OffboardFees> & Required<Omit<OffboardFees, never>>) => OffboardFees;
|
|
486
|
+
new: (partial: Partial<OffboardFees> & Required<Omit<OffboardFees, never>>) => OffboardFees;
|
|
487
|
+
defaults: () => Partial<OffboardFees>;
|
|
488
|
+
}>;
|
|
365
489
|
export type OffboardResult = {
|
|
366
490
|
roundId: string;
|
|
367
491
|
};
|
|
@@ -414,6 +538,28 @@ export declare const PendingBoard: Readonly<{
|
|
|
414
538
|
new: (partial: Partial<PendingBoard> & Required<Omit<PendingBoard, never>>) => PendingBoard;
|
|
415
539
|
defaults: () => Partial<PendingBoard>;
|
|
416
540
|
}>;
|
|
541
|
+
/**
|
|
542
|
+
* One tier of a PPM-by-expiry fee table.
|
|
543
|
+
*
|
|
544
|
+
* The entry applies when a VTXO expires in at most `expiry_blocks_threshold`
|
|
545
|
+
* blocks and no other entry has a threshold between this one and the VTXO's
|
|
546
|
+
* actual expiry distance. Tables are sorted ascending by threshold.
|
|
547
|
+
*/
|
|
548
|
+
export type PpmExpiryFeeEntry = {
|
|
549
|
+
expiryBlocksThreshold: number;
|
|
550
|
+
/**
|
|
551
|
+
* Parts-per-million fee rate applied for this expiry period.
|
|
552
|
+
*/
|
|
553
|
+
ppm: bigint;
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* Generated factory for {@link PpmExpiryFeeEntry} record objects.
|
|
557
|
+
*/
|
|
558
|
+
export declare const PpmExpiryFeeEntry: Readonly<{
|
|
559
|
+
create: (partial: Partial<PpmExpiryFeeEntry> & Required<Omit<PpmExpiryFeeEntry, never>>) => PpmExpiryFeeEntry;
|
|
560
|
+
new: (partial: Partial<PpmExpiryFeeEntry> & Required<Omit<PpmExpiryFeeEntry, never>>) => PpmExpiryFeeEntry;
|
|
561
|
+
defaults: () => Partial<PpmExpiryFeeEntry>;
|
|
562
|
+
}>;
|
|
417
563
|
/**
|
|
418
564
|
* One bucket of a [`RecoveryReport`].
|
|
419
565
|
*
|
|
@@ -483,6 +629,21 @@ export declare const RecoveryReport: Readonly<{
|
|
|
483
629
|
new: (partial: Partial<RecoveryReport> & Required<Omit<RecoveryReport, never>>) => RecoveryReport;
|
|
484
630
|
defaults: () => Partial<RecoveryReport>;
|
|
485
631
|
}>;
|
|
632
|
+
/**
|
|
633
|
+
* Fees for refreshing VTXOs in a round.
|
|
634
|
+
*/
|
|
635
|
+
export type RefreshFees = {
|
|
636
|
+
baseFeeSats: bigint;
|
|
637
|
+
ppmExpiryTable: Array<PpmExpiryFeeEntry>;
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* Generated factory for {@link RefreshFees} record objects.
|
|
641
|
+
*/
|
|
642
|
+
export declare const RefreshFees: Readonly<{
|
|
643
|
+
create: (partial: Partial<RefreshFees> & Required<Omit<RefreshFees, never>>) => RefreshFees;
|
|
644
|
+
new: (partial: Partial<RefreshFees> & Required<Omit<RefreshFees, never>>) => RefreshFees;
|
|
645
|
+
defaults: () => Partial<RefreshFees>;
|
|
646
|
+
}>;
|
|
486
647
|
/**
|
|
487
648
|
* A pending round state
|
|
488
649
|
*/
|
|
@@ -506,7 +667,7 @@ export type Vtxo = {
|
|
|
506
667
|
amountSats: bigint;
|
|
507
668
|
expiryHeight: number;
|
|
508
669
|
kind: string;
|
|
509
|
-
state:
|
|
670
|
+
state: VtxoState;
|
|
510
671
|
/**
|
|
511
672
|
* Genesis chain length. Compare against `ArkInfo.max_vtxo_exit_depth` to
|
|
512
673
|
* detect VTXOs nearing the server's OOR-cosign refusal threshold.
|
|
@@ -600,6 +761,45 @@ export declare const WalletProperties: Readonly<{
|
|
|
600
761
|
new: (partial: Partial<WalletProperties> & Required<Omit<WalletProperties, never>>) => WalletProperties;
|
|
601
762
|
defaults: () => Partial<WalletProperties>;
|
|
602
763
|
}>;
|
|
764
|
+
/**
|
|
765
|
+
* Summary of one onchain wallet transaction, mirroring
|
|
766
|
+
* `bark::onchain::WalletTxInfo`.
|
|
767
|
+
*/
|
|
768
|
+
export type WalletTransaction = {
|
|
769
|
+
txid: string;
|
|
770
|
+
/**
|
|
771
|
+
* The raw transaction, consensus-serialized as hex.
|
|
772
|
+
*/
|
|
773
|
+
txHex: string;
|
|
774
|
+
/**
|
|
775
|
+
* Total fee paid by the transaction, when computable. `None` for
|
|
776
|
+
* inbound or collaboratively-funded txs whose foreign prevouts the
|
|
777
|
+
* wallet has not indexed.
|
|
778
|
+
*/
|
|
779
|
+
onchainFeeSats?: bigint;
|
|
780
|
+
/**
|
|
781
|
+
* Net change to the wallet's balance: received minus sent over
|
|
782
|
+
* wallet-owned outputs.
|
|
783
|
+
*/
|
|
784
|
+
balanceChangeSats: bigint;
|
|
785
|
+
/**
|
|
786
|
+
* `Some` if confirmed in a block, `None` if still in the mempool.
|
|
787
|
+
*/
|
|
788
|
+
confirmation?: BlockRef;
|
|
789
|
+
/**
|
|
790
|
+
* `true` when this tx spends a P2A fee anchor — i.e. it is a CPFP
|
|
791
|
+
* child bumping the parent that created the anchor (exit fee txs).
|
|
792
|
+
*/
|
|
793
|
+
isCpfp: boolean;
|
|
794
|
+
};
|
|
795
|
+
/**
|
|
796
|
+
* Generated factory for {@link WalletTransaction} record objects.
|
|
797
|
+
*/
|
|
798
|
+
export declare const WalletTransaction: Readonly<{
|
|
799
|
+
create: (partial: Partial<WalletTransaction> & Required<Omit<WalletTransaction, "onchainFeeSats" | "confirmation">>) => WalletTransaction;
|
|
800
|
+
new: (partial: Partial<WalletTransaction> & Required<Omit<WalletTransaction, "onchainFeeSats" | "confirmation">>) => WalletTransaction;
|
|
801
|
+
defaults: () => Partial<WalletTransaction>;
|
|
802
|
+
}>;
|
|
603
803
|
export declare enum Exception_Tags {
|
|
604
804
|
Inner = "Inner"
|
|
605
805
|
}
|
|
@@ -618,216 +818,1288 @@ export declare const Exception: {
|
|
|
618
818
|
readonly tag: Exception_Tags.Inner;
|
|
619
819
|
/**
|
|
620
820
|
* @private
|
|
621
|
-
* This field is private and should not be used.
|
|
821
|
+
* This field is private and should not be used.
|
|
822
|
+
*/
|
|
823
|
+
readonly [uniffiTypeNameSymbol]: string;
|
|
824
|
+
/**
|
|
825
|
+
* @private
|
|
826
|
+
* This field is private and should not be used.
|
|
827
|
+
*/
|
|
828
|
+
readonly [variantOrdinalSymbol]: 1;
|
|
829
|
+
name: string;
|
|
830
|
+
message: string;
|
|
831
|
+
stack?: string | undefined;
|
|
832
|
+
cause?: unknown;
|
|
833
|
+
};
|
|
834
|
+
instanceOf(e: any): e is {
|
|
835
|
+
readonly tag: Exception_Tags.Inner;
|
|
836
|
+
/**
|
|
837
|
+
* @private
|
|
838
|
+
* This field is private and should not be used.
|
|
839
|
+
*/
|
|
840
|
+
readonly [uniffiTypeNameSymbol]: string;
|
|
841
|
+
/**
|
|
842
|
+
* @private
|
|
843
|
+
* This field is private and should not be used.
|
|
844
|
+
*/
|
|
845
|
+
readonly [variantOrdinalSymbol]: 1;
|
|
846
|
+
name: string;
|
|
847
|
+
message: string;
|
|
848
|
+
stack?: string | undefined;
|
|
849
|
+
cause?: unknown;
|
|
850
|
+
};
|
|
851
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void;
|
|
852
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
853
|
+
stackTraceLimit: number;
|
|
854
|
+
};
|
|
855
|
+
instanceOf: (e: any) => e is {
|
|
856
|
+
readonly tag: Exception_Tags.Inner;
|
|
857
|
+
/**
|
|
858
|
+
* @private
|
|
859
|
+
* This field is private and should not be used.
|
|
860
|
+
*/
|
|
861
|
+
readonly [uniffiTypeNameSymbol]: string;
|
|
862
|
+
/**
|
|
863
|
+
* @private
|
|
864
|
+
* This field is private and should not be used.
|
|
865
|
+
*/
|
|
866
|
+
readonly [variantOrdinalSymbol]: 1;
|
|
867
|
+
name: string;
|
|
868
|
+
message: string;
|
|
869
|
+
stack?: string | undefined;
|
|
870
|
+
cause?: unknown;
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
/**
|
|
874
|
+
* The single error type surfaced across the Bark FFI.
|
|
875
|
+
*
|
|
876
|
+
* It is a thin, single-variant wrapper around [`anyhow::Error`]. uniffi error
|
|
877
|
+
* types must be enums (callback interfaces require `ConvertError`, which
|
|
878
|
+
* objects cannot provide), and `flat_error` tells uniffi to carry only the
|
|
879
|
+
* `Display` string across the boundary — so the rich anyhow context collapses
|
|
880
|
+
* to a single message on the foreign side.
|
|
881
|
+
*/
|
|
882
|
+
export type Exception = InstanceType<(typeof Exception)[keyof Omit<typeof Exception, "instanceOf">]>;
|
|
883
|
+
export declare enum ExitState_Tags {
|
|
884
|
+
Start = "Start",
|
|
885
|
+
Processing = "Processing",
|
|
886
|
+
AwaitingDelta = "AwaitingDelta",
|
|
887
|
+
Claimable = "Claimable",
|
|
888
|
+
ClaimInProgress = "ClaimInProgress",
|
|
889
|
+
Claimed = "Claimed",
|
|
890
|
+
VtxoAlreadySpent = "VtxoAlreadySpent",
|
|
891
|
+
Canceled = "Canceled"
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* State of a unilateral exit, mirroring `bark::exit::ExitState`.
|
|
895
|
+
*
|
|
896
|
+
* Serde/TS tags match upstream's kebab-case serialization (`"start"`,
|
|
897
|
+
* `"processing"`, `"awaiting-delta"`, `"claimable"`, `"claim-in-progress"`,
|
|
898
|
+
* `"claimed"`, `"vtxo-already-spent"`, `"canceled"`), with camelCase fields.
|
|
899
|
+
*/
|
|
900
|
+
export declare const ExitState: Readonly<{
|
|
901
|
+
instanceOf: (obj: any) => obj is ExitState;
|
|
902
|
+
Start: {
|
|
903
|
+
new (inner: {
|
|
904
|
+
tipHeight: number;
|
|
905
|
+
}): {
|
|
906
|
+
readonly tag: ExitState_Tags.Start;
|
|
907
|
+
readonly inner: Readonly<{
|
|
908
|
+
tipHeight: number;
|
|
909
|
+
}>;
|
|
910
|
+
/**
|
|
911
|
+
* @private
|
|
912
|
+
* This field is private and should not be used, use `tag` instead.
|
|
913
|
+
*/
|
|
914
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
915
|
+
};
|
|
916
|
+
new(inner: {
|
|
917
|
+
tipHeight: number;
|
|
918
|
+
}): {
|
|
919
|
+
readonly tag: ExitState_Tags.Start;
|
|
920
|
+
readonly inner: Readonly<{
|
|
921
|
+
tipHeight: number;
|
|
922
|
+
}>;
|
|
923
|
+
/**
|
|
924
|
+
* @private
|
|
925
|
+
* This field is private and should not be used, use `tag` instead.
|
|
926
|
+
*/
|
|
927
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
928
|
+
};
|
|
929
|
+
instanceOf(obj: any): obj is {
|
|
930
|
+
readonly tag: ExitState_Tags.Start;
|
|
931
|
+
readonly inner: Readonly<{
|
|
932
|
+
tipHeight: number;
|
|
933
|
+
}>;
|
|
934
|
+
/**
|
|
935
|
+
* @private
|
|
936
|
+
* This field is private and should not be used, use `tag` instead.
|
|
937
|
+
*/
|
|
938
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
939
|
+
};
|
|
940
|
+
};
|
|
941
|
+
Processing: {
|
|
942
|
+
new (inner: {
|
|
943
|
+
tipHeight: number;
|
|
944
|
+
transactions: Array<ExitTx>;
|
|
945
|
+
}): {
|
|
946
|
+
readonly tag: ExitState_Tags.Processing;
|
|
947
|
+
readonly inner: Readonly<{
|
|
948
|
+
tipHeight: number;
|
|
949
|
+
transactions: Array<ExitTx>;
|
|
950
|
+
}>;
|
|
951
|
+
/**
|
|
952
|
+
* @private
|
|
953
|
+
* This field is private and should not be used, use `tag` instead.
|
|
954
|
+
*/
|
|
955
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
956
|
+
};
|
|
957
|
+
new(inner: {
|
|
958
|
+
tipHeight: number;
|
|
959
|
+
transactions: Array<ExitTx>;
|
|
960
|
+
}): {
|
|
961
|
+
readonly tag: ExitState_Tags.Processing;
|
|
962
|
+
readonly inner: Readonly<{
|
|
963
|
+
tipHeight: number;
|
|
964
|
+
transactions: Array<ExitTx>;
|
|
965
|
+
}>;
|
|
966
|
+
/**
|
|
967
|
+
* @private
|
|
968
|
+
* This field is private and should not be used, use `tag` instead.
|
|
969
|
+
*/
|
|
970
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
971
|
+
};
|
|
972
|
+
instanceOf(obj: any): obj is {
|
|
973
|
+
readonly tag: ExitState_Tags.Processing;
|
|
974
|
+
readonly inner: Readonly<{
|
|
975
|
+
tipHeight: number;
|
|
976
|
+
transactions: Array<ExitTx>;
|
|
977
|
+
}>;
|
|
978
|
+
/**
|
|
979
|
+
* @private
|
|
980
|
+
* This field is private and should not be used, use `tag` instead.
|
|
981
|
+
*/
|
|
982
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
983
|
+
};
|
|
984
|
+
};
|
|
985
|
+
AwaitingDelta: {
|
|
986
|
+
new (inner: {
|
|
987
|
+
tipHeight: number;
|
|
988
|
+
confirmedBlock: BlockRef;
|
|
989
|
+
claimableHeight: number;
|
|
990
|
+
}): {
|
|
991
|
+
readonly tag: ExitState_Tags.AwaitingDelta;
|
|
992
|
+
readonly inner: Readonly<{
|
|
993
|
+
tipHeight: number;
|
|
994
|
+
confirmedBlock: BlockRef;
|
|
995
|
+
claimableHeight: number;
|
|
996
|
+
}>;
|
|
997
|
+
/**
|
|
998
|
+
* @private
|
|
999
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1000
|
+
*/
|
|
1001
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1002
|
+
};
|
|
1003
|
+
new(inner: {
|
|
1004
|
+
tipHeight: number;
|
|
1005
|
+
confirmedBlock: BlockRef;
|
|
1006
|
+
claimableHeight: number;
|
|
1007
|
+
}): {
|
|
1008
|
+
readonly tag: ExitState_Tags.AwaitingDelta;
|
|
1009
|
+
readonly inner: Readonly<{
|
|
1010
|
+
tipHeight: number;
|
|
1011
|
+
confirmedBlock: BlockRef;
|
|
1012
|
+
claimableHeight: number;
|
|
1013
|
+
}>;
|
|
1014
|
+
/**
|
|
1015
|
+
* @private
|
|
1016
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1017
|
+
*/
|
|
1018
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1019
|
+
};
|
|
1020
|
+
instanceOf(obj: any): obj is {
|
|
1021
|
+
readonly tag: ExitState_Tags.AwaitingDelta;
|
|
1022
|
+
readonly inner: Readonly<{
|
|
1023
|
+
tipHeight: number;
|
|
1024
|
+
confirmedBlock: BlockRef;
|
|
1025
|
+
claimableHeight: number;
|
|
1026
|
+
}>;
|
|
1027
|
+
/**
|
|
1028
|
+
* @private
|
|
1029
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1030
|
+
*/
|
|
1031
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1032
|
+
};
|
|
1033
|
+
};
|
|
1034
|
+
Claimable: {
|
|
1035
|
+
new (inner: {
|
|
1036
|
+
tipHeight: number;
|
|
1037
|
+
claimableSince: BlockRef;
|
|
1038
|
+
lastScannedBlock: BlockRef | undefined;
|
|
1039
|
+
}): {
|
|
1040
|
+
readonly tag: ExitState_Tags.Claimable;
|
|
1041
|
+
readonly inner: Readonly<{
|
|
1042
|
+
tipHeight: number;
|
|
1043
|
+
claimableSince: BlockRef;
|
|
1044
|
+
lastScannedBlock: BlockRef | undefined;
|
|
1045
|
+
}>;
|
|
1046
|
+
/**
|
|
1047
|
+
* @private
|
|
1048
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1049
|
+
*/
|
|
1050
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1051
|
+
};
|
|
1052
|
+
new(inner: {
|
|
1053
|
+
tipHeight: number;
|
|
1054
|
+
claimableSince: BlockRef;
|
|
1055
|
+
lastScannedBlock: BlockRef | undefined;
|
|
1056
|
+
}): {
|
|
1057
|
+
readonly tag: ExitState_Tags.Claimable;
|
|
1058
|
+
readonly inner: Readonly<{
|
|
1059
|
+
tipHeight: number;
|
|
1060
|
+
claimableSince: BlockRef;
|
|
1061
|
+
lastScannedBlock: BlockRef | undefined;
|
|
1062
|
+
}>;
|
|
1063
|
+
/**
|
|
1064
|
+
* @private
|
|
1065
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1066
|
+
*/
|
|
1067
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1068
|
+
};
|
|
1069
|
+
instanceOf(obj: any): obj is {
|
|
1070
|
+
readonly tag: ExitState_Tags.Claimable;
|
|
1071
|
+
readonly inner: Readonly<{
|
|
1072
|
+
tipHeight: number;
|
|
1073
|
+
claimableSince: BlockRef;
|
|
1074
|
+
lastScannedBlock: BlockRef | undefined;
|
|
1075
|
+
}>;
|
|
1076
|
+
/**
|
|
1077
|
+
* @private
|
|
1078
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1079
|
+
*/
|
|
1080
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1081
|
+
};
|
|
1082
|
+
};
|
|
1083
|
+
ClaimInProgress: {
|
|
1084
|
+
new (inner: {
|
|
1085
|
+
tipHeight: number;
|
|
1086
|
+
claimableSince: BlockRef;
|
|
1087
|
+
claimTxid: string;
|
|
1088
|
+
}): {
|
|
1089
|
+
readonly tag: ExitState_Tags.ClaimInProgress;
|
|
1090
|
+
readonly inner: Readonly<{
|
|
1091
|
+
tipHeight: number;
|
|
1092
|
+
claimableSince: BlockRef;
|
|
1093
|
+
claimTxid: string;
|
|
1094
|
+
}>;
|
|
1095
|
+
/**
|
|
1096
|
+
* @private
|
|
1097
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1098
|
+
*/
|
|
1099
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1100
|
+
};
|
|
1101
|
+
new(inner: {
|
|
1102
|
+
tipHeight: number;
|
|
1103
|
+
claimableSince: BlockRef;
|
|
1104
|
+
claimTxid: string;
|
|
1105
|
+
}): {
|
|
1106
|
+
readonly tag: ExitState_Tags.ClaimInProgress;
|
|
1107
|
+
readonly inner: Readonly<{
|
|
1108
|
+
tipHeight: number;
|
|
1109
|
+
claimableSince: BlockRef;
|
|
1110
|
+
claimTxid: string;
|
|
1111
|
+
}>;
|
|
1112
|
+
/**
|
|
1113
|
+
* @private
|
|
1114
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1115
|
+
*/
|
|
1116
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1117
|
+
};
|
|
1118
|
+
instanceOf(obj: any): obj is {
|
|
1119
|
+
readonly tag: ExitState_Tags.ClaimInProgress;
|
|
1120
|
+
readonly inner: Readonly<{
|
|
1121
|
+
tipHeight: number;
|
|
1122
|
+
claimableSince: BlockRef;
|
|
1123
|
+
claimTxid: string;
|
|
1124
|
+
}>;
|
|
1125
|
+
/**
|
|
1126
|
+
* @private
|
|
1127
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1128
|
+
*/
|
|
1129
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1130
|
+
};
|
|
1131
|
+
};
|
|
1132
|
+
Claimed: {
|
|
1133
|
+
new (inner: {
|
|
1134
|
+
tipHeight: number;
|
|
1135
|
+
txid: string;
|
|
1136
|
+
block: BlockRef;
|
|
1137
|
+
}): {
|
|
1138
|
+
readonly tag: ExitState_Tags.Claimed;
|
|
1139
|
+
readonly inner: Readonly<{
|
|
1140
|
+
tipHeight: number;
|
|
1141
|
+
txid: string;
|
|
1142
|
+
block: BlockRef;
|
|
1143
|
+
}>;
|
|
1144
|
+
/**
|
|
1145
|
+
* @private
|
|
1146
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1147
|
+
*/
|
|
1148
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1149
|
+
};
|
|
1150
|
+
new(inner: {
|
|
1151
|
+
tipHeight: number;
|
|
1152
|
+
txid: string;
|
|
1153
|
+
block: BlockRef;
|
|
1154
|
+
}): {
|
|
1155
|
+
readonly tag: ExitState_Tags.Claimed;
|
|
1156
|
+
readonly inner: Readonly<{
|
|
1157
|
+
tipHeight: number;
|
|
1158
|
+
txid: string;
|
|
1159
|
+
block: BlockRef;
|
|
1160
|
+
}>;
|
|
1161
|
+
/**
|
|
1162
|
+
* @private
|
|
1163
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1164
|
+
*/
|
|
1165
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1166
|
+
};
|
|
1167
|
+
instanceOf(obj: any): obj is {
|
|
1168
|
+
readonly tag: ExitState_Tags.Claimed;
|
|
1169
|
+
readonly inner: Readonly<{
|
|
1170
|
+
tipHeight: number;
|
|
1171
|
+
txid: string;
|
|
1172
|
+
block: BlockRef;
|
|
1173
|
+
}>;
|
|
1174
|
+
/**
|
|
1175
|
+
* @private
|
|
1176
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1177
|
+
*/
|
|
1178
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
VtxoAlreadySpent: {
|
|
1182
|
+
new (inner: {
|
|
1183
|
+
tipHeight: number;
|
|
1184
|
+
}): {
|
|
1185
|
+
readonly tag: ExitState_Tags.VtxoAlreadySpent;
|
|
1186
|
+
readonly inner: Readonly<{
|
|
1187
|
+
tipHeight: number;
|
|
1188
|
+
}>;
|
|
1189
|
+
/**
|
|
1190
|
+
* @private
|
|
1191
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1192
|
+
*/
|
|
1193
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1194
|
+
};
|
|
1195
|
+
new(inner: {
|
|
1196
|
+
tipHeight: number;
|
|
1197
|
+
}): {
|
|
1198
|
+
readonly tag: ExitState_Tags.VtxoAlreadySpent;
|
|
1199
|
+
readonly inner: Readonly<{
|
|
1200
|
+
tipHeight: number;
|
|
1201
|
+
}>;
|
|
1202
|
+
/**
|
|
1203
|
+
* @private
|
|
1204
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1205
|
+
*/
|
|
1206
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1207
|
+
};
|
|
1208
|
+
instanceOf(obj: any): obj is {
|
|
1209
|
+
readonly tag: ExitState_Tags.VtxoAlreadySpent;
|
|
1210
|
+
readonly inner: Readonly<{
|
|
1211
|
+
tipHeight: number;
|
|
1212
|
+
}>;
|
|
1213
|
+
/**
|
|
1214
|
+
* @private
|
|
1215
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1216
|
+
*/
|
|
1217
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1218
|
+
};
|
|
1219
|
+
};
|
|
1220
|
+
Canceled: {
|
|
1221
|
+
new (inner: {
|
|
1222
|
+
tipHeight: number;
|
|
1223
|
+
}): {
|
|
1224
|
+
readonly tag: ExitState_Tags.Canceled;
|
|
1225
|
+
readonly inner: Readonly<{
|
|
1226
|
+
tipHeight: number;
|
|
1227
|
+
}>;
|
|
1228
|
+
/**
|
|
1229
|
+
* @private
|
|
1230
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1231
|
+
*/
|
|
1232
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1233
|
+
};
|
|
1234
|
+
new(inner: {
|
|
1235
|
+
tipHeight: number;
|
|
1236
|
+
}): {
|
|
1237
|
+
readonly tag: ExitState_Tags.Canceled;
|
|
1238
|
+
readonly inner: Readonly<{
|
|
1239
|
+
tipHeight: number;
|
|
1240
|
+
}>;
|
|
1241
|
+
/**
|
|
1242
|
+
* @private
|
|
1243
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1244
|
+
*/
|
|
1245
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1246
|
+
};
|
|
1247
|
+
instanceOf(obj: any): obj is {
|
|
1248
|
+
readonly tag: ExitState_Tags.Canceled;
|
|
1249
|
+
readonly inner: Readonly<{
|
|
1250
|
+
tipHeight: number;
|
|
1251
|
+
}>;
|
|
1252
|
+
/**
|
|
1253
|
+
* @private
|
|
1254
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1255
|
+
*/
|
|
1256
|
+
readonly [uniffiTypeNameSymbol]: "ExitState";
|
|
1257
|
+
};
|
|
1258
|
+
};
|
|
1259
|
+
}>;
|
|
1260
|
+
/**
|
|
1261
|
+
* State of a unilateral exit, mirroring `bark::exit::ExitState`.
|
|
1262
|
+
*
|
|
1263
|
+
* Serde/TS tags match upstream's kebab-case serialization (`"start"`,
|
|
1264
|
+
* `"processing"`, `"awaiting-delta"`, `"claimable"`, `"claim-in-progress"`,
|
|
1265
|
+
* `"claimed"`, `"vtxo-already-spent"`, `"canceled"`), with camelCase fields.
|
|
1266
|
+
*/
|
|
1267
|
+
export type ExitState = InstanceType<(typeof ExitState)[keyof Omit<typeof ExitState, "instanceOf">]>;
|
|
1268
|
+
export declare enum ExitTxOrigin_Tags {
|
|
1269
|
+
Wallet = "Wallet",
|
|
1270
|
+
Mempool = "Mempool",
|
|
1271
|
+
Block = "Block"
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Where an exit transaction was first seen, mirroring `bark::exit::ExitTxOrigin`.
|
|
1275
|
+
*/
|
|
1276
|
+
export declare const ExitTxOrigin: Readonly<{
|
|
1277
|
+
instanceOf: (obj: any) => obj is ExitTxOrigin;
|
|
1278
|
+
Wallet: {
|
|
1279
|
+
new (inner: {
|
|
1280
|
+
confirmedIn: BlockRef | undefined;
|
|
1281
|
+
}): {
|
|
1282
|
+
readonly tag: ExitTxOrigin_Tags.Wallet;
|
|
1283
|
+
readonly inner: Readonly<{
|
|
1284
|
+
confirmedIn: BlockRef | undefined;
|
|
1285
|
+
}>;
|
|
1286
|
+
/**
|
|
1287
|
+
* @private
|
|
1288
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1289
|
+
*/
|
|
1290
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxOrigin";
|
|
1291
|
+
};
|
|
1292
|
+
new(inner: {
|
|
1293
|
+
confirmedIn: BlockRef | undefined;
|
|
1294
|
+
}): {
|
|
1295
|
+
readonly tag: ExitTxOrigin_Tags.Wallet;
|
|
1296
|
+
readonly inner: Readonly<{
|
|
1297
|
+
confirmedIn: BlockRef | undefined;
|
|
1298
|
+
}>;
|
|
1299
|
+
/**
|
|
1300
|
+
* @private
|
|
1301
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1302
|
+
*/
|
|
1303
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxOrigin";
|
|
1304
|
+
};
|
|
1305
|
+
instanceOf(obj: any): obj is {
|
|
1306
|
+
readonly tag: ExitTxOrigin_Tags.Wallet;
|
|
1307
|
+
readonly inner: Readonly<{
|
|
1308
|
+
confirmedIn: BlockRef | undefined;
|
|
1309
|
+
}>;
|
|
1310
|
+
/**
|
|
1311
|
+
* @private
|
|
1312
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1313
|
+
*/
|
|
1314
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxOrigin";
|
|
1315
|
+
};
|
|
1316
|
+
};
|
|
1317
|
+
Mempool: {
|
|
1318
|
+
new (): {
|
|
1319
|
+
readonly tag: ExitTxOrigin_Tags.Mempool;
|
|
1320
|
+
/**
|
|
1321
|
+
* @private
|
|
1322
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1323
|
+
*/
|
|
1324
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxOrigin";
|
|
1325
|
+
};
|
|
1326
|
+
new(): {
|
|
1327
|
+
readonly tag: ExitTxOrigin_Tags.Mempool;
|
|
1328
|
+
/**
|
|
1329
|
+
* @private
|
|
1330
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1331
|
+
*/
|
|
1332
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxOrigin";
|
|
1333
|
+
};
|
|
1334
|
+
instanceOf(obj: any): obj is {
|
|
1335
|
+
readonly tag: ExitTxOrigin_Tags.Mempool;
|
|
1336
|
+
/**
|
|
1337
|
+
* @private
|
|
1338
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1339
|
+
*/
|
|
1340
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxOrigin";
|
|
1341
|
+
};
|
|
1342
|
+
};
|
|
1343
|
+
Block: {
|
|
1344
|
+
new (inner: {
|
|
1345
|
+
confirmedIn: BlockRef;
|
|
1346
|
+
}): {
|
|
1347
|
+
readonly tag: ExitTxOrigin_Tags.Block;
|
|
1348
|
+
readonly inner: Readonly<{
|
|
1349
|
+
confirmedIn: BlockRef;
|
|
1350
|
+
}>;
|
|
1351
|
+
/**
|
|
1352
|
+
* @private
|
|
1353
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1354
|
+
*/
|
|
1355
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxOrigin";
|
|
1356
|
+
};
|
|
1357
|
+
new(inner: {
|
|
1358
|
+
confirmedIn: BlockRef;
|
|
1359
|
+
}): {
|
|
1360
|
+
readonly tag: ExitTxOrigin_Tags.Block;
|
|
1361
|
+
readonly inner: Readonly<{
|
|
1362
|
+
confirmedIn: BlockRef;
|
|
1363
|
+
}>;
|
|
1364
|
+
/**
|
|
1365
|
+
* @private
|
|
1366
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1367
|
+
*/
|
|
1368
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxOrigin";
|
|
1369
|
+
};
|
|
1370
|
+
instanceOf(obj: any): obj is {
|
|
1371
|
+
readonly tag: ExitTxOrigin_Tags.Block;
|
|
1372
|
+
readonly inner: Readonly<{
|
|
1373
|
+
confirmedIn: BlockRef;
|
|
1374
|
+
}>;
|
|
1375
|
+
/**
|
|
1376
|
+
* @private
|
|
1377
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1378
|
+
*/
|
|
1379
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxOrigin";
|
|
1380
|
+
};
|
|
1381
|
+
};
|
|
1382
|
+
}>;
|
|
1383
|
+
/**
|
|
1384
|
+
* Where an exit transaction was first seen, mirroring `bark::exit::ExitTxOrigin`.
|
|
1385
|
+
*/
|
|
1386
|
+
export type ExitTxOrigin = InstanceType<(typeof ExitTxOrigin)[keyof Omit<typeof ExitTxOrigin, "instanceOf">]>;
|
|
1387
|
+
export declare enum ExitTxStatus_Tags {
|
|
1388
|
+
VerifyInputs = "VerifyInputs",
|
|
1389
|
+
AwaitingInputConfirmation = "AwaitingInputConfirmation",
|
|
1390
|
+
AwaitingCpfpBroadcast = "AwaitingCpfpBroadcast",
|
|
1391
|
+
AwaitingConfirmation = "AwaitingConfirmation",
|
|
1392
|
+
Confirmed = "Confirmed"
|
|
1393
|
+
}
|
|
1394
|
+
/**
|
|
1395
|
+
* Broadcast/confirmation status of one transaction in an exit chain,
|
|
1396
|
+
* mirroring `bark::exit::ExitTxStatus`.
|
|
1397
|
+
*/
|
|
1398
|
+
export declare const ExitTxStatus: Readonly<{
|
|
1399
|
+
instanceOf: (obj: any) => obj is ExitTxStatus;
|
|
1400
|
+
VerifyInputs: {
|
|
1401
|
+
new (): {
|
|
1402
|
+
readonly tag: ExitTxStatus_Tags.VerifyInputs;
|
|
1403
|
+
/**
|
|
1404
|
+
* @private
|
|
1405
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1406
|
+
*/
|
|
1407
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1408
|
+
};
|
|
1409
|
+
new(): {
|
|
1410
|
+
readonly tag: ExitTxStatus_Tags.VerifyInputs;
|
|
1411
|
+
/**
|
|
1412
|
+
* @private
|
|
1413
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1414
|
+
*/
|
|
1415
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1416
|
+
};
|
|
1417
|
+
instanceOf(obj: any): obj is {
|
|
1418
|
+
readonly tag: ExitTxStatus_Tags.VerifyInputs;
|
|
1419
|
+
/**
|
|
1420
|
+
* @private
|
|
1421
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1422
|
+
*/
|
|
1423
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1424
|
+
};
|
|
1425
|
+
};
|
|
1426
|
+
AwaitingInputConfirmation: {
|
|
1427
|
+
new (inner: {
|
|
1428
|
+
txids: Array<string>;
|
|
1429
|
+
}): {
|
|
1430
|
+
readonly tag: ExitTxStatus_Tags.AwaitingInputConfirmation;
|
|
1431
|
+
readonly inner: Readonly<{
|
|
1432
|
+
txids: Array<string>;
|
|
1433
|
+
}>;
|
|
1434
|
+
/**
|
|
1435
|
+
* @private
|
|
1436
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1437
|
+
*/
|
|
1438
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1439
|
+
};
|
|
1440
|
+
new(inner: {
|
|
1441
|
+
txids: Array<string>;
|
|
1442
|
+
}): {
|
|
1443
|
+
readonly tag: ExitTxStatus_Tags.AwaitingInputConfirmation;
|
|
1444
|
+
readonly inner: Readonly<{
|
|
1445
|
+
txids: Array<string>;
|
|
1446
|
+
}>;
|
|
1447
|
+
/**
|
|
1448
|
+
* @private
|
|
1449
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1450
|
+
*/
|
|
1451
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1452
|
+
};
|
|
1453
|
+
instanceOf(obj: any): obj is {
|
|
1454
|
+
readonly tag: ExitTxStatus_Tags.AwaitingInputConfirmation;
|
|
1455
|
+
readonly inner: Readonly<{
|
|
1456
|
+
txids: Array<string>;
|
|
1457
|
+
}>;
|
|
1458
|
+
/**
|
|
1459
|
+
* @private
|
|
1460
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1461
|
+
*/
|
|
1462
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
AwaitingCpfpBroadcast: {
|
|
1466
|
+
new (): {
|
|
1467
|
+
readonly tag: ExitTxStatus_Tags.AwaitingCpfpBroadcast;
|
|
1468
|
+
/**
|
|
1469
|
+
* @private
|
|
1470
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1471
|
+
*/
|
|
1472
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1473
|
+
};
|
|
1474
|
+
new(): {
|
|
1475
|
+
readonly tag: ExitTxStatus_Tags.AwaitingCpfpBroadcast;
|
|
1476
|
+
/**
|
|
1477
|
+
* @private
|
|
1478
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1479
|
+
*/
|
|
1480
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1481
|
+
};
|
|
1482
|
+
instanceOf(obj: any): obj is {
|
|
1483
|
+
readonly tag: ExitTxStatus_Tags.AwaitingCpfpBroadcast;
|
|
1484
|
+
/**
|
|
1485
|
+
* @private
|
|
1486
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1487
|
+
*/
|
|
1488
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1489
|
+
};
|
|
1490
|
+
};
|
|
1491
|
+
AwaitingConfirmation: {
|
|
1492
|
+
new (inner: {
|
|
1493
|
+
childTxid: string;
|
|
1494
|
+
origin: ExitTxOrigin;
|
|
1495
|
+
}): {
|
|
1496
|
+
readonly tag: ExitTxStatus_Tags.AwaitingConfirmation;
|
|
1497
|
+
readonly inner: Readonly<{
|
|
1498
|
+
childTxid: string;
|
|
1499
|
+
origin: ExitTxOrigin;
|
|
1500
|
+
}>;
|
|
1501
|
+
/**
|
|
1502
|
+
* @private
|
|
1503
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1504
|
+
*/
|
|
1505
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1506
|
+
};
|
|
1507
|
+
new(inner: {
|
|
1508
|
+
childTxid: string;
|
|
1509
|
+
origin: ExitTxOrigin;
|
|
1510
|
+
}): {
|
|
1511
|
+
readonly tag: ExitTxStatus_Tags.AwaitingConfirmation;
|
|
1512
|
+
readonly inner: Readonly<{
|
|
1513
|
+
childTxid: string;
|
|
1514
|
+
origin: ExitTxOrigin;
|
|
1515
|
+
}>;
|
|
1516
|
+
/**
|
|
1517
|
+
* @private
|
|
1518
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1519
|
+
*/
|
|
1520
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1521
|
+
};
|
|
1522
|
+
instanceOf(obj: any): obj is {
|
|
1523
|
+
readonly tag: ExitTxStatus_Tags.AwaitingConfirmation;
|
|
1524
|
+
readonly inner: Readonly<{
|
|
1525
|
+
childTxid: string;
|
|
1526
|
+
origin: ExitTxOrigin;
|
|
1527
|
+
}>;
|
|
1528
|
+
/**
|
|
1529
|
+
* @private
|
|
1530
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1531
|
+
*/
|
|
1532
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1533
|
+
};
|
|
1534
|
+
};
|
|
1535
|
+
Confirmed: {
|
|
1536
|
+
new (inner: {
|
|
1537
|
+
childTxid: string;
|
|
1538
|
+
block: BlockRef;
|
|
1539
|
+
origin: ExitTxOrigin;
|
|
1540
|
+
}): {
|
|
1541
|
+
readonly tag: ExitTxStatus_Tags.Confirmed;
|
|
1542
|
+
readonly inner: Readonly<{
|
|
1543
|
+
childTxid: string;
|
|
1544
|
+
block: BlockRef;
|
|
1545
|
+
origin: ExitTxOrigin;
|
|
1546
|
+
}>;
|
|
1547
|
+
/**
|
|
1548
|
+
* @private
|
|
1549
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1550
|
+
*/
|
|
1551
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1552
|
+
};
|
|
1553
|
+
new(inner: {
|
|
1554
|
+
childTxid: string;
|
|
1555
|
+
block: BlockRef;
|
|
1556
|
+
origin: ExitTxOrigin;
|
|
1557
|
+
}): {
|
|
1558
|
+
readonly tag: ExitTxStatus_Tags.Confirmed;
|
|
1559
|
+
readonly inner: Readonly<{
|
|
1560
|
+
childTxid: string;
|
|
1561
|
+
block: BlockRef;
|
|
1562
|
+
origin: ExitTxOrigin;
|
|
1563
|
+
}>;
|
|
1564
|
+
/**
|
|
1565
|
+
* @private
|
|
1566
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1567
|
+
*/
|
|
1568
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1569
|
+
};
|
|
1570
|
+
instanceOf(obj: any): obj is {
|
|
1571
|
+
readonly tag: ExitTxStatus_Tags.Confirmed;
|
|
1572
|
+
readonly inner: Readonly<{
|
|
1573
|
+
childTxid: string;
|
|
1574
|
+
block: BlockRef;
|
|
1575
|
+
origin: ExitTxOrigin;
|
|
1576
|
+
}>;
|
|
1577
|
+
/**
|
|
1578
|
+
* @private
|
|
1579
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1580
|
+
*/
|
|
1581
|
+
readonly [uniffiTypeNameSymbol]: "ExitTxStatus";
|
|
1582
|
+
};
|
|
1583
|
+
};
|
|
1584
|
+
}>;
|
|
1585
|
+
/**
|
|
1586
|
+
* Broadcast/confirmation status of one transaction in an exit chain,
|
|
1587
|
+
* mirroring `bark::exit::ExitTxStatus`.
|
|
1588
|
+
*/
|
|
1589
|
+
export type ExitTxStatus = InstanceType<(typeof ExitTxStatus)[keyof Omit<typeof ExitTxStatus, "instanceOf">]>;
|
|
1590
|
+
export declare enum LightningSendStatus_Tags {
|
|
1591
|
+
Unknown = "Unknown",
|
|
1592
|
+
InProgress = "InProgress",
|
|
1593
|
+
Paid = "Paid"
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* Terminal/in-flight state of an outgoing lightning send.
|
|
1597
|
+
*
|
|
1598
|
+
* Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
|
|
1599
|
+
* `check_lightning_payment` now return this so callers can drive the
|
|
1600
|
+
* crash-safe send flow themselves (initiate with `wait = false`, then poll).
|
|
1601
|
+
*/
|
|
1602
|
+
export declare const LightningSendStatus: Readonly<{
|
|
1603
|
+
instanceOf: (obj: any) => obj is LightningSendStatus;
|
|
1604
|
+
Unknown: {
|
|
1605
|
+
new (): {
|
|
1606
|
+
readonly tag: LightningSendStatus_Tags.Unknown;
|
|
1607
|
+
/**
|
|
1608
|
+
* @private
|
|
1609
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1610
|
+
*/
|
|
1611
|
+
readonly [uniffiTypeNameSymbol]: "LightningSendStatus";
|
|
1612
|
+
};
|
|
1613
|
+
new(): {
|
|
1614
|
+
readonly tag: LightningSendStatus_Tags.Unknown;
|
|
1615
|
+
/**
|
|
1616
|
+
* @private
|
|
1617
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1618
|
+
*/
|
|
1619
|
+
readonly [uniffiTypeNameSymbol]: "LightningSendStatus";
|
|
1620
|
+
};
|
|
1621
|
+
instanceOf(obj: any): obj is {
|
|
1622
|
+
readonly tag: LightningSendStatus_Tags.Unknown;
|
|
1623
|
+
/**
|
|
1624
|
+
* @private
|
|
1625
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1626
|
+
*/
|
|
1627
|
+
readonly [uniffiTypeNameSymbol]: "LightningSendStatus";
|
|
1628
|
+
};
|
|
1629
|
+
};
|
|
1630
|
+
InProgress: {
|
|
1631
|
+
new (inner: {
|
|
1632
|
+
send: LightningSend;
|
|
1633
|
+
}): {
|
|
1634
|
+
readonly tag: LightningSendStatus_Tags.InProgress;
|
|
1635
|
+
readonly inner: Readonly<{
|
|
1636
|
+
send: LightningSend;
|
|
1637
|
+
}>;
|
|
1638
|
+
/**
|
|
1639
|
+
* @private
|
|
1640
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1641
|
+
*/
|
|
1642
|
+
readonly [uniffiTypeNameSymbol]: "LightningSendStatus";
|
|
1643
|
+
};
|
|
1644
|
+
new(inner: {
|
|
1645
|
+
send: LightningSend;
|
|
1646
|
+
}): {
|
|
1647
|
+
readonly tag: LightningSendStatus_Tags.InProgress;
|
|
1648
|
+
readonly inner: Readonly<{
|
|
1649
|
+
send: LightningSend;
|
|
1650
|
+
}>;
|
|
1651
|
+
/**
|
|
1652
|
+
* @private
|
|
1653
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1654
|
+
*/
|
|
1655
|
+
readonly [uniffiTypeNameSymbol]: "LightningSendStatus";
|
|
1656
|
+
};
|
|
1657
|
+
instanceOf(obj: any): obj is {
|
|
1658
|
+
readonly tag: LightningSendStatus_Tags.InProgress;
|
|
1659
|
+
readonly inner: Readonly<{
|
|
1660
|
+
send: LightningSend;
|
|
1661
|
+
}>;
|
|
1662
|
+
/**
|
|
1663
|
+
* @private
|
|
1664
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1665
|
+
*/
|
|
1666
|
+
readonly [uniffiTypeNameSymbol]: "LightningSendStatus";
|
|
1667
|
+
};
|
|
1668
|
+
};
|
|
1669
|
+
Paid: {
|
|
1670
|
+
new (inner: {
|
|
1671
|
+
paymentHash: string;
|
|
1672
|
+
preimage: string;
|
|
1673
|
+
}): {
|
|
1674
|
+
readonly tag: LightningSendStatus_Tags.Paid;
|
|
1675
|
+
readonly inner: Readonly<{
|
|
1676
|
+
paymentHash: string;
|
|
1677
|
+
preimage: string;
|
|
1678
|
+
}>;
|
|
1679
|
+
/**
|
|
1680
|
+
* @private
|
|
1681
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1682
|
+
*/
|
|
1683
|
+
readonly [uniffiTypeNameSymbol]: "LightningSendStatus";
|
|
1684
|
+
};
|
|
1685
|
+
new(inner: {
|
|
1686
|
+
paymentHash: string;
|
|
1687
|
+
preimage: string;
|
|
1688
|
+
}): {
|
|
1689
|
+
readonly tag: LightningSendStatus_Tags.Paid;
|
|
1690
|
+
readonly inner: Readonly<{
|
|
1691
|
+
paymentHash: string;
|
|
1692
|
+
preimage: string;
|
|
1693
|
+
}>;
|
|
1694
|
+
/**
|
|
1695
|
+
* @private
|
|
1696
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1697
|
+
*/
|
|
1698
|
+
readonly [uniffiTypeNameSymbol]: "LightningSendStatus";
|
|
1699
|
+
};
|
|
1700
|
+
instanceOf(obj: any): obj is {
|
|
1701
|
+
readonly tag: LightningSendStatus_Tags.Paid;
|
|
1702
|
+
readonly inner: Readonly<{
|
|
1703
|
+
paymentHash: string;
|
|
1704
|
+
preimage: string;
|
|
1705
|
+
}>;
|
|
1706
|
+
/**
|
|
1707
|
+
* @private
|
|
1708
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1709
|
+
*/
|
|
1710
|
+
readonly [uniffiTypeNameSymbol]: "LightningSendStatus";
|
|
1711
|
+
};
|
|
1712
|
+
};
|
|
1713
|
+
}>;
|
|
1714
|
+
/**
|
|
1715
|
+
* Terminal/in-flight state of an outgoing lightning send.
|
|
1716
|
+
*
|
|
1717
|
+
* Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
|
|
1718
|
+
* `check_lightning_payment` now return this so callers can drive the
|
|
1719
|
+
* crash-safe send flow themselves (initiate with `wait = false`, then poll).
|
|
1720
|
+
*/
|
|
1721
|
+
export type LightningSendStatus = InstanceType<(typeof LightningSendStatus)[keyof Omit<typeof LightningSendStatus, "instanceOf">]>;
|
|
1722
|
+
/**
|
|
1723
|
+
* Severity of a log record.
|
|
1724
|
+
*/
|
|
1725
|
+
export declare enum LogLevel {
|
|
1726
|
+
Error = 0,
|
|
1727
|
+
Warn = 1,
|
|
1728
|
+
Info = 2,
|
|
1729
|
+
Debug = 3,
|
|
1730
|
+
Trace = 4
|
|
1731
|
+
}
|
|
1732
|
+
export declare enum Network {
|
|
1733
|
+
Bitcoin = 0,
|
|
1734
|
+
Testnet = 1,
|
|
1735
|
+
Signet = 2,
|
|
1736
|
+
Regtest = 3
|
|
1737
|
+
}
|
|
1738
|
+
export declare enum OnchainUtxo_Tags {
|
|
1739
|
+
Local = "Local",
|
|
1740
|
+
Exit = "Exit"
|
|
1741
|
+
}
|
|
1742
|
+
/**
|
|
1743
|
+
* An onchain UTXO known to the wallet, mirroring `bark::onchain::Utxo`.
|
|
1744
|
+
*/
|
|
1745
|
+
export declare const OnchainUtxo: Readonly<{
|
|
1746
|
+
instanceOf: (obj: any) => obj is OnchainUtxo;
|
|
1747
|
+
Local: {
|
|
1748
|
+
new (inner: {
|
|
1749
|
+
outpoint: OutPoint;
|
|
1750
|
+
amountSats: bigint;
|
|
1751
|
+
/**
|
|
1752
|
+
* `None` if unconfirmed.
|
|
1753
|
+
*/ confirmationHeight: /*u32*/ number | undefined;
|
|
1754
|
+
}): {
|
|
1755
|
+
readonly tag: OnchainUtxo_Tags.Local;
|
|
1756
|
+
readonly inner: Readonly<{
|
|
1757
|
+
outpoint: OutPoint;
|
|
1758
|
+
amountSats: bigint;
|
|
1759
|
+
confirmationHeight: /*u32*/ number | undefined;
|
|
1760
|
+
}>;
|
|
1761
|
+
/**
|
|
1762
|
+
* @private
|
|
1763
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1764
|
+
*/
|
|
1765
|
+
readonly [uniffiTypeNameSymbol]: "OnchainUtxo";
|
|
1766
|
+
};
|
|
1767
|
+
new(inner: {
|
|
1768
|
+
outpoint: OutPoint;
|
|
1769
|
+
amountSats: bigint;
|
|
1770
|
+
/**
|
|
1771
|
+
* `None` if unconfirmed.
|
|
1772
|
+
*/ confirmationHeight: /*u32*/ number | undefined;
|
|
1773
|
+
}): {
|
|
1774
|
+
readonly tag: OnchainUtxo_Tags.Local;
|
|
1775
|
+
readonly inner: Readonly<{
|
|
1776
|
+
outpoint: OutPoint;
|
|
1777
|
+
amountSats: bigint;
|
|
1778
|
+
confirmationHeight: /*u32*/ number | undefined;
|
|
1779
|
+
}>;
|
|
1780
|
+
/**
|
|
1781
|
+
* @private
|
|
1782
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1783
|
+
*/
|
|
1784
|
+
readonly [uniffiTypeNameSymbol]: "OnchainUtxo";
|
|
1785
|
+
};
|
|
1786
|
+
instanceOf(obj: any): obj is {
|
|
1787
|
+
readonly tag: OnchainUtxo_Tags.Local;
|
|
1788
|
+
readonly inner: Readonly<{
|
|
1789
|
+
outpoint: OutPoint;
|
|
1790
|
+
amountSats: bigint;
|
|
1791
|
+
confirmationHeight: /*u32*/ number | undefined;
|
|
1792
|
+
}>;
|
|
1793
|
+
/**
|
|
1794
|
+
* @private
|
|
1795
|
+
* This field is private and should not be used, use `tag` instead.
|
|
622
1796
|
*/
|
|
623
|
-
readonly [uniffiTypeNameSymbol]:
|
|
1797
|
+
readonly [uniffiTypeNameSymbol]: "OnchainUtxo";
|
|
1798
|
+
};
|
|
1799
|
+
};
|
|
1800
|
+
Exit: {
|
|
1801
|
+
new (inner: {
|
|
1802
|
+
vtxoId: string;
|
|
1803
|
+
amountSats: bigint;
|
|
1804
|
+
/**
|
|
1805
|
+
* Block height associated with the exit's validity window.
|
|
1806
|
+
*/ height: number;
|
|
1807
|
+
}): {
|
|
1808
|
+
readonly tag: OnchainUtxo_Tags.Exit;
|
|
1809
|
+
readonly inner: Readonly<{
|
|
1810
|
+
vtxoId: string;
|
|
1811
|
+
amountSats: bigint;
|
|
1812
|
+
height: number;
|
|
1813
|
+
}>;
|
|
624
1814
|
/**
|
|
625
1815
|
* @private
|
|
626
|
-
* This field is private and should not be used.
|
|
1816
|
+
* This field is private and should not be used, use `tag` instead.
|
|
627
1817
|
*/
|
|
628
|
-
readonly [
|
|
629
|
-
name: string;
|
|
630
|
-
message: string;
|
|
631
|
-
stack?: string | undefined;
|
|
632
|
-
cause?: unknown;
|
|
1818
|
+
readonly [uniffiTypeNameSymbol]: "OnchainUtxo";
|
|
633
1819
|
};
|
|
634
|
-
|
|
635
|
-
|
|
1820
|
+
new(inner: {
|
|
1821
|
+
vtxoId: string;
|
|
1822
|
+
amountSats: bigint;
|
|
1823
|
+
/**
|
|
1824
|
+
* Block height associated with the exit's validity window.
|
|
1825
|
+
*/ height: number;
|
|
1826
|
+
}): {
|
|
1827
|
+
readonly tag: OnchainUtxo_Tags.Exit;
|
|
1828
|
+
readonly inner: Readonly<{
|
|
1829
|
+
vtxoId: string;
|
|
1830
|
+
amountSats: bigint;
|
|
1831
|
+
height: number;
|
|
1832
|
+
}>;
|
|
636
1833
|
/**
|
|
637
1834
|
* @private
|
|
638
|
-
* This field is private and should not be used.
|
|
1835
|
+
* This field is private and should not be used, use `tag` instead.
|
|
639
1836
|
*/
|
|
640
|
-
readonly [uniffiTypeNameSymbol]:
|
|
1837
|
+
readonly [uniffiTypeNameSymbol]: "OnchainUtxo";
|
|
1838
|
+
};
|
|
1839
|
+
instanceOf(obj: any): obj is {
|
|
1840
|
+
readonly tag: OnchainUtxo_Tags.Exit;
|
|
1841
|
+
readonly inner: Readonly<{
|
|
1842
|
+
vtxoId: string;
|
|
1843
|
+
amountSats: bigint;
|
|
1844
|
+
height: number;
|
|
1845
|
+
}>;
|
|
641
1846
|
/**
|
|
642
1847
|
* @private
|
|
643
|
-
* This field is private and should not be used.
|
|
1848
|
+
* This field is private and should not be used, use `tag` instead.
|
|
644
1849
|
*/
|
|
645
|
-
readonly [
|
|
646
|
-
name: string;
|
|
647
|
-
message: string;
|
|
648
|
-
stack?: string | undefined;
|
|
649
|
-
cause?: unknown;
|
|
1850
|
+
readonly [uniffiTypeNameSymbol]: "OnchainUtxo";
|
|
650
1851
|
};
|
|
651
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void;
|
|
652
|
-
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
653
|
-
stackTraceLimit: number;
|
|
654
|
-
};
|
|
655
|
-
instanceOf: (e: any) => e is {
|
|
656
|
-
readonly tag: Exception_Tags.Inner;
|
|
657
|
-
/**
|
|
658
|
-
* @private
|
|
659
|
-
* This field is private and should not be used.
|
|
660
|
-
*/
|
|
661
|
-
readonly [uniffiTypeNameSymbol]: string;
|
|
662
|
-
/**
|
|
663
|
-
* @private
|
|
664
|
-
* This field is private and should not be used.
|
|
665
|
-
*/
|
|
666
|
-
readonly [variantOrdinalSymbol]: 1;
|
|
667
|
-
name: string;
|
|
668
|
-
message: string;
|
|
669
|
-
stack?: string | undefined;
|
|
670
|
-
cause?: unknown;
|
|
671
1852
|
};
|
|
672
|
-
}
|
|
1853
|
+
}>;
|
|
673
1854
|
/**
|
|
674
|
-
*
|
|
675
|
-
*
|
|
676
|
-
* It is a thin, single-variant wrapper around [`anyhow::Error`]. uniffi error
|
|
677
|
-
* types must be enums (callback interfaces require `ConvertError`, which
|
|
678
|
-
* objects cannot provide), and `flat_error` tells uniffi to carry only the
|
|
679
|
-
* `Display` string across the boundary — so the rich anyhow context collapses
|
|
680
|
-
* to a single message on the foreign side.
|
|
1855
|
+
* An onchain UTXO known to the wallet, mirroring `bark::onchain::Utxo`.
|
|
681
1856
|
*/
|
|
682
|
-
export type
|
|
683
|
-
export declare enum
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
Paid = "Paid"
|
|
1857
|
+
export type OnchainUtxo = InstanceType<(typeof OnchainUtxo)[keyof Omit<typeof OnchainUtxo, "instanceOf">]>;
|
|
1858
|
+
export declare enum VtxoLockHolder_Tags {
|
|
1859
|
+
Action = "Action",
|
|
1860
|
+
Movement = "Movement"
|
|
687
1861
|
}
|
|
688
1862
|
/**
|
|
689
|
-
*
|
|
1863
|
+
* Who holds the lock on a [`VtxoState::Locked`] VTXO.
|
|
690
1864
|
*
|
|
691
|
-
* Mirrors `bark
|
|
692
|
-
* `
|
|
693
|
-
*
|
|
1865
|
+
* Mirrors `bark::vtxo::VtxoLockHolder`. Action-based subsystems lock with
|
|
1866
|
+
* `Action`; pre-action subsystems (round, offboard, board, lightning
|
|
1867
|
+
* receive) lock with `Movement`. As upstream converts subsystems to
|
|
1868
|
+
* actions, new locks migrate from `Movement` to `Action` per-subsystem.
|
|
1869
|
+
*
|
|
1870
|
+
* Serde/TS tags match upstream's serialization: `"action"` / `"movement"`.
|
|
694
1871
|
*/
|
|
695
|
-
export declare const
|
|
696
|
-
instanceOf: (obj: any) => obj is
|
|
697
|
-
|
|
698
|
-
new (
|
|
699
|
-
|
|
1872
|
+
export declare const VtxoLockHolder: Readonly<{
|
|
1873
|
+
instanceOf: (obj: any) => obj is VtxoLockHolder;
|
|
1874
|
+
Action: {
|
|
1875
|
+
new (inner: {
|
|
1876
|
+
id: string;
|
|
1877
|
+
}): {
|
|
1878
|
+
readonly tag: VtxoLockHolder_Tags.Action;
|
|
1879
|
+
readonly inner: Readonly<{
|
|
1880
|
+
id: string;
|
|
1881
|
+
}>;
|
|
700
1882
|
/**
|
|
701
1883
|
* @private
|
|
702
1884
|
* This field is private and should not be used, use `tag` instead.
|
|
703
1885
|
*/
|
|
704
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
1886
|
+
readonly [uniffiTypeNameSymbol]: "VtxoLockHolder";
|
|
705
1887
|
};
|
|
706
|
-
new(
|
|
707
|
-
|
|
1888
|
+
new(inner: {
|
|
1889
|
+
id: string;
|
|
1890
|
+
}): {
|
|
1891
|
+
readonly tag: VtxoLockHolder_Tags.Action;
|
|
1892
|
+
readonly inner: Readonly<{
|
|
1893
|
+
id: string;
|
|
1894
|
+
}>;
|
|
708
1895
|
/**
|
|
709
1896
|
* @private
|
|
710
1897
|
* This field is private and should not be used, use `tag` instead.
|
|
711
1898
|
*/
|
|
712
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
1899
|
+
readonly [uniffiTypeNameSymbol]: "VtxoLockHolder";
|
|
713
1900
|
};
|
|
714
1901
|
instanceOf(obj: any): obj is {
|
|
715
|
-
readonly tag:
|
|
1902
|
+
readonly tag: VtxoLockHolder_Tags.Action;
|
|
1903
|
+
readonly inner: Readonly<{
|
|
1904
|
+
id: string;
|
|
1905
|
+
}>;
|
|
716
1906
|
/**
|
|
717
1907
|
* @private
|
|
718
1908
|
* This field is private and should not be used, use `tag` instead.
|
|
719
1909
|
*/
|
|
720
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
1910
|
+
readonly [uniffiTypeNameSymbol]: "VtxoLockHolder";
|
|
721
1911
|
};
|
|
722
1912
|
};
|
|
723
|
-
|
|
1913
|
+
Movement: {
|
|
724
1914
|
new (inner: {
|
|
725
|
-
|
|
1915
|
+
id: number;
|
|
726
1916
|
}): {
|
|
727
|
-
readonly tag:
|
|
1917
|
+
readonly tag: VtxoLockHolder_Tags.Movement;
|
|
728
1918
|
readonly inner: Readonly<{
|
|
729
|
-
|
|
1919
|
+
id: number;
|
|
730
1920
|
}>;
|
|
731
1921
|
/**
|
|
732
1922
|
* @private
|
|
733
1923
|
* This field is private and should not be used, use `tag` instead.
|
|
734
1924
|
*/
|
|
735
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
1925
|
+
readonly [uniffiTypeNameSymbol]: "VtxoLockHolder";
|
|
736
1926
|
};
|
|
737
1927
|
new(inner: {
|
|
738
|
-
|
|
1928
|
+
id: number;
|
|
739
1929
|
}): {
|
|
740
|
-
readonly tag:
|
|
1930
|
+
readonly tag: VtxoLockHolder_Tags.Movement;
|
|
741
1931
|
readonly inner: Readonly<{
|
|
742
|
-
|
|
1932
|
+
id: number;
|
|
743
1933
|
}>;
|
|
744
1934
|
/**
|
|
745
1935
|
* @private
|
|
746
1936
|
* This field is private and should not be used, use `tag` instead.
|
|
747
1937
|
*/
|
|
748
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
1938
|
+
readonly [uniffiTypeNameSymbol]: "VtxoLockHolder";
|
|
749
1939
|
};
|
|
750
1940
|
instanceOf(obj: any): obj is {
|
|
751
|
-
readonly tag:
|
|
1941
|
+
readonly tag: VtxoLockHolder_Tags.Movement;
|
|
752
1942
|
readonly inner: Readonly<{
|
|
753
|
-
|
|
1943
|
+
id: number;
|
|
754
1944
|
}>;
|
|
755
1945
|
/**
|
|
756
1946
|
* @private
|
|
757
1947
|
* This field is private and should not be used, use `tag` instead.
|
|
758
1948
|
*/
|
|
759
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
1949
|
+
readonly [uniffiTypeNameSymbol]: "VtxoLockHolder";
|
|
760
1950
|
};
|
|
761
1951
|
};
|
|
762
|
-
|
|
1952
|
+
}>;
|
|
1953
|
+
/**
|
|
1954
|
+
* Who holds the lock on a [`VtxoState::Locked`] VTXO.
|
|
1955
|
+
*
|
|
1956
|
+
* Mirrors `bark::vtxo::VtxoLockHolder`. Action-based subsystems lock with
|
|
1957
|
+
* `Action`; pre-action subsystems (round, offboard, board, lightning
|
|
1958
|
+
* receive) lock with `Movement`. As upstream converts subsystems to
|
|
1959
|
+
* actions, new locks migrate from `Movement` to `Action` per-subsystem.
|
|
1960
|
+
*
|
|
1961
|
+
* Serde/TS tags match upstream's serialization: `"action"` / `"movement"`.
|
|
1962
|
+
*/
|
|
1963
|
+
export type VtxoLockHolder = InstanceType<(typeof VtxoLockHolder)[keyof Omit<typeof VtxoLockHolder, "instanceOf">]>;
|
|
1964
|
+
export declare enum VtxoState_Tags {
|
|
1965
|
+
Spendable = "Spendable",
|
|
1966
|
+
Locked = "Locked",
|
|
1967
|
+
Spent = "Spent",
|
|
1968
|
+
Exited = "Exited"
|
|
1969
|
+
}
|
|
1970
|
+
/**
|
|
1971
|
+
* Rich VTXO state, mirroring `bark::vtxo::VtxoState`.
|
|
1972
|
+
*
|
|
1973
|
+
* Serde/TS tags match upstream's kebab-case serialization:
|
|
1974
|
+
* `"spendable"` | `"locked"` | `"spent"` | `"exited"`.
|
|
1975
|
+
*/
|
|
1976
|
+
export declare const VtxoState: Readonly<{
|
|
1977
|
+
instanceOf: (obj: any) => obj is VtxoState;
|
|
1978
|
+
Spendable: {
|
|
1979
|
+
new (): {
|
|
1980
|
+
readonly tag: VtxoState_Tags.Spendable;
|
|
1981
|
+
/**
|
|
1982
|
+
* @private
|
|
1983
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1984
|
+
*/
|
|
1985
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
1986
|
+
};
|
|
1987
|
+
new(): {
|
|
1988
|
+
readonly tag: VtxoState_Tags.Spendable;
|
|
1989
|
+
/**
|
|
1990
|
+
* @private
|
|
1991
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1992
|
+
*/
|
|
1993
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
1994
|
+
};
|
|
1995
|
+
instanceOf(obj: any): obj is {
|
|
1996
|
+
readonly tag: VtxoState_Tags.Spendable;
|
|
1997
|
+
/**
|
|
1998
|
+
* @private
|
|
1999
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2000
|
+
*/
|
|
2001
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
2002
|
+
};
|
|
2003
|
+
};
|
|
2004
|
+
Locked: {
|
|
763
2005
|
new (inner: {
|
|
764
|
-
|
|
765
|
-
preimage: string;
|
|
2006
|
+
holder: VtxoLockHolder | undefined;
|
|
766
2007
|
}): {
|
|
767
|
-
readonly tag:
|
|
2008
|
+
readonly tag: VtxoState_Tags.Locked;
|
|
768
2009
|
readonly inner: Readonly<{
|
|
769
|
-
|
|
770
|
-
preimage: string;
|
|
2010
|
+
holder: VtxoLockHolder | undefined;
|
|
771
2011
|
}>;
|
|
772
2012
|
/**
|
|
773
2013
|
* @private
|
|
774
2014
|
* This field is private and should not be used, use `tag` instead.
|
|
775
2015
|
*/
|
|
776
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
2016
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
777
2017
|
};
|
|
778
2018
|
new(inner: {
|
|
779
|
-
|
|
780
|
-
preimage: string;
|
|
2019
|
+
holder: VtxoLockHolder | undefined;
|
|
781
2020
|
}): {
|
|
782
|
-
readonly tag:
|
|
2021
|
+
readonly tag: VtxoState_Tags.Locked;
|
|
783
2022
|
readonly inner: Readonly<{
|
|
784
|
-
|
|
785
|
-
preimage: string;
|
|
2023
|
+
holder: VtxoLockHolder | undefined;
|
|
786
2024
|
}>;
|
|
787
2025
|
/**
|
|
788
2026
|
* @private
|
|
789
2027
|
* This field is private and should not be used, use `tag` instead.
|
|
790
2028
|
*/
|
|
791
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
2029
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
792
2030
|
};
|
|
793
2031
|
instanceOf(obj: any): obj is {
|
|
794
|
-
readonly tag:
|
|
2032
|
+
readonly tag: VtxoState_Tags.Locked;
|
|
795
2033
|
readonly inner: Readonly<{
|
|
796
|
-
|
|
797
|
-
preimage: string;
|
|
2034
|
+
holder: VtxoLockHolder | undefined;
|
|
798
2035
|
}>;
|
|
799
2036
|
/**
|
|
800
2037
|
* @private
|
|
801
2038
|
* This field is private and should not be used, use `tag` instead.
|
|
802
2039
|
*/
|
|
803
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
2040
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
2041
|
+
};
|
|
2042
|
+
};
|
|
2043
|
+
Spent: {
|
|
2044
|
+
new (): {
|
|
2045
|
+
readonly tag: VtxoState_Tags.Spent;
|
|
2046
|
+
/**
|
|
2047
|
+
* @private
|
|
2048
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2049
|
+
*/
|
|
2050
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
2051
|
+
};
|
|
2052
|
+
new(): {
|
|
2053
|
+
readonly tag: VtxoState_Tags.Spent;
|
|
2054
|
+
/**
|
|
2055
|
+
* @private
|
|
2056
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2057
|
+
*/
|
|
2058
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
2059
|
+
};
|
|
2060
|
+
instanceOf(obj: any): obj is {
|
|
2061
|
+
readonly tag: VtxoState_Tags.Spent;
|
|
2062
|
+
/**
|
|
2063
|
+
* @private
|
|
2064
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2065
|
+
*/
|
|
2066
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
2067
|
+
};
|
|
2068
|
+
};
|
|
2069
|
+
Exited: {
|
|
2070
|
+
new (): {
|
|
2071
|
+
readonly tag: VtxoState_Tags.Exited;
|
|
2072
|
+
/**
|
|
2073
|
+
* @private
|
|
2074
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2075
|
+
*/
|
|
2076
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
2077
|
+
};
|
|
2078
|
+
new(): {
|
|
2079
|
+
readonly tag: VtxoState_Tags.Exited;
|
|
2080
|
+
/**
|
|
2081
|
+
* @private
|
|
2082
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2083
|
+
*/
|
|
2084
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
2085
|
+
};
|
|
2086
|
+
instanceOf(obj: any): obj is {
|
|
2087
|
+
readonly tag: VtxoState_Tags.Exited;
|
|
2088
|
+
/**
|
|
2089
|
+
* @private
|
|
2090
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2091
|
+
*/
|
|
2092
|
+
readonly [uniffiTypeNameSymbol]: "VtxoState";
|
|
804
2093
|
};
|
|
805
2094
|
};
|
|
806
2095
|
}>;
|
|
807
2096
|
/**
|
|
808
|
-
*
|
|
2097
|
+
* Rich VTXO state, mirroring `bark::vtxo::VtxoState`.
|
|
809
2098
|
*
|
|
810
|
-
*
|
|
811
|
-
* `
|
|
812
|
-
* crash-safe send flow themselves (initiate with `wait = false`, then poll).
|
|
813
|
-
*/
|
|
814
|
-
export type LightningSendStatus = InstanceType<(typeof LightningSendStatus)[keyof Omit<typeof LightningSendStatus, "instanceOf">]>;
|
|
815
|
-
/**
|
|
816
|
-
* Severity of a log record.
|
|
2099
|
+
* Serde/TS tags match upstream's kebab-case serialization:
|
|
2100
|
+
* `"spendable"` | `"locked"` | `"spent"` | `"exited"`.
|
|
817
2101
|
*/
|
|
818
|
-
export
|
|
819
|
-
Error = 0,
|
|
820
|
-
Warn = 1,
|
|
821
|
-
Info = 2,
|
|
822
|
-
Debug = 3,
|
|
823
|
-
Trace = 4
|
|
824
|
-
}
|
|
825
|
-
export declare enum Network {
|
|
826
|
-
Bitcoin = 0,
|
|
827
|
-
Testnet = 1,
|
|
828
|
-
Signet = 2,
|
|
829
|
-
Regtest = 3
|
|
830
|
-
}
|
|
2102
|
+
export type VtxoState = InstanceType<(typeof VtxoState)[keyof Omit<typeof VtxoState, "instanceOf">]>;
|
|
831
2103
|
export declare enum WalletNotification_Tags {
|
|
832
2104
|
MovementCreated = "MovementCreated",
|
|
833
2105
|
MovementUpdated = "MovementUpdated",
|
|
@@ -1259,6 +2531,12 @@ export interface OnchainWalletLike {
|
|
|
1259
2531
|
balance(asyncOpts_?: {
|
|
1260
2532
|
signal: AbortSignal;
|
|
1261
2533
|
}): Promise<OnchainBalance>;
|
|
2534
|
+
/**
|
|
2535
|
+
* Cached network fee-rate estimates from the wallet's chain source.
|
|
2536
|
+
*/
|
|
2537
|
+
feeRates(asyncOpts_?: {
|
|
2538
|
+
signal: AbortSignal;
|
|
2539
|
+
}): Promise<FeeRates>;
|
|
1262
2540
|
newAddress(asyncOpts_?: {
|
|
1263
2541
|
signal: AbortSignal;
|
|
1264
2542
|
}): Promise<string>;
|
|
@@ -1268,6 +2546,25 @@ export interface OnchainWalletLike {
|
|
|
1268
2546
|
sync(asyncOpts_?: {
|
|
1269
2547
|
signal: AbortSignal;
|
|
1270
2548
|
}): Promise</*u64*/ bigint>;
|
|
2549
|
+
/**
|
|
2550
|
+
* Current chain tip height from the wallet's chain source.
|
|
2551
|
+
*/
|
|
2552
|
+
tipHeight(asyncOpts_?: {
|
|
2553
|
+
signal: AbortSignal;
|
|
2554
|
+
}): Promise</*u32*/ number>;
|
|
2555
|
+
/**
|
|
2556
|
+
* Every wallet transaction with fee, balance change, confirmation and
|
|
2557
|
+
* CPFP flag. Requires a prior `sync` to be meaningful.
|
|
2558
|
+
*/
|
|
2559
|
+
transactions(asyncOpts_?: {
|
|
2560
|
+
signal: AbortSignal;
|
|
2561
|
+
}): Promise<Array<WalletTransaction>>;
|
|
2562
|
+
/**
|
|
2563
|
+
* The wallet's unspent outputs. Requires a prior `sync` to be meaningful.
|
|
2564
|
+
*/
|
|
2565
|
+
utxos(asyncOpts_?: {
|
|
2566
|
+
signal: AbortSignal;
|
|
2567
|
+
}): Promise<Array<OnchainUtxo>>;
|
|
1271
2568
|
}
|
|
1272
2569
|
/**
|
|
1273
2570
|
* @deprecated Use `OnchainWalletLike` instead.
|
|
@@ -1296,6 +2593,12 @@ export declare class OnchainWallet extends UniffiAbstractObject implements Oncha
|
|
|
1296
2593
|
balance(asyncOpts_?: {
|
|
1297
2594
|
signal: AbortSignal;
|
|
1298
2595
|
}): Promise<OnchainBalance>;
|
|
2596
|
+
/**
|
|
2597
|
+
* Cached network fee-rate estimates from the wallet's chain source.
|
|
2598
|
+
*/
|
|
2599
|
+
feeRates(asyncOpts_?: {
|
|
2600
|
+
signal: AbortSignal;
|
|
2601
|
+
}): Promise<FeeRates>;
|
|
1299
2602
|
newAddress(asyncOpts_?: {
|
|
1300
2603
|
signal: AbortSignal;
|
|
1301
2604
|
}): Promise<string>;
|
|
@@ -1305,6 +2608,25 @@ export declare class OnchainWallet extends UniffiAbstractObject implements Oncha
|
|
|
1305
2608
|
sync(asyncOpts_?: {
|
|
1306
2609
|
signal: AbortSignal;
|
|
1307
2610
|
}): Promise</*u64*/ bigint>;
|
|
2611
|
+
/**
|
|
2612
|
+
* Current chain tip height from the wallet's chain source.
|
|
2613
|
+
*/
|
|
2614
|
+
tipHeight(asyncOpts_?: {
|
|
2615
|
+
signal: AbortSignal;
|
|
2616
|
+
}): Promise</*u32*/ number>;
|
|
2617
|
+
/**
|
|
2618
|
+
* Every wallet transaction with fee, balance change, confirmation and
|
|
2619
|
+
* CPFP flag. Requires a prior `sync` to be meaningful.
|
|
2620
|
+
*/
|
|
2621
|
+
transactions(asyncOpts_?: {
|
|
2622
|
+
signal: AbortSignal;
|
|
2623
|
+
}): Promise<Array<WalletTransaction>>;
|
|
2624
|
+
/**
|
|
2625
|
+
* The wallet's unspent outputs. Requires a prior `sync` to be meaningful.
|
|
2626
|
+
*/
|
|
2627
|
+
utxos(asyncOpts_?: {
|
|
2628
|
+
signal: AbortSignal;
|
|
2629
|
+
}): Promise<Array<OnchainUtxo>>;
|
|
1308
2630
|
/**
|
|
1309
2631
|
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
1310
2632
|
*/
|
|
@@ -1505,7 +2827,7 @@ export interface WalletLike {
|
|
|
1505
2827
|
signal: AbortSignal;
|
|
1506
2828
|
}): Promise<string>;
|
|
1507
2829
|
/**
|
|
1508
|
-
* Pay to a Lightning Address (
|
|
2830
|
+
* Pay to a Lightning Address (`user@domain`), resolved via LNURL-pay.
|
|
1509
2831
|
*/
|
|
1510
2832
|
payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined, wait: boolean, asyncOpts_?: {
|
|
1511
2833
|
signal: AbortSignal;
|
|
@@ -1517,7 +2839,7 @@ export interface WalletLike {
|
|
|
1517
2839
|
signal: AbortSignal;
|
|
1518
2840
|
}): Promise<LightningSendStatus>;
|
|
1519
2841
|
/**
|
|
1520
|
-
* Pay a raw LNURL-pay link (`lnurl1…`).
|
|
2842
|
+
* Pay a raw LNURL-pay link (`lnurl1…`).
|
|
1521
2843
|
*
|
|
1522
2844
|
* Resolves the LNURL-pay endpoint to a BOLT11 invoice and pays it. Errors
|
|
1523
2845
|
* if the link decodes to a non-pay LNURL (auth, withdraw, channel).
|
|
@@ -1884,7 +3206,7 @@ export declare class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
1884
3206
|
signal: AbortSignal;
|
|
1885
3207
|
}): Promise<string>;
|
|
1886
3208
|
/**
|
|
1887
|
-
* Pay to a Lightning Address (
|
|
3209
|
+
* Pay to a Lightning Address (`user@domain`), resolved via LNURL-pay.
|
|
1888
3210
|
*/
|
|
1889
3211
|
payLightningAddress(lightningAddress: string, amountSats: bigint, comment: string | undefined, wait?: boolean, asyncOpts_?: {
|
|
1890
3212
|
signal: AbortSignal;
|
|
@@ -1896,7 +3218,7 @@ export declare class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
1896
3218
|
signal: AbortSignal;
|
|
1897
3219
|
}): Promise<LightningSendStatus>;
|
|
1898
3220
|
/**
|
|
1899
|
-
* Pay a raw LNURL-pay link (`lnurl1…`).
|
|
3221
|
+
* Pay a raw LNURL-pay link (`lnurl1…`).
|
|
1900
3222
|
*
|
|
1901
3223
|
* Resolves the LNURL-pay endpoint to a BOLT11 invoice and pays it. Errors
|
|
1902
3224
|
* if the link decodes to a non-pay LNURL (auth, withdraw, channel).
|
|
@@ -2097,6 +3419,13 @@ declare const _default: Readonly<{
|
|
|
2097
3419
|
lift(value: Uint8Array): BlockRef;
|
|
2098
3420
|
lower(value: BlockRef): Uint8Array;
|
|
2099
3421
|
};
|
|
3422
|
+
FfiConverterTypeBoardFees: {
|
|
3423
|
+
read(from: RustBuffer): BoardFees;
|
|
3424
|
+
write(value: BoardFees, into: RustBuffer): void;
|
|
3425
|
+
allocationSize(value: BoardFees): number;
|
|
3426
|
+
lift(value: Uint8Array): BoardFees;
|
|
3427
|
+
lower(value: BoardFees): Uint8Array;
|
|
3428
|
+
};
|
|
2100
3429
|
FfiConverterTypeConfig: {
|
|
2101
3430
|
read(from: RustBuffer): Config;
|
|
2102
3431
|
write(value: Config, into: RustBuffer): void;
|
|
@@ -2220,6 +3549,13 @@ declare const _default: Readonly<{
|
|
|
2220
3549
|
lift(value: Uint8Array): ExitProgressStatus;
|
|
2221
3550
|
lower(value: ExitProgressStatus): Uint8Array;
|
|
2222
3551
|
};
|
|
3552
|
+
FfiConverterTypeExitState: {
|
|
3553
|
+
read(from: RustBuffer): ExitState;
|
|
3554
|
+
write(value: ExitState, into: RustBuffer): void;
|
|
3555
|
+
allocationSize(value: ExitState): number;
|
|
3556
|
+
lift(value: Uint8Array): ExitState;
|
|
3557
|
+
lower(value: ExitState): Uint8Array;
|
|
3558
|
+
};
|
|
2223
3559
|
FfiConverterTypeExitTransactionStatus: {
|
|
2224
3560
|
read(from: RustBuffer): ExitTransactionStatus;
|
|
2225
3561
|
write(value: ExitTransactionStatus, into: RustBuffer): void;
|
|
@@ -2227,6 +3563,27 @@ declare const _default: Readonly<{
|
|
|
2227
3563
|
lift(value: Uint8Array): ExitTransactionStatus;
|
|
2228
3564
|
lower(value: ExitTransactionStatus): Uint8Array;
|
|
2229
3565
|
};
|
|
3566
|
+
FfiConverterTypeExitTx: {
|
|
3567
|
+
read(from: RustBuffer): ExitTx;
|
|
3568
|
+
write(value: ExitTx, into: RustBuffer): void;
|
|
3569
|
+
allocationSize(value: ExitTx): number;
|
|
3570
|
+
lift(value: Uint8Array): ExitTx;
|
|
3571
|
+
lower(value: ExitTx): Uint8Array;
|
|
3572
|
+
};
|
|
3573
|
+
FfiConverterTypeExitTxOrigin: {
|
|
3574
|
+
read(from: RustBuffer): ExitTxOrigin;
|
|
3575
|
+
write(value: ExitTxOrigin, into: RustBuffer): void;
|
|
3576
|
+
allocationSize(value: ExitTxOrigin): number;
|
|
3577
|
+
lift(value: Uint8Array): ExitTxOrigin;
|
|
3578
|
+
lower(value: ExitTxOrigin): Uint8Array;
|
|
3579
|
+
};
|
|
3580
|
+
FfiConverterTypeExitTxStatus: {
|
|
3581
|
+
read(from: RustBuffer): ExitTxStatus;
|
|
3582
|
+
write(value: ExitTxStatus, into: RustBuffer): void;
|
|
3583
|
+
allocationSize(value: ExitTxStatus): number;
|
|
3584
|
+
lift(value: Uint8Array): ExitTxStatus;
|
|
3585
|
+
lower(value: ExitTxStatus): Uint8Array;
|
|
3586
|
+
};
|
|
2230
3587
|
FfiConverterTypeExitVtxo: {
|
|
2231
3588
|
read(from: RustBuffer): ExitVtxo;
|
|
2232
3589
|
write(value: ExitVtxo, into: RustBuffer): void;
|
|
@@ -2241,6 +3598,20 @@ declare const _default: Readonly<{
|
|
|
2241
3598
|
lift(value: Uint8Array): FeeEstimate;
|
|
2242
3599
|
lower(value: FeeEstimate): Uint8Array;
|
|
2243
3600
|
};
|
|
3601
|
+
FfiConverterTypeFeeRates: {
|
|
3602
|
+
read(from: RustBuffer): FeeRates;
|
|
3603
|
+
write(value: FeeRates, into: RustBuffer): void;
|
|
3604
|
+
allocationSize(value: FeeRates): number;
|
|
3605
|
+
lift(value: Uint8Array): FeeRates;
|
|
3606
|
+
lower(value: FeeRates): Uint8Array;
|
|
3607
|
+
};
|
|
3608
|
+
FfiConverterTypeFeeSchedule: {
|
|
3609
|
+
read(from: RustBuffer): FeeSchedule;
|
|
3610
|
+
write(value: FeeSchedule, into: RustBuffer): void;
|
|
3611
|
+
allocationSize(value: FeeSchedule): number;
|
|
3612
|
+
lift(value: Uint8Array): FeeSchedule;
|
|
3613
|
+
lower(value: FeeSchedule): Uint8Array;
|
|
3614
|
+
};
|
|
2244
3615
|
FfiConverterTypeLightningInvoice: {
|
|
2245
3616
|
read(from: RustBuffer): LightningInvoice;
|
|
2246
3617
|
write(value: LightningInvoice, into: RustBuffer): void;
|
|
@@ -2255,6 +3626,13 @@ declare const _default: Readonly<{
|
|
|
2255
3626
|
lift(value: Uint8Array): LightningReceive;
|
|
2256
3627
|
lower(value: LightningReceive): Uint8Array;
|
|
2257
3628
|
};
|
|
3629
|
+
FfiConverterTypeLightningReceiveFees: {
|
|
3630
|
+
read(from: RustBuffer): LightningReceiveFees;
|
|
3631
|
+
write(value: LightningReceiveFees, into: RustBuffer): void;
|
|
3632
|
+
allocationSize(value: LightningReceiveFees): number;
|
|
3633
|
+
lift(value: Uint8Array): LightningReceiveFees;
|
|
3634
|
+
lower(value: LightningReceiveFees): Uint8Array;
|
|
3635
|
+
};
|
|
2258
3636
|
FfiConverterTypeLightningSend: {
|
|
2259
3637
|
read(from: RustBuffer): LightningSend;
|
|
2260
3638
|
write(value: LightningSend, into: RustBuffer): void;
|
|
@@ -2262,6 +3640,13 @@ declare const _default: Readonly<{
|
|
|
2262
3640
|
lift(value: Uint8Array): LightningSend;
|
|
2263
3641
|
lower(value: LightningSend): Uint8Array;
|
|
2264
3642
|
};
|
|
3643
|
+
FfiConverterTypeLightningSendFees: {
|
|
3644
|
+
read(from: RustBuffer): LightningSendFees;
|
|
3645
|
+
write(value: LightningSendFees, into: RustBuffer): void;
|
|
3646
|
+
allocationSize(value: LightningSendFees): number;
|
|
3647
|
+
lift(value: Uint8Array): LightningSendFees;
|
|
3648
|
+
lower(value: LightningSendFees): Uint8Array;
|
|
3649
|
+
};
|
|
2265
3650
|
FfiConverterTypeLightningSendStatus: {
|
|
2266
3651
|
read(from: RustBuffer): LightningSendStatus;
|
|
2267
3652
|
write(value: LightningSendStatus, into: RustBuffer): void;
|
|
@@ -2291,6 +3676,13 @@ declare const _default: Readonly<{
|
|
|
2291
3676
|
lower(value: Network): Uint8Array;
|
|
2292
3677
|
};
|
|
2293
3678
|
FfiConverterTypeNotificationHolder: FfiConverterObject<NotificationHolderLike>;
|
|
3679
|
+
FfiConverterTypeOffboardFees: {
|
|
3680
|
+
read(from: RustBuffer): OffboardFees;
|
|
3681
|
+
write(value: OffboardFees, into: RustBuffer): void;
|
|
3682
|
+
allocationSize(value: OffboardFees): number;
|
|
3683
|
+
lift(value: Uint8Array): OffboardFees;
|
|
3684
|
+
lower(value: OffboardFees): Uint8Array;
|
|
3685
|
+
};
|
|
2294
3686
|
FfiConverterTypeOffboardResult: {
|
|
2295
3687
|
read(from: RustBuffer): OffboardResult;
|
|
2296
3688
|
write(value: OffboardResult, into: RustBuffer): void;
|
|
@@ -2305,6 +3697,13 @@ declare const _default: Readonly<{
|
|
|
2305
3697
|
lift(value: Uint8Array): OnchainBalance;
|
|
2306
3698
|
lower(value: OnchainBalance): Uint8Array;
|
|
2307
3699
|
};
|
|
3700
|
+
FfiConverterTypeOnchainUtxo: {
|
|
3701
|
+
read(from: RustBuffer): OnchainUtxo;
|
|
3702
|
+
write(value: OnchainUtxo, into: RustBuffer): void;
|
|
3703
|
+
allocationSize(value: OnchainUtxo): number;
|
|
3704
|
+
lift(value: Uint8Array): OnchainUtxo;
|
|
3705
|
+
lower(value: OnchainUtxo): Uint8Array;
|
|
3706
|
+
};
|
|
2308
3707
|
FfiConverterTypeOnchainWallet: FfiConverterObject<OnchainWalletLike>;
|
|
2309
3708
|
FfiConverterTypeOutPoint: {
|
|
2310
3709
|
read(from: RustBuffer): OutPoint;
|
|
@@ -2320,6 +3719,13 @@ declare const _default: Readonly<{
|
|
|
2320
3719
|
lift(value: Uint8Array): PendingBoard;
|
|
2321
3720
|
lower(value: PendingBoard): Uint8Array;
|
|
2322
3721
|
};
|
|
3722
|
+
FfiConverterTypePpmExpiryFeeEntry: {
|
|
3723
|
+
read(from: RustBuffer): PpmExpiryFeeEntry;
|
|
3724
|
+
write(value: PpmExpiryFeeEntry, into: RustBuffer): void;
|
|
3725
|
+
allocationSize(value: PpmExpiryFeeEntry): number;
|
|
3726
|
+
lift(value: Uint8Array): PpmExpiryFeeEntry;
|
|
3727
|
+
lower(value: PpmExpiryFeeEntry): Uint8Array;
|
|
3728
|
+
};
|
|
2323
3729
|
FfiConverterTypeRecoveryBucket: {
|
|
2324
3730
|
read(from: RustBuffer): RecoveryBucket;
|
|
2325
3731
|
write(value: RecoveryBucket, into: RustBuffer): void;
|
|
@@ -2334,6 +3740,13 @@ declare const _default: Readonly<{
|
|
|
2334
3740
|
lift(value: Uint8Array): RecoveryReport;
|
|
2335
3741
|
lower(value: RecoveryReport): Uint8Array;
|
|
2336
3742
|
};
|
|
3743
|
+
FfiConverterTypeRefreshFees: {
|
|
3744
|
+
read(from: RustBuffer): RefreshFees;
|
|
3745
|
+
write(value: RefreshFees, into: RustBuffer): void;
|
|
3746
|
+
allocationSize(value: RefreshFees): number;
|
|
3747
|
+
lift(value: Uint8Array): RefreshFees;
|
|
3748
|
+
lower(value: RefreshFees): Uint8Array;
|
|
3749
|
+
};
|
|
2337
3750
|
FfiConverterTypeRoundState: {
|
|
2338
3751
|
read(from: RustBuffer): RoundState;
|
|
2339
3752
|
write(value: RoundState, into: RustBuffer): void;
|
|
@@ -2348,6 +3761,20 @@ declare const _default: Readonly<{
|
|
|
2348
3761
|
lift(value: Uint8Array): Vtxo;
|
|
2349
3762
|
lower(value: Vtxo): Uint8Array;
|
|
2350
3763
|
};
|
|
3764
|
+
FfiConverterTypeVtxoLockHolder: {
|
|
3765
|
+
read(from: RustBuffer): VtxoLockHolder;
|
|
3766
|
+
write(value: VtxoLockHolder, into: RustBuffer): void;
|
|
3767
|
+
allocationSize(value: VtxoLockHolder): number;
|
|
3768
|
+
lift(value: Uint8Array): VtxoLockHolder;
|
|
3769
|
+
lower(value: VtxoLockHolder): Uint8Array;
|
|
3770
|
+
};
|
|
3771
|
+
FfiConverterTypeVtxoState: {
|
|
3772
|
+
read(from: RustBuffer): VtxoState;
|
|
3773
|
+
write(value: VtxoState, into: RustBuffer): void;
|
|
3774
|
+
allocationSize(value: VtxoState): number;
|
|
3775
|
+
lift(value: Uint8Array): VtxoState;
|
|
3776
|
+
lower(value: VtxoState): Uint8Array;
|
|
3777
|
+
};
|
|
2351
3778
|
FfiConverterTypeWallet: FfiConverterObject<WalletLike>;
|
|
2352
3779
|
FfiConverterTypeWalletNotification: {
|
|
2353
3780
|
read(from: RustBuffer): WalletNotification;
|
|
@@ -2370,6 +3797,13 @@ declare const _default: Readonly<{
|
|
|
2370
3797
|
lift(value: Uint8Array): WalletProperties;
|
|
2371
3798
|
lower(value: WalletProperties): Uint8Array;
|
|
2372
3799
|
};
|
|
3800
|
+
FfiConverterTypeWalletTransaction: {
|
|
3801
|
+
read(from: RustBuffer): WalletTransaction;
|
|
3802
|
+
write(value: WalletTransaction, into: RustBuffer): void;
|
|
3803
|
+
allocationSize(value: WalletTransaction): number;
|
|
3804
|
+
lift(value: Uint8Array): WalletTransaction;
|
|
3805
|
+
lower(value: WalletTransaction): Uint8Array;
|
|
3806
|
+
};
|
|
2373
3807
|
};
|
|
2374
3808
|
}>;
|
|
2375
3809
|
export default _default;
|