@secondts/bark-react-native 0.21.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.
@@ -1 +1 @@
1
- {"version":3,"names":["getter","globalThis","NativeBark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/bark-ffi.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AAwzBA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,UAAU;AAChC,eAAeF,MAAM;;AAErB;;AAwKA;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":[]}
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: FfiConverterOptionalUInt32.read(from),
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
- FfiConverterOptionalUInt32.write(value.vtxoRefreshExpiryThreshold, into);
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) + FfiConverterOptionalUInt32.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);
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();
@@ -489,6 +489,57 @@ const FfiConverterTypeDestination = (() => {
489
489
  return new FFIConverter();
490
490
  })();
491
491
 
492
+ /**
493
+ * Estimated onchain cost of unilaterally (emergency) exiting a set of VTXOs.
494
+ *
495
+ * Mirrors bark-rest's `GET /exits/fee` response. The two legs are paid from
496
+ * different pockets: `exit_broadcast_fee_sats` is spent now out of confirmed
497
+ * onchain funds to CPFP-bump every not-yet-confirmed exit transaction, while
498
+ * `claim_fee_sats` is deducted later from the recovered value when the
499
+ * matured outputs are drained.
500
+ */
501
+
502
+ /**
503
+ * Generated factory for {@link EmergencyExitFeeEstimate} record objects.
504
+ */
505
+ export const EmergencyExitFeeEstimate = (() => {
506
+ const defaults = () => ({});
507
+ const create = (() => {
508
+ return uniffiCreateRecord(defaults);
509
+ })();
510
+ return Object.freeze({
511
+ create,
512
+ new: create,
513
+ defaults: () => Object.freeze(defaults())
514
+ });
515
+ })();
516
+ const FfiConverterTypeEmergencyExitFeeEstimate = (() => {
517
+ class FFIConverter extends AbstractFfiConverterByteArray {
518
+ read(from) {
519
+ return {
520
+ exitBroadcastFeeSats: FfiConverterUInt64.read(from),
521
+ claimFeeSats: FfiConverterUInt64.read(from),
522
+ totalFeeSats: FfiConverterUInt64.read(from),
523
+ feeRateSatPerVb: FfiConverterUInt64.read(from),
524
+ txsToBroadcast: FfiConverterUInt64.read(from),
525
+ fundable: FfiConverterBool.read(from)
526
+ };
527
+ }
528
+ write(value, into) {
529
+ FfiConverterUInt64.write(value.exitBroadcastFeeSats, into);
530
+ FfiConverterUInt64.write(value.claimFeeSats, into);
531
+ FfiConverterUInt64.write(value.totalFeeSats, into);
532
+ FfiConverterUInt64.write(value.feeRateSatPerVb, into);
533
+ FfiConverterUInt64.write(value.txsToBroadcast, into);
534
+ FfiConverterBool.write(value.fundable, into);
535
+ }
536
+ allocationSize(value) {
537
+ return FfiConverterUInt64.allocationSize(value.exitBroadcastFeeSats) + FfiConverterUInt64.allocationSize(value.claimFeeSats) + FfiConverterUInt64.allocationSize(value.totalFeeSats) + FfiConverterUInt64.allocationSize(value.feeRateSatPerVb) + FfiConverterUInt64.allocationSize(value.txsToBroadcast) + FfiConverterBool.allocationSize(value.fundable);
538
+ }
539
+ }
540
+ return new FFIConverter();
541
+ })();
542
+
492
543
  /**
493
544
  * Outcome of a cancellation request.
494
545
  *
@@ -1470,15 +1521,19 @@ const FfiConverterTypeRoundState = (() => {
1470
1521
  read(from) {
1471
1522
  return {
1472
1523
  id: FfiConverterUInt32.read(from),
1473
- ongoing: FfiConverterBool.read(from)
1524
+ ongoing: FfiConverterBool.read(from),
1525
+ state: FfiConverterTypeRoundFlowKind.read(from),
1526
+ scheduledHeight: FfiConverterOptionalUInt32.read(from)
1474
1527
  };
1475
1528
  }
1476
1529
  write(value, into) {
1477
1530
  FfiConverterUInt32.write(value.id, into);
1478
1531
  FfiConverterBool.write(value.ongoing, into);
1532
+ FfiConverterTypeRoundFlowKind.write(value.state, into);
1533
+ FfiConverterOptionalUInt32.write(value.scheduledHeight, into);
1479
1534
  }
1480
1535
  allocationSize(value) {
1481
- 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);
1482
1537
  }
1483
1538
  }
1484
1539
  return new FFIConverter();
@@ -3219,6 +3274,266 @@ const FfiConverterTypeOnchainUtxo = (() => {
3219
3274
  return new FFIConverter();
3220
3275
  })();
3221
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
+
3222
3537
  // Enum: VtxoLockHolder
3223
3538
  export let VtxoLockHolder_Tags = /*#__PURE__*/function (VtxoLockHolder_Tags) {
3224
3539
  VtxoLockHolder_Tags["Action"] = "Action";
@@ -3935,6 +4250,23 @@ export class CustomOnchainWalletCallbacksImpl extends UniffiAbstractObject {
3935
4250
  }, /*liftString:*/FfiConverterString.lift);
