@arkade-os/sdk 0.5.12 → 0.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +6 -0
  2. package/dist/adapters/expo.cjs +7 -7
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +4 -4
  6. package/dist/{asyncStorageTaskQueue-DTNS2qfN.d.cts → asyncStorageTaskQueue-DzO5SBcm.d.cts} +2 -2
  7. package/dist/{asyncStorageTaskQueue-Bsty8W7d.d.ts → asyncStorageTaskQueue-p7zeFhA3.d.ts} +2 -2
  8. package/dist/{chunk-4OY5BCIE.js → chunk-4HZQSKWG.js} +628 -23
  9. package/dist/chunk-4HZQSKWG.js.map +1 -0
  10. package/dist/{chunk-4X4SY3RH.cjs → chunk-6J4GABF7.cjs} +28 -20
  11. package/dist/chunk-6J4GABF7.cjs.map +1 -0
  12. package/dist/{chunk-YAVF2PR6.cjs → chunk-6TBTL42M.cjs} +87 -2
  13. package/dist/chunk-6TBTL42M.cjs.map +1 -0
  14. package/dist/{chunk-5NY5EOS2.js → chunk-72EC3ASW.js} +4 -4
  15. package/dist/{chunk-5NY5EOS2.js.map → chunk-72EC3ASW.js.map} +1 -1
  16. package/dist/{chunk-QV7AOZZN.cjs → chunk-7LPT6AYH.cjs} +21 -21
  17. package/dist/{chunk-QV7AOZZN.cjs.map → chunk-7LPT6AYH.cjs.map} +1 -1
  18. package/dist/{chunk-JA4SYFC7.cjs → chunk-ACIQZLWL.cjs} +379 -20
  19. package/dist/chunk-ACIQZLWL.cjs.map +1 -0
  20. package/dist/{chunk-BA3GPO5C.js → chunk-AZHBGWVC.js} +5 -5
  21. package/dist/{chunk-BA3GPO5C.js.map → chunk-AZHBGWVC.js.map} +1 -1
  22. package/dist/{chunk-HNLC6F73.cjs → chunk-EVVLVFY7.cjs} +20 -20
  23. package/dist/{chunk-HNLC6F73.cjs.map → chunk-EVVLVFY7.cjs.map} +1 -1
  24. package/dist/{chunk-2YXVU5TK.js → chunk-GB67AGXG.js} +81 -3
  25. package/dist/chunk-GB67AGXG.js.map +1 -0
  26. package/dist/{chunk-WBZYYRAB.js → chunk-HWWSLCQN.js} +9724 -8151
  27. package/dist/chunk-HWWSLCQN.js.map +1 -0
  28. package/dist/{chunk-4TMJBLJT.js → chunk-J2JZZTOE.js} +20 -14
  29. package/dist/chunk-J2JZZTOE.js.map +1 -0
  30. package/dist/{chunk-3RO63OPW.js → chunk-LCGRZ24T.js} +4 -4
  31. package/dist/{chunk-3RO63OPW.js.map → chunk-LCGRZ24T.js.map} +1 -1
  32. package/dist/{chunk-CJUVKHK4.cjs → chunk-LQH7DACV.cjs} +10204 -8628
  33. package/dist/chunk-LQH7DACV.cjs.map +1 -0
  34. package/dist/{chunk-QDX2HUBK.cjs → chunk-MEIE2AEU.cjs} +11 -11
  35. package/dist/{chunk-QDX2HUBK.cjs.map → chunk-MEIE2AEU.cjs.map} +1 -1
  36. package/dist/{chunk-3ABF4EMM.js → chunk-X57WKONW.js} +369 -10
  37. package/dist/chunk-X57WKONW.js.map +1 -0
  38. package/dist/{chunk-C3NKBKRY.cjs → chunk-XZHTYYW5.cjs} +680 -68
  39. package/dist/chunk-XZHTYYW5.cjs.map +1 -0
  40. package/dist/compiler.cjs +3 -4
  41. package/dist/compiler.cjs.map +1 -1
  42. package/dist/compiler.d.cts +1 -1
  43. package/dist/compiler.d.ts +1 -1
  44. package/dist/compiler.js +2 -3
  45. package/dist/compiler.js.map +1 -1
  46. package/dist/contracts/handlers/index.cjs +15 -11
  47. package/dist/contracts/handlers/index.d.cts +5 -5
  48. package/dist/contracts/handlers/index.d.ts +5 -5
  49. package/dist/contracts/handlers/index.js +4 -4
  50. package/dist/{index-D_zLtU-F.d.ts → index-CaOBA9Ev.d.ts} +2 -2
  51. package/dist/{index-BBmZXXqk.d.cts → index-Cy57QdcL.d.cts} +589 -23
  52. package/dist/{index-DJ32LpfD.d.ts → index-Db5qzYRi.d.ts} +589 -23
  53. package/dist/{index-DenQfCn1.d.cts → index-Lq_u0hqj.d.cts} +2 -2
  54. package/dist/index.cjs +403 -368
  55. package/dist/index.d.cts +197 -117
  56. package/dist/index.d.ts +197 -117
  57. package/dist/index.js +6 -7
  58. package/dist/{program-DPzf5qsk.d.cts → program-ZWUAWy_9.d.cts} +1 -1
  59. package/dist/{program-38A2Twvj.d.ts → program-zdDO4cMt.d.ts} +1 -1
  60. package/dist/repositories/realm/index.cjs +39 -40
  61. package/dist/repositories/realm/index.cjs.map +1 -1
  62. package/dist/repositories/realm/index.d.cts +2 -2
  63. package/dist/repositories/realm/index.d.ts +2 -2
  64. package/dist/repositories/realm/index.js +7 -8
  65. package/dist/repositories/realm/index.js.map +1 -1
  66. package/dist/repositories/sqlite/index.cjs +37 -38
  67. package/dist/repositories/sqlite/index.cjs.map +1 -1
  68. package/dist/repositories/sqlite/index.d.cts +2 -2
  69. package/dist/repositories/sqlite/index.d.ts +2 -2
  70. package/dist/repositories/sqlite/index.js +7 -8
  71. package/dist/repositories/sqlite/index.js.map +1 -1
  72. package/dist/{taskRunner-BBGaN4cq.d.cts → taskRunner-DhZ-KQBW.d.cts} +2 -2
  73. package/dist/{taskRunner-Cck24OnC.d.ts → taskRunner-amPuilMW.d.ts} +2 -2
  74. package/dist/wallet/expo/background.cjs +16 -17
  75. package/dist/wallet/expo/background.cjs.map +1 -1
  76. package/dist/wallet/expo/background.d.cts +3 -3
  77. package/dist/wallet/expo/background.d.ts +3 -3
  78. package/dist/wallet/expo/background.js +8 -9
  79. package/dist/wallet/expo/background.js.map +1 -1
  80. package/dist/wallet/expo/index.cjs +17 -18
  81. package/dist/wallet/expo/index.cjs.map +1 -1
  82. package/dist/wallet/expo/index.d.cts +2 -2
  83. package/dist/wallet/expo/index.d.ts +2 -2
  84. package/dist/wallet/expo/index.js +7 -8
  85. package/dist/wallet/expo/index.js.map +1 -1
  86. package/dist/worker/expo/index.cjs +11 -12
  87. package/dist/worker/expo/index.cjs.map +1 -1
  88. package/dist/worker/expo/index.d.cts +4 -4
  89. package/dist/worker/expo/index.d.ts +4 -4
  90. package/dist/worker/expo/index.js +7 -8
  91. package/dist/worker/expo/index.js.map +1 -1
  92. package/package.json +1 -1
  93. package/dist/chunk-2YXVU5TK.js.map +0 -1
  94. package/dist/chunk-3ABF4EMM.js.map +0 -1
  95. package/dist/chunk-4OY5BCIE.js.map +0 -1
  96. package/dist/chunk-4TMJBLJT.js.map +0 -1
  97. package/dist/chunk-4X4SY3RH.cjs.map +0 -1
  98. package/dist/chunk-C3NKBKRY.cjs.map +0 -1
  99. package/dist/chunk-CJUVKHK4.cjs.map +0 -1
  100. package/dist/chunk-JA4SYFC7.cjs.map +0 -1
  101. package/dist/chunk-PHOJF7OK.cjs +0 -376
  102. package/dist/chunk-PHOJF7OK.cjs.map +0 -1
  103. package/dist/chunk-UXLETBNK.js +0 -373
  104. package/dist/chunk-UXLETBNK.js.map +0 -1
  105. package/dist/chunk-WBZYYRAB.js.map +0 -1
  106. package/dist/chunk-YAVF2PR6.cjs.map +0 -1
