@arkade-os/sdk 0.5.14 → 0.5.15

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 (88) hide show
  1. package/README.md +49 -1
  2. package/dist/adapters/expo.cjs +6 -6
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/artifact-DA5YHM2k.d.cts +87 -0
  7. package/dist/artifact-DacurepK.d.ts +87 -0
  8. package/dist/{asyncStorageTaskQueue-p7zeFhA3.d.ts → asyncStorageTaskQueue-B3umqlkb.d.ts} +2 -2
  9. package/dist/{asyncStorageTaskQueue-DzO5SBcm.d.cts → asyncStorageTaskQueue-Dq6AJHNv.d.cts} +2 -2
  10. package/dist/{chunk-MEIE2AEU.cjs → chunk-35GRSVCZ.cjs} +11 -11
  11. package/dist/{chunk-MEIE2AEU.cjs.map → chunk-35GRSVCZ.cjs.map} +1 -1
  12. package/dist/{chunk-X57WKONW.js → chunk-43APGKWL.js} +130 -22
  13. package/dist/chunk-43APGKWL.js.map +1 -0
  14. package/dist/{chunk-LQH7DACV.cjs → chunk-CMFRCBZW.cjs} +866 -615
  15. package/dist/chunk-CMFRCBZW.cjs.map +1 -0
  16. package/dist/{chunk-6J4GABF7.cjs → chunk-FKHUXSYW.cjs} +3 -3
  17. package/dist/chunk-FKHUXSYW.cjs.map +1 -0
  18. package/dist/{chunk-AZHBGWVC.js → chunk-HVUZKXB2.js} +4 -4
  19. package/dist/{chunk-AZHBGWVC.js.map → chunk-HVUZKXB2.js.map} +1 -1
  20. package/dist/{chunk-EVVLVFY7.cjs → chunk-INQAIZUO.cjs} +17 -17
  21. package/dist/{chunk-EVVLVFY7.cjs.map → chunk-INQAIZUO.cjs.map} +1 -1
  22. package/dist/{chunk-7LPT6AYH.cjs → chunk-JSYS2KX3.cjs} +18 -18
  23. package/dist/{chunk-7LPT6AYH.cjs.map → chunk-JSYS2KX3.cjs.map} +1 -1
  24. package/dist/{chunk-4HZQSKWG.js → chunk-R37I633T.js} +22 -17
  25. package/dist/chunk-R37I633T.js.map +1 -0
  26. package/dist/{chunk-ACIQZLWL.cjs → chunk-UNLH3NNG.cjs} +129 -20
  27. package/dist/chunk-UNLH3NNG.cjs.map +1 -0
  28. package/dist/{chunk-XZHTYYW5.cjs → chunk-VIQF74QJ.cjs} +38 -33
  29. package/dist/chunk-VIQF74QJ.cjs.map +1 -0
  30. package/dist/{chunk-LCGRZ24T.js → chunk-XPZ7TMXH.js} +4 -4
  31. package/dist/{chunk-LCGRZ24T.js.map → chunk-XPZ7TMXH.js.map} +1 -1
  32. package/dist/{chunk-72EC3ASW.js → chunk-YYSHQPCG.js} +3 -3
  33. package/dist/{chunk-72EC3ASW.js.map → chunk-YYSHQPCG.js.map} +1 -1
  34. package/dist/{chunk-J2JZZTOE.js → chunk-Z4LG3CZ4.js} +3 -3
  35. package/dist/chunk-Z4LG3CZ4.js.map +1 -0
  36. package/dist/{chunk-HWWSLCQN.js → chunk-ZECZ2MKX.js} +344 -93
  37. package/dist/chunk-ZECZ2MKX.js.map +1 -0
  38. package/dist/compiler.cjs +5 -5
  39. package/dist/compiler.cjs.map +1 -1
  40. package/dist/compiler.d.cts +9 -9
  41. package/dist/compiler.d.ts +9 -9
  42. package/dist/compiler.js +5 -5
  43. package/dist/compiler.js.map +1 -1
  44. package/dist/contracts/handlers/index.cjs +11 -11
  45. package/dist/contracts/handlers/index.d.cts +2 -2
  46. package/dist/contracts/handlers/index.d.ts +2 -2
  47. package/dist/contracts/handlers/index.js +3 -3
  48. package/dist/{index-Cy57QdcL.d.cts → index-Bi22mLsh.d.cts} +147 -43
  49. package/dist/{index-CaOBA9Ev.d.ts → index-CiLMmCHX.d.ts} +1 -1
  50. package/dist/{index-Db5qzYRi.d.ts → index-DOdoDqvM.d.ts} +147 -43
  51. package/dist/{index-Lq_u0hqj.d.cts → index-DnKugm-h.d.cts} +1 -1
  52. package/dist/index.cjs +327 -327
  53. package/dist/index.d.cts +32 -66
  54. package/dist/index.d.ts +32 -66
  55. package/dist/index.js +5 -5
  56. package/dist/repositories/realm/index.cjs +38 -38
  57. package/dist/repositories/realm/index.d.cts +2 -2
  58. package/dist/repositories/realm/index.d.ts +2 -2
  59. package/dist/repositories/realm/index.js +6 -6
  60. package/dist/repositories/sqlite/index.cjs +36 -36
  61. package/dist/repositories/sqlite/index.d.cts +2 -2
  62. package/dist/repositories/sqlite/index.d.ts +2 -2
  63. package/dist/repositories/sqlite/index.js +6 -6
  64. package/dist/{taskRunner-amPuilMW.d.ts → taskRunner-CoE4Xx9K.d.ts} +2 -2
  65. package/dist/{taskRunner-DhZ-KQBW.d.cts → taskRunner-DFG0BN_R.d.cts} +2 -2
  66. package/dist/wallet/expo/background.cjs +15 -15
  67. package/dist/wallet/expo/background.d.cts +3 -3
  68. package/dist/wallet/expo/background.d.ts +3 -3
  69. package/dist/wallet/expo/background.js +7 -7
  70. package/dist/wallet/expo/index.cjs +19 -16
  71. package/dist/wallet/expo/index.cjs.map +1 -1
  72. package/dist/wallet/expo/index.d.cts +3 -2
  73. package/dist/wallet/expo/index.d.ts +3 -2
  74. package/dist/wallet/expo/index.js +9 -6
  75. package/dist/wallet/expo/index.js.map +1 -1
  76. package/dist/worker/expo/index.cjs +10 -10
  77. package/dist/worker/expo/index.d.cts +4 -4
  78. package/dist/worker/expo/index.d.ts +4 -4
  79. package/dist/worker/expo/index.js +6 -6
  80. package/package.json +3 -3
  81. package/dist/chunk-4HZQSKWG.js.map +0 -1
  82. package/dist/chunk-6J4GABF7.cjs.map +0 -1
  83. package/dist/chunk-ACIQZLWL.cjs.map +0 -1
  84. package/dist/chunk-HWWSLCQN.js.map +0 -1
  85. package/dist/chunk-J2JZZTOE.js.map +0 -1
  86. package/dist/chunk-LQH7DACV.cjs.map +0 -1
  87. package/dist/chunk-X57WKONW.js.map +0 -1
  88. package/dist/chunk-XZHTYYW5.cjs.map +0 -1