3936
4251
  }
3937
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
+
3938
4270
  /**
3939
4271
  * Create a signed P2A CPFP transaction
3940
4272
  *
@@ -4123,6 +4455,19 @@ const uniffiCallbackInterfaceCustomOnchainWalletCallbacks = {
4123
4455
  uniffiTraitInterfaceCallWithError(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/Exception.instanceOf, /*lowerError:*/FfiConverterTypeError.lower.bind(FfiConverterTypeError), /*lowerString:*/FfiConverterString.lower);
4124
4456
  return uniffiResult;
4125
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
+ },
4126
4471
  makeSignedP2aCpfp: (uniffiHandle, params) => {
4127
4472
  const uniffiMakeCall = () => {
4128
4473
  const jsCallback = FfiConverterTypeCustomOnchainWalletCallbacks.lift(uniffiHandle);
@@ -4377,6 +4722,26 @@ export class OnchainWallet extends UniffiAbstractObject {
4377
4722
  }
4378
4723
  }
4379
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
+
4380
4745
  /**
4381
4746
  * Cached network fee-rate estimates from the wallet's chain source.
4382
4747
  */
@@ -4933,6 +5298,34 @@ export class Wallet extends UniffiAbstractObject {
4933
5298
  throw __error;
4934
5299
  }
4935
5300
  }
5301
+
5302
+ /**
5303
+ * Estimate the onchain cost of unilaterally (emergency) exiting VTXOs.
5304
+ * Mirrors bark-rest `GET /exits/fee`.
5305
+ *
5306
+ * Pass an empty `vtxo_ids` to price exiting the whole wallet (every
5307
+ * spendable VTXO). `fee_rate_sat_per_vb` applies to both legs; omit it to
5308
+ * use the chain's fast rate for the broadcast leg and regular rate for
5309
+ * the claim leg. `destination` only affects the claim transaction's weight.
5310
+ *
5311
+ * The onchain wallet is synced first so `fundable` reflects the current
5312
+ * confirmed balance. Requires a BDK onchain wallet: callback-backed
5313
+ * wallets (`CustomOnchainWalletCallbacks`) cannot simulate the CPFP walk
5314
+ * and return an error.
5315
+ */
5316
+ async estimateEmergencyExitFee(vtxoIds, feeRateSatPerVb, destination, asyncOpts_) /*throws*/{
5317
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
5318
+ try {
5319
+ return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
5320
+ return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_estimate_emergency_exit_fee(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterArrayString.lower(vtxoIds), FfiConverterOptionalUInt64.lower(feeRateSatPerVb), FfiConverterOptionalString.lower(destination));
5321
+ }, /*pollFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_bark_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeEmergencyExitFeeEstimate.lift.bind(FfiConverterTypeEmergencyExitFeeEstimate), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeError.lift.bind(FfiConverterTypeError));
5322
+ } catch (__error) {
5323
+ if (uniffiIsDebug && __error instanceof Error) {
5324
+ __error.stack = __stack;
5325
+ }
5326
+ throw __error;
5327
+ }
5328
+ }
4936
5329
  async estimateLightningReceiveFee(amountSats, asyncOpts_) /*throws*/{
4937
5330
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
4938
5331
  try {
@@ -5609,21 +6002,32 @@ export class Wallet extends UniffiAbstractObject {
5609
6002
  }
5610
6003
 
5611
6004
  /**
5612
- * Result of the seed-recovery scan that ran during `Wallet::open`, or none
5613
- * if no report was produced.
5614
- *
5615
- * Recovery only runs on the open that creates the wallet locally, and not
5616
- * at all when `WalletOpenArgs.skip_recovery` is set, so this is empty on
5617
- * every subsequent open. It is also empty when the scan itself failed
5618
- * outright — bark logs that and lets open succeed, so an empty result does
5619
- * not prove no funds are missing. `isComplete == false` means funds may
5620
- * 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.
5621
6008
  */
5622
6009
  recoveryReport() {
5623
6010
  return FfiConverterOptionalTypeRecoveryReport.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
5624
6011
  return nativeModule().ubrn_uniffi_bark_ffi_fn_method_wallet_recovery_report(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
5625
6012
  }, /*liftString:*/FfiConverterString.lift));
5626
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
+ }
5627
6031
  async refreshServer(asyncOpts_) /*throws*/{
5628
6032
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
5629
6033
  try {
@@ -5805,6 +6209,25 @@ export class Wallet extends UniffiAbstractObject {
5805
6209
  throw __error;
5806
6210
  }
5807
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
+ }
5808
6231
  async stuckFailedLightningSends(asyncOpts_) /*throws*/{
5809
6232
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
5810
6233
  try {
@@ -5917,6 +6340,13 @@ export class Wallet extends UniffiAbstractObject {
5917
6340
  throw __error;
5918
6341
  }
5919
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
+ */
5920
6350
  async validateArkoorAddress(address, asyncOpts_) /*throws*/{
5921
6351
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
5922
6352
  try {
@@ -6171,13 +6601,16 @@ function uniffiEnsureInitialized() {
6171
6601
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx() !== 17970) {
6172
6602
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_register_tx");
6173
6603
  }
6174
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp() !== 62938) {
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) {
6175
6608
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_make_signed_p2a_cpfp");
6176
6609
  }
6177
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp() !== 47426) {
6610
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp() !== 64815) {
6178
6611
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_store_signed_p2a_cpfp");
6179
6612
  }
6180
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync() !== 12900) {
6613
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync() !== 29018) {
6181
6614
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_customonchainwalletcallbacks_sync");
6182
6615
  }
6183
6616
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_barklogger_log() !== 30279) {
@@ -6186,6 +6619,9 @@ function uniffiEnsureInitialized() {
6186
6619
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_balance() !== 39213) {
6187
6620
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_balance");
6188
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
+ }
6189
6625
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates() !== 30741) {
6190
6626
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_onchainwallet_fee_rates");
6191
6627
  }
@@ -6279,6 +6715,9 @@ function uniffiEnsureInitialized() {
6279
6715
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee() !== 55967) {
6280
6716
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_board_fee");
6281
6717
  }
6718
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee() !== 44713) {
6719
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_emergency_exit_fee");
6720
+ }
6282
6721
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee() !== 33637) {
6283
6722
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_estimate_lightning_receive_fee");
6284
6723
  }