@@ -2408,6 +2408,12 @@ declare class VtxoManager implements AsyncDisposable, IVtxoManager {
2408
2408
  * re-select and expiry sort share one tip instead of fetching (and disagreeing on) one each.
2409
2409
  */
2410
2410
  private selectExpiringVtxos;
2411
+ /**
2412
+ * Keep Executor-renewable delegated coins out of wallet renewal, with a safety fallback:
2413
+ * fail-open, so an unreadable watch renews as before rather than leaving coins to a dead
2414
+ * Executor.
2415
+ */
2416
+ private deferToExecutor;
2411
2417
  /** Outpoints {@link warnHeldExpiring} last reported, so each is reported once while held. */
2412
2418
  private heldExpiringWarned;
2413
2419
  /**
@@ -2418,7 +2424,8 @@ declare class VtxoManager implements AsyncDisposable, IVtxoManager {
2418
2424
  private warnHeldExpiring;
2419
2425
  /**
2420
2426
  * Renew expiring virtual outputs (including recoverable ones) by settling them back to the
2421
- * wallet's address, refreshing their expiration time.
2427
+ * wallet's address, refreshing their expiration time. Coins covered by a live Executor renewal
2428
+ * watch are skipped, including for a manual call; use {@link IWallet.settle} to force them.
2422
2429
  *
2423
2430
  * @param eventCallback - Optional callback for settlement events
2424
2431
  * @param options - Optional per-call overrides; see {@link RenewVtxosOptions}
@@ -2528,9 +2535,9 @@ declare class VtxoManager implements AsyncDisposable, IVtxoManager {
2528
2535
  */
2529
2536
  private runMigrationLeg;
2530
2537
  /**
2531
- * Classify the wallet's `default`/`delegate` contracts against the fresh signer set, splitting
2532
- * spendable VTXOs into cooperatively-migratable and cutoff-expired sets and building the
2533
- * per-signer report. Current-signer contracts are skipped.
2538
+ * Classify the wallet's `default`/`delegate`/`executor` contracts against the fresh signer
2539
+ * set, splitting spendable VTXOs into cooperatively-migratable and cutoff-expired sets and
2540
+ * building the per-signer report. Current-signer contracts are skipped.
2534
2541
  */
2535
2542
  private classifyDeprecatedSignerContracts;
2536
2543
  /**
@@ -2827,10 +2834,12 @@ interface StoredVtxoReservation {
2827
2834
  }
2828
2835
  /** Single-writer holds; only the owning application can establish when release is safe. */
2829
2836
  interface VtxoReservationRepository {
2830
- readonly version: 1;
2837
+ readonly version: 2;
2831
2838
  getReservations(): Promise<StoredVtxoReservation[]>;
2832
2839
  saveReservation(reservation: StoredVtxoReservation): Promise<void>;
2833
2840
  deleteReservation(id: string): Promise<void>;
2841
+ /** Compare and delete atomically; resolve true only after the matching delete commits. */
2842
+ deleteReservationIfMatches(id: string, expected: readonly Outpoint[]): Promise<boolean>;
2834
2843
  }
2835
2844
 
2836
2845
  /**
@@ -2870,8 +2879,12 @@ declare namespace DefaultVtxo {
2870
2879
  static readonly DEFAULT_TIMELOCK: RelativeTimelock;
2871
2880
  readonly forfeitScript: string;
2872
2881
  readonly exitScript: string;
2873
- /** Create the default virtual output script with one forfeit path and one exit path. */
2874
- constructor(options: Options);
2882
+ /**
2883
+ * Create the default virtual output script with one forfeit path and one exit path.
2884
+ * @param extraLeaves leaves after forfeit and exit, e.g. the Executor's emulator-enforced
2885
+ * renewal leaf, which keeps the wallet's paths and adds one it never signs.
2886
+ */
2887
+ constructor(options: Options, extraLeaves?: Bytes[]);
2875
2888
  /** Return the forfeit tapleaf script. */
2876
2889
  forfeit(): TapLeafScript;
2877
2890
  /** Return the unilateral exit tapleaf script. */
@@ -2921,6 +2934,63 @@ declare namespace DelegateVtxo {
2921
2934
  }
2922
2935
  }
2923
2936
 
2937
+ /** The Executor's keys a delegated contract derives from, compressed hex. */
2938
+ interface ExecutorContractKeys {
2939
+ cosignerPubkey: string;
2940
+ serverPubkey: string;
2941
+ emulatorPubkey: string;
2942
+ }
2943
+ /** The parameters of a delegation under the default templates. */
2944
+ interface DelegationParams {
2945
+ /** BIP 68 sequence of the owner's exit from a delegated virtual output, at least the operator's. */
2946
+ exitDelay: number;
2947
+ /** Seconds before expiry the Executor renews a virtual output. */
2948
+ renewalWindow: number;
2949
+ /** Satoshis a renewal may cost. */
2950
+ maxFee: number;
2951
+ /** BIP 68 sequence of the owner's exit from a boarding deposit, at least the operator's. */
2952
+ boardingExitDelay?: number;
2953
+ }
2954
+ /** A delegation as restore scans for it: the Executor's keys and the params, owner aside. */
2955
+ interface ExecutorWatchTemplate {
2956
+ keys: ExecutorContractKeys;
2957
+ params: DelegationParams;
2958
+ }
2959
+ /** A default template: renewal holds delegated VTXOs, boarding holds on-chain deposits. */
2960
+ type ExecutorDefault = "renewal" | "boarding";
2961
+
2962
+ /**
2963
+ * Typed parameters for delegated contracts: a default template's variables and the Executor's
2964
+ * keys. Keys are compressed, delays are BIP 68 sequences.
2965
+ */
2966
+ interface ExecutorContractParams {
2967
+ template: ExecutorDefault;
2968
+ owner: Uint8Array;
2969
+ exitDelay: number;
2970
+ renewalWindow: number;
2971
+ maxFee: number;
2972
+ /** boarding only */
2973
+ boardingExitDelay?: number;
2974
+ cosignerPubKey: Uint8Array;
2975
+ serverPubKey: Uint8Array;
2976
+ emulatorPubKey: Uint8Array;
2977
+ }
2978
+ /**
2979
+ * Handler for the coins a wallet delegated to the Executor under its default templates:
2980
+ * virtual outputs at the renewal contract, which the Executor renews in place, and onchain
2981
+ * deposits at the boarding contract, which it boards to the renewal contract. The scripts derive
2982
+ * from the bundled templates, the owner key, the params and the Executor's keys, so a restored
2983
+ * wallet needs no round-trip to the Executor.
2984
+ *
2985
+ * - forfeit: (Owner + Operator) multisig, the wallet's collaborative path
2986
+ * - exit: (Owner) + CSV, the wallet's unilateral path
2987
+ * - renew/board: (Operator + Emulator), emulator-enforced, the Executor's; never offered
2988
+ *
2989
+ * Restore probes every index under each of `deps.executorWatches`: an HD wallet registers a watch
2990
+ * per boarding key it rotates to.
2991
+ */
2992
+ declare const ExecutorContractHandler: ContractHandler<ExecutorContractParams, DefaultVtxo.Script> & Discoverable;
2993
+
2924
2994
  /** One transaction's participation in one logical action. */
