@secondts/bark-react-native 0.6.3 → 0.7.0
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 +84 -9
- package/cpp/generated/bark.hpp +4 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +225 -19
- 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 +224 -18
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +7 -3
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +177 -17
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +7 -3
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +177 -17
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/bark-ffi.ts +16 -3
- package/src/generated/bark.ts +344 -28
package/src/generated/bark.ts
CHANGED
|
@@ -1051,9 +1051,18 @@ const FfiConverterTypeLightningReceive = (() => {
|
|
|
1051
1051
|
|
|
1052
1052
|
export type LightningSend = {
|
|
1053
1053
|
invoice: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Amount being paid, in sats (`payment_amount`).
|
|
1056
|
+
*/
|
|
1054
1057
|
amountSats: /*u64*/ bigint;
|
|
1058
|
+
/**
|
|
1059
|
+
* Routing/ark fee for the send, in sats.
|
|
1060
|
+
*/
|
|
1061
|
+
feeSats: /*u64*/ bigint;
|
|
1062
|
+
/**
|
|
1063
|
+
* Number of input VTXOs locked into the in-flight HTLC.
|
|
1064
|
+
*/
|
|
1055
1065
|
htlcVtxoCount: /*u32*/ number;
|
|
1056
|
-
preimage?: string;
|
|
1057
1066
|
};
|
|
1058
1067
|
|
|
1059
1068
|
/**
|
|
@@ -1080,22 +1089,22 @@ const FfiConverterTypeLightningSend = (() => {
|
|
|
1080
1089
|
return {
|
|
1081
1090
|
invoice: FfiConverterString.read(from),
|
|
1082
1091
|
amountSats: FfiConverterUInt64.read(from),
|
|
1092
|
+
feeSats: FfiConverterUInt64.read(from),
|
|
1083
1093
|
htlcVtxoCount: FfiConverterUInt32.read(from),
|
|
1084
|
-
preimage: FfiConverterOptionalString.read(from),
|
|
1085
1094
|
};
|
|
1086
1095
|
}
|
|
1087
1096
|
write(value: TypeName, into: RustBuffer): void {
|
|
1088
1097
|
FfiConverterString.write(value.invoice, into);
|
|
1089
1098
|
FfiConverterUInt64.write(value.amountSats, into);
|
|
1099
|
+
FfiConverterUInt64.write(value.feeSats, into);
|
|
1090
1100
|
FfiConverterUInt32.write(value.htlcVtxoCount, into);
|
|
1091
|
-
FfiConverterOptionalString.write(value.preimage, into);
|
|
1092
1101
|
}
|
|
1093
1102
|
allocationSize(value: TypeName): number {
|
|
1094
1103
|
return (
|
|
1095
1104
|
FfiConverterString.allocationSize(value.invoice) +
|
|
1096
1105
|
FfiConverterUInt64.allocationSize(value.amountSats) +
|
|
1097
|
-
|
|
1098
|
-
|
|
1106
|
+
FfiConverterUInt64.allocationSize(value.feeSats) +
|
|
1107
|
+
FfiConverterUInt32.allocationSize(value.htlcVtxoCount)
|
|
1099
1108
|
);
|
|
1100
1109
|
}
|
|
1101
1110
|
}
|
|
@@ -2406,6 +2415,206 @@ const FfiConverterTypeBarkError = (() => {
|
|
|
2406
2415
|
return new FFIConverter();
|
|
2407
2416
|
})();
|
|
2408
2417
|
|
|
2418
|
+
// Enum: LightningSendStatus
|
|
2419
|
+
export enum LightningSendStatus_Tags {
|
|
2420
|
+
Unknown = "Unknown",
|
|
2421
|
+
InProgress = "InProgress",
|
|
2422
|
+
Paid = "Paid",
|
|
2423
|
+
}
|
|
2424
|
+
/**
|
|
2425
|
+
* Terminal/in-flight state of an outgoing lightning send.
|
|
2426
|
+
*
|
|
2427
|
+
* Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
|
|
2428
|
+
* `check_lightning_payment` now return this so callers can drive the
|
|
2429
|
+
* crash-safe send flow themselves (initiate with `wait = false`, then poll).
|
|
2430
|
+
*/
|
|
2431
|
+
export const LightningSendStatus = (() => {
|
|
2432
|
+
type Unknown__interface = {
|
|
2433
|
+
tag: LightningSendStatus_Tags.Unknown;
|
|
2434
|
+
};
|
|
2435
|
+
|
|
2436
|
+
/**
|
|
2437
|
+
* No record of this payment (never started, or already pruned).
|
|
2438
|
+
*/
|
|
2439
|
+
class Unknown_ extends UniffiEnum implements Unknown__interface {
|
|
2440
|
+
/**
|
|
2441
|
+
* @private
|
|
2442
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2443
|
+
*/
|
|
2444
|
+
readonly [uniffiTypeNameSymbol] = "LightningSendStatus";
|
|
2445
|
+
readonly tag = LightningSendStatus_Tags.Unknown;
|
|
2446
|
+
constructor() {
|
|
2447
|
+
super("LightningSendStatus", "Unknown");
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
static new(): Unknown_ {
|
|
2451
|
+
return new Unknown_();
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
static instanceOf(obj: any): obj is Unknown_ {
|
|
2455
|
+
return obj.tag === LightningSendStatus_Tags.Unknown;
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
type InProgress__interface = {
|
|
2460
|
+
tag: LightningSendStatus_Tags.InProgress;
|
|
2461
|
+
inner: Readonly<{ send: LightningSend }>;
|
|
2462
|
+
};
|
|
2463
|
+
|
|
2464
|
+
/**
|
|
2465
|
+
* Send is in flight; HTLC VTXOs are locked.
|
|
2466
|
+
*/
|
|
2467
|
+
class InProgress_ extends UniffiEnum implements InProgress__interface {
|
|
2468
|
+
/**
|
|
2469
|
+
* @private
|
|
2470
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2471
|
+
*/
|
|
2472
|
+
readonly [uniffiTypeNameSymbol] = "LightningSendStatus";
|
|
2473
|
+
readonly tag = LightningSendStatus_Tags.InProgress;
|
|
2474
|
+
readonly inner: Readonly<{ send: LightningSend }>;
|
|
2475
|
+
constructor(inner: { send: LightningSend }) {
|
|
2476
|
+
super("LightningSendStatus", "InProgress");
|
|
2477
|
+
this.inner = Object.freeze(inner);
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
static new(inner: { send: LightningSend }): InProgress_ {
|
|
2481
|
+
return new InProgress_(inner);
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
static instanceOf(obj: any): obj is InProgress_ {
|
|
2485
|
+
return obj.tag === LightningSendStatus_Tags.InProgress;
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
type Paid__interface = {
|
|
2490
|
+
tag: LightningSendStatus_Tags.Paid;
|
|
2491
|
+
inner: Readonly<{ paymentHash: string; preimage: string }>;
|
|
2492
|
+
};
|
|
2493
|
+
|
|
2494
|
+
/**
|
|
2495
|
+
* Send has settled; the preimage proves payment.
|
|
2496
|
+
*/
|
|
2497
|
+
class Paid_ extends UniffiEnum implements Paid__interface {
|
|
2498
|
+
/**
|
|
2499
|
+
* @private
|
|
2500
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2501
|
+
*/
|
|
2502
|
+
readonly [uniffiTypeNameSymbol] = "LightningSendStatus";
|
|
2503
|
+
readonly tag = LightningSendStatus_Tags.Paid;
|
|
2504
|
+
readonly inner: Readonly<{ paymentHash: string; preimage: string }>;
|
|
2505
|
+
constructor(inner: { paymentHash: string; preimage: string }) {
|
|
2506
|
+
super("LightningSendStatus", "Paid");
|
|
2507
|
+
this.inner = Object.freeze(inner);
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
static new(inner: { paymentHash: string; preimage: string }): Paid_ {
|
|
2511
|
+
return new Paid_(inner);
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
static instanceOf(obj: any): obj is Paid_ {
|
|
2515
|
+
return obj.tag === LightningSendStatus_Tags.Paid;
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
function instanceOf(obj: any): obj is LightningSendStatus {
|
|
2520
|
+
return obj[uniffiTypeNameSymbol] === "LightningSendStatus";
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
return Object.freeze({
|
|
2524
|
+
instanceOf,
|
|
2525
|
+
Unknown: Unknown_,
|
|
2526
|
+
InProgress: InProgress_,
|
|
2527
|
+
Paid: Paid_,
|
|
2528
|
+
});
|
|
2529
|
+
})();
|
|
2530
|
+
|
|
2531
|
+
/**
|
|
2532
|
+
* Terminal/in-flight state of an outgoing lightning send.
|
|
2533
|
+
*
|
|
2534
|
+
* Mirrors `bark`'s `LightningSendState`. `pay_lightning_*` and
|
|
2535
|
+
* `check_lightning_payment` now return this so callers can drive the
|
|
2536
|
+
* crash-safe send flow themselves (initiate with `wait = false`, then poll).
|
|
2537
|
+
*/
|
|
2538
|
+
|
|
2539
|
+
export type LightningSendStatus = InstanceType<
|
|
2540
|
+
(typeof LightningSendStatus)[keyof Omit<
|
|
2541
|
+
typeof LightningSendStatus,
|
|
2542
|
+
"instanceOf"
|
|
2543
|
+
>]
|
|
2544
|
+
>;
|
|
2545
|
+
|
|
2546
|
+
// FfiConverter for enum LightningSendStatus
|
|
2547
|
+
const FfiConverterTypeLightningSendStatus = (() => {
|
|
2548
|
+
const ordinalConverter = FfiConverterInt32;
|
|
2549
|
+
type TypeName = LightningSendStatus;
|
|
2550
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
2551
|
+
read(from: RustBuffer): TypeName {
|
|
2552
|
+
switch (ordinalConverter.read(from)) {
|
|
2553
|
+
case 1:
|
|
2554
|
+
return new LightningSendStatus.Unknown();
|
|
2555
|
+
case 2:
|
|
2556
|
+
return new LightningSendStatus.InProgress({
|
|
2557
|
+
send: FfiConverterTypeLightningSend.read(from),
|
|
2558
|
+
});
|
|
2559
|
+
case 3:
|
|
2560
|
+
return new LightningSendStatus.Paid({
|
|
2561
|
+
paymentHash: FfiConverterString.read(from),
|
|
2562
|
+
preimage: FfiConverterString.read(from),
|
|
2563
|
+
});
|
|
2564
|
+
default:
|
|
2565
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
2569
|
+
switch (value.tag) {
|
|
2570
|
+
case LightningSendStatus_Tags.Unknown: {
|
|
2571
|
+
ordinalConverter.write(1, into);
|
|
2572
|
+
return;
|
|
2573
|
+
}
|
|
2574
|
+
case LightningSendStatus_Tags.InProgress: {
|
|
2575
|
+
ordinalConverter.write(2, into);
|
|
2576
|
+
const inner = value.inner;
|
|
2577
|
+
FfiConverterTypeLightningSend.write(inner.send, into);
|
|
2578
|
+
return;
|
|
2579
|
+
}
|
|
2580
|
+
case LightningSendStatus_Tags.Paid: {
|
|
2581
|
+
ordinalConverter.write(3, into);
|
|
2582
|
+
const inner = value.inner;
|
|
2583
|
+
FfiConverterString.write(inner.paymentHash, into);
|
|
2584
|
+
FfiConverterString.write(inner.preimage, into);
|
|
2585
|
+
return;
|
|
2586
|
+
}
|
|
2587
|
+
default:
|
|
2588
|
+
// Throwing from here means that LightningSendStatus_Tags hasn't matched an ordinal.
|
|
2589
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
allocationSize(value: TypeName): number {
|
|
2593
|
+
switch (value.tag) {
|
|
2594
|
+
case LightningSendStatus_Tags.Unknown: {
|
|
2595
|
+
return ordinalConverter.allocationSize(1);
|
|
2596
|
+
}
|
|
2597
|
+
case LightningSendStatus_Tags.InProgress: {
|
|
2598
|
+
const inner = value.inner;
|
|
2599
|
+
let size = ordinalConverter.allocationSize(2);
|
|
2600
|
+
size += FfiConverterTypeLightningSend.allocationSize(inner.send);
|
|
2601
|
+
return size;
|
|
2602
|
+
}
|
|
2603
|
+
case LightningSendStatus_Tags.Paid: {
|
|
2604
|
+
const inner = value.inner;
|
|
2605
|
+
let size = ordinalConverter.allocationSize(3);
|
|
2606
|
+
size += FfiConverterString.allocationSize(inner.paymentHash);
|
|
2607
|
+
size += FfiConverterString.allocationSize(inner.preimage);
|
|
2608
|
+
return size;
|
|
2609
|
+
}
|
|
2610
|
+
default:
|
|
2611
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
return new FFIConverter();
|
|
2616
|
+
})();
|
|
2617
|
+
|
|
2409
2618
|
/**
|
|
2410
2619
|
* Severity of a log record.
|
|
2411
2620
|
*/
|
|
@@ -4262,7 +4471,7 @@ export interface WalletLike {
|
|
|
4262
4471
|
paymentHash: string,
|
|
4263
4472
|
wait: boolean,
|
|
4264
4473
|
asyncOpts_?: { signal: AbortSignal }
|
|
4265
|
-
): /*throws*/ Promise<
|
|
4474
|
+
): /*throws*/ Promise<LightningSendStatus>;
|
|
4266
4475
|
claimableLightningReceiveBalanceSats(asyncOpts_?: {
|
|
4267
4476
|
signal: AbortSignal;
|
|
4268
4477
|
}): /*throws*/ Promise</*u64*/ bigint>;
|
|
@@ -4349,10 +4558,18 @@ export interface WalletLike {
|
|
|
4349
4558
|
vtxoBase64: string,
|
|
4350
4559
|
asyncOpts_?: { signal: AbortSignal }
|
|
4351
4560
|
): /*throws*/ Promise<void>;
|
|
4561
|
+
isInvoicePaid(
|
|
4562
|
+
paymentHash: string,
|
|
4563
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
4564
|
+
): /*throws*/ Promise<boolean>;
|
|
4352
4565
|
lightningReceiveStatus(
|
|
4353
4566
|
paymentHash: string,
|
|
4354
4567
|
asyncOpts_?: { signal: AbortSignal }
|
|
4355
4568
|
): /*throws*/ Promise<LightningReceive | undefined>;
|
|
4569
|
+
lightningSendState(
|
|
4570
|
+
paymentHash: string,
|
|
4571
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
4572
|
+
): /*throws*/ Promise<LightningSendStatus>;
|
|
4356
4573
|
listClaimableExits(asyncOpts_?: {
|
|
4357
4574
|
signal: AbortSignal;
|
|
4358
4575
|
}): /*throws*/ Promise<Array<ExitVtxo>>;
|
|
@@ -4401,18 +4618,21 @@ export interface WalletLike {
|
|
|
4401
4618
|
lightningAddress: string,
|
|
4402
4619
|
amountSats: /*u64*/ bigint,
|
|
4403
4620
|
comment: string | undefined,
|
|
4621
|
+
wait: boolean,
|
|
4404
4622
|
asyncOpts_?: { signal: AbortSignal }
|
|
4405
|
-
): /*throws*/ Promise<
|
|
4623
|
+
): /*throws*/ Promise<LightningSendStatus>;
|
|
4406
4624
|
payLightningInvoice(
|
|
4407
4625
|
invoice: string,
|
|
4408
4626
|
amountSats: /*u64*/ bigint | undefined,
|
|
4627
|
+
wait: boolean,
|
|
4409
4628
|
asyncOpts_?: { signal: AbortSignal }
|
|
4410
|
-
): /*throws*/ Promise<
|
|
4629
|
+
): /*throws*/ Promise<LightningSendStatus>;
|
|
4411
4630
|
payLightningOffer(
|
|
4412
4631
|
offer: string,
|
|
4413
4632
|
amountSats: /*u64*/ bigint | undefined,
|
|
4633
|
+
wait: boolean,
|
|
4414
4634
|
asyncOpts_?: { signal: AbortSignal }
|
|
4415
|
-
): /*throws*/ Promise<
|
|
4635
|
+
): /*throws*/ Promise<LightningSendStatus>;
|
|
4416
4636
|
peekAddress(
|
|
4417
4637
|
index: /*u32*/ number,
|
|
4418
4638
|
asyncOpts_?: { signal: AbortSignal }
|
|
@@ -5148,7 +5368,7 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
5148
5368
|
paymentHash: string,
|
|
5149
5369
|
wait: boolean,
|
|
5150
5370
|
asyncOpts_?: { signal: AbortSignal }
|
|
5151
|
-
): Promise<
|
|
5371
|
+
): Promise<LightningSendStatus> /*throws*/ {
|
|
5152
5372
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5153
5373
|
try {
|
|
5154
5374
|
return await uniffiRustCallAsync(
|
|
@@ -5168,8 +5388,8 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
5168
5388
|
.ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,
|
|
5169
5389
|
/*freeFunc:*/ nativeModule()
|
|
5170
5390
|
.ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,
|
|
5171
|
-
/*liftFunc:*/
|
|
5172
|
-
|
|
5391
|
+
/*liftFunc:*/ FfiConverterTypeLightningSendStatus.lift.bind(
|
|
5392
|
+
FfiConverterTypeLightningSendStatus
|
|
5173
5393
|
),
|
|
5174
5394
|
/*liftString:*/ FfiConverterString.lift,
|
|
5175
5395
|
/*asyncOpts:*/ asyncOpts_,
|
|
@@ -6032,6 +6252,40 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6032
6252
|
}
|
|
6033
6253
|
}
|
|
6034
6254
|
|
|
6255
|
+
async isInvoicePaid(
|
|
6256
|
+
paymentHash: string,
|
|
6257
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
6258
|
+
): Promise<boolean> /*throws*/ {
|
|
6259
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6260
|
+
try {
|
|
6261
|
+
return await uniffiRustCallAsync(
|
|
6262
|
+
/*rustCaller:*/ uniffiCaller,
|
|
6263
|
+
/*rustFutureFunc:*/ () => {
|
|
6264
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_is_invoice_paid(
|
|
6265
|
+
uniffiTypeWalletObjectFactory.clonePointer(this),
|
|
6266
|
+
FfiConverterString.lower(paymentHash)
|
|
6267
|
+
);
|
|
6268
|
+
},
|
|
6269
|
+
/*pollFunc:*/ nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_i8,
|
|
6270
|
+
/*cancelFunc:*/ nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_i8,
|
|
6271
|
+
/*completeFunc:*/ nativeModule()
|
|
6272
|
+
.ubrn_ffi_bark_ffi_rust_future_complete_i8,
|
|
6273
|
+
/*freeFunc:*/ nativeModule().ubrn_ffi_bark_ffi_rust_future_free_i8,
|
|
6274
|
+
/*liftFunc:*/ FfiConverterBool.lift.bind(FfiConverterBool),
|
|
6275
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
6276
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
6277
|
+
/*errorHandler:*/ FfiConverterTypeBarkError.lift.bind(
|
|
6278
|
+
FfiConverterTypeBarkError
|
|
6279
|
+
)
|
|
6280
|
+
);
|
|
6281
|
+
} catch (__error: any) {
|
|
6282
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
6283
|
+
__error.stack = __stack;
|
|
6284
|
+
}
|
|
6285
|
+
throw __error;
|
|
6286
|
+
}
|
|
6287
|
+
}
|
|
6288
|
+
|
|
6035
6289
|
async lightningReceiveStatus(
|
|
6036
6290
|
paymentHash: string,
|
|
6037
6291
|
asyncOpts_?: { signal: AbortSignal }
|
|
@@ -6071,6 +6325,45 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6071
6325
|
}
|
|
6072
6326
|
}
|
|
6073
6327
|
|
|
6328
|
+
async lightningSendState(
|
|
6329
|
+
paymentHash: string,
|
|
6330
|
+
asyncOpts_?: { signal: AbortSignal }
|
|
6331
|
+
): Promise<LightningSendStatus> /*throws*/ {
|
|
6332
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6333
|
+
try {
|
|
6334
|
+
return await uniffiRustCallAsync(
|
|
6335
|
+
/*rustCaller:*/ uniffiCaller,
|
|
6336
|
+
/*rustFutureFunc:*/ () => {
|
|
6337
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_lightning_send_state(
|
|
6338
|
+
uniffiTypeWalletObjectFactory.clonePointer(this),
|
|
6339
|
+
FfiConverterString.lower(paymentHash)
|
|
6340
|
+
);
|
|
6341
|
+
},
|
|
6342
|
+
/*pollFunc:*/ nativeModule()
|
|
6343
|
+
.ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer,
|
|
6344
|
+
/*cancelFunc:*/ nativeModule()
|
|
6345
|
+
.ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer,
|
|
6346
|
+
/*completeFunc:*/ nativeModule()
|
|
6347
|
+
.ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,
|
|
6348
|
+
/*freeFunc:*/ nativeModule()
|
|
6349
|
+
.ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,
|
|
6350
|
+
/*liftFunc:*/ FfiConverterTypeLightningSendStatus.lift.bind(
|
|
6351
|
+
FfiConverterTypeLightningSendStatus
|
|
6352
|
+
),
|
|
6353
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
6354
|
+
/*asyncOpts:*/ asyncOpts_,
|
|
6355
|
+
/*errorHandler:*/ FfiConverterTypeBarkError.lift.bind(
|
|
6356
|
+
FfiConverterTypeBarkError
|
|
6357
|
+
)
|
|
6358
|
+
);
|
|
6359
|
+
} catch (__error: any) {
|
|
6360
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
6361
|
+
__error.stack = __stack;
|
|
6362
|
+
}
|
|
6363
|
+
throw __error;
|
|
6364
|
+
}
|
|
6365
|
+
}
|
|
6366
|
+
|
|
6074
6367
|
async listClaimableExits(asyncOpts_?: {
|
|
6075
6368
|
signal: AbortSignal;
|
|
6076
6369
|
}): Promise<Array<ExitVtxo>> /*throws*/ {
|
|
@@ -6592,8 +6885,9 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6592
6885
|
lightningAddress: string,
|
|
6593
6886
|
amountSats: /*u64*/ bigint,
|
|
6594
6887
|
comment: string | undefined,
|
|
6888
|
+
wait: boolean,
|
|
6595
6889
|
asyncOpts_?: { signal: AbortSignal }
|
|
6596
|
-
): Promise<
|
|
6890
|
+
): Promise<LightningSendStatus> /*throws*/ {
|
|
6597
6891
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6598
6892
|
try {
|
|
6599
6893
|
return await uniffiRustCallAsync(
|
|
@@ -6603,7 +6897,8 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6603
6897
|
uniffiTypeWalletObjectFactory.clonePointer(this),
|
|
6604
6898
|
FfiConverterString.lower(lightningAddress),
|
|
6605
6899
|
FfiConverterUInt64.lower(amountSats),
|
|
6606
|
-
FfiConverterOptionalString.lower(comment)
|
|
6900
|
+
FfiConverterOptionalString.lower(comment),
|
|
6901
|
+
FfiConverterBool.lower(wait)
|
|
6607
6902
|
);
|
|
6608
6903
|
},
|
|
6609
6904
|
/*pollFunc:*/ nativeModule()
|
|
@@ -6614,8 +6909,8 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6614
6909
|
.ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,
|
|
6615
6910
|
/*freeFunc:*/ nativeModule()
|
|
6616
6911
|
.ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,
|
|
6617
|
-
/*liftFunc:*/
|
|
6618
|
-
|
|
6912
|
+
/*liftFunc:*/ FfiConverterTypeLightningSendStatus.lift.bind(
|
|
6913
|
+
FfiConverterTypeLightningSendStatus
|
|
6619
6914
|
),
|
|
6620
6915
|
/*liftString:*/ FfiConverterString.lift,
|
|
6621
6916
|
/*asyncOpts:*/ asyncOpts_,
|
|
@@ -6634,8 +6929,9 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6634
6929
|
async payLightningInvoice(
|
|
6635
6930
|
invoice: string,
|
|
6636
6931
|
amountSats: /*u64*/ bigint | undefined,
|
|
6932
|
+
wait: boolean,
|
|
6637
6933
|
asyncOpts_?: { signal: AbortSignal }
|
|
6638
|
-
): Promise<
|
|
6934
|
+
): Promise<LightningSendStatus> /*throws*/ {
|
|
6639
6935
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6640
6936
|
try {
|
|
6641
6937
|
return await uniffiRustCallAsync(
|
|
@@ -6644,7 +6940,8 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6644
6940
|
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_invoice(
|
|
6645
6941
|
uniffiTypeWalletObjectFactory.clonePointer(this),
|
|
6646
6942
|
FfiConverterString.lower(invoice),
|
|
6647
|
-
FfiConverterOptionalUInt64.lower(amountSats)
|
|
6943
|
+
FfiConverterOptionalUInt64.lower(amountSats),
|
|
6944
|
+
FfiConverterBool.lower(wait)
|
|
6648
6945
|
);
|
|
6649
6946
|
},
|
|
6650
6947
|
/*pollFunc:*/ nativeModule()
|
|
@@ -6655,8 +6952,8 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6655
6952
|
.ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,
|
|
6656
6953
|
/*freeFunc:*/ nativeModule()
|
|
6657
6954
|
.ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,
|
|
6658
|
-
/*liftFunc:*/
|
|
6659
|
-
|
|
6955
|
+
/*liftFunc:*/ FfiConverterTypeLightningSendStatus.lift.bind(
|
|
6956
|
+
FfiConverterTypeLightningSendStatus
|
|
6660
6957
|
),
|
|
6661
6958
|
/*liftString:*/ FfiConverterString.lift,
|
|
6662
6959
|
/*asyncOpts:*/ asyncOpts_,
|
|
@@ -6675,8 +6972,9 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6675
6972
|
async payLightningOffer(
|
|
6676
6973
|
offer: string,
|
|
6677
6974
|
amountSats: /*u64*/ bigint | undefined,
|
|
6975
|
+
wait: boolean,
|
|
6678
6976
|
asyncOpts_?: { signal: AbortSignal }
|
|
6679
|
-
): Promise<
|
|
6977
|
+
): Promise<LightningSendStatus> /*throws*/ {
|
|
6680
6978
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6681
6979
|
try {
|
|
6682
6980
|
return await uniffiRustCallAsync(
|
|
@@ -6685,7 +6983,8 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6685
6983
|
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_pay_lightning_offer(
|
|
6686
6984
|
uniffiTypeWalletObjectFactory.clonePointer(this),
|
|
6687
6985
|
FfiConverterString.lower(offer),
|
|
6688
|
-
FfiConverterOptionalUInt64.lower(amountSats)
|
|
6986
|
+
FfiConverterOptionalUInt64.lower(amountSats),
|
|
6987
|
+
FfiConverterBool.lower(wait)
|
|
6689
6988
|
);
|
|
6690
6989
|
},
|
|
6691
6990
|
/*pollFunc:*/ nativeModule()
|
|
@@ -6696,8 +6995,8 @@ export class Wallet extends UniffiAbstractObject implements WalletLike {
|
|
|
6696
6995
|
.ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer,
|
|
6697
6996
|
/*freeFunc:*/ nativeModule()
|
|
6698
6997
|
.ubrn_ffi_bark_ffi_rust_future_free_rust_buffer,
|
|
6699
|
-
/*liftFunc:*/
|
|
6700
|
-
|
|
6998
|
+
/*liftFunc:*/ FfiConverterTypeLightningSendStatus.lift.bind(
|
|
6999
|
+
FfiConverterTypeLightningSendStatus
|
|
6701
7000
|
),
|
|
6702
7001
|
/*liftString:*/ FfiConverterString.lift,
|
|
6703
7002
|
/*asyncOpts:*/ asyncOpts_,
|
|
@@ -8263,7 +8562,7 @@ function uniffiEnsureInitialized() {
|
|
|
8263
8562
|
}
|
|
8264
8563
|
if (
|
|
8265
8564
|
nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment() !==
|
|
8266
|
-
|
|
8565
|
+
33087
|
|
8267
8566
|
) {
|
|
8268
8567
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
8269
8568
|
"uniffi_bark_ffi_checksum_method_wallet_check_lightning_payment"
|
|
@@ -8453,6 +8752,14 @@ function uniffiEnsureInitialized() {
|
|
|
8453
8752
|
"uniffi_bark_ffi_checksum_method_wallet_import_vtxo"
|
|
8454
8753
|
);
|
|
8455
8754
|
}
|
|
8755
|
+
if (
|
|
8756
|
+
nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid() !==
|
|
8757
|
+
43344
|
|
8758
|
+
) {
|
|
8759
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
8760
|
+
"uniffi_bark_ffi_checksum_method_wallet_is_invoice_paid"
|
|
8761
|
+
);
|
|
8762
|
+
}
|
|
8456
8763
|
if (
|
|
8457
8764
|
nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status() !==
|
|
8458
8765
|
37213
|
|
@@ -8461,6 +8768,14 @@ function uniffiEnsureInitialized() {
|
|
|
8461
8768
|
"uniffi_bark_ffi_checksum_method_wallet_lightning_receive_status"
|
|
8462
8769
|
);
|
|
8463
8770
|
}
|
|
8771
|
+
if (
|
|
8772
|
+
nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_lightning_send_state() !==
|
|
8773
|
+
37487
|
|
8774
|
+
) {
|
|
8775
|
+
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
8776
|
+
"uniffi_bark_ffi_checksum_method_wallet_lightning_send_state"
|
|
8777
|
+
);
|
|
8778
|
+
}
|
|
8464
8779
|
if (
|
|
8465
8780
|
nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_list_claimable_exits() !==
|
|
8466
8781
|
46928
|
|
@@ -8591,7 +8906,7 @@ function uniffiEnsureInitialized() {
|
|
|
8591
8906
|
}
|
|
8592
8907
|
if (
|
|
8593
8908
|
nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address() !==
|
|
8594
|
-
|
|
8909
|
+
2440
|
|
8595
8910
|
) {
|
|
8596
8911
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
8597
8912
|
"uniffi_bark_ffi_checksum_method_wallet_pay_lightning_address"
|
|
@@ -8599,7 +8914,7 @@ function uniffiEnsureInitialized() {
|
|
|
8599
8914
|
}
|
|
8600
8915
|
if (
|
|
8601
8916
|
nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice() !==
|
|
8602
|
-
|
|
8917
|
+
18714
|
|
8603
8918
|
) {
|
|
8604
8919
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
8605
8920
|
"uniffi_bark_ffi_checksum_method_wallet_pay_lightning_invoice"
|
|
@@ -8607,7 +8922,7 @@ function uniffiEnsureInitialized() {
|
|
|
8607
8922
|
}
|
|
8608
8923
|
if (
|
|
8609
8924
|
nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer() !==
|
|
8610
|
-
|
|
8925
|
+
31129
|
|
8611
8926
|
) {
|
|
8612
8927
|
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
8613
8928
|
"uniffi_bark_ffi_checksum_method_wallet_pay_lightning_offer"
|
|
@@ -8933,6 +9248,7 @@ export default Object.freeze({
|
|
|
8933
9248
|
FfiConverterTypeLightningInvoice,
|
|
8934
9249
|
FfiConverterTypeLightningReceive,
|
|
8935
9250
|
FfiConverterTypeLightningSend,
|
|
9251
|
+
FfiConverterTypeLightningSendStatus,
|
|
8936
9252
|
FfiConverterTypeLogLevel,
|
|
8937
9253
|
FfiConverterTypeMovement,
|
|
8938
9254
|
FfiConverterTypeNetwork,
|