@@ -6435,9 +6874,12 @@ function uniffiEnsureInitialized() {
6435
6874
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recover_vtxos() !== 640) {
6436
6875
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recover_vtxos");
6437
6876
  }
6438
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_report() !== 54899) {
6877
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_recovery_report() !== 10331) {
6439
6878
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_recovery_report");
6440
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
+ }
6441
6883
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_refresh_server() !== 41162) {
6442
6884
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_refresh_server");
6443
6885
  }
@@ -6477,6 +6919,9 @@ function uniffiEnsureInitialized() {
6477
6919
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stop_daemon() !== 7109) {
6478
6920
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stop_daemon");
6479
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
+ }
6480
6925
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends() !== 31451) {
6481
6926
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_stuck_failed_lightning_sends");
6482
6927
  }
@@ -6501,7 +6946,7 @@ function uniffiEnsureInitialized() {
6501
6946
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos() !== 42168) {
6502
6947
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_unlock_vtxos");
6503
6948
  }
6504
- if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address() !== 10861) {
6949
+ if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address() !== 30498) {
6505
6950
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_bark_ffi_checksum_method_wallet_validate_arkoor_address");
6506
6951
  }
6507
6952
  if (nativeModule().ubrn_uniffi_bark_ffi_checksum_method_wallet_vtxo_encoded() !== 25637) {
@@ -6536,6 +6981,7 @@ export default Object.freeze({
6536
6981
  FfiConverterTypeCpfpParams,
6537
6982
  FfiConverterTypeCustomOnchainWalletCallbacks,
6538
6983
  FfiConverterTypeDestination,
6984
+ FfiConverterTypeEmergencyExitFeeEstimate,
6539
6985
  FfiConverterTypeError,
6540
6986
  FfiConverterTypeExitCancelFailure,
6541
6987
  FfiConverterTypeExitCancelResult,
@@ -6571,7 +7017,9 @@ export default Object.freeze({
6571
7017
  FfiConverterTypePpmExpiryFeeEntry,
6572
7018
  FfiConverterTypeRecoveryBucket,
6573
7019
  FfiConverterTypeRecoveryReport,
7020
+ FfiConverterTypeRecoveryStatus,
6574
7021
  FfiConverterTypeRefreshFees,
7022
+ FfiConverterTypeRoundFlowKind,
6575
7023
  FfiConverterTypeRoundState,
6576
7024
  FfiConverterTypeVtxo,
6577
7025
  FfiConverterTypeVtxoLockHolder,