2925
2995
  interface GroupMembership {
2926
2996
  /**
@@ -3432,6 +3502,129 @@ declare class RestDelegateProvider implements DelegateProvider {
3432
3502
  getDelegateInfo(): Promise<DelegateInfo>;
3433
3503
  }
3434
3504
 
3505
+ interface ExecutorInfo extends ExecutorContractKeys {
3506
+ version: string;
3507
+ network: string;
3508
+ /** Seals template secrets for this Executor; absent when it has no encryption key. */
3509
+ encryptionPubkey?: string;
3510
+ }
3511
+ interface ExecutorTemplate {
3512
+ id: string;
3513
+ status: string;
3514
+ }
3515
+ interface ExecutorTemplateParam {
3516
+ name: string;
3517
+ type: string;
3518
+ }
3519
+ /** A template with its document, as `getTemplate` and `registerTemplate` return it. */
3520
+ interface ExecutorTemplateDetails extends ExecutorTemplate {
3521
+ document: string;
3522
+ artifactIds: string[];
3523
+ params: ExecutorTemplateParam[];
3524
+ /** proof, virtual or onchain. */
3525
+ type: string;
3526
+ createdAt?: number;
3527
+ }
3528
+ interface ExecutorArtifact {
3529
+ id: string;
3530
+ document: string;
3531
+ createdAt?: number;
3532
+ }
3533
+ interface ExecutorDelegationInput {
3534
+ name: string;
3535
+ onchain: boolean;
3536
+ script: string;
3537
+ address: string;
3538
+ }
3539
+ /** An instance of a template. */
3540
+ interface ExecutorDelegation {
3541
+ id: number;
3542
+ inputs: ExecutorDelegationInput[];
3543
+ status: "active" | "cancelled" | "expired" | "done";
3544
+ templateId: string;
3545
+ variables: Record<string, string>;
3546
+ /** Unix seconds, as the service's `service.openapi.json` defines it. */
3547
+ expiresAt?: number;
3548
+ }
3549
+ interface DelegatedOutput {
3550
+ outpoint: string;
3551
+ amount: number;
3552
+ status: "present" | "spent";
3553
+ expiresAt?: number;
3554
+ due?: number;
3555
+ spentBy?: string;
3556
+ }
3557
+ interface ExecutorDelegationDetails {
3558
+ delegation: ExecutorDelegation;
3559
+ coins: DelegatedOutput[];
3560
+ }
3561
+ /**
3562
+ * An executor request that failed. `status` is the HTTP status when the service answered, and
3563
+ * undefined when the request never reached it or got an answer that is not the service's. A
3564
+ * 404 from `getDelegation` means the service does not know the watch.
3565
+ */
3566
+ declare class ExecutorRequestError extends Error {
3567
+ readonly status?: number | undefined;
3568
+ constructor(message: string, status?: number | undefined);
3569
+ }
3570
+ interface ExecutorProvider {
3571
+ getInfo(): Promise<ExecutorInfo>;
3572
+ listTemplates(): Promise<ExecutorTemplate[]>;
3573
+ registerDelegation(templateId: string, variables: Record<string, string>, options?: {
3574
+ expiresAt?: number;
3575
+ signal?: AbortSignal;
3576
+ }): Promise<ExecutorDelegation>;
3577
+ getDelegation(address: string, options?: {
3578
+ signal?: AbortSignal;
3579
+ }): Promise<ExecutorDelegationDetails>;
3580
+ /**
3581
+ * `document` is the JSON text, or an object to send as its JSON. Executor v0.0.5 takes uploads
3582
+ * on its admin port; its public port answers 403 unless run with `EXECUTOR_PUBLIC_REGISTRY=true`.
3583
+ */
3584
+ registerArtifact?(document: string | object, options?: {
3585
+ signal?: AbortSignal;
3586
+ }): Promise<ExecutorArtifact>;
3587
+ getArtifact?(id: string, options?: {
3588
+ signal?: AbortSignal;
3589
+ }): Promise<ExecutorArtifact>;
3590
+ /** Needs the template's artifacts registered first; `document` and 403 as in `registerArtifact`. */
3591
+ registerTemplate?(document: string | object, options?: {
3592
+ signal?: AbortSignal;
3593
+ }): Promise<ExecutorTemplateDetails>;
3594
+ getTemplate?(id: string, options?: {
3595
+ signal?: AbortSignal;
3596
+ }): Promise<ExecutorTemplateDetails>;
3597
+ }
3598
+ /** REST provider for the Executor, the service that renews and boards a wallet's coins. */
3599
+ declare class RestExecutorProvider implements ExecutorProvider {
3600
+ url: string;
3601
+ constructor(url: string);
3602
+ private endpoint;
3603
+ getInfo(): Promise<ExecutorInfo>;
3604
+ listTemplates(): Promise<ExecutorTemplate[]>;
3605
+ registerDelegation(templateId: string, variables: Record<string, string>, options?: {
3606
+ expiresAt?: number;
3607
+ signal?: AbortSignal;
3608
+ }): Promise<ExecutorDelegation>;
3609
+ getDelegation(address: string, options?: {
3610
+ signal?: AbortSignal;
3611
+ }): Promise<ExecutorDelegationDetails>;
3612
+ registerArtifact(document: string | object, options?: {
3613
+ signal?: AbortSignal;
3614
+ }): Promise<ExecutorArtifact>;
3615
+ getArtifact(id: string, options?: {
3616
+ signal?: AbortSignal;
3617
+ }): Promise<ExecutorArtifact>;
3618
+ registerTemplate(document: string | object, options?: {
3619
+ signal?: AbortSignal;
3620
+ }): Promise<ExecutorTemplateDetails>;
3621
+ getTemplate(id: string, options?: {
3622
+ signal?: AbortSignal;
3623
+ }): Promise<ExecutorTemplateDetails>;
3624
+ private postJson;
3625
+ private getJson;
3626
+ }
3627
+
3435
3628
  interface IDelegateManager {
3436
3629
  /**
3437
3630
  * Delegate virtual outputs to the remote delegation service.
@@ -3471,6 +3664,211 @@ declare class DelegateManagerImpl implements IDelegateManager {
3471
3664
  }>;
3472
3665
  }
3473
3666
 
3667
+ /** Metadata key: the service's status of a delegated watch. */
3668
+ declare const DELEGATION_STATUS_KEY = "delegationStatus";
3669
+ /** Metadata key: the watch's expiry, in unix seconds; 0 or absent when it has none. */
3670
+ declare const DELEGATION_EXPIRES_KEY = "delegationExpiresAt";
3671
+ /** Metadata key: when the watch was last registered, in unix milliseconds. */
3672
+ declare const DELEGATION_REGISTERED_KEY = "delegationRegisteredAt";
3673
+ /**
3674
+ * The status of a contract row the SDK watches but did not register with the service: the local
3675
+ * companion of a registration, such as the renewal contract a boarding watch boards into.
3676
+ */
3677
+ declare const DELEGATION_LOCAL_STATUS = "local";
3678
+ /** How a delegated watch was registered, persisted on its contract row. */
3679
+ interface ExecutorWatchMetadata {
3680
+ /** The template the service registered. */
3681
+ template: ExecutorDefault;
3682
+ /** The service's status of the watch. */
3683
+ status: string;
3684
+ /** The watch's expiry, in unix seconds; 0 or absent when it has none. */
3685
+ expiresAt?: number;
3686
+ }
3687
+ /** A watch both sides derived: the address to fund and what restores it. */
3688
+ interface ExecutorWatchRegistration {
3689
+ /** The delegated boarding address, onchain. */
3690
+ address: string;
3691
+ templateId: string;
3692
+ /** The template's variables, canonical hex. */
3693
+ variables: Record<string, string>;
3694
+ /** The Executor's keys the wallet's delegated contracts are derived from. */
3695
+ keys: ExecutorContractKeys;
3696
+ /** The parameters the contracts were derived from, exit delays resolved. */
3697
+ params: DelegationParams;
3698
+ /** The service's answer; absent when the stored watch answered and the service was not asked. */
3699
+ delegation?: ExecutorDelegation;
3700
+ }
3701
+ /**
3702
+ * The parameters a caller chooses. The exit delays default to the operator's, as BIP 68
3703
+ * sequences.
3704
+ */
3705
+ type DelegationOptions = Pick<DelegationParams, "renewalWindow" | "maxFee"> & Partial<Pick<DelegationParams, "exitDelay" | "boardingExitDelay">>;
3706
+ interface RegistrationOptions {
3707
+ /** The watch's expiry, in unix seconds. */
3708
+ expiresAt?: number;
3709
+ /**
3710
+ * The emulator key to accept in place of the network's pinned one, for a private emulator or
3711
+ * a network with none. Its holder, with the operator, can move the delegated coins.
3712
+ */
3713
+ emulatorPubkey?: string;
3714
+ }
3715
+ /** What the manager needs of a wallet: its key, its operator and its contracts. */
3716
+ type DelegatedWallet = Pick<IWallet, "identity" | "getAddress" | "getContractManager" | "getOperatorInfo">;
3717
+ interface DelegatedContractWatch {
3718
+ contract: Contract;
3719
+ owner: string;
3720
+ script: ReturnType<typeof ExecutorContractHandler.createScript>;
3721
+ signer: string;
3722
+ live: boolean;
3723
+ }
3724
+ /**
3725
+ * Make the wallet's contract manager watch, as its own, the renewal contract of its key and, when
3726
+ * params has a boarding exit delay, its boarding contract: derived locally from the key, the
3727
+ * params and the service's keys, so a restored wallet finds its delegated coins without asking
3728
+ * the service. Idempotent.
3729
+ *
3730
+ * `descriptor` names the owner key, the identity's by default. Called before `restore()`, it
3731
+ * also lets an HD wallet find the watches of its rotated keys.
3732
+ *
3733
+ * `registered` carries the service's answer for the template it registered: that row becomes the
3734
+ * live delegation, the others stay local companions of it (watched, never delegated to). Without
3735
+ * it (a restore) the rows carry no status.
3736
+ */
3737
+ declare function watchExecutorContracts(wallet: Pick<IWallet, "identity" | "getAddress" | "getContractManager">, keys: ExecutorContractKeys, params: DelegationParams, registered?: ExecutorWatchMetadata, descriptor?: string): Promise<Contract[]>;
3738
+ /**
3739
+ * Registers Executor watches. Renewal keeps renewal-contract coins alive while the wallet is
3740
+ * offline; boarding moves onchain deposits into the corresponding renewal contract.
3741
+ */
3742
+ interface IExecutorManager {
3743
+ getInfo(): Promise<ExecutorInfo>;
3744
+ /** The default template ids; throws unless the service lists them as active. */
3745
+ defaultTemplates(): Promise<Record<ExecutorDefault, string>>;
3746
+ /**
3747
+ * Watch the displayed boarding address's key: the Executor boards every deposit there
3748
+ * into the wallet's renewal contract, a virtual output the wallet spends and renews as its
3749
+ * own. The wallet watches both contracts. Without `expiresAt` the watch has no deadline of
3750
+ * its own, but the Executor expires one that never receives a coin after an idle window: the
3751
+ * wallet registers it again while it is online. Registering again returns the existing watch
3752
+ * unchanged, from the stored row when it is the key's newest live watch under the same params:
3753
+ * the Executor is not asked, and `delegation` is absent. An HD wallet registers a new watch
3754
+ * each time it rotates the boarding address.
3755
+ *
3756
+ * The address derives from the key, `params`, the operator's exit delays when `params` omits
3757
+ * them, and the Executor's keys: registering again on a restored wallet finds the same watch
3758
+ * only while none of them changed. The returned `keys` and `params` restore it regardless,
3759
+ * through {@link watchExecutorContracts}.
3760
+ *
3761
+ * Params may change between calls: the new ones register a new watch, and the earlier watches
3762
+ * stay live and keep boarding the deposits already sent to them. The boarding address follows
3763
+ * the most recently registered watch, so registering older params again moves it back.
3764
+ *
3765
+ * A boarding watch pays into the renewal contract of its own params. While renewal is on, that
3766
+ * is, while the wallet has any live renewal watch under the current operator, this also
3767
+ * registers renewal under `params` and `options`, unless that contract already has one. That registration is best-effort: a failure is logged and never
3768
+ * undoes the boarding watch. {@link registerRenewal} retries it.
3769
+ */
3770
+ registerBoarding(params: DelegationOptions, options?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3771
+ /**
3772
+ * Register the renewal watch, like {@link registerBoarding} idempotent, so apps call it at
3773
+ * startup. `params` is the displayed boarding key's: that registration comes first, is
3774
+ * returned, and its failure throws at once, before any other key is tried.
3775
+ *
3776
+ * It then covers every live boarding watch under the current operator, each under its own
3777
+ * params, which is where its coins sit: the displayed key's earlier watches, and each earlier
3778
+ * rotated key's. A key whose renewal watch is already live, as stored, is not asked again. A watch under another emulator key than the Executor's, or with a window no
3779
+ * longer shorter than the operator's VTXO expiry, cannot be registered: it is skipped with a
3780
+ * warning, and the wallet renews its coins itself. The others are all tried before a failure
3781
+ * is thrown, and the error names the keys that failed, so a retry covers the rest.
3782
+ * `expiresAt` applies to every watch registered.
3783
+ *
3784
+ * A send's change returns to the live renewal contract of its first delegated input, and the
3785
+ * wallet's own renewals pay into the newest live one, unless the amount is `maxFee + dust` or
3786
+ * less, or a renewed coin carries assets. A renewal spending a coin at a live renewal contract
3787
+ * pays to `getAddress()` instead: the Executor missed that coin, so paying it back repeats the
3788
+ * miss. A coin received at `getAddress()` is covered from its first renewal on; until then the
3789
+ * wallet renews it itself. Under an Executor that keeps failing, a coin alternates: one
3790
+ * fallback renewal out, one ordinary renewal back in.
3791
+ */
3792
+ registerRenewal(params: DelegationOptions, options?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3793
+ }
3794
+ /** Client-side watch registration with the Executor. */
3795
+ declare class ExecutorManagerImpl implements IExecutorManager {
3796
+ readonly executorProvider: ExecutorProvider;
3797
+ readonly wallet: DelegatedWallet;
3798
+ constructor(executorProvider: ExecutorProvider, wallet: DelegatedWallet);
3799
+ getInfo(): Promise<ExecutorInfo>;
3800
+ defaultTemplates(): Promise<Record<ExecutorDefault, string>>;
3801
+ registerBoarding(options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3802
+ registerRenewal(options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3803
+ /** @internal {@link registerBoarding} for `descriptor`'s key; the displayed one by default. */
3804
+ registerBoardingAt(descriptor: string | undefined, options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3805
+ /**
3806
+ * Register again the live watches the Executor no longer holds. It expires a client delegation
3807
+ * that never held a coin after an idle window, and reports no deadline for it: the row stays
3808
+ * live, and the wallet keeps advertising an address nobody watches. Registering an expired
3809
+ * watch again revives it at the same address, keeping its registration time: only an explicit
3810
+ * registration moves the boarding address. One that cannot be revived stops being live, and
3811
+ * the wallet boards its deposits itself. A failing watch leaves the others to be tried.
3812
+ *
3813
+ * Only a key the wallet still uses is revived: the displayed one, and the most recently
3814
+ * registered other key with a live watch, whose renewal contract the wallet's renewals pay
3815
+ * into. A lapsed watch of any older key ends instead: it never held a coin, and reviving it
3816
+ * would repeat for every rotation, forever.
3817
+ *
3818
+ * The status reads run as called; only the writes go through `write`, so a caller that orders
3819
+ * them with its rotations holds those back for one write, never for the whole refresh.
3820
+ * `stopped` ends the refresh between watches, and turns a write still queued into a no-op.
3821
+ *
3822
+ * Throws when a live watch is held and the Executor or the operator cannot be reached; a
3823
+ * wallet with none reaches neither.
3824
+ * @internal
3825
+ */
3826
+ refreshWatches({ write, stopped, }?: {
3827
+ write?: (task: () => Promise<void>) => Promise<void>;
3828
+ stopped?: () => boolean;
3829
+ }): Promise<void>;
3830
+ /** What the Executor says of `watch`; an unknown watch is a lost one, so "expired". */
3831
+ private serviceStatus;
3832
+ /** Revive a lapsed watch, or end it when its key is no longer in use. */
3833
+ private settleLapsed;
3834
+ /** Record the service's `status`, so the watch stops being live and is no longer shown. */
3835
+ private endWatch;
3836
+ /**
3837
+ * The displayed key, and the most recently registered other key with a live watch: the
3838
+ * wallet's renewals pay into its renewal contract, and a rotation copies its params when the
3839
+ * displayed key has no watch.
3840
+ */
3841
+ private keyInUse;
3842
+ /**
3843
+ * A boarding watch pays into the renewal contract of its own params, so while renewal is on,
3844
+ * meaning any live renewal watch under the operator, that contract needs one too, or its
3845
+ * boarded coins fall back to the wallet.
3846
+ */
3847
+ private pairRenewal;
3848
+ /**
3849
+ * What registering `descriptor`'s key would return, read from the stored watch: the key's
3850
+ * newest live one of `template` under the current operator, when it has the same params and
3851
+ * emulator key. The service would answer with it unchanged; a lapsed watch is the refresh's to
3852
+ * find. Undefined when the service must be asked: a first registration, a restored row, new
3853
+ * params, or older ones registered again to move the boarding address back.
3854
+ */
3855
+ private storedWatch;
3856
+ /** {@link registrationContext}, read once, and only when the service is asked. */
3857
+ private lazyContext;
3858
+ /** The wallet's operator key, x-only hex: the signer a live watch is registered under. */
3859
+ private operatorSigner;
3860
+ /**
3861
+ * Both templates register the displayed boarding key: boarding moves its deposits in, renewal
3862
+ * keeps the renewal contract that receives them alive. It falls back to the identity's, so a
3863
+ * static wallet registers its identity key.
3864
+ */
3865
+ private displayedDescriptor;
3866
+ /** The wallet's watches of `template`, from the repository rows. */
3867
+ private heldWatches;
3868
+ private registrationContext;
3869
+ private registerAt;
3870
+ }
3871
+
3474
3872
  /**
3475
3873
  * Inputs a {@link ReceiveRotatorFactory} gets at boot to find the current display contract or
3476
3874
  * allocate a fresh descriptor. Allocation only: `resolveBoot` rebuilds the tapscript afterwards.
@@ -3788,6 +4186,8 @@ interface BoardingUtxoGroup {
3788
4186
  /** CSV exit timelock decoded from THIS tapscript's exit leaf. */
3789
4187
  csvTimelock: RelativeTimelock;
3790
4188
  coins: ExtendedCoin[];
4189
+ /** A live Executor boarding watch: the Executor boards these, settle leaves them alone. */
4190
+ delegated?: true;
3791
4191
  }
3792
4192
  /**
3793
4193
  * Why a VTXO at an arkadeCash address could neither be swept nor imported for
@@ -3914,6 +4314,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
3914
4314
  readonly walletRepository: WalletRepository;
3915
4315
  readonly contractRepository: ContractRepository;
3916
4316
  readonly delegateProvider?: DelegateProvider | undefined;
4317
+ readonly executorProvider?: ExecutorProvider | undefined;
3917
4318
  protected lazyInitialization: boolean;
3918
4319
  private boardingLoaded;
3919
4320
  private _contractManager?;
@@ -3982,7 +4383,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
3982
4383
  getContractSyncState(): ContractSyncState;
3983
4384
  protected constructor(identity: ReadonlyIdentity, network: Network, onchainProvider: OnchainProvider,
3984
4385
  /** Narrowed so a readonly wallet can't grow a `submitTx` use; `Wallet` re-widens it. */
3985
- arkProvider: Pick<OperatorProvider, "getInfo">, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository, delegateProvider?: DelegateProvider | undefined, watcherConfig?: ReadonlyWalletConfig["watcherConfig"], walletContractTimelocks?: RelativeTimelock[]);
4386
+ arkProvider: Pick<OperatorProvider, "getInfo">, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository, delegateProvider?: DelegateProvider | undefined, watcherConfig?: ReadonlyWalletConfig["watcherConfig"], walletContractTimelocks?: RelativeTimelock[], executorProvider?: ExecutorProvider | undefined);
3986
4387
  /**
3987
4388
  * x-only hex → cutoff of the operator's deprecated signers, cached for OFFLINE read/watch.
3988
4389
  * Boarding watch/history fan out over {current} ∪ this set so deposits at addresses minted
@@ -4001,6 +4402,11 @@ declare class ReadonlyWallet implements IReadonlyWallet {
4001
4402
  cutoffDate?: bigint;
4002
4403
  }[];
4003
4404
  }): void;
4405
+ /**
4406
+ * Arkade's retired delegator keys when this wallet's operator is Arkade's and it has an
4407
+ * Executor: apps that drop `delegateUrl` do so to move to it. Discovery only.
4408
+ */
4409
+ protected retiredDelegateKeys(): Uint8Array[];
4004
4410
  /** Boarding WATCH/HISTORY signer set: current ∪ deprecated (spend stays current-only). */
4005
4411
  protected watchedBoardingSigners(): Set<string>;
4006
4412
  /**
@@ -4043,8 +4449,9 @@ declare class ReadonlyWallet implements IReadonlyWallet {
4043
4449
  */
4044
4450
  get boardingTapscript(): DefaultVtxo.Script;
4045
4451
  /**
4046
- * Fired after boarding rotation so a live {@link notifyIncomingFunds} watcher re-subscribes
4047
- * to the fresh address in-session instead of missing deposits until its next re-init.
4452
+ * Fired after boarding rotation, or a new onchain contract such as an Executor boarding watch,
4453
+ * so a live {@link notifyIncomingFunds} watcher re-subscribes to the fresh address in-session
4454
+ * instead of missing deposits until its next re-init.
4048
4455
  */
4049
4456
  private readonly _boardingRotationListeners;
4050
4457
  /** Register a listener invoked synchronously after each boarding rotation. */
@@ -4068,6 +4475,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
4068
4475
  serverInfoSource: ServerInfoSource;
4069
4476
  serverInfoLastOnlineAt: number | undefined;
4070
4477
  delegateProvider: DelegateProvider | undefined;
4478
+ executorProvider: ExecutorProvider | undefined;
4071
4479
  walletContractTimelocks: RelativeTimelock[];
4072
4480
  }>;
4073
4481
  /**
@@ -4086,10 +4494,36 @@ declare class ReadonlyWallet implements IReadonlyWallet {
4086
4494
  * For the full wallet-owned script set registered in ContractManager, use getWalletScripts().
4087
4495
  */
4088
4496
  get defaultContractScript(): string;
4089
- /** Returns the wallet's Arkade address. */
4497
+ /**
4498
+ * Returns the wallet's Arkade address. While an Executor renewal watch is live, the wallet's
4499
+ * own renewals move coins received here into its renewal contract, which the Executor renews.
4500
+ */
4090
4501
  getAddress(): Promise<string>;
4091
- /** Returns the onchain boarding address used to move funds into Arkade. */
4502
+ /**
4503
+ * Returns the onchain boarding address used to move funds into Arkade: with an Executor
4504
+ * configured and a boarding watch registered, the delegated boarding address, whose deposits
4505
+ * the Executor boards into the wallet's renewal contract while the wallet is offline.
4506
+ */
4092
4507
  getBoardingAddress(): Promise<string>;
4508
+ /**
4509
+ * The live boarding watch of the displayed boarding key and current operator, see
4510
+ * {@link delegatedExecutorContracts}. A rotated key without one shows its own address.
4511
+ */
4512
+ private delegatedBoardingAddress;
4513
+ /**
4514
+ * The Executor contracts of this wallet's keys, most recently registered first: the
4515
+ * identity's, or one its `signingDescriptor` derives. Read from the contract repository, not
4516
+ * the contract manager: a boarding or renewal read must not start its indexer sync. Reads
4517
+ * follow registrations made through any wallet front-end.
4518
+ */
4519
+ protected delegatedExecutorContracts(template: ExecutorDefault): Promise<DelegatedContractWatch[]>;
4520
+ /** Encoded tap trees of the live boarding watches, whose deposits the Executor boards. */
4521
+ protected liveDelegatedBoardingTrees(): Promise<Set<string>>;
4522
+ /**
4523
+ * @internal The wallet's own boarding address, never the delegated one: where the boarding
4524
+ * sweeps send coins, so a deposit swept off a delegated address does not land on it again.
4525
+ */
4526
+ ownBoardingAddress(): string;
4093
4527
  /**
4094
4528
  * Return the wallet's combined onchain and offchain balances.
4095
4529
  */
@@ -4228,16 +4662,17 @@ declare class ReadonlyWallet implements IReadonlyWallet {
4228
4662
  */
4229
4663
  getBoardingUtxos(): Promise<ExtendedCoin[]>;
4230
4664
  /**
4231
- * @internal {@link getBoardingUtxos} minus those an in-flight settle is spending or an
4232
- * unresolved intent locks, for SDK picks. The getter itself lists them: callers that mirror it
4665
+ * @internal {@link getBoardingUtxos} minus those an in-flight settle is spending, an
4666
+ * unresolved intent locks or a live Executor watch leaves to the Executor, for SDK picks. The getter itself lists them: callers that mirror it
4233
4667
  * (the worker's cache and broadcasts, balances) must not see a settle's inputs vanish, and then
4234
4668
  * stay gone if it fails.
4235
4669
  */
4236
4670
  getSelectableBoardingUtxos(): Promise<ExtendedCoin[]>;
4237
4671
  /**
4238
4672
  * @internal {@link getSelectableBoardingUtxos} for every boarding address history shows,
4239
- * current and deprecated signers, grouped by signer. Only the boarding sweep reads it: a
4240
- * unilateral exit needs no operator, so it recovers coins that `settle` must not take.
4673
+ * current and deprecated signers, grouped by signer. The periodic settle takes the current
4674
+ * signer's groups except `delegated` ones; the boarding sweep takes them all: a unilateral
4675
+ * exit needs no operator, so it recovers coins that `settle` must not take.
4241
4676
  */
4242
4677
  getSelectableBoardingUtxoGroups(): Promise<BoardingUtxoGroup[]>;
4243
4678
  /** Boarding coins from the store, no network call; pending and confirmed spends excluded. */
@@ -4257,7 +4692,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
4257
4692
  fetchPendingTxs(): Promise<string[]>;
4258
4693
  /**
4259
4694
  * Get all pkScript hex strings for the wallet's own addresses
4260
- * (both delegate and non-delegate, current and historical).
4695
+ * (default, delegate and executor, current and historical).
4261
4696
  */
4262
4697
  getWalletScripts(): Promise<string[]>;
4263
4698
  /**
@@ -4344,6 +4779,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4344
4779
  static MIN_FEE_RATE: number;
4345
4780
  readonly identity: Identity;
4346
4781
  private readonly _delegateManager?;
4782
+ private readonly _executorManager?;
4347
4783
  private _vtxoManager?;
4348
4784
  private _vtxoManagerInitializing?;
4349
4785
  private _walletAssetManager?;
@@ -4376,6 +4812,18 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4376
4812
  */
4377
4813
  settleServerInfoChanges(): Promise<void>;
4378
4814
  private _receiveRotatorInstalled;
4815
+ /** Rotates the boarding address once the Executor boards a deposit at it. */
4816
+ private _executorBoardUnsub?;
4817
+ private _executorBootInstalled;
4818
+ private _executorBoardChain;
4819
+ private _executorRefreshedAt;
4820
+ private _executorBoot?;
4821
+ private _executorRefreshing?;
4822
+ /**
4823
+ * Set by dispose: a refresh stops between watches, and its queued writes do nothing. Rotations
4824
+ * still drain.
4825
+ */
4826
+ private _executorStopping;
4379
4827
  /**
4380
4828
  * Descriptor-aware signer for inputs locked by rotated pubkeys (the rotator's instance).
4381
4829
  * Undefined for static / non-HD wallets, which only sign with the identity.
@@ -4467,14 +4915,69 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4467
4915
  * {@link maybeRotateBoardingAfterBoard} on every settle consuming a boarding UTXO; retired
4468
4916
  * addresses stay reachable through {@link getBoardingUtxos}.
4469
4917
  *
4918
+ * While an Executor boarding watch is live, the new key gets a watch of its own, and this
4919
+ * returns its delegated address; if that registration fails or times out, the new key's own
4920
+ * address. It waits for the registration, unlike the rotation after a settle.
4921
+ *
4470
4922
  * @deprecated Use {@link getNewAddresses} — it mints any combination of
4471
4923
  * address types at one shared index, and reports the contract row behind
4472
4924
  * each. Note the difference in display behaviour: this method *swaps* the
4473
4925
  * advertised boarding address, where `getNewAddresses` mints side
4474
- * addresses and leaves {@link getBoardingAddress} alone. To keep this
4475
- * method's behaviour, keep calling this method.
4926
+ * addresses and leaves {@link getBoardingAddress} alone. It also registers
4927
+ * no Executor watch: a deposit at its boarding address waits for this
4928
+ * wallet's own settle. To keep this method's behaviour, keep calling this
4929
+ * method.
4476
4930
  */
4477
4931
  getNewBoardingAddress(): Promise<string>;
4932
+ /**
4933
+ * Allocate the next boarding key, register its Executor watch, then swap the display.
4934
+ * Persisted before the swap, so a throw leaves the previous (watched) address displayed. The
4935
+ * row is tagged at allocation: a restart before the swap boots on the new key's own address,
4936
+ * as after a failed registration.
4937
+ */
4938
+ private rotateBoarding;
4939
+ /**
4940
+ * Runs `task` after the rotations queued before it; its failure reaches only its caller. Never
4941
+ * call {@link getNewBoardingAddress} from a task: it would wait on itself.
4942
+ */
4943
+ private onBoardChain;
4944
+ /**
4945
+ * Register the most recently registered live Executor boarding watch again for a rotated
4946
+ * key, so its deposits are boarded while the wallet is offline too. Not the displayed key's
4947
+ * own watch: it may have none, and the parameters are wallet policy. While renewal is on, the
4948
+ * registration pairs a renewal watch with it, after the boarding one, whose failure it never
4949
+ * undoes. Best-effort: on failure the key shows its own address, which the wallet boards once
4950
+ * online.
4951
+ */
4952
+ private extendBoardingWatch;
4953
+ /**
4954
+ * Startup work for an Executor: refresh its watches (every wallet), then, with a descriptor
4955
+ * provider, rotate-on-board. The Executor boards a deposit into the renewal contract of its
4956
+ * key, so a coin there while that key is displayed means the address was used. Renewals and a
4957
+ * delegated coin's change land there too, and the trigger is still correct.
4958
+ */
4959
+ private installExecutorBoot;
4960
+ /**
4961
+ * @internal Register again the Executor watches the service let lapse, see
4962
+ * {@link ExecutorManagerImpl.refreshWatches}; runs at startup for every wallet with an Executor
4963
+ * and from the poll of the {@link VtxoManager} every cycle. At most once a day, reloads
4964
+ * included. Its writes go on the board chain, so they never interleave a rotation's
4965
+ * registration, and a rotation waits for one write at most. Concurrent calls share one run.
4966
+ * Best-effort: never throws. Never call it from a board chain task: it would wait on itself.
4967
+ */
4968
+ refreshExecutorWatches(): Promise<void>;
4969
+ private refreshExecutorWatchesNow;
4970
+ /**
4971
+ * Re-checked when it runs: an earlier rotation may have moved the displayed key, and the
4972
+ * deposit's own rotation must then not burn another index.
4973
+ */
4974
+ private queueExecutorBoardRotation;
4975
+ /**
4976
+ * A coin that predates the subscription raises no event: a stored one, or one the contract
4977
+ * manager's boot sync writes, which is why this runs once that boot has finished. Any coin
4978
+ * counts: it proves the key was used. Best-effort: a failed read must not fail the boot.
4979
+ */
4980
+ private rotateForExecutorCoinAtBoot;
4478
4981
  /**
4479
4982
  * Allocate a *fresh* address of each requested type, all at **one** new HD index. The way to
4480
4983
  * issue a second address before the first is paid ({@link getAddress} only advances on
@@ -4599,6 +5102,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4599
5102
  private persistentReservedOutpoints;
4600
5103
  private reservationWrites;
4601
5104
  private reservationQueue;
5105
+ private requireReservationRepository;
4602
5106
  private withReservationWrite;
4603
5107
  isVtxoReserved(outpoint: Outpoint): boolean;
4604
5108
  /** Restored before automatic spending. Reusing an owner id must name the same inputs. */
@@ -4634,10 +5138,18 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4634
5138
  restore(opts?: {
4635
5139
  gapLimit?: number;
4636
5140
  }): Promise<void>;
5141
+ /**
5142
+ * The delegations of the persisted Executor contracts, owner aside, so restore finds them at
5143
+ * every key: {@link watchExecutorContracts} before `restore()` covers the rotated ones too.
5144
+ */
5145
+ private executorWatchTemplates;
4637
5146
  private _runRestore;
4638
5147
  readonly settlementConfig: SettlementConfig | false;
4639
5148
  private _concurrentSpending;
4640
5149
  private _submitsAwaitingFinalize;
5150
+ private pendingTxRecoveryDeferred;
5151
+ /** @internal */
5152
+ get hasDeferredPendingTxRecovery(): boolean;
4641
5153
  /** @see WalletConfig.concurrentSpending */
4642
5154
  get concurrentSpending(): boolean;
4643
5155
  /** Public here; `ReadonlyWallet` keeps it protected so a readonly view can't submit. */
@@ -4647,11 +5159,12 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4647
5159
  * {@link ReadonlyWallet}: a readonly wallet or `toReadonly()` view must not be able to submit.
4648
5160
  */
4649
5161
  getArkadeBroadcaster(): Promise<ArkadeBroadcaster>;
5162
+ private assertNoDeferredPendingTxRecovery;
4650
5163
  protected constructor(identity: Identity, network: Network, onchainProvider: OnchainProvider, arkProvider: OperatorProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, serverUnrollScript: CSVMultisigTapscript.Type, forfeitOutputScript: Bytes, forfeitPubkey: Bytes, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository, delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider, keyring?: KeyringDescriptorProvider, lookAheadWindow?: number,
4651
5164
  /** Overrides for the `batchExpiry` bounds; defaults derive from `network`. */
4652
5165
  batchExpiryPolicy?: Partial<BatchExpiryPolicy> | undefined,
4653
5166
  /** @see WalletConfig.oneShotSubmit */
4654
- oneShotSubmit?: boolean);
5167
+ oneShotSubmit?: boolean, executorProvider?: ExecutorProvider);
4655
5168
  get assetManager(): IAssetManager;
4656
5169
  getVtxoManager(): Promise<VtxoManager>;
4657
5170
  /** Also drops durable holds: a cleared wallet's holds would outlive their owner. */
@@ -4694,6 +5207,8 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4694
5207
  toReadonly(): Promise<ReadonlyWallet>;
4695
5208
  /** Returns the delegate manager when delegation support is configured. */
4696
5209
  getDelegateManager(): Promise<IDelegateManager | undefined>;
5210
+ /** Returns the Executor manager when an Executor is configured. */
5211
+ getExecutorManager(): Promise<IExecutorManager | undefined>;
4697
5212
  /**
4698
5213
  * Settle boarding inputs and/or virtual outputs into a finalized mainnet transaction.
4699
5214
  *
@@ -4715,6 +5230,10 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4715
5230
  * Boarding has no on-chain receive event (the watcher sees only the L2 indexer), so a settle
4716
5231
  * consuming a boarding UTXO (a non-VTXO, non-arknote input) is the trigger. No-op without a
4717
5232
  * descriptor provider. Best-effort: the settle has committed, so failures are only logged.
5233
+ *
5234
+ * With an Executor the rotation runs in the background, as its watch is a network round the
5235
+ * settle (and the tx lock it holds) must not wait on. The old key's delegated address stays
5236
+ * displayed, still watched, until the new watch exists: the brief reuse is intended.
4718
5237
  */
4719
5238
  private maybeRotateBoardingAfterBoard;
4720
5239
  private handleSettlementFinalizationEvent;
@@ -4764,6 +5283,11 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4764
5283
  finalized: string[];
4765
5284
  pending: string[];
4766
5285
  }>;
5286
+ /** @internal */
5287
+ deferPendingTxRecovery(): Promise<boolean>;
5288
+ /** @internal */
5289
+ resumeDeferredPendingTxs(isCurrent: () => boolean): Promise<void>;
5290
+ private finalizePendingTxsImpl;
4767
5291
  /**
4768
5292
  * Operator unroll scripts a pending checkpoint may have been built under: configured, current,
4769
5293
  * and one per deprecated signer — else a pre-rotation tx would stay pending forever.
@@ -4909,6 +5433,28 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4909
5433
  */
4910
5434
  send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
4911
5435
  private _sendImpl;
5436
+ /**
5437
+ * Change follows its inputs: a send spending a coin at a live renewal watch returns the change
5438
+ * to that contract, so the Executor keeps renewing it. The own script otherwise. Fail-open: a
5439
+ * send must not fail over a delegation lookup.
5440
+ */
5441
+ private changeTapscriptFor;
5442
+ /** The live Executor renewal watches under `signer`, the operator's x-only key. */
5443
+ private liveRenewalWatches;
5444
+ /** Whether the Executor can renew `amount` at `watch`: not for `maxFee + dust` or less. */
5445
+ private renews;
5446
+ /**
5447
+ * @internal Where the wallet's own renewals pay `amount`: the newest live Executor renewal
5448
+ * contract under the current operator, so the Executor renews the coin from then on. One the
5449
+ * displayed boarding key does not own comes first: a coin at that key's contract rotates the
5450
+ * boarding address. The wallet's address when none applies, for `maxFee + dust` or less, which
5451
+ * the Executor cannot renew, or when a renewed coin carries assets, which `settle()` places
5452
+ * only at the wallet's address. Also the wallet's address when any of `inputScripts` sits at a
5453
+ * live renewal contract, whatever the reason: the Executor had its chance at that coin, and
5454
+ * paying it back there only repeats the miss. Fail-open: a renewal must not fail over a
5455
+ * delegation lookup.
5456
+ */
5457
+ renewalAddress(amount: bigint, inputScripts?: readonly string[]): Promise<string>;
4912
5458
  /**
4913
5459
  * Shared submit/persist tail of `send` and {@link sendSelectedVtxosToSelf}; callers own coin
4914
5460
  * selection, outputs and the synchronous epoch snapshot.
@@ -5452,6 +5998,8 @@ interface ContractManagerConfig {
5452
5998
  /** Enables onchain coin discovery and watching; needs `network` too. */
5453
5999
  onchainProvider?: OnchainProvider;
5454
6000
  network?: Network;
6001
+ /** Fired after a new onchain-scoped contract is saved: the onchain address set changed. */
6002
+ onOnchainContractCreated?: () => void;
5455
6003
  }