@@ -2936,8 +2936,8 @@ declare namespace DelegateVtxo {
2936
2936
 
2937
2937
  /** The Executor's keys a delegated contract derives from, compressed hex. */
2938
2938
  interface ExecutorContractKeys {
2939
- cosignerPubkey: string;
2940
- serverPubkey: string;
2939
+ batchCosignerPubkey: string;
2940
+ operatorPubkey: string;
2941
2941
  emulatorPubkey: string;
2942
2942
  }
2943
2943
  /** The parameters of a delegation under the default templates. */
@@ -2971,8 +2971,8 @@ interface ExecutorContractParams {
2971
2971
  maxFee: number;
2972
2972
  /** boarding only */
2973
2973
  boardingExitDelay?: number;
2974
- cosignerPubKey: Uint8Array;
2975
- serverPubKey: Uint8Array;
2974
+ batchCosignerPubKey: Uint8Array;
2975
+ operatorPubKey: Uint8Array;
2976
2976
  emulatorPubKey: Uint8Array;
2977
2977
  }
2978
2978
  /**
@@ -3445,7 +3445,11 @@ declare namespace Batch {
3445
3445
  function join(eventIterator: AsyncIterableIterator<SettlementEvent>, handler: Handler, options?: JoinOptions): Promise<string>;
3446
3446
  }
3447
3447
 
3448
- /** Delegate identity and fee information returned by `getDelegateInfo`. */
3448
+ /**
3449
+ * Delegate identity and fee information returned by `getDelegateInfo`.
3450
+ *
3451
+ * @deprecated The legacy delegator is retired. Use `ExecutorProvider`.
3452
+ */
3449
3453
  interface DelegateInfo {
3450
3454
  /** Delegate public key. */
3451
3455
  pubkey: string;
@@ -3454,7 +3458,11 @@ interface DelegateInfo {
3454
3458
  /** Address for delegate fee collection. */
3455
3459
  delegateAddress: string;
3456
3460
  }
3457
- /** Optional delegate behavior flags. */
3461
+ /**
3462
+ * Optional delegate behavior flags.
3463
+ *
3464
+ * @deprecated The legacy delegator is retired. Use `ExecutorProvider`.
3465
+ */
3458
3466
  interface DelegateOptions {
3459
3467
  /**
3460
3468
  * Tell the delegate not to replace an existing delegation (signed register intent + its
@@ -3464,7 +3472,11 @@ interface DelegateOptions {
3464
3472
  */
3465
3473
  rejectReplace?: boolean;
3466
3474
  }
3467
- /** Provider interface for a remote delegation service. */
3475
+ /**
3476
+ * Provider interface for a remote delegation service.
3477
+ *
3478
+ * @deprecated The legacy delegator is retired. Use `ExecutorProvider`.
3479
+ */
3468
3480
  interface DelegateProvider {
3469
3481
  /**
3470
3482
  * Request delegation for a signed register intent and its forfeit transactions.
@@ -3477,6 +3489,9 @@ interface DelegateProvider {
3477
3489
  }
3478
3490
  /**
3479
3491
  * REST-based delegate provider implementation.
3492
+ *
3493
+ * @deprecated The legacy delegator is retired. Use `RestExecutorProvider`.
3494
+ *
3480
3495
  * @example
3481
3496
  * ```typescript
3482
3497
  * const provider = new RestDelegateProvider('https://delegate.example.com');
@@ -3505,8 +3520,8 @@ declare class RestDelegateProvider implements DelegateProvider {
3505
3520
  interface ExecutorInfo extends ExecutorContractKeys {
3506
3521
  version: string;
3507
3522
  network: string;
3508
- /** Seals template secrets for this Executor; absent when it has no encryption key. */
3509
- encryptionPubkey?: string;
3523
+ /** Seals template secrets for this Executor; absent when it has no sealing key. */
3524
+ sealingPubkey?: string;
3510
3525
  }
3511
3526
  interface ExecutorTemplate {
3512
3527
  id: string;
@@ -3712,8 +3727,19 @@ interface RegistrationOptions {
3712
3727
  */
3713
3728
  emulatorPubkey?: string;
3714
3729
  }
3715
- /** What the manager needs of a wallet: its key, its operator and its contracts. */
3716
- type DelegatedWallet = Pick<IWallet, "identity" | "getAddress" | "getContractManager" | "getOperatorInfo">;
3730
+ /**
3731
+ * What the manager needs of a wallet: its key, its operator and its contracts. Its hrp and
3732
+ * operator key come from `getOwnAddress()`: `getAddress()` reads the rows a registration is about
3733
+ * to write. A wallet without it answers from `getAddress()`.
3734
+ */
3735
+ type DelegatedWallet = Pick<IWallet, "identity" | "getAddress" | "getOwnAddress" | "getContractManager" | "getOperatorInfo"> & {
3736
+ /** The displayed receive tapscript, whose key a refresh keeps alive. */
3737
+ readonly offchainTapscript?: {
3738
+ readonly options: {
3739
+ readonly pubKey: Uint8Array;
3740
+ };
3741
+ };
3742
+ };
3717
3743
  interface DelegatedContractWatch {
3718
3744
  contract: Contract;
3719
3745
  owner: string;
@@ -3734,7 +3760,7 @@ interface DelegatedContractWatch {
3734
3760
  * live delegation, the others stay local companions of it (watched, never delegated to). Without
3735
3761
  * it (a restore) the rows carry no status.
3736
3762
  */
3737
- declare function watchExecutorContracts(wallet: Pick<IWallet, "identity" | "getAddress" | "getContractManager">, keys: ExecutorContractKeys, params: DelegationParams, registered?: ExecutorWatchMetadata, descriptor?: string): Promise<Contract[]>;
3763
+ declare function watchExecutorContracts(wallet: Pick<DelegatedWallet, "identity" | "getAddress" | "getOwnAddress" | "getContractManager">, keys: ExecutorContractKeys, params: DelegationParams, registered?: ExecutorWatchMetadata, descriptor?: string): Promise<Contract[]>;
3738
3764
  /**
3739
3765
  * Registers Executor watches. Renewal keeps renewal-contract coins alive while the wallet is
3740
3766
  * offline; boarding moves onchain deposits into the corresponding renewal contract.
@@ -3781,13 +3807,27 @@ interface IExecutorManager {
3781
3807
  * is thrown, and the error names the keys that failed, so a retry covers the rest.
3782
3808
  * `expiresAt` applies to every watch registered.
3783
3809
  *
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.
3810
+ * This is the opt-in to receiving under delegation. While the displayed receive key's renewal
3811
+ * watch is live, `getAddress()` answers that contract, the key's delegated twin, so the
3812
+ * Executor renews what lands there while the wallet is offline: payments, change, `settle()`
3813
+ * outputs, renewals and swap payouts and refunds all follow it. The wallet's own address
3814
+ * answers when there is no live twin. The address changes once, the first time a twin is live:
3815
+ * apps that store the output of `getAddress()` must not keep it. An HD wallet registers one
3816
+ * twin per receive key; an older twin stays live, so a payment to an address the wallet showed
3817
+ * earlier is still renewed. Look-ahead addresses and `getNewAddresses` are not delegated, and
3818
+ * are covered from the wallet's own first renewal of what lands there.
3819
+ *
3820
+ * The Executor sees the amount and time of every receipt at a twin, and with an HD wallet it
3821
+ * can link the addresses of one wallet. It can delay a renewal, not spend.
3822
+ *
3823
+ * A send's change returns to the live renewal contract of its first delegated input, else goes
3824
+ * to `getAddress()`. The wallet's own renewals pay to `getAddress()`, unless the amount is
3825
+ * `maxFee + dust` or less. A renewal spending a coin at a live renewal contract pays to the
3826
+ * wallet's own address instead: the Executor missed that coin, so paying it back repeats the
3827
+ * miss. A renewal of a coin that carries assets is the exception to both: `settle()` places
3828
+ * assets only at `getAddress()`, so it pays that address, whatever the amount and wherever the
3829
+ * coin sat. Under an Executor that keeps failing, a coin alternates: one fallback renewal out,
3830
+ * one ordinary renewal back in.
3791
3831
  */
3792
3832
  registerRenewal(params: DelegationOptions, options?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3793
3833
  }
@@ -3800,6 +3840,8 @@ declare class ExecutorManagerImpl implements IExecutorManager {
3800
3840
  defaultTemplates(): Promise<Record<ExecutorDefault, string>>;
3801
3841
  registerBoarding(options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3802
3842
  registerRenewal(options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3843
+ /** @internal The renewal watch of `descriptor`'s key alone, under the params of `options`. */
3844
+ registerRenewalAt(descriptor: string, options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3803
3845
  /** @internal {@link registerBoarding} for `descriptor`'s key; the displayed one by default. */
3804
3846
  registerBoardingAt(descriptor: string | undefined, options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
3805
3847
  /**
@@ -3810,10 +3852,11 @@ declare class ExecutorManagerImpl implements IExecutorManager {
3810
3852
  * registration moves the boarding address. One that cannot be revived stops being live, and
3811
3853
  * the wallet boards its deposits itself. A failing watch leaves the others to be tried.
3812
3854
  *
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.
3855
+ * Only a watch the wallet still needs is revived: the displayed boarding and receive keys', the
3856
+ * most recently registered other key's, and a renewal watch whose contract holds an unspent
3857
+ * coin, which the Executor must keep renewing while the wallet is offline. A lapsed watch of
3858
+ * any other key ends instead: it never held a coin, or none is left, and reviving it would
3859
+ * repeat for every rotation, forever.
3817
3860
  *
3818
3861
  * The status reads run as called; only the writes go through `write`, so a caller that orders
3819
3862
  * them with its rotations holds those back for one write, never for the whole refresh.
@@ -3833,10 +3876,12 @@ declare class ExecutorManagerImpl implements IExecutorManager {
3833
3876
  private settleLapsed;
3834
3877
  /** Record the service's `status`, so the watch stops being live and is no longer shown. */
3835
3878
  private endWatch;
3879
+ /** Whether `contract` holds an unspent, unswept coin, as stored. */
3880
+ private holdsCoin;
3836
3881
  /**
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.
3882
+ * The displayed boarding key, the displayed receive key, and the most recently registered
3883
+ * other key with a live watch, whose params a rotation copies when the displayed key has no
3884
+ * watch.
3840
3885
  */
3841
3886
  private keyInUse;
3842
3887
  /**
@@ -3949,6 +3994,12 @@ interface RotatableWallet {
3949
3994
  setOffchainTapscriptForRotation(tapscript: DefaultVtxo.Script | DelegateVtxo.Script): void;
3950
3995
  getContractManager(): Promise<IContractManager>;
3951
3996
  getAddress(): Promise<string>;
3997
+ /**
3998
+ * @internal Register the Executor twin of the receive key at `descriptor`, so it is renewed
3999
+ * from the moment it is shown. Absent without an Executor. Never throws: a failure leaves
4000
+ * the own address displayed.
4001
+ */
4002
+ registerReceiveTwin?(descriptor: string): Promise<void>;
3952
4003
  }
3953
4004
  /**
3954
4005
  * Owns the wallet's HD receive-rotation lifecycle; exists only when `walletMode` resolves to a
@@ -4488,17 +4539,38 @@ declare class ReadonlyWallet implements IReadonlyWallet {
4488
4539
  prototype: T;
4489
4540
  }, config: ReadonlyWalletConfig): Promise<T>;
4490
4541
  static create(config: ReadonlyWalletConfig): Promise<ReadonlyWallet>;
4542
+ /**
4543
+ * The wallet's own address, under its own key: what its hrp and operator key are read from.
4544
+ * Not where to receive; that is {@link getAddress}, which answers the delegated twin once the
4545
+ * Executor watches this key.
4546
+ */
4491
4547
  get arkAddress(): ArkAddress;
4548
+ getOwnAddress(): Promise<string>;
4492
4549
  /**
4493
4550
  * Get the pkScript hex for the wallet's primary offchain address.
4494
4551
  * For the full wallet-owned script set registered in ContractManager, use getWalletScripts().
4495
4552
  */
4496
4553
  get defaultContractScript(): string;
4497
4554
  /**
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.
4555
+ * Returns the Arkade address to receive at: the delegated twin of the current receive key
4556
+ * while its Executor renewal watch is live, so the Executor renews what lands here while the
4557
+ * wallet is offline; the wallet's own address otherwise. See
4558
+ * {@link IExecutorManager.registerRenewal}.
4559
+ *
4560
+ * The answer changes without a receipt when a watch registers or ends, and when the operator
4561
+ * signer rotates: do not store it. Use {@link arkAddress} for the wallet's own address.
4500
4562
  */
4501
4563
  getAddress(): Promise<string>;
4564
+ /**
4565
+ * Where receives go under `serverPubKey`: the live Executor renewal watch of the receive key
4566
+ * (the delegated twin), else `own`. With `amount`, a twin the Executor cannot renew it at
4567
+ * (`maxFee + dust` or less) gives way to `own`. Fail-open: a lookup must not fail a receive.
4568
+ *
4569
+ * Callers read `own` and `serverPubKey` before their first await, then pass them here.
4570
+ */
4571
+ protected destinationTapscript(serverPubKey: Bytes, own?: DefaultVtxo.Script | DelegateVtxo.Script, amount?: bigint): Promise<DefaultVtxo.Script | DelegateVtxo.Script>;
4572
+ /** Whether the Executor can renew `amount` at `watch`: not for `maxFee + dust` or less. */
4573
+ protected renews(watch: DelegatedContractWatch, amount: bigint): boolean;
4502
4574
  /**
4503
4575
  * Returns the onchain boarding address used to move funds into Arkade: with an Executor
4504
4576
  * configured and a boarding watch registered, the delegated boarding address, whose deposits
@@ -4950,6 +5022,31 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
4950
5022
  * online.
4951
5023
  */
4952
5024
  private extendBoardingWatch;
5025
+ /**
5026
+ * @internal Register the Executor twin of the receive key at `descriptor`, under the params
5027
+ * of {@link delegationSource}: none means the app never opted in, and nothing is done.
5028
+ * Only the displayed key gets one: look-ahead addresses may have been issued to others and
5029
+ * are not delegated. Never throws: on failure the own address is shown until
5030
+ * {@link syncReceiveDelegation} registers the twin.
5031
+ */
5032
+ registerReceiveTwin(descriptor: string): Promise<void>;
5033
+ /**
5034
+ * The live renewal watch whose params a twin copies: the displayed boarding key's, which
5035
+ * `registerRenewal` registers with the app's params, else the newest.
5036
+ */
5037
+ private delegationSource;
5038
+ private _receiveSyncFailedAt;
5039
+ /**
5040
+ * @internal The upkeep of receive delegation for an HD wallet that opted in, run from the poll
5041
+ * and at boot, and never throwing:
5042
+ * - the receive key never is the displayed boarding key, as a payment at the twin would
5043
+ * rotate boarding: it rotates boarding first, once, when they coincide;
5044
+ * - the displayed receive key gets its twin when a rotation could not register one, or a new
5045
+ * one when the app registered renewal with other params since.
5046
+ *
5047
+ * A failure is not tried again for a few minutes, as the Executor may be down.
5048
+ */
5049
+ private syncReceiveDelegation;
4953
5050
  /**
4954
5051
  * Startup work for an Executor: refresh its watches (every wallet), then, with a descriptor
4955
5052
  * provider, rotate-on-board. The Executor boards a deposit into the renewal contract of its
@@ -5435,24 +5532,21 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
5435
5532
  private _sendImpl;
5436
5533
  /**
5437
5534
  * 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.
5535
+ * to that contract, so the Executor keeps renewing it. Otherwise it goes where receives go.
5536
+ * Fail-open: a send must not fail over a delegation lookup.
5440
5537
  */
5441
5538
  private changeTapscriptFor;
5442
5539
  /** The live Executor renewal watches under `signer`, the operator's x-only key. */
5443
5540
  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.
5541
+ /**
5542
+ * @internal Where the wallet's own renewals pay `amount`: {@link getAddress}, except for
5543
+ * `maxFee + dust` or less, which the Executor cannot renew, and when any of `inputScripts`
5544
+ * sits at a live renewal contract, whatever the reason: the Executor had its chance at that
5545
+ * coin, and paying it back there only repeats the miss. Both pay the wallet's own address.
5546
+ * Fail-open: a renewal must not fail over a delegation lookup.
5547
+ *
5548
+ * {@link VtxoManager} does not ask for a renewal of a coin that carries assets: `settle()`
5549
+ * places assets only at {@link getAddress}, which that renewal pays whatever the rules above say.
5456
5550
  */
5457
5551
  renewalAddress(amount: bigint, inputScripts?: readonly string[]): Promise<string>;
5458
5552
  /**
@@ -8067,8 +8161,18 @@ interface IWallet extends IReadonlyWallet {
8067
8161
  interface IReadonlyWallet {
8068
8162
  /** Readonly identity associated with the wallet. */
8069
8163
  identity: ReadonlyIdentity;
8070
- /** @returns Arkade address used for offchain funds. */
8164
+ /**
8165
+ * @returns Arkade address to receive offchain funds at. It can change without a receipt,
8166
+ * for instance once an Executor watches the wallet's key: do not store it. See
8167
+ * {@link getOwnAddress}.
8168
+ */
8071
8169
  getAddress(): Promise<string>;
8170
+ /**
8171
+ * @returns The wallet's own Arkade address under its current receive key, which
8172
+ * {@link getAddress} answers until an Executor watches that key. For an address bound to the
8173
+ * wallet, such as an LNURL handle's. It rotates with an HD wallet's receive key.
8174
+ */
8175
+ getOwnAddress?(): Promise<string>;
8072
8176
  /** @returns Onchain boarding address used to move funds into Arkade. */
8073
8177
  getBoardingAddress(): Promise<string>;
8074
8178
  /**
@@ -1,4 +1,4 @@
1
- import { bR as ContractHandler, c4 as DefaultVtxo, cg as Discoverable, c8 as DelegateVtxo, fj as TapscriptDeriving } from './index-Cy57QdcL.cjs';
1
+ import { bR as ContractHandler, c4 as DefaultVtxo, cg as Discoverable, c8 as DelegateVtxo, fj as TapscriptDeriving } from './index-Bi22mLsh.cjs';
2
2
  import { R as RelativeTimelock, V as VtxoScript, T as TapLeafScript } from './base-C-Y5t_0F.cjs';
3
3
  import { Bytes } from '@scure/btc-signer/utils.js';
4
4
  import { g as ArkadeContractParams, a as ArkadeProgramScript } from './program-ZWUAWy_9.cjs';