@secondts/bark-react-native 0.22.0 → 0.23.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 +319 -27
- package/cpp/generated/bark.hpp +8 -0
- package/lib/commonjs/generated/bark-ffi.js.map +1 -1
- package/lib/commonjs/generated/bark.js +385 -20
- 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 +384 -19
- package/lib/module/generated/bark.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts +16 -6
- package/lib/typescript/commonjs/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bark.d.ts +298 -20
- package/lib/typescript/commonjs/src/generated/bark.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark-ffi.d.ts +16 -6
- package/lib/typescript/module/src/generated/bark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bark.d.ts +298 -20
- package/lib/typescript/module/src/generated/bark.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/generated/bark-ffi.ts +28 -5
- package/src/generated/bark.ts +555 -30
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getter","globalThis","NativeBark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["getter","globalThis","NativeBark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AAi1BA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAChC,eAAeF,MAAM;;AAErB;;AA6KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
|
|
@@ -373,7 +373,7 @@ const FfiConverterTypeConfig = (() => {
|
|
|
373
373
|
bitcoindCookiefile: FfiConverterOptionalString.read(from),
|
|
374
374
|
bitcoindUser: FfiConverterOptionalString.read(from),
|
|
375
375
|
bitcoindPass: FfiConverterOptionalString.read(from),
|
|
376
|
-
vtxoRefreshExpiryThreshold:
|
|
376
|
+
vtxoRefreshExpiryThreshold: FfiConverterOptionalUInt16.read(from),
|
|
377
377
|
vtxoExitMargin: FfiConverterOptionalUInt16.read(from),
|
|
378
378
|
htlcRecvClaimDelta: FfiConverterOptionalUInt16.read(from),
|
|
379
379
|
fallbackFeeRate: FfiConverterOptionalUInt64.read(from),
|
|
@@ -393,7 +393,7 @@ const FfiConverterTypeConfig = (() => {
|
|
|
393
393
|
FfiConverterOptionalString.write(value.bitcoindCookiefile, into);
|
|
394
394
|
FfiConverterOptionalString.write(value.bitcoindUser, into);
|
|
395
395
|
FfiConverterOptionalString.write(value.bitcoindPass, into);
|
|
396
|
-
|
|
396
|
+
FfiConverterOptionalUInt16.write(value.vtxoRefreshExpiryThreshold, into);
|
|
397
397
|
FfiConverterOptionalUInt16.write(value.vtxoExitMargin, into);
|
|
398
398
|
FfiConverterOptionalUInt16.write(value.htlcRecvClaimDelta, into);
|
|
399
399
|
FfiConverterOptionalUInt64.write(value.fallbackFeeRate, into);
|
|
@@ -405,7 +405,7 @@ const FfiConverterTypeConfig = (() => {
|
|
|
405
405
|
FfiConverterOptionalString.write(value.userAgent, into);
|
|
406
406
|
}
|
|
407
407
|
allocationSize(value) {
|
|
408
|
-
return FfiConverterString.allocationSize(value.serverAddress) + FfiConverterOptionalString.allocationSize(value.serverAccessToken) + FfiConverterOptionalString.allocationSize(value.esploraAddress) + FfiConverterOptionalString.allocationSize(value.bitcoindAddress) + FfiConverterOptionalString.allocationSize(value.bitcoindCookiefile) + FfiConverterOptionalString.allocationSize(value.bitcoindUser) + FfiConverterOptionalString.allocationSize(value.bitcoindPass) +
|
|
408
|
+
return FfiConverterString.allocationSize(value.serverAddress) + FfiConverterOptionalString.allocationSize(value.serverAccessToken) + FfiConverterOptionalString.allocationSize(value.esploraAddress) + FfiConverterOptionalString.allocationSize(value.bitcoindAddress) + FfiConverterOptionalString.allocationSize(value.bitcoindCookiefile) + FfiConverterOptionalString.allocationSize(value.bitcoindUser) + FfiConverterOptionalString.allocationSize(value.bitcoindPass) + FfiConverterOptionalUInt16.allocationSize(value.vtxoRefreshExpiryThreshold) + FfiConverterOptionalUInt16.allocationSize(value.vtxoExitMargin) + FfiConverterOptionalUInt16.allocationSize(value.htlcRecvClaimDelta) + FfiConverterOptionalUInt64.allocationSize(value.fallbackFeeRate) + FfiConverterOptionalUInt32.allocationSize(value.roundTxRequiredConfirmations) + FfiConverterOptionalUInt64.allocationSize(value.daemonSyncIntervalSecs) + FfiConverterOptionalUInt32.allocationSize(value.offboardRequiredConfirmations) + FfiConverterOptionalBool.allocationSize(value.daemonManualSync) + FfiConverterOptionalUInt8.allocationSize(value.lightningReceiveClaimRetries) + FfiConverterOptionalString.allocationSize(value.userAgent);
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
return new FFIConverter();
|
|
@@ -1521,15 +1521,19 @@ const FfiConverterTypeRoundState = (() => {
|
|
|
1521
1521
|
read(from) {
|
|
1522
1522
|
return {
|
|
1523
1523
|
id: FfiConverterUInt32.read(from),
|
|
1524
|
-
ongoing: FfiConverterBool.read(from)
|
|
1524
|
+
ongoing: FfiConverterBool.read(from),
|
|
1525
|
+
state: FfiConverterTypeRoundFlowKind.read(from),
|
|
1526
|
+
scheduledHeight: FfiConverterOptionalUInt32.read(from)
|
|
1525
1527
|
};
|
|
1526
1528
|
}
|
|
1527
1529
|
write(value, into) {
|
|
1528
1530
|
FfiConverterUInt32.write(value.id, into);
|
|
1529
1531
|
FfiConverterBool.write(value.ongoing, into);
|
|
1532
|
+
FfiConverterTypeRoundFlowKind.write(value.state, into);
|
|
1533
|
+
FfiConverterOptionalUInt32.write(value.scheduledHeight, into);
|
|
1530
1534
|
}
|
|
1531
1535
|
allocationSize(value) {
|
|
1532
|
-
return FfiConverterUInt32.allocationSize(value.id) + FfiConverterBool.allocationSize(value.ongoing);
|
|
1536
|
+
return FfiConverterUInt32.allocationSize(value.id) + FfiConverterBool.allocationSize(value.ongoing) + FfiConverterTypeRoundFlowKind.allocationSize(value.state) + FfiConverterOptionalUInt32.allocationSize(value.scheduledHeight);
|
|
1533
1537
|
}
|
|
1534
1538
|
}
|
|
1535
1539
|
return new FFIConverter();
|
|
@@ -3270,6 +3274,266 @@ const FfiConverterTypeOnchainUtxo = (() => {
|
|
|
3270
3274
|
return new FFIConverter();
|
|
3271
3275
|
})();
|
|
3272
3276
|
|
|
3277
|
+
// Enum: RecoveryStatus
|
|
3278
|
+
export let RecoveryStatus_Tags = /*#__PURE__*/function (RecoveryStatus_Tags) {
|
|
3279
|
+
RecoveryStatus_Tags["NotRun"] = "NotRun";
|
|
3280
|
+
RecoveryStatus_Tags["Failed"] = "Failed";
|
|
3281
|
+
RecoveryStatus_Tags["Completed"] = "Completed";
|
|
3282
|
+
return RecoveryStatus_Tags;
|
|
3283
|
+
}({});
|
|
3284
|
+
/**
|
|
3285
|
+
* Outcome of the seed-recovery scan `Wallet::open` runs, mirroring
|
|
3286
|
+
* `bark::RecoveryStatus`.
|
|
3287
|
+
*
|
|
3288
|
+
* The three variants are distinguishable on purpose: `NotRun` means nothing
|
|
3289
|
+
* was attempted (wallet already existed locally, or `skip_recovery` was set),
|
|
3290
|
+
* `Failed` means the scan errored before producing a report so funds may be
|
|
3291
|
+
* missing until a retry succeeds, and `Completed` carries the report — whose
|
|
3292
|
+
* `is_complete` can still be `false` for individual VTXOs.
|
|
3293
|
+
*
|
|
3294
|
+
* Serde/TS tags: `"not-run"` | `"failed"` | `"completed"`.
|
|
3295
|
+
*/
|
|
3296
|
+
export const RecoveryStatus = (() => {
|
|
3297
|
+
/**
|
|
3298
|
+
* No scan was attempted.
|
|
3299
|
+
*/
|
|
3300
|
+
class NotRun_ extends UniffiEnum {
|
|
3301
|
+
/**
|
|
3302
|
+
* @private
|
|
3303
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3304
|
+
*/
|
|
3305
|
+
[uniffiTypeNameSymbol] = "RecoveryStatus";
|
|
3306
|
+
tag = RecoveryStatus_Tags.NotRun;
|
|
3307
|
+
constructor() {
|
|
3308
|
+
super("RecoveryStatus", "NotRun");
|
|
3309
|
+
}
|
|
3310
|
+
static new() {
|
|
3311
|
+
return new NotRun_();
|
|
3312
|
+
}
|
|
3313
|
+
static instanceOf(obj) {
|
|
3314
|
+
return obj.tag === RecoveryStatus_Tags.NotRun;
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3317
|
+
/**
|
|
3318
|
+
* The scan errored before it could produce a report.
|
|
3319
|
+
*/
|
|
3320
|
+
class Failed_ extends UniffiEnum {
|
|
3321
|
+
/**
|
|
3322
|
+
* @private
|
|
3323
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3324
|
+
*/
|
|
3325
|
+
[uniffiTypeNameSymbol] = "RecoveryStatus";
|
|
3326
|
+
tag = RecoveryStatus_Tags.Failed;
|
|
3327
|
+
constructor(inner) {
|
|
3328
|
+
super("RecoveryStatus", "Failed");
|
|
3329
|
+
this.inner = Object.freeze(inner);
|
|
3330
|
+
}
|
|
3331
|
+
static new(inner) {
|
|
3332
|
+
return new Failed_(inner);
|
|
3333
|
+
}
|
|
3334
|
+
static instanceOf(obj) {
|
|
3335
|
+
return obj.tag === RecoveryStatus_Tags.Failed;
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
/**
|
|
3339
|
+
* The scan ran to the end.
|
|
3340
|
+
*/
|
|
3341
|
+
class Completed_ extends UniffiEnum {
|
|
3342
|
+
/**
|
|
3343
|
+
* @private
|
|
3344
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3345
|
+
*/
|
|
3346
|
+
[uniffiTypeNameSymbol] = "RecoveryStatus";
|
|
3347
|
+
tag = RecoveryStatus_Tags.Completed;
|
|
3348
|
+
constructor(inner) {
|
|
3349
|
+
super("RecoveryStatus", "Completed");
|
|
3350
|
+
this.inner = Object.freeze(inner);
|
|
3351
|
+
}
|
|
3352
|
+
static new(inner) {
|
|
3353
|
+
return new Completed_(inner);
|
|
3354
|
+
}
|
|
3355
|
+
static instanceOf(obj) {
|
|
3356
|
+
return obj.tag === RecoveryStatus_Tags.Completed;
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
function instanceOf(obj) {
|
|
3360
|
+
return obj[uniffiTypeNameSymbol] === "RecoveryStatus";
|
|
3361
|
+
}
|
|
3362
|
+
return Object.freeze({
|
|
3363
|
+
instanceOf,
|
|
3364
|
+
NotRun: NotRun_,
|
|
3365
|
+
Failed: Failed_,
|
|
3366
|
+
Completed: Completed_
|
|
3367
|
+
});
|
|
3368
|
+
})();
|
|
3369
|
+
|
|
3370
|
+
/**
|
|
3371
|
+
* Outcome of the seed-recovery scan `Wallet::open` runs, mirroring
|
|
3372
|
+
* `bark::RecoveryStatus`.
|
|
3373
|
+
*
|
|
3374
|
+
* The three variants are distinguishable on purpose: `NotRun` means nothing
|
|
3375
|
+
* was attempted (wallet already existed locally, or `skip_recovery` was set),
|
|
3376
|
+
* `Failed` means the scan errored before producing a report so funds may be
|
|
3377
|
+
* missing until a retry succeeds, and `Completed` carries the report — whose
|
|
3378
|
+
* `is_complete` can still be `false` for individual VTXOs.
|
|
3379
|
+
*
|
|
3380
|
+
* Serde/TS tags: `"not-run"` | `"failed"` | `"completed"`.
|
|
3381
|
+
*/
|
|
3382
|
+
|
|
3383
|
+
// FfiConverter for enum RecoveryStatus
|
|
3384
|
+
const FfiConverterTypeRecoveryStatus = (() => {
|
|
3385
|
+
const ordinalConverter = FfiConverterInt32;
|
|
3386
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
3387
|
+
read(from) {
|
|
3388
|
+
switch (ordinalConverter.read(from)) {
|
|
3389
|
+
case 1:
|
|
3390
|
+
return new RecoveryStatus.NotRun();
|
|
3391
|
+
case 2:
|
|
3392
|
+
return new RecoveryStatus.Failed({
|
|
3393
|
+
message: FfiConverterString.read(from)
|
|
3394
|
+
});
|
|
3395
|
+
case 3:
|
|
3396
|
+
return new RecoveryStatus.Completed({
|
|
3397
|
+
report: FfiConverterTypeRecoveryReport.read(from)
|
|
3398
|
+
});
|
|
3399
|
+
default:
|
|
3400
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3401
|
+
}
|
|
3402
|
+
}
|
|
3403
|
+
write(value, into) {
|
|
3404
|
+
switch (value.tag) {
|
|
3405
|
+
case RecoveryStatus_Tags.NotRun:
|
|
3406
|
+
{
|
|
3407
|
+
ordinalConverter.write(1, into);
|
|
3408
|
+
return;
|
|
3409
|
+
}
|
|
3410
|
+
case RecoveryStatus_Tags.Failed:
|
|
3411
|
+
{
|
|
3412
|
+
ordinalConverter.write(2, into);
|
|
3413
|
+
const inner = value.inner;
|
|
3414
|
+
FfiConverterString.write(inner.message, into);
|
|
3415
|
+
return;
|
|
3416
|
+
}
|
|
3417
|
+
case RecoveryStatus_Tags.Completed:
|
|
3418
|
+
{
|
|
3419
|
+
ordinalConverter.write(3, into);
|
|
3420
|
+
const inner = value.inner;
|
|
3421
|
+
FfiConverterTypeRecoveryReport.write(inner.report, into);
|
|
3422
|
+
return;
|
|
3423
|
+
}
|
|
3424
|
+
default:
|
|
3425
|
+
// Throwing from here means that RecoveryStatus_Tags hasn't matched an ordinal.
|
|
3426
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3427
|
+
}
|
|
3428
|
+
}
|
|
3429
|
+
allocationSize(value) {
|
|
3430
|
+
switch (value.tag) {
|
|
3431
|
+
case RecoveryStatus_Tags.NotRun:
|
|
3432
|
+
{
|
|
3433
|
+
return ordinalConverter.allocationSize(1);
|
|
3434
|
+
}
|
|
3435
|
+
case RecoveryStatus_Tags.Failed:
|
|
3436
|
+
{
|
|
3437
|
+
const inner = value.inner;
|
|
3438
|
+
let size = ordinalConverter.allocationSize(2);
|
|
3439
|
+
size += FfiConverterString.allocationSize(inner.message);
|
|
3440
|
+
return size;
|
|
3441
|
+
}
|
|
3442
|
+
case RecoveryStatus_Tags.Completed:
|
|
3443
|
+
{
|
|
3444
|
+
const inner = value.inner;
|
|
3445
|
+
let size = ordinalConverter.allocationSize(3);
|
|
3446
|
+
size += FfiConverterTypeRecoveryReport.allocationSize(inner.report);
|
|
3447
|
+
return size;
|
|
3448
|
+
}
|
|
3449
|
+
default:
|
|
3450
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
return new FFIConverter();
|
|
3455
|
+
})();
|
|
3456
|
+
|
|
3457
|
+
/**
|
|
3458
|
+
* Lifecycle phase of a round participation, mirroring
|
|
3459
|
+
* `bark::round::RoundFlowKind`.
|
|
3460
|
+
*
|
|
3461
|
+
* Serde/TS tags match upstream's `Display` form: `"delegated-pending"` |
|
|
3462
|
+
* `"pending"` | `"ongoing"` | `"awaiting-confirmations"` | `"failed"` |
|
|
3463
|
+
* `"canceled"`.
|
|
3464
|
+
*/
|
|
3465
|
+
export let RoundFlowKind = /*#__PURE__*/function (RoundFlowKind) {
|
|
3466
|
+
/**
|
|
3467
|
+
* Delegated participation waiting for its scheduled round. See
|
|
3468
|
+
* [`RoundState::scheduled_height`].
|
|
3469
|
+
*/
|
|
3470
|
+
RoundFlowKind[RoundFlowKind["DelegatedPending"] = 0] = "DelegatedPending";
|
|
3471
|
+
/**
|
|
3472
|
+
* Interactive participation waiting for its round.
|
|
3473
|
+
*/
|
|
3474
|
+
RoundFlowKind[RoundFlowKind["Pending"] = 1] = "Pending";
|
|
3475
|
+
/**
|
|
3476
|
+
* The interactive part is being played out with the server.
|
|
3477
|
+
*/
|
|
3478
|
+
RoundFlowKind[RoundFlowKind["Ongoing"] = 2] = "Ongoing";
|
|
3479
|
+
/**
|
|
3480
|
+
* The round finished; waiting for its funding tx to confirm.
|
|
3481
|
+
*/
|
|
3482
|
+
RoundFlowKind[RoundFlowKind["AwaitingConfirmations"] = 3] = "AwaitingConfirmations";
|
|
3483
|
+
/**
|
|
3484
|
+
* The participation failed.
|
|
3485
|
+
*/
|
|
3486
|
+
RoundFlowKind[RoundFlowKind["Failed"] = 4] = "Failed";
|
|
3487
|
+
/**
|
|
3488
|
+
* The user canceled the participation.
|
|
3489
|
+
*/
|
|
3490
|
+
RoundFlowKind[RoundFlowKind["Canceled"] = 5] = "Canceled";
|
|
3491
|
+
return RoundFlowKind;
|
|
3492
|
+
}({});
|
|
3493
|
+
const FfiConverterTypeRoundFlowKind = (() => {
|
|
3494
|
+
const ordinalConverter = FfiConverterInt32;
|
|
3495
|
+
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
3496
|
+
read(from) {
|
|
3497
|
+
switch (ordinalConverter.read(from)) {
|
|
3498
|
+
case 1:
|
|
3499
|
+
return RoundFlowKind.DelegatedPending;
|
|
3500
|
+
case 2:
|
|
3501
|
+
return RoundFlowKind.Pending;
|
|
3502
|
+
case 3:
|
|
3503
|
+
return RoundFlowKind.Ongoing;
|
|
3504
|
+
case 4:
|
|
3505
|
+
return RoundFlowKind.AwaitingConfirmations;
|
|
3506
|
+
case 5:
|
|
3507
|
+
return RoundFlowKind.Failed;
|
|
3508
|
+
case 6:
|
|
3509
|
+
return RoundFlowKind.Canceled;
|
|
3510
|
+
default:
|
|
3511
|
+
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
write(value, into) {
|
|
3515
|
+
switch (value) {
|
|
3516
|
+
case RoundFlowKind.DelegatedPending:
|
|
3517
|
+
return ordinalConverter.write(1, into);
|
|
3518
|
+
case RoundFlowKind.Pending:
|
|
3519
|
+
return ordinalConverter.write(2, into);
|
|
3520
|
+
case RoundFlowKind.Ongoing:
|
|
3521
|
+
return ordinalConverter.write(3, into);
|
|
3522
|
+
case RoundFlowKind.AwaitingConfirmations:
|
|
3523
|
+
return ordinalConverter.write(4, into);
|
|
3524
|
+
case RoundFlowKind.Failed:
|
|
3525
|
+
return ordinalConverter.write(5, into);
|
|
3526
|
+
case RoundFlowKind.Canceled:
|
|
3527
|
+
return ordinalConverter.write(6, into);
|
|
3528
|
+
}
|
|
3529
|
+
}
|
|
3530
|
+
allocationSize(value) {
|
|
3531
|
+
return ordinalConverter.allocationSize(0);
|
|
3532
|
+
}
|
|
3533
|
+
}
|
|
3534
|
+
return new FFIConverter();
|
|
3535
|
+
})();
|
|
3536
|
+
|
|
3273
3537
|
// Enum: VtxoLockHolder
|
|
3274
3538
|
export let VtxoLockHolder_Tags = /*#__PURE__*/function (VtxoLockHolder_Tags) {
|
|
3275
3539
|
VtxoLockHolder_Tags["Action"] = "Action";
|
|
@@ -3986,6 +4250,23 @@ export class CustomOnchainWalletCallbacksImpl extends UniffiAbstractObject {
|
|
|
3986
4250
|
}, /*liftString:*/FfiConverterString.lift);
|
|
3987
4251
|
}
|
|
3988
4252
|
|
|
4253
|
+
/**
|
|
4254
|
+
* Mark a wallet-known transaction as evicted from the mempool
|
|
4255
|
+
*
|
|
4256
|
+
* Bark calls this when a CPFP it broadcast was RBF-replaced by a competing
|
|
4257
|
+
* party, so the tx's inputs should return to coin selection immediately
|
|
4258
|
+
* instead of waiting for the sync eviction grace period. Only ever called
|
|
4259
|
+
* for a tx that has definitively been superseded on-chain.
|
|
4260
|
+
*
|
|
4261
|
+
* # Arguments
|
|
4262
|
+
* * `txid` - Hex-encoded transaction id
|
|
4263
|
+
*/
|
|
4264
|
+
evictTx(txid) /*throws*/{
|
|
4265
|
+
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError), /*caller:*/callStatus => {
|
|
4266
|
+
nativeModule().ubrn_uniffi_bark_ffi_fn_method_customonchainwalletcallbacks_evict_tx(uniffiTypeCustomOnchainWalletCallbacksImplObjectFactory.clonePointer(this), FfiConverterString.lower(txid), callStatus);
|
|
4267
|
+
}, /*liftString:*/FfiConverterString.lift);
|
|
4268
|
+
}
|
|
4269
|
+
|
|
3989
4270
|
/**
|
|
3990
4271
|
* Create a signed P2A CPFP transaction
|
|
3991
4272
|
*
|
|
@@ -4174,6 +4455,19 @@ const uniffiCallbackInterfaceCustomOnchainWalletCallbacks = {
|
|
|
4174
4455
|
uniffiTraitInterfaceCallWithError(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/Exception.instanceOf, /*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError), /*lowerString:*/FfiConverterString.lower);
|
|
4175
4456
|
return uniffiResult;
|
|
4176
4457
|
},
|
|
4458
|
+
evictTx: (uniffiHandle, txid) => {
|
|
4459
|
+
const uniffiMakeCall = () => {
|
|
4460
|
+
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
4461
|
+
return jsCallback.evictTx(FfiConverterString.lift(txid));
|
|
4462
|
+
};
|
|
4463
|
+
const uniffiResult = UniffiResult.ready();
|
|
4464
|
+
const uniffiHandleSuccess = obj => {};
|
|
4465
|
+
const uniffiHandleError = (code, errBuf) => {
|
|
4466
|
+
UniffiResult.writeError(uniffiResult, code, errBuf);
|
|
4467
|
+
};
|
|
4468
|
+
uniffiTraitInterfaceCallWithError(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/Exception.instanceOf, /*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError), /*lowerString:*/FfiConverterString.lower);
|
|
4469
|
+
return uniffiResult;
|
|
4470
|
+
},
|
|
4177
4471
|
makeSignedP2aCpfp: (uniffiHandle, params) => {
|
|
4178
4472
|
const uniffiMakeCall = () => {
|
|
4179
4473
|
const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
|
|
@@ -4428,6 +4722,26 @@ export class OnchainWallet extends UniffiAbstractObject {
|
|
|
4428
4722
|
}
|
|
4429
4723
|
}
|
|
4430
4724
|
|
|
4725
|
+
/**
|
|
4726
|
+
* Mark a wallet-known transaction as evicted from the mempool, so its
|
|
4727
|
+
* inputs return to coin selection immediately. Only for a tx that has
|
|
4728
|
+
* definitively been superseded on-chain (e.g. an RBF-replaced exit CPFP);
|
|
4729
|
+
* evicting a still-in-flight tx invites a self-inflicted double-spend.
|
|
4730
|
+
*/
|
|
4731
|
+
async evictTx(txid, asyncOpts_) /*throws*/{
|
|
4732
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
4733
|
+
try {
|
|
4734
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
4735
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_onchainwallet_evict_tx(uniffiTypeOnchainWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txid));
|
|
4736
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
4737
|
+
} catch (__error) {
|
|
4738
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
4739
|
+
__error.stack = __stack;
|
|
4740
|
+
}
|
|
4741
|
+
throw __error;
|
|
4742
|
+
}
|
|
4743
|
+
}
|
|
4744
|
+
|
|
4431
4745
|
/**
|
|
4432
4746
|
* Cached network fee-rate estimates from the wallet's chain source.
|
|
4433
4747
|
*/
|
|
@@ -5688,21 +6002,32 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
5688
6002
|
}
|
|
5689
6003
|
|
|
5690
6004
|
/**
|
|
5691
|
-
*
|
|
5692
|
-
* if
|
|
5693
|
-
*
|
|
5694
|
-
* Recovery only runs on the open that creates the wallet locally, and not
|
|
5695
|
-
* at all when `WalletOpenArgs.skip_recovery` is set, so this is empty on
|
|
5696
|
-
* every subsequent open. It is also empty when the scan itself failed
|
|
5697
|
-
* outright — bark logs that and lets open succeed, so an empty result does
|
|
5698
|
-
* not prove no funds are missing. `isComplete == false` means funds may
|
|
5699
|
-
* still be missing; retry the report's `failed` ids with `recoverVtxos`.
|
|
6005
|
+
* The report of the seed-recovery scan that ran during `Wallet::open`, or
|
|
6006
|
+
* none if the scan did not complete. Use `recovery_status` to tell a scan
|
|
6007
|
+
* that failed apart from one that never ran.
|
|
5700
6008
|
*/
|
|
5701
6009
|
recoveryReport() {
|
|
5702
6010
|
return FfiConverterOptionalTypeRecoveryReport.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
5703
6011
|
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_recovery_report(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
5704
6012
|
}, /*liftString:*/FfiConverterString.lift));
|
|
5705
6013
|
}
|
|
6014
|
+
|
|
6015
|
+
/**
|
|
6016
|
+
* Outcome of the seed-recovery scan that ran during `Wallet::open`.
|
|
6017
|
+
*
|
|
6018
|
+
* Recovery only runs on the open that creates the wallet locally, and not
|
|
6019
|
+
* at all when `WalletOpenArgs.skip_recovery` is set, so this is `NotRun`
|
|
6020
|
+
* on every subsequent open. `Failed` means the scan errored before
|
|
6021
|
+
* producing a report — bark logs that and lets open succeed — so funds
|
|
6022
|
+
* may be missing until a retry; `Completed` carries the report, and
|
|
6023
|
+
* `isComplete == false` there means funds may still be missing. Retry the
|
|
6024
|
+
* report's `failed` ids with `recoverVtxos`.
|
|
6025
|
+
*/
|
|
6026
|
+
recoveryStatus() {
|
|
6027
|
+
return FfiConverterTypeRecoveryStatus.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
6028
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_recovery_status(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
6029
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
6030
|
+
}
|
|
5706
6031
|
async refreshServer(asyncOpts_) /*throws*/{
|
|
5707
6032
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5708
6033
|
try {
|
|
@@ -5884,6 +6209,25 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
5884
6209
|
throw __error;
|
|
5885
6210
|
}
|
|
5886
6211
|
}
|
|
6212
|
+
|
|
6213
|
+
/**
|
|
6214
|
+
* Stop the background daemon and wait until its tasks have finished, so
|
|
6215
|
+
* nothing runs in the background afterwards (e.g. before deleting the
|
|
6216
|
+
* wallet's datadir). No-op when no daemon is running.
|
|
6217
|
+
*/
|
|
6218
|
+
async stopDaemonWait(asyncOpts_) /*throws*/{
|
|
6219
|
+
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6220
|
+
try {
|
|
6221
|
+
return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
6222
|
+
return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_stop_daemon_wait(uniffiTypeWalletObjectFactory.clonePointer(this));
|
|
6223
|
+
}, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_void, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_void, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_void, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
|
|
6224
|
+
} catch (__error) {
|
|
6225
|
+
if (uniffiIsDebug && __error instanceof Error) {
|
|
6226
|
+
__error.stack = __stack;
|
|
6227
|
+
}
|
|
6228
|
+
throw __error;
|
|
6229
|
+
}
|
|
6230
|
+
}
|
|
5887
6231
|
async stuckFailedLightningSends(asyncOpts_) /*throws*/{
|
|
5888
6232
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
5889
6233
|
try {
|
|
@@ -5996,6 +6340,13 @@ export class Wallet extends UniffiAbstractObject {
|
|
|
5996
6340
|
throw __error;
|
|
5997
6341
|
}
|
|
5998
6342
|
}
|
|
6343
|
+
|
|
6344
|
+
/**
|
|
6345
|
+
* Whether this wallet can pay `address` out-of-round: same network and
|
|
6346
|
+
* server, a supported VTXO policy, and only delivery mechanisms this bark
|
|
6347
|
+
* supports. An address listing no delivery mechanism is valid. Errors only
|
|
6348
|
+
* when the address does not parse.
|
|
6349
|
+
*/
|
|
5999
6350
|
async validateArkoorAddress(address, asyncOpts_) /*throws*/{
|
|
6000
6351
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
6001
6352
|
try {
|
|
@@ -6250,13 +6601,16 @@ function uniffiEnsureInitialized() {
|
|
|
6250
6601
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx() !== 17970) {
|
|
6251
6602
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx");
|
|
6252
6603
|
}
|
|
6253
|
-
if (nativeModule().
|
|
6604
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx() !== 36298) {
|
|
6605
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_evict_tx");
|
|
6606
|
+
}
|
|
6607
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp() !== 58200) {
|
|
6254
6608
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp");
|
|
6255
6609
|
}
|
|
6256
|
-
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp() !==
|
|
6610
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp() !== 64815) {
|
|
6257
6611
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp");
|
|
6258
6612
|
}
|
|
6259
|
-
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync() !==
|
|
6613
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync() !== 29018) {
|
|
6260
6614
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync");
|
|
6261
6615
|
}
|
|
6262
6616
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_barklogger_log() !== 30279) {
|
|
@@ -6265,6 +6619,9 @@ function uniffiEnsureInitialized() {
|
|
|
6265
6619
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_balance() !== 39213) {
|
|
6266
6620
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_balance");
|
|
6267
6621
|
}
|
|
6622
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx() !== 26786) {
|
|
6623
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_evict_tx");
|
|
6624
|
+
}
|
|
6268
6625
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates() !== 30741) {
|
|
6269
6626
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates");
|
|
6270
6627
|
}
|
|
@@ -6517,9 +6874,12 @@ function uniffiEnsureInitialized() {
|
|
|
6517
6874
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recover_vtxos() !== 640) {
|
|
6518
6875
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recover_vtxos");
|
|
6519
6876
|
}
|
|
6520
|
-
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_report() !==
|
|
6877
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_report() !== 10331) {
|
|
6521
6878
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_report");
|
|
6522
6879
|
}
|
|
6880
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_status() !== 14132) {
|
|
6881
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_status");
|
|
6882
|
+
}
|
|
6523
6883
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_server() !== 41162) {
|
|
6524
6884
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_server");
|
|
6525
6885
|
}
|
|
@@ -6559,6 +6919,9 @@ function uniffiEnsureInitialized() {
|
|
|
6559
6919
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon() !== 7109) {
|
|
6560
6920
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon");
|
|
6561
6921
|
}
|
|
6922
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait() !== 1734) {
|
|
6923
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon_wait");
|
|
6924
|
+
}
|
|
6562
6925
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends() !== 31451) {
|
|
6563
6926
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends");
|
|
6564
6927
|
}
|
|
@@ -6583,7 +6946,7 @@ function uniffiEnsureInitialized() {
|
|
|
6583
6946
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos() !== 42168) {
|
|
6584
6947
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos");
|
|
6585
6948
|
}
|
|
6586
|
-
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address() !==
|
|
6949
|
+
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address() !== 30498) {
|
|
6587
6950
|
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address");
|
|
6588
6951
|
}
|
|
6589
6952
|
if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded() !== 25637) {
|
|
@@ -6654,7 +7017,9 @@ export default Object.freeze({
|
|
|
6654
7017
|
FfiConverterTypePpmExpiryFeeEntry,
|
|
6655
7018
|
FfiConverterTypeRecoveryBucket,
|
|
6656
7019
|
FfiConverterTypeRecoveryReport,
|
|
7020
|
+
FfiConverterTypeRecoveryStatus,
|
|
6657
7021
|
FfiConverterTypeRefreshFees,
|
|
7022
|
+
FfiConverterTypeRoundFlowKind,
|
|
6658
7023
|
FfiConverterTypeRoundState,
|
|
6659
7024
|
FfiConverterTypeVtxo,
|
|
6660
7025
|
FfiConverterTypeVtxoLockHolder,
|