5456
6004
  /**
5457
6005
  * Wallet-injected surface backing the HD look-ahead window; a callback bundle so the contracts
@@ -5809,6 +6357,11 @@ declare class ContractManager implements IContractManager {
5809
6357
  unwatchScript(script: string | string[]): Promise<void>;
5810
6358
  /** @see IContractManager.getWatchedScripts */
5811
6359
  getWatchedScripts(): Promise<WatchedScript[]>;
6360
+ /**
6361
+ * The onchain side of hydrating new Executor contracts: stores their coins, and the sync's
6362
+ * retarget adds their addresses to the onchain watch. Best-effort: the next sync retries.
6363
+ */
6364
+ private syncNewOnchain;
5812
6365
  /** @see IContractManager.syncOnchain */
5813
6366
  syncOnchain(scripts?: string[], fetched?: ReadonlyMap<string, Coin[]>): Promise<void>;
5814
6367
  /**
@@ -6130,6 +6683,7 @@ interface DiscoveredContract {
6130
6683
  address: string;
6131
6684
  metadata?: Record<string, unknown>;
6132
6685
  label?: string;
6686
+ scope?: ContractScope;
6133
6687
  }
6134
6688
  /**
6135
6689
  * Read-only context the scanner injects into every `discoverAt` call. Never carries an external
@@ -6166,15 +6720,19 @@ interface DiscoveryDeps {
6166
6720
  * no-ops.
6167
6721
  */
6168
6722
  boardingTimelock?: RelativeTimelock;
6169
- /** Present only for delegate wallets. */
6723
+ /** The configured delegator's key (x-only), the one new `delegate` contracts are minted with. */
6170
6724
  delegatePubKey?: Uint8Array;
6725
+ /** Retired delegators' keys (x-only). Discovery only, never minted. */
6726
+ retiredDelegatePubKeys?: Uint8Array[];
6727
+ /** The wallet's Executor delegations, probed at every index; none when absent. */
6728
+ executorWatches?: readonly ExecutorWatchTemplate[];
6171
6729
  }
6172
6730
  /**
6173
6731
  * The I/O-free subset of {@link DiscoveryDeps}: the axes a receive script can
6174
6732
  * be anchored to. `DiscoveryDeps` satisfies it structurally, so one
6175
6733
  * {@link Discoverable.candidatesAt} serves the scan and the look-ahead band.
6176
6734
  */
6177
- type CandidateDeps = Pick<DiscoveryDeps, "network" | "serverPubKey" | "csvTimelocks"> & Pick<Partial<DiscoveryDeps>, "deprecatedSignerPubKeys" | "delegatePubKey">;
6735
+ type CandidateDeps = Pick<DiscoveryDeps, "network" | "serverPubKey" | "csvTimelocks"> & Pick<Partial<DiscoveryDeps>, "deprecatedSignerPubKeys" | "delegatePubKey" | "retiredDelegatePubKeys">;
6178
6736
  /**
6179
6737
  * Optional {@link ContractHandler} capability for `wallet.restore()`'s gap-limit scan. The scanner
6180
6738
  * owns the index loop and gap counter; the handler answers "do I own a contract at this index?"
@@ -6649,6 +7207,12 @@ interface BaseWalletConfig {
6649
7207
  onchainProvider?: OnchainProvider | ((network: NetworkName) => OnchainProvider);
6650
7208
  /** Optional delegation service instance. */
6651
7209
  delegateProvider?: DelegateProvider;
7210
+ /**
7211
+ * Optional Executor, the service that boards the wallet's deposits while it is offline. Only a
7212
+ * `Wallet` registers watches, through `getExecutorManager()`; a readonly wallet reads them.
7213
+ * Without one, the wallet behaves as it does without the Executor.
7214
+ */
7215
+ executorProvider?: ExecutorProvider;
6652
7216
  }
6653
7217
  /**
6654
7218
  * Configuration for a readonly (watch-only) wallet: query balance, addresses and transactions
@@ -7570,6 +8134,8 @@ interface IReadonlyWallet {
7570
8134
  assetManager: IReadonlyAssetManager;
7571
8135
  /** Wipe all locally persisted wallet data (VTXOs, UTXOs, history, sync cursor, contracts). */
7572
8136
  clear(): Promise<void>;
8137
+ /** Release wallet-owned background resources without wiping persisted data. */
8138
+ dispose?(): Promise<void>;
7573
8139
  }
7574
8140
 
7575
8141
  interface TransactionHistoryPageFilter {
@@ -7887,4 +8453,4 @@ declare function isBatchSignable(identity: Identity): identity is BatchSignableI
7887
8453
  */
7888
8454
  declare function isSigningIdentity(value: unknown): value is Identity;
7889
8455
 
7890
- export { type WalletState as $, type AddressAllocationCapable as A, type OperatorProvider as B, type ContractRepository as C, type Contract as D, type ExtendedCoin as E, type ExtendedVirtualCoin as F, type GetOperatorInfoOptions as G, type HDWalletCapable as H, type IWallet as I, type PageRequest as J, type Outpoint as K, type PageResult as L, type ScriptVtxoCursor as M, type NormalizedExtendedVirtualCoin as N, type OperatorInfo as O, type ProviderConnectionState as P, type ScriptVtxoPageOptions as Q, type Recipient as R, type SettleParams as S, type TxNotificationEvent as T, type StoredVtxo as U, type VirtualCoin as V, type WalletRepository as W, type VtxoRepositoryKey as X, type TransactionHistoryPageFilter as Y, type TransactionHistoryPageCursor as Z, type AtomicWalletState as _, type HDAllocationCapable as a, type Coin as a$, type ContractFilter as a0, type BatchRegistrationRepository as a1, type BatchRegistration as a2, type BatchRegistrationPageFilter as a3, type VirtualTxRepository as a4, type VirtualTx as a5, type VtxoBranch as a6, ChainedTxType as a7, type DescriptorProvider as a8, Transaction as a9, type NormalizedVtxoPage as aA, type ContractSyncState as aB, type ContractWithVtxos as aC, type WatchedScript as aD, type PathSelection as aE, type ContractEvent as aF, type AssetDetails as aG, type IssuanceResult as aH, type DelegateInfo as aI, type MigrationGlobalSkipReason as aJ, type MigrationLegSkipReason as aK, type SignerStatus as aL, type NetworkName as aM, ReadonlyWallet as aN, type SettlementConfig as aO, type ContractWatcherConfig as aP, type Asset as aQ, type FeeInfo as aR, type ReceiveRotatorFactory as aS, type ReceiveRotatorBootOpts as aT, type ReceiveRotatorBoot as aU, type IReadonlyWallet as aV, type IReadonlyAssetManager as aW, type StorageConfig as aX, type VtxoReservation as aY, type IVtxoManager as aZ, type Network as a_, type SignerSession as aa, type ReadonlyIdentity as ab, type DescriptorSigningRequest as ac, type IntentFeeConfig as ad, type OffchainInput as ae, FeeAmount as af, type OnchainInput as ag, type FeeOutput as ah, type VtxoReservationRepository as ai, type StoredVtxoReservation as aj, type ArkadeCashTx as ak, type ArkadeInfo as al, type OnchainProvider as am, type ArkadeCashRecord as an, type ArkadeCashClaimResult as ao, type GetVtxosOptions as ap, type PaginationOptions as aq, type CreateContractParams as ar, type GetContractsFilter as as, type GetSpendablePathsOptions as at, type GetAllSpendingPathsOptions as au, type InputExpiryFloor as av, type IssuanceParams as aw, type ReissuanceParams as ax, type BurnParams as ay, type RenewVtxosOptions as az, type Identity as b, DefaultVtxo as b$, type SendBitcoinParams as b0, type ExplorerTransaction as b1, type SignedProof as b2, Proof as b3, type TreeNonces as b4, type TreePartialSigs as b5, type PendingTx as b6, type EmulatorProvider as b7, type Status as b8, type BatchExpiryPolicy as b9, type BaseWalletConfig as bA, type BatchFailedEvent as bB, type BatchFinalizationEvent as bC, type BatchFinalizedEvent as bD, type BatchInfo as bE, type BatchRegistrationFilter as bF, type BatchRegistrationState as bG, type BatchSignableIdentity as bH, type BatchStartedEvent as bI, type BoardingUtxoGroup as bJ, type CandidateDeps as bK, ChainTxType as bL, type CommitmentTx as bM, type ConnectorTreeNode as bN, type ContractBalance as bO, type ContractEventCallback as bP, type ContractHandler as bQ, ContractManager as bR, type ContractManagerConfig as bS, type ContractScope as bT, type ContractState as bU, type ContractVtxo as bV, ContractWatcher as bW, type ContractWatcherEventCallback as bX, DEFAULT_ARKADE_EMULATOR_URL as bY, DEFAULT_MIN_BATCH_EXPIRY_SECONDS as bZ, DEFAULT_VTXO_PAGE_SIZE as b_, Batch as ba, type ChainTx as bb, TxTree as bc, type ArkadeService as bd, type ContractVtxoEvent as be, type ExtendedContractVtxo as bf, type ResolvedArkadeService as bg, resolveArkadeService as bh, type PathContext as bi, AbortError as bj, type ActivityIntent as bk, type ActivityResolver as bl, ArkError as bm, ArkErrorName as bn, type ArkIntent as bo, type ArkIntentState as bp, ArkadeCash as bq, type ArkadeCashAction as br, ArkadeCashCreateError as bs, ArkadeCashOperatorMismatchError as bt, type ArkadeCashUnclaimedReason as bu, type ArkadeCashUnclaimedVtxo as bv, type ArkadeCashVtxoRef as bw, type AssetMetadata as bx, BATCH_REGISTRATION_TERMINAL_STATES as by, BITCOIN_EMULATOR_PUBKEY as bz, Wallet as c, ReadonlySingleKey as c$, DelegateManagerImpl as c0, type DelegateOptions as c1, type DelegateProvider as c2, DelegateVtxo as c3, type DeprecatedSignerMigrationReport as c4, type DeprecatedSignerReport as c5, DigestMismatchError as c6, type Discoverable as c7, type DiscoveredContract as c8, type DiscoveryDeps as c9, type IntentRepository as cA, KeyringDescriptorProvider as cB, type KnownMetadata as cC, MAX_PAGE_SIZE as cD, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD as cE, MUTINYNET_EMULATOR_PUBKEY as cF, type MigrateDeprecatedSignerOptions as cG, type MigrationLegReport as cH, type MigrationVtxoRef as cI, type NewAddressType as cJ, type Nonces as cK, type NotifiesIncomingFunds as cL, OnchainCosignAmbiguousError as cM, OnchainCosignRejectedError as cN, OnchainCosignUnsupportedError as cO, type Output as cP, type PageResponse as cQ, PartialSig as cR, type PrevTxSource as cS, PrevTxUnavailableError as cT, type ProofInput as cU, type ProviderClass as cV, type ProviderKind as cW, ProviderUnavailableError as cX, REGTEST_EMULATOR_PUBKEY as cY, REGTEST_MIN_BATCH_EXPIRY_SECONDS as cZ, type RawTxSource as c_, ESPLORA_URL as ca, type EmulatorInfo as cb, EsploraProvider as cc, type EventSourceCapable as cd, type EventSourceFactory as ce, type EventSourceLike as cf, EventSourceUnavailableError as cg, type ExitCaptureMode as ch, type ExitChainResolver as ci, type ExitDataSource as cj, ForeignDescriptorError as ck, type GetArkadeInfoOptions as cl, type GetUtxosOptions as cm, type GroupMembership as cn, type HandlerError as co, HttpResponseError as cp, INTENT_TERMINAL_STATES as cq, type IncomingFunds as cr, IndexedDBWalletRepository as cs, IndexerTxType as ct, type IndexerUtxo as cu, IndexerUtxosUnsupportedError as cv, Intent as cw, type IntentCoin as cx, type IntentFilter as cy, type IntentPageFilter as cz, type WalletConfig as d, collectContracts as d$, type ReadonlyWalletConfig as d0, type RecipientArkadeAddressContext as d1, type RenewalSplit as d2, type RenewalSplitContext as d3, RestArkProvider as d4, RestDelegateProvider as d5, RestEmulatorProvider as d6, type ScanContractsOptions as d7, type ScanResult as d8, type ScheduledSession as d9, type Vtxo as dA, type VtxoChain as dB, VtxoManager as dC, VtxoReservedError as dD, type VtxoType as dE, type WaitForIncomingFundsOptions as dF, WalletCannotAllocateAddressError as dG, type WalletMode as dH, type WithPrevTx as dI, addArkadeCashRecord as dJ, arkadeCashId as dK, arkadeCashResolver as dL, assertAllowedSighashTypes as dM, assertPageRequest as dN, assertRecipientArkadeAddress as dO, assertValidBatchExpiry as dP, assetMintResolver as dQ, attachPrevArkTxs as dR, attachPrevoutTxs as dS, boardingResolver as dT, canRecoverOnchain as dU, canSpendOffchain as dV, canSweepOnchain as dW, classifyAgainstSignerSet as dX, classifyContractSigner as dY, collabExitResolver as dZ, collectBatchRegistrations as d_, type ServerInfoSource as da, ServerResponseMismatchError as db, SettlementEventType as dc, type SignRequest as dd, type SignedIntent as de, type SignerClassification as df, type SignerSet as dg, SingleKey as dh, type SubscriptionFilter as di, type SubscriptionResponse as dj, type SweepTxNotification as dk, type TapLeaves as dl, type TimeHeight as dm, type TreeNoncesEvent as dn, type TreeSignatureEvent as dp, TreeSignerSession as dq, type TreeSigningStartedEvent as dr, type TreeTxEvent as ds, type Tx as dt, type TxHistoryRecord as du, type TxKey as dv, type TxNotification as dw, type TxTag as dx, type TxTreeNode as dy, TxType as dz, type ArkadeReader as e, collectIntents as e0, collectPages as e1, collectScriptVtxos as e2, collectTransactionHistory as e3, collectUtxos as e4, collectVtxos as e5, configureEventSource as e6, createArkadeCashTracker as e7, createDefaultActivityRegistry as e8, createExitChainResolver as e9, maybeArkError as eA, mergeArkadeCashRecord as eB, networkFromArkadeInfo as eC, networkFromOperatorInfo as eD, networks as eE, pageResult as eF, resolveBatchExpiryPolicy as eG, resolveDescriptorSigner as eH, resolveEmulatorPubkey as eI, resolveEventSource as eJ, resolvePrevTxs as eK, selectVirtualCoins as eL, signerSetFromInfo as eM, signingDescriptorIndex as eN, strictSigningDescriptorIndex as eO, toOffchainInputFeeParams as eP, toXOnlySignerHex as eQ, waitForIncomingFunds as eR, withPrevTxs as eS, type TapscriptDeriving as eT, defaultBatchExpiryPolicy as ea, defaultEmulatorPubkey as eb, getAllNormalizedVtxos as ec, getConfiguredEventSource as ed, getNetwork as ee, getNormalizedVtxos as ef, getRandomId as eg, hasCandidates as eh, isAddressAllocationCapable as ei, isArkError as ej, isBatchSignable as ek, isContractVtxoEvent as el, isCooperativelyMigratable as em, isDiscoverable as en, isEventSourceUnavailableError as eo, isHDAllocationCapable as ep, isHDWalletCapable as eq, isPastExpiry as er, isSigningIdentity as es, isSubdust as et, isTerminalBatchRegistrationState as eu, isTerminalIntentState as ev, isVirtualCoin as ew, isVtxoExpiringSoon as ex, isVtxoSpent as ey, iteratePages as ez, type ArkadeBroadcaster as f, type WalletBalance as g, type GetVtxosFilter as h, type GetSpendableVtxosFilter as i, type ArkTransaction as j, ActivityRegistry as k, type Activity as l, type IContractManager as m, type GetNewAddressesOptions as n, type NewAddress as o, type IDelegateManager as p, type SettlementEvent as q, type SendParams as r, type SendOnchainParams as s, type IAssetManager as t, RestOperatorProvider as u, RestIndexerProvider as v, type SubscriptionEvent as w, type SubscriptionHeartbeat as x, type ArkProvider as y, type IndexerProvider as z };
8456
+ export { type WalletState as $, type AddressAllocationCapable as A, type OperatorProvider as B, type ContractRepository as C, type Contract as D, type ExtendedCoin as E, type ExtendedVirtualCoin as F, type GetOperatorInfoOptions as G, type HDWalletCapable as H, type IWallet as I, type PageRequest as J, type Outpoint as K, type PageResult as L, type ScriptVtxoCursor as M, type NormalizedExtendedVirtualCoin as N, type OperatorInfo as O, type ProviderConnectionState as P, type ScriptVtxoPageOptions as Q, type Recipient as R, type SettleParams as S, type TxNotificationEvent as T, type StoredVtxo as U, type VirtualCoin as V, type WalletRepository as W, type VtxoRepositoryKey as X, type TransactionHistoryPageFilter as Y, type TransactionHistoryPageCursor as Z, type AtomicWalletState as _, type HDAllocationCapable as a, type Network as a$, type ContractFilter as a0, type BatchRegistrationRepository as a1, type BatchRegistration as a2, type BatchRegistrationPageFilter as a3, type VirtualTxRepository as a4, type VirtualTx as a5, type VtxoBranch as a6, ChainedTxType as a7, type DescriptorProvider as a8, Transaction as a9, type NormalizedVtxoPage as aA, type ContractSyncState as aB, type ContractWithVtxos as aC, type WatchedScript as aD, type PathSelection as aE, type ContractEvent as aF, type AssetDetails as aG, type IssuanceResult as aH, type DelegateInfo as aI, type MigrationGlobalSkipReason as aJ, type MigrationLegSkipReason as aK, type SignerStatus as aL, type NetworkName as aM, ReadonlyWallet as aN, type SettlementConfig as aO, type ContractWatcherConfig as aP, type Asset as aQ, type FeeInfo as aR, type ReceiveRotatorFactory as aS, type ReceiveRotatorBootOpts as aT, type ReceiveRotatorBoot as aU, type IReadonlyWallet as aV, type IReadonlyAssetManager as aW, type StorageConfig as aX, type VtxoReservation as aY, type IExecutorManager as aZ, type IVtxoManager as a_, type SignerSession as aa, type ReadonlyIdentity as ab, type DescriptorSigningRequest as ac, type IntentFeeConfig as ad, type OffchainInput as ae, FeeAmount as af, type OnchainInput as ag, type FeeOutput as ah, type VtxoReservationRepository as ai, type StoredVtxoReservation as aj, type ArkadeCashTx as ak, type ArkadeInfo as al, type OnchainProvider as am, type ArkadeCashRecord as an, type ArkadeCashClaimResult as ao, type GetVtxosOptions as ap, type PaginationOptions as aq, type CreateContractParams as ar, type GetContractsFilter as as, type GetSpendablePathsOptions as at, type GetAllSpendingPathsOptions as au, type InputExpiryFloor as av, type IssuanceParams as aw, type ReissuanceParams as ax, type BurnParams as ay, type RenewVtxosOptions as az, type Identity as b, DEFAULT_VTXO_PAGE_SIZE as b$, type Coin as b0, type SendBitcoinParams as b1, type ExplorerTransaction as b2, type SignedProof as b3, Proof as b4, type TreeNonces as b5, type TreePartialSigs as b6, type PendingTx as b7, type EmulatorProvider as b8, type Status as b9, BITCOIN_EMULATOR_PUBKEY as bA, type BaseWalletConfig as bB, type BatchFailedEvent as bC, type BatchFinalizationEvent as bD, type BatchFinalizedEvent as bE, type BatchInfo as bF, type BatchRegistrationFilter as bG, type BatchRegistrationState as bH, type BatchSignableIdentity as bI, type BatchStartedEvent as bJ, type BoardingUtxoGroup as bK, type CandidateDeps as bL, ChainTxType as bM, type CommitmentTx as bN, type ConnectorTreeNode as bO, type ContractBalance as bP, type ContractEventCallback as bQ, type ContractHandler as bR, ContractManager as bS, type ContractManagerConfig as bT, type ContractScope as bU, type ContractState as bV, type ContractVtxo as bW, ContractWatcher as bX, type ContractWatcherEventCallback as bY, DEFAULT_ARKADE_EMULATOR_URL as bZ, DEFAULT_MIN_BATCH_EXPIRY_SECONDS as b_, type BatchExpiryPolicy as ba, Batch as bb, type ChainTx as bc, TxTree as bd, type ArkadeService as be, type ContractVtxoEvent as bf, type ExtendedContractVtxo as bg, type ResolvedArkadeService as bh, resolveArkadeService as bi, type PathContext as bj, AbortError as bk, type ActivityIntent as bl, type ActivityResolver as bm, ArkError as bn, ArkErrorName as bo, type ArkIntent as bp, type ArkIntentState as bq, ArkadeCash as br, type ArkadeCashAction as bs, ArkadeCashCreateError as bt, ArkadeCashOperatorMismatchError as bu, type ArkadeCashUnclaimedReason as bv, type ArkadeCashUnclaimedVtxo as bw, type ArkadeCashVtxoRef as bx, type AssetMetadata as by, BATCH_REGISTRATION_TERMINAL_STATES as bz, Wallet as c, type KnownMetadata as c$, DELEGATION_EXPIRES_KEY as c0, DELEGATION_LOCAL_STATUS as c1, DELEGATION_REGISTERED_KEY as c2, DELEGATION_STATUS_KEY as c3, DefaultVtxo as c4, DelegateManagerImpl as c5, type DelegateOptions as c6, type DelegateProvider as c7, DelegateVtxo as c8, type DelegatedOutput as c9, ExecutorRequestError as cA, type ExecutorTemplate as cB, type ExecutorTemplateDetails as cC, type ExecutorTemplateParam as cD, type ExecutorWatchMetadata as cE, type ExecutorWatchRegistration as cF, type ExitCaptureMode as cG, type ExitChainResolver as cH, type ExitDataSource as cI, ForeignDescriptorError as cJ, type GetArkadeInfoOptions as cK, type GetUtxosOptions as cL, type GroupMembership as cM, type HandlerError as cN, HttpResponseError as cO, INTENT_TERMINAL_STATES as cP, type IncomingFunds as cQ, IndexedDBWalletRepository as cR, IndexerTxType as cS, type IndexerUtxo as cT, IndexerUtxosUnsupportedError as cU, Intent as cV, type IntentCoin as cW, type IntentFilter as cX, type IntentPageFilter as cY, type IntentRepository as cZ, KeyringDescriptorProvider as c_, type DelegatedWallet as ca, type DelegationOptions as cb, type DelegationParams as cc, type DeprecatedSignerMigrationReport as cd, type DeprecatedSignerReport as ce, DigestMismatchError as cf, type Discoverable as cg, type DiscoveredContract as ch, type DiscoveryDeps as ci, ESPLORA_URL as cj, type EmulatorInfo as ck, EsploraProvider as cl, type EventSourceCapable as cm, type EventSourceFactory as cn, type EventSourceLike as co, EventSourceUnavailableError as cp, type ExecutorArtifact as cq, ExecutorContractHandler as cr, type ExecutorContractKeys as cs, type ExecutorContractParams as ct, type ExecutorDefault as cu, type ExecutorDelegation as cv, type ExecutorDelegationDetails as cw, type ExecutorInfo as cx, ExecutorManagerImpl as cy, type ExecutorProvider as cz, type WalletConfig as d, type Vtxo as d$, MAX_PAGE_SIZE as d0, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD as d1, MUTINYNET_EMULATOR_PUBKEY as d2, type MigrateDeprecatedSignerOptions as d3, type MigrationLegReport as d4, type MigrationVtxoRef as d5, type NewAddressType as d6, type Nonces as d7, type NotifiesIncomingFunds as d8, OnchainCosignAmbiguousError as d9, type ScanResult as dA, type ScheduledSession as dB, type ServerInfoSource as dC, ServerResponseMismatchError as dD, SettlementEventType as dE, type SignRequest as dF, type SignedIntent as dG, type SignerClassification as dH, type SignerSet as dI, SingleKey as dJ, type SubscriptionFilter as dK, type SubscriptionResponse as dL, type SweepTxNotification as dM, type TapLeaves as dN, type TimeHeight as dO, type TreeNoncesEvent as dP, type TreeSignatureEvent as dQ, TreeSignerSession as dR, type TreeSigningStartedEvent as dS, type TreeTxEvent as dT, type Tx as dU, type TxHistoryRecord as dV, type TxKey as dW, type TxNotification as dX, type TxTag as dY, type TxTreeNode as dZ, TxType as d_, OnchainCosignRejectedError as da, OnchainCosignUnsupportedError as db, type Output as dc, type PageResponse as dd, PartialSig as de, type PrevTxSource as df, PrevTxUnavailableError as dg, type ProofInput as dh, type ProviderClass as di, type ProviderKind as dj, ProviderUnavailableError as dk, REGTEST_EMULATOR_PUBKEY as dl, REGTEST_MIN_BATCH_EXPIRY_SECONDS as dm, type RawTxSource as dn, ReadonlySingleKey as dp, type ReadonlyWalletConfig as dq, type RecipientArkadeAddressContext as dr, type RegistrationOptions as ds, type RenewalSplit as dt, type RenewalSplitContext as du, RestArkProvider as dv, RestDelegateProvider as dw, RestEmulatorProvider as dx, RestExecutorProvider as dy, type ScanContractsOptions as dz, type ArkadeReader as e, maybeArkError as e$, type VtxoChain as e0, VtxoManager as e1, VtxoReservedError as e2, type VtxoType as e3, type WaitForIncomingFundsOptions as e4, WalletCannotAllocateAddressError as e5, type WalletMode as e6, type WithPrevTx as e7, addArkadeCashRecord as e8, arkadeCashId as e9, createExitChainResolver as eA, defaultBatchExpiryPolicy as eB, defaultEmulatorPubkey as eC, getAllNormalizedVtxos as eD, getConfiguredEventSource as eE, getNetwork as eF, getNormalizedVtxos as eG, getRandomId as eH, hasCandidates as eI, isAddressAllocationCapable as eJ, isArkError as eK, isBatchSignable as eL, isContractVtxoEvent as eM, isCooperativelyMigratable as eN, isDiscoverable as eO, isEventSourceUnavailableError as eP, isHDAllocationCapable as eQ, isHDWalletCapable as eR, isPastExpiry as eS, isSigningIdentity as eT, isSubdust as eU, isTerminalBatchRegistrationState as eV, isTerminalIntentState as eW, isVirtualCoin as eX, isVtxoExpiringSoon as eY, isVtxoSpent as eZ, iteratePages as e_, arkadeCashResolver as ea, assertAllowedSighashTypes as eb, assertPageRequest as ec, assertRecipientArkadeAddress as ed, assertValidBatchExpiry as ee, assetMintResolver as ef, attachPrevArkTxs as eg, attachPrevoutTxs as eh, boardingResolver as ei, canRecoverOnchain as ej, canSpendOffchain as ek, canSweepOnchain as el, classifyAgainstSignerSet as em, classifyContractSigner as en, collabExitResolver as eo, collectBatchRegistrations as ep, collectContracts as eq, collectIntents as er, collectPages as es, collectScriptVtxos as et, collectTransactionHistory as eu, collectUtxos as ev, collectVtxos as ew, configureEventSource as ex, createArkadeCashTracker as ey, createDefaultActivityRegistry as ez, type ArkadeBroadcaster as f, mergeArkadeCashRecord as f0, networkFromArkadeInfo as f1, networkFromOperatorInfo as f2, networks as f3, pageResult as f4, resolveBatchExpiryPolicy as f5, resolveDescriptorSigner as f6, resolveEmulatorPubkey as f7, resolveEventSource as f8, resolvePrevTxs as f9, selectVirtualCoins as fa, signerSetFromInfo as fb, signingDescriptorIndex as fc, strictSigningDescriptorIndex as fd, toOffchainInputFeeParams as fe, toXOnlySignerHex as ff, waitForIncomingFunds as fg, watchExecutorContracts as fh, withPrevTxs as fi, type TapscriptDeriving as fj, type WalletBalance as g, type GetVtxosFilter as h, type GetSpendableVtxosFilter as i, type ArkTransaction as j, ActivityRegistry as k, type Activity as l, type IContractManager as m, type GetNewAddressesOptions as n, type NewAddress as o, type IDelegateManager as p, type SettlementEvent as q, type SendParams as r, type SendOnchainParams as s, type IAssetManager as t, RestOperatorProvider as u, RestIndexerProvider as v, type SubscriptionEvent as w, type SubscriptionHeartbeat as x, type ArkProvider as y, type IndexerProvider as z };