@arkade-os/sdk 0.5.12 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/expo.cjs +7 -7
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +4 -4
- package/dist/{asyncStorageTaskQueue-Bsty8W7d.d.ts → asyncStorageTaskQueue-Dhbe00Ya.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-DTNS2qfN.d.cts → asyncStorageTaskQueue-Y4BlVm41.d.cts} +1 -1
- package/dist/{chunk-YAVF2PR6.cjs → chunk-6TBTL42M.cjs} +87 -2
- package/dist/chunk-6TBTL42M.cjs.map +1 -0
- package/dist/{chunk-CJUVKHK4.cjs → chunk-6WPP4UGN.cjs} +9846 -8606
- package/dist/chunk-6WPP4UGN.cjs.map +1 -0
- package/dist/{chunk-HNLC6F73.cjs → chunk-6XVTGWQK.cjs} +20 -20
- package/dist/{chunk-HNLC6F73.cjs.map → chunk-6XVTGWQK.cjs.map} +1 -1
- package/dist/{chunk-JA4SYFC7.cjs → chunk-ACIQZLWL.cjs} +379 -20
- package/dist/chunk-ACIQZLWL.cjs.map +1 -0
- package/dist/{chunk-5NY5EOS2.js → chunk-BA36SQY2.js} +4 -4
- package/dist/{chunk-5NY5EOS2.js.map → chunk-BA36SQY2.js.map} +1 -1
- package/dist/{chunk-BA3GPO5C.js → chunk-BP4NA7HK.js} +5 -5
- package/dist/{chunk-BA3GPO5C.js.map → chunk-BP4NA7HK.js.map} +1 -1
- package/dist/{chunk-3RO63OPW.js → chunk-D4QH6L54.js} +4 -4
- package/dist/{chunk-3RO63OPW.js.map → chunk-D4QH6L54.js.map} +1 -1
- package/dist/{chunk-2YXVU5TK.js → chunk-GB67AGXG.js} +81 -3
- package/dist/chunk-GB67AGXG.js.map +1 -0
- package/dist/{chunk-4X4SY3RH.cjs → chunk-HS7TKVOZ.cjs} +23 -19
- package/dist/chunk-HS7TKVOZ.cjs.map +1 -0
- package/dist/{chunk-4TMJBLJT.js → chunk-LHLRG2BE.js} +16 -13
- package/dist/chunk-LHLRG2BE.js.map +1 -0
- package/dist/{chunk-4OY5BCIE.js → chunk-QSERJPTT.js} +628 -23
- package/dist/chunk-QSERJPTT.js.map +1 -0
- package/dist/{chunk-C3NKBKRY.cjs → chunk-TD4PKK2I.cjs} +680 -68
- package/dist/chunk-TD4PKK2I.cjs.map +1 -0
- package/dist/{chunk-QDX2HUBK.cjs → chunk-TYSUFG2K.cjs} +11 -11
- package/dist/{chunk-QDX2HUBK.cjs.map → chunk-TYSUFG2K.cjs.map} +1 -1
- package/dist/{chunk-QV7AOZZN.cjs → chunk-WFJPLXOE.cjs} +21 -21
- package/dist/{chunk-QV7AOZZN.cjs.map → chunk-WFJPLXOE.cjs.map} +1 -1
- package/dist/{chunk-3ABF4EMM.js → chunk-X57WKONW.js} +369 -10
- package/dist/chunk-X57WKONW.js.map +1 -0
- package/dist/{chunk-WBZYYRAB.js → chunk-Y3AWLHQP.js} +9390 -8153
- package/dist/chunk-Y3AWLHQP.js.map +1 -0
- package/dist/compiler.cjs +3 -4
- package/dist/compiler.cjs.map +1 -1
- package/dist/compiler.js +2 -3
- package/dist/compiler.js.map +1 -1
- package/dist/contracts/handlers/index.cjs +15 -11
- package/dist/contracts/handlers/index.d.cts +5 -5
- package/dist/contracts/handlers/index.d.ts +5 -5
- package/dist/contracts/handlers/index.js +4 -4
- package/dist/{index-BBmZXXqk.d.cts → index-BQwrHcOh.d.cts} +523 -22
- package/dist/{index-DenQfCn1.d.cts → index-BaTItxPx.d.cts} +1 -1
- package/dist/{index-D_zLtU-F.d.ts → index-BapVvuoI.d.ts} +1 -1
- package/dist/{index-DJ32LpfD.d.ts → index-DuXylQrN.d.ts} +523 -22
- package/dist/index.cjs +403 -368
- package/dist/index.d.cts +78 -67
- package/dist/index.d.ts +78 -67
- package/dist/index.js +6 -7
- package/dist/repositories/realm/index.cjs +39 -40
- package/dist/repositories/realm/index.cjs.map +1 -1
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +7 -8
- package/dist/repositories/realm/index.js.map +1 -1
- package/dist/repositories/sqlite/index.cjs +37 -38
- package/dist/repositories/sqlite/index.cjs.map +1 -1
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +7 -8
- package/dist/repositories/sqlite/index.js.map +1 -1
- package/dist/{taskRunner-Cck24OnC.d.ts → taskRunner-BxOmg-O6.d.ts} +1 -1
- package/dist/{taskRunner-BBGaN4cq.d.cts → taskRunner-D2itCXf6.d.cts} +1 -1
- package/dist/wallet/expo/background.cjs +16 -17
- package/dist/wallet/expo/background.cjs.map +1 -1
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +8 -9
- package/dist/wallet/expo/background.js.map +1 -1
- package/dist/wallet/expo/index.cjs +17 -18
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +2 -2
- package/dist/wallet/expo/index.d.ts +2 -2
- package/dist/wallet/expo/index.js +7 -8
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/worker/expo/index.cjs +11 -12
- package/dist/worker/expo/index.cjs.map +1 -1
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +7 -8
- package/dist/worker/expo/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2YXVU5TK.js.map +0 -1
- package/dist/chunk-3ABF4EMM.js.map +0 -1
- package/dist/chunk-4OY5BCIE.js.map +0 -1
- package/dist/chunk-4TMJBLJT.js.map +0 -1
- package/dist/chunk-4X4SY3RH.cjs.map +0 -1
- package/dist/chunk-C3NKBKRY.cjs.map +0 -1
- package/dist/chunk-CJUVKHK4.cjs.map +0 -1
- package/dist/chunk-JA4SYFC7.cjs.map +0 -1
- package/dist/chunk-PHOJF7OK.cjs +0 -376
- package/dist/chunk-PHOJF7OK.cjs.map +0 -1
- package/dist/chunk-UXLETBNK.js +0 -373
- package/dist/chunk-UXLETBNK.js.map +0 -1
- package/dist/chunk-WBZYYRAB.js.map +0 -1
- 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
|
|
2532
|
-
* spendable VTXOs into cooperatively-migratable and cutoff-expired sets and
|
|
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
|
/**
|
|
@@ -2870,8 +2877,12 @@ declare namespace DefaultVtxo {
|
|
|
2870
2877
|
static readonly DEFAULT_TIMELOCK: RelativeTimelock;
|
|
2871
2878
|
readonly forfeitScript: string;
|
|
2872
2879
|
readonly exitScript: string;
|
|
2873
|
-
/**
|
|
2874
|
-
|
|
2880
|
+
/**
|
|
2881
|
+
* Create the default virtual output script with one forfeit path and one exit path.
|
|
2882
|
+
* @param extraLeaves leaves after forfeit and exit, e.g. the Executor's emulator-enforced
|
|
2883
|
+
* renewal leaf, which keeps the wallet's paths and adds one it never signs.
|
|
2884
|
+
*/
|
|
2885
|
+
constructor(options: Options, extraLeaves?: Bytes[]);
|
|
2875
2886
|
/** Return the forfeit tapleaf script. */
|
|
2876
2887
|
forfeit(): TapLeafScript;
|
|
2877
2888
|
/** Return the unilateral exit tapleaf script. */
|
|
@@ -2921,6 +2932,63 @@ declare namespace DelegateVtxo {
|
|
|
2921
2932
|
}
|
|
2922
2933
|
}
|
|
2923
2934
|
|
|
2935
|
+
/** The Executor's keys a delegated contract derives from, compressed hex. */
|
|
2936
|
+
interface ExecutorContractKeys {
|
|
2937
|
+
cosignerPubkey: string;
|
|
2938
|
+
serverPubkey: string;
|
|
2939
|
+
emulatorPubkey: string;
|
|
2940
|
+
}
|
|
2941
|
+
/** The parameters of a delegation under the default templates. */
|
|
2942
|
+
interface DelegationParams {
|
|
2943
|
+
/** BIP 68 sequence of the owner's exit from a delegated virtual output, at least the operator's. */
|
|
2944
|
+
exitDelay: number;
|
|
2945
|
+
/** Seconds before expiry the Executor renews a virtual output. */
|
|
2946
|
+
renewalWindow: number;
|
|
2947
|
+
/** Satoshis a renewal may cost. */
|
|
2948
|
+
maxFee: number;
|
|
2949
|
+
/** BIP 68 sequence of the owner's exit from a boarding deposit, at least the operator's. */
|
|
2950
|
+
boardingExitDelay?: number;
|
|
2951
|
+
}
|
|
2952
|
+
/** A delegation as restore scans for it: the Executor's keys and the params, owner aside. */
|
|
2953
|
+
interface ExecutorWatchTemplate {
|
|
2954
|
+
keys: ExecutorContractKeys;
|
|
2955
|
+
params: DelegationParams;
|
|
2956
|
+
}
|
|
2957
|
+
/** A default template: renewal holds delegated VTXOs, boarding holds on-chain deposits. */
|
|
2958
|
+
type ExecutorDefault = "renewal" | "boarding";
|
|
2959
|
+
|
|
2960
|
+
/**
|
|
2961
|
+
* Typed parameters for delegated contracts: a default template's variables and the Executor's
|
|
2962
|
+
* keys. Keys are compressed, delays are BIP 68 sequences.
|
|
2963
|
+
*/
|
|
2964
|
+
interface ExecutorContractParams {
|
|
2965
|
+
template: ExecutorDefault;
|
|
2966
|
+
owner: Uint8Array;
|
|
2967
|
+
exitDelay: number;
|
|
2968
|
+
renewalWindow: number;
|
|
2969
|
+
maxFee: number;
|
|
2970
|
+
/** boarding only */
|
|
2971
|
+
boardingExitDelay?: number;
|
|
2972
|
+
cosignerPubKey: Uint8Array;
|
|
2973
|
+
serverPubKey: Uint8Array;
|
|
2974
|
+
emulatorPubKey: Uint8Array;
|
|
2975
|
+
}
|
|
2976
|
+
/**
|
|
2977
|
+
* Handler for the coins a wallet delegated to the Executor under its default templates:
|
|
2978
|
+
* virtual outputs at the renewal contract, which the Executor renews in place, and onchain
|
|
2979
|
+
* deposits at the boarding contract, which it boards to the renewal contract. The scripts derive
|
|
2980
|
+
* from the bundled templates, the owner key, the params and the Executor's keys, so a restored
|
|
2981
|
+
* wallet needs no round-trip to the Executor.
|
|
2982
|
+
*
|
|
2983
|
+
* - forfeit: (Owner + Operator) multisig, the wallet's collaborative path
|
|
2984
|
+
* - exit: (Owner) + CSV, the wallet's unilateral path
|
|
2985
|
+
* - renew/board: (Operator + Emulator), emulator-enforced, the Executor's; never offered
|
|
2986
|
+
*
|
|
2987
|
+
* Restore probes every index under each of `deps.executorWatches`: an HD wallet registers a watch
|
|
2988
|
+
* per boarding key it rotates to.
|
|
2989
|
+
*/
|
|
2990
|
+
declare const ExecutorContractHandler: ContractHandler<ExecutorContractParams, DefaultVtxo.Script> & Discoverable;
|
|
2991
|
+
|
|
2924
2992
|
/** One transaction's participation in one logical action. */
|
|
2925
2993
|
interface GroupMembership {
|
|
2926
2994
|
/**
|
|
@@ -3432,6 +3500,78 @@ declare class RestDelegateProvider implements DelegateProvider {
|
|
|
3432
3500
|
getDelegateInfo(): Promise<DelegateInfo>;
|
|
3433
3501
|
}
|
|
3434
3502
|
|
|
3503
|
+
interface ExecutorInfo extends ExecutorContractKeys {
|
|
3504
|
+
version: string;
|
|
3505
|
+
network: string;
|
|
3506
|
+
}
|
|
3507
|
+
interface ExecutorTemplate {
|
|
3508
|
+
id: string;
|
|
3509
|
+
status: string;
|
|
3510
|
+
}
|
|
3511
|
+
interface ExecutorDelegationInput {
|
|
3512
|
+
name: string;
|
|
3513
|
+
onchain: boolean;
|
|
3514
|
+
script: string;
|
|
3515
|
+
address: string;
|
|
3516
|
+
}
|
|
3517
|
+
/** An instance of a template. */
|
|
3518
|
+
interface ExecutorDelegation {
|
|
3519
|
+
id: number;
|
|
3520
|
+
inputs: ExecutorDelegationInput[];
|
|
3521
|
+
status: "active" | "cancelled" | "expired" | "done";
|
|
3522
|
+
templateId: string;
|
|
3523
|
+
variables: Record<string, string>;
|
|
3524
|
+
/** Unix seconds, as the service's `service.openapi.json` defines it. */
|
|
3525
|
+
expiresAt?: number;
|
|
3526
|
+
}
|
|
3527
|
+
interface DelegatedOutput {
|
|
3528
|
+
outpoint: string;
|
|
3529
|
+
amount: number;
|
|
3530
|
+
status: "present" | "spent";
|
|
3531
|
+
expiresAt?: number;
|
|
3532
|
+
due?: number;
|
|
3533
|
+
spentBy?: string;
|
|
3534
|
+
}
|
|
3535
|
+
interface ExecutorDelegationDetails {
|
|
3536
|
+
delegation: ExecutorDelegation;
|
|
3537
|
+
coins: DelegatedOutput[];
|
|
3538
|
+
}
|
|
3539
|
+
/**
|
|
3540
|
+
* An executor request that failed. `status` is the HTTP status when the service answered, and
|
|
3541
|
+
* undefined when the request never reached it or got an answer that is not the service's. A
|
|
3542
|
+
* 404 from `getDelegation` means the service does not know the watch.
|
|
3543
|
+
*/
|
|
3544
|
+
declare class ExecutorRequestError extends Error {
|
|
3545
|
+
readonly status?: number | undefined;
|
|
3546
|
+
constructor(message: string, status?: number | undefined);
|
|
3547
|
+
}
|
|
3548
|
+
interface ExecutorProvider {
|
|
3549
|
+
getInfo(): Promise<ExecutorInfo>;
|
|
3550
|
+
listTemplates(): Promise<ExecutorTemplate[]>;
|
|
3551
|
+
registerDelegation(templateId: string, variables: Record<string, string>, options?: {
|
|
3552
|
+
expiresAt?: number;
|
|
3553
|
+
signal?: AbortSignal;
|
|
3554
|
+
}): Promise<ExecutorDelegation>;
|
|
3555
|
+
getDelegation(address: string, options?: {
|
|
3556
|
+
signal?: AbortSignal;
|
|
3557
|
+
}): Promise<ExecutorDelegationDetails>;
|
|
3558
|
+
}
|
|
3559
|
+
/** REST provider for the Executor, the service that renews and boards a wallet's coins. */
|
|
3560
|
+
declare class RestExecutorProvider implements ExecutorProvider {
|
|
3561
|
+
url: string;
|
|
3562
|
+
constructor(url: string);
|
|
3563
|
+
private endpoint;
|
|
3564
|
+
getInfo(): Promise<ExecutorInfo>;
|
|
3565
|
+
listTemplates(): Promise<ExecutorTemplate[]>;
|
|
3566
|
+
registerDelegation(templateId: string, variables: Record<string, string>, options?: {
|
|
3567
|
+
expiresAt?: number;
|
|
3568
|
+
signal?: AbortSignal;
|
|
3569
|
+
}): Promise<ExecutorDelegation>;
|
|
3570
|
+
getDelegation(address: string, options?: {
|
|
3571
|
+
signal?: AbortSignal;
|
|
3572
|
+
}): Promise<ExecutorDelegationDetails>;
|
|
3573
|
+
}
|
|
3574
|
+
|
|
3435
3575
|
interface IDelegateManager {
|
|
3436
3576
|
/**
|
|
3437
3577
|
* Delegate virtual outputs to the remote delegation service.
|
|
@@ -3471,6 +3611,211 @@ declare class DelegateManagerImpl implements IDelegateManager {
|
|
|
3471
3611
|
}>;
|
|
3472
3612
|
}
|
|
3473
3613
|
|
|
3614
|
+
/** Metadata key: the service's status of a delegated watch. */
|
|
3615
|
+
declare const DELEGATION_STATUS_KEY = "delegationStatus";
|
|
3616
|
+
/** Metadata key: the watch's expiry, in unix seconds; 0 or absent when it has none. */
|
|
3617
|
+
declare const DELEGATION_EXPIRES_KEY = "delegationExpiresAt";
|
|
3618
|
+
/** Metadata key: when the watch was last registered, in unix milliseconds. */
|
|
3619
|
+
declare const DELEGATION_REGISTERED_KEY = "delegationRegisteredAt";
|
|
3620
|
+
/**
|
|
3621
|
+
* The status of a contract row the SDK watches but did not register with the service: the local
|
|
3622
|
+
* companion of a registration, such as the renewal contract a boarding watch boards into.
|
|
3623
|
+
*/
|
|
3624
|
+
declare const DELEGATION_LOCAL_STATUS = "local";
|
|
3625
|
+
/** How a delegated watch was registered, persisted on its contract row. */
|
|
3626
|
+
interface ExecutorWatchMetadata {
|
|
3627
|
+
/** The template the service registered. */
|
|
3628
|
+
template: ExecutorDefault;
|
|
3629
|
+
/** The service's status of the watch. */
|
|
3630
|
+
status: string;
|
|
3631
|
+
/** The watch's expiry, in unix seconds; 0 or absent when it has none. */
|
|
3632
|
+
expiresAt?: number;
|
|
3633
|
+
}
|
|
3634
|
+
/** A watch both sides derived: the address to fund and what restores it. */
|
|
3635
|
+
interface ExecutorWatchRegistration {
|
|
3636
|
+
/** The delegated boarding address, onchain. */
|
|
3637
|
+
address: string;
|
|
3638
|
+
templateId: string;
|
|
3639
|
+
/** The template's variables, canonical hex. */
|
|
3640
|
+
variables: Record<string, string>;
|
|
3641
|
+
/** The Executor's keys the wallet's delegated contracts are derived from. */
|
|
3642
|
+
keys: ExecutorContractKeys;
|
|
3643
|
+
/** The parameters the contracts were derived from, exit delays resolved. */
|
|
3644
|
+
params: DelegationParams;
|
|
3645
|
+
/** The service's answer; absent when the stored watch answered and the service was not asked. */
|
|
3646
|
+
delegation?: ExecutorDelegation;
|
|
3647
|
+
}
|
|
3648
|
+
/**
|
|
3649
|
+
* The parameters a caller chooses. The exit delays default to the operator's, as BIP 68
|
|
3650
|
+
* sequences.
|
|
3651
|
+
*/
|
|
3652
|
+
type DelegationOptions = Pick<DelegationParams, "renewalWindow" | "maxFee"> & Partial<Pick<DelegationParams, "exitDelay" | "boardingExitDelay">>;
|
|
3653
|
+
interface RegistrationOptions {
|
|
3654
|
+
/** The watch's expiry, in unix seconds. */
|
|
3655
|
+
expiresAt?: number;
|
|
3656
|
+
/**
|
|
3657
|
+
* The emulator key to accept in place of the network's pinned one, for a private emulator or
|
|
3658
|
+
* a network with none. Its holder, with the operator, can move the delegated coins.
|
|
3659
|
+
*/
|
|
3660
|
+
emulatorPubkey?: string;
|
|
3661
|
+
}
|
|
3662
|
+
/** What the manager needs of a wallet: its key, its operator and its contracts. */
|
|
3663
|
+
type DelegatedWallet = Pick<IWallet, "identity" | "getAddress" | "getContractManager" | "getOperatorInfo">;
|
|
3664
|
+
interface DelegatedContractWatch {
|
|
3665
|
+
contract: Contract;
|
|
3666
|
+
owner: string;
|
|
3667
|
+
script: ReturnType<typeof ExecutorContractHandler.createScript>;
|
|
3668
|
+
signer: string;
|
|
3669
|
+
live: boolean;
|
|
3670
|
+
}
|
|
3671
|
+
/**
|
|
3672
|
+
* Make the wallet's contract manager watch, as its own, the renewal contract of its key and, when
|
|
3673
|
+
* params has a boarding exit delay, its boarding contract: derived locally from the key, the
|
|
3674
|
+
* params and the service's keys, so a restored wallet finds its delegated coins without asking
|
|
3675
|
+
* the service. Idempotent.
|
|
3676
|
+
*
|
|
3677
|
+
* `descriptor` names the owner key, the identity's by default. Called before `restore()`, it
|
|
3678
|
+
* also lets an HD wallet find the watches of its rotated keys.
|
|
3679
|
+
*
|
|
3680
|
+
* `registered` carries the service's answer for the template it registered: that row becomes the
|
|
3681
|
+
* live delegation, the others stay local companions of it (watched, never delegated to). Without
|
|
3682
|
+
* it (a restore) the rows carry no status.
|
|
3683
|
+
*/
|
|
3684
|
+
declare function watchExecutorContracts(wallet: Pick<IWallet, "identity" | "getAddress" | "getContractManager">, keys: ExecutorContractKeys, params: DelegationParams, registered?: ExecutorWatchMetadata, descriptor?: string): Promise<Contract[]>;
|
|
3685
|
+
/**
|
|
3686
|
+
* Registers Executor watches. Renewal keeps renewal-contract coins alive while the wallet is
|
|
3687
|
+
* offline; boarding moves onchain deposits into the corresponding renewal contract.
|
|
3688
|
+
*/
|
|
3689
|
+
interface IExecutorManager {
|
|
3690
|
+
getInfo(): Promise<ExecutorInfo>;
|
|
3691
|
+
/** The default template ids; throws unless the service lists them as active. */
|
|
3692
|
+
defaultTemplates(): Promise<Record<ExecutorDefault, string>>;
|
|
3693
|
+
/**
|
|
3694
|
+
* Watch the displayed boarding address's key: the Executor boards every deposit there
|
|
3695
|
+
* into the wallet's renewal contract, a virtual output the wallet spends and renews as its
|
|
3696
|
+
* own. The wallet watches both contracts. Without `expiresAt` the watch has no deadline of
|
|
3697
|
+
* its own, but the Executor expires one that never receives a coin after an idle window: the
|
|
3698
|
+
* wallet registers it again while it is online. Registering again returns the existing watch
|
|
3699
|
+
* unchanged, from the stored row when it is the key's newest live watch under the same params:
|
|
3700
|
+
* the Executor is not asked, and `delegation` is absent. An HD wallet registers a new watch
|
|
3701
|
+
* each time it rotates the boarding address.
|
|
3702
|
+
*
|
|
3703
|
+
* The address derives from the key, `params`, the operator's exit delays when `params` omits
|
|
3704
|
+
* them, and the Executor's keys: registering again on a restored wallet finds the same watch
|
|
3705
|
+
* only while none of them changed. The returned `keys` and `params` restore it regardless,
|
|
3706
|
+
* through {@link watchExecutorContracts}.
|
|
3707
|
+
*
|
|
3708
|
+
* Params may change between calls: the new ones register a new watch, and the earlier watches
|
|
3709
|
+
* stay live and keep boarding the deposits already sent to them. The boarding address follows
|
|
3710
|
+
* the most recently registered watch, so registering older params again moves it back.
|
|
3711
|
+
*
|
|
3712
|
+
* A boarding watch pays into the renewal contract of its own params. While renewal is on, that
|
|
3713
|
+
* is, while the wallet has any live renewal watch under the current operator, this also
|
|
3714
|
+
* registers renewal under `params` and `options`, unless that contract already has one. That registration is best-effort: a failure is logged and never
|
|
3715
|
+
* undoes the boarding watch. {@link registerRenewal} retries it.
|
|
3716
|
+
*/
|
|
3717
|
+
registerBoarding(params: DelegationOptions, options?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
|
|
3718
|
+
/**
|
|
3719
|
+
* Register the renewal watch, like {@link registerBoarding} idempotent, so apps call it at
|
|
3720
|
+
* startup. `params` is the displayed boarding key's: that registration comes first, is
|
|
3721
|
+
* returned, and its failure throws at once, before any other key is tried.
|
|
3722
|
+
*
|
|
3723
|
+
* It then covers every live boarding watch under the current operator, each under its own
|
|
3724
|
+
* params, which is where its coins sit: the displayed key's earlier watches, and each earlier
|
|
3725
|
+
* 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
|
|
3726
|
+
* longer shorter than the operator's VTXO expiry, cannot be registered: it is skipped with a
|
|
3727
|
+
* warning, and the wallet renews its coins itself. The others are all tried before a failure
|
|
3728
|
+
* is thrown, and the error names the keys that failed, so a retry covers the rest.
|
|
3729
|
+
* `expiresAt` applies to every watch registered.
|
|
3730
|
+
*
|
|
3731
|
+
* A send's change returns to the live renewal contract of its first delegated input, and the
|
|
3732
|
+
* wallet's own renewals pay into the newest live one, unless the amount is `maxFee + dust` or
|
|
3733
|
+
* less, or a renewed coin carries assets. A renewal spending a coin at a live renewal contract
|
|
3734
|
+
* pays to `getAddress()` instead: the Executor missed that coin, so paying it back repeats the
|
|
3735
|
+
* miss. A coin received at `getAddress()` is covered from its first renewal on; until then the
|
|
3736
|
+
* wallet renews it itself. Under an Executor that keeps failing, a coin alternates: one
|
|
3737
|
+
* fallback renewal out, one ordinary renewal back in.
|
|
3738
|
+
*/
|
|
3739
|
+
registerRenewal(params: DelegationOptions, options?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
|
|
3740
|
+
}
|
|
3741
|
+
/** Client-side watch registration with the Executor. */
|
|
3742
|
+
declare class ExecutorManagerImpl implements IExecutorManager {
|
|
3743
|
+
readonly executorProvider: ExecutorProvider;
|
|
3744
|
+
readonly wallet: DelegatedWallet;
|
|
3745
|
+
constructor(executorProvider: ExecutorProvider, wallet: DelegatedWallet);
|
|
3746
|
+
getInfo(): Promise<ExecutorInfo>;
|
|
3747
|
+
defaultTemplates(): Promise<Record<ExecutorDefault, string>>;
|
|
3748
|
+
registerBoarding(options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
|
|
3749
|
+
registerRenewal(options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
|
|
3750
|
+
/** @internal {@link registerBoarding} for `descriptor`'s key; the displayed one by default. */
|
|
3751
|
+
registerBoardingAt(descriptor: string | undefined, options: DelegationOptions, registration?: RegistrationOptions): Promise<ExecutorWatchRegistration>;
|
|
3752
|
+
/**
|
|
3753
|
+
* Register again the live watches the Executor no longer holds. It expires a client delegation
|
|
3754
|
+
* that never held a coin after an idle window, and reports no deadline for it: the row stays
|
|
3755
|
+
* live, and the wallet keeps advertising an address nobody watches. Registering an expired
|
|
3756
|
+
* watch again revives it at the same address, keeping its registration time: only an explicit
|
|
3757
|
+
* registration moves the boarding address. One that cannot be revived stops being live, and
|
|
3758
|
+
* the wallet boards its deposits itself. A failing watch leaves the others to be tried.
|
|
3759
|
+
*
|
|
3760
|
+
* Only a key the wallet still uses is revived: the displayed one, and the most recently
|
|
3761
|
+
* registered other key with a live watch, whose renewal contract the wallet's renewals pay
|
|
3762
|
+
* into. A lapsed watch of any older key ends instead: it never held a coin, and reviving it
|
|
3763
|
+
* would repeat for every rotation, forever.
|
|
3764
|
+
*
|
|
3765
|
+
* The status reads run as called; only the writes go through `write`, so a caller that orders
|
|
3766
|
+
* them with its rotations holds those back for one write, never for the whole refresh.
|
|
3767
|
+
* `stopped` ends the refresh between watches, and turns a write still queued into a no-op.
|
|
3768
|
+
*
|
|
3769
|
+
* Throws when a live watch is held and the Executor or the operator cannot be reached; a
|
|
3770
|
+
* wallet with none reaches neither.
|
|
3771
|
+
* @internal
|
|
3772
|
+
*/
|
|
3773
|
+
refreshWatches({ write, stopped, }?: {
|
|
3774
|
+
write?: (task: () => Promise<void>) => Promise<void>;
|
|
3775
|
+
stopped?: () => boolean;
|
|
3776
|
+
}): Promise<void>;
|
|
3777
|
+
/** What the Executor says of `watch`; an unknown watch is a lost one, so "expired". */
|
|
3778
|
+
private serviceStatus;
|
|
3779
|
+
/** Revive a lapsed watch, or end it when its key is no longer in use. */
|
|
3780
|
+
private settleLapsed;
|
|
3781
|
+
/** Record the service's `status`, so the watch stops being live and is no longer shown. */
|
|
3782
|
+
private endWatch;
|
|
3783
|
+
/**
|
|
3784
|
+
* The displayed key, and the most recently registered other key with a live watch: the
|
|
3785
|
+
* wallet's renewals pay into its renewal contract, and a rotation copies its params when the
|
|
3786
|
+
* displayed key has no watch.
|
|
3787
|
+
*/
|
|
3788
|
+
private keyInUse;
|
|
3789
|
+
/**
|
|
3790
|
+
* A boarding watch pays into the renewal contract of its own params, so while renewal is on,
|
|
3791
|
+
* meaning any live renewal watch under the operator, that contract needs one too, or its
|
|
3792
|
+
* boarded coins fall back to the wallet.
|
|
3793
|
+
*/
|
|
3794
|
+
private pairRenewal;
|
|
3795
|
+
/**
|
|
3796
|
+
* What registering `descriptor`'s key would return, read from the stored watch: the key's
|
|
3797
|
+
* newest live one of `template` under the current operator, when it has the same params and
|
|
3798
|
+
* emulator key. The service would answer with it unchanged; a lapsed watch is the refresh's to
|
|
3799
|
+
* find. Undefined when the service must be asked: a first registration, a restored row, new
|
|
3800
|
+
* params, or older ones registered again to move the boarding address back.
|
|
3801
|
+
*/
|
|
3802
|
+
private storedWatch;
|
|
3803
|
+
/** {@link registrationContext}, read once, and only when the service is asked. */
|
|
3804
|
+
private lazyContext;
|
|
3805
|
+
/** The wallet's operator key, x-only hex: the signer a live watch is registered under. */
|
|
3806
|
+
private operatorSigner;
|
|
3807
|
+
/**
|
|
3808
|
+
* Both templates register the displayed boarding key: boarding moves its deposits in, renewal
|
|
3809
|
+
* keeps the renewal contract that receives them alive. It falls back to the identity's, so a
|
|
3810
|
+
* static wallet registers its identity key.
|
|
3811
|
+
*/
|
|
3812
|
+
private displayedDescriptor;
|
|
3813
|
+
/** The wallet's watches of `template`, from the repository rows. */
|
|
3814
|
+
private heldWatches;
|
|
3815
|
+
private registrationContext;
|
|
3816
|
+
private registerAt;
|
|
3817
|
+
}
|
|
3818
|
+
|
|
3474
3819
|
/**
|
|
3475
3820
|
* Inputs a {@link ReceiveRotatorFactory} gets at boot to find the current display contract or
|
|
3476
3821
|
* allocate a fresh descriptor. Allocation only: `resolveBoot` rebuilds the tapscript afterwards.
|
|
@@ -3788,6 +4133,8 @@ interface BoardingUtxoGroup {
|
|
|
3788
4133
|
/** CSV exit timelock decoded from THIS tapscript's exit leaf. */
|
|
3789
4134
|
csvTimelock: RelativeTimelock;
|
|
3790
4135
|
coins: ExtendedCoin[];
|
|
4136
|
+
/** A live Executor boarding watch: the Executor boards these, settle leaves them alone. */
|
|
4137
|
+
delegated?: true;
|
|
3791
4138
|
}
|
|
3792
4139
|
/**
|
|
3793
4140
|
* Why a VTXO at an arkadeCash address could neither be swept nor imported for
|
|
@@ -3914,6 +4261,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
3914
4261
|
readonly walletRepository: WalletRepository;
|
|
3915
4262
|
readonly contractRepository: ContractRepository;
|
|
3916
4263
|
readonly delegateProvider?: DelegateProvider | undefined;
|
|
4264
|
+
readonly executorProvider?: ExecutorProvider | undefined;
|
|
3917
4265
|
protected lazyInitialization: boolean;
|
|
3918
4266
|
private boardingLoaded;
|
|
3919
4267
|
private _contractManager?;
|
|
@@ -3982,7 +4330,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
3982
4330
|
getContractSyncState(): ContractSyncState;
|
|
3983
4331
|
protected constructor(identity: ReadonlyIdentity, network: Network, onchainProvider: OnchainProvider,
|
|
3984
4332
|
/** 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[]);
|
|
4333
|
+
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
4334
|
/**
|
|
3987
4335
|
* x-only hex → cutoff of the operator's deprecated signers, cached for OFFLINE read/watch.
|
|
3988
4336
|
* Boarding watch/history fan out over {current} ∪ this set so deposits at addresses minted
|
|
@@ -4001,6 +4349,11 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
4001
4349
|
cutoffDate?: bigint;
|
|
4002
4350
|
}[];
|
|
4003
4351
|
}): void;
|
|
4352
|
+
/**
|
|
4353
|
+
* Arkade's retired delegator keys when this wallet's operator is Arkade's and it has an
|
|
4354
|
+
* Executor: apps that drop `delegateUrl` do so to move to it. Discovery only.
|
|
4355
|
+
*/
|
|
4356
|
+
protected retiredDelegateKeys(): Uint8Array[];
|
|
4004
4357
|
/** Boarding WATCH/HISTORY signer set: current ∪ deprecated (spend stays current-only). */
|
|
4005
4358
|
protected watchedBoardingSigners(): Set<string>;
|
|
4006
4359
|
/**
|
|
@@ -4043,8 +4396,9 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
4043
4396
|
*/
|
|
4044
4397
|
get boardingTapscript(): DefaultVtxo.Script;
|
|
4045
4398
|
/**
|
|
4046
|
-
* Fired after boarding rotation
|
|
4047
|
-
*
|
|
4399
|
+
* Fired after boarding rotation, or a new onchain contract such as an Executor boarding watch,
|
|
4400
|
+
* so a live {@link notifyIncomingFunds} watcher re-subscribes to the fresh address in-session
|
|
4401
|
+
* instead of missing deposits until its next re-init.
|
|
4048
4402
|
*/
|
|
4049
4403
|
private readonly _boardingRotationListeners;
|
|
4050
4404
|
/** Register a listener invoked synchronously after each boarding rotation. */
|
|
@@ -4068,6 +4422,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
4068
4422
|
serverInfoSource: ServerInfoSource;
|
|
4069
4423
|
serverInfoLastOnlineAt: number | undefined;
|
|
4070
4424
|
delegateProvider: DelegateProvider | undefined;
|
|
4425
|
+
executorProvider: ExecutorProvider | undefined;
|
|
4071
4426
|
walletContractTimelocks: RelativeTimelock[];
|
|
4072
4427
|
}>;
|
|
4073
4428
|
/**
|
|
@@ -4086,10 +4441,36 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
4086
4441
|
* For the full wallet-owned script set registered in ContractManager, use getWalletScripts().
|
|
4087
4442
|
*/
|
|
4088
4443
|
get defaultContractScript(): string;
|
|
4089
|
-
/**
|
|
4444
|
+
/**
|
|
4445
|
+
* Returns the wallet's Arkade address. While an Executor renewal watch is live, the wallet's
|
|
4446
|
+
* own renewals move coins received here into its renewal contract, which the Executor renews.
|
|
4447
|
+
*/
|
|
4090
4448
|
getAddress(): Promise<string>;
|
|
4091
|
-
/**
|
|
4449
|
+
/**
|
|
4450
|
+
* Returns the onchain boarding address used to move funds into Arkade: with an Executor
|
|
4451
|
+
* configured and a boarding watch registered, the delegated boarding address, whose deposits
|
|
4452
|
+
* the Executor boards into the wallet's renewal contract while the wallet is offline.
|
|
4453
|
+
*/
|
|
4092
4454
|
getBoardingAddress(): Promise<string>;
|
|
4455
|
+
/**
|
|
4456
|
+
* The live boarding watch of the displayed boarding key and current operator, see
|
|
4457
|
+
* {@link delegatedExecutorContracts}. A rotated key without one shows its own address.
|
|
4458
|
+
*/
|
|
4459
|
+
private delegatedBoardingAddress;
|
|
4460
|
+
/**
|
|
4461
|
+
* The Executor contracts of this wallet's keys, most recently registered first: the
|
|
4462
|
+
* identity's, or one its `signingDescriptor` derives. Read from the contract repository, not
|
|
4463
|
+
* the contract manager: a boarding or renewal read must not start its indexer sync. Reads
|
|
4464
|
+
* follow registrations made through any wallet front-end.
|
|
4465
|
+
*/
|
|
4466
|
+
protected delegatedExecutorContracts(template: ExecutorDefault): Promise<DelegatedContractWatch[]>;
|
|
4467
|
+
/** Encoded tap trees of the live boarding watches, whose deposits the Executor boards. */
|
|
4468
|
+
protected liveDelegatedBoardingTrees(): Promise<Set<string>>;
|
|
4469
|
+
/**
|
|
4470
|
+
* @internal The wallet's own boarding address, never the delegated one: where the boarding
|
|
4471
|
+
* sweeps send coins, so a deposit swept off a delegated address does not land on it again.
|
|
4472
|
+
*/
|
|
4473
|
+
ownBoardingAddress(): string;
|
|
4093
4474
|
/**
|
|
4094
4475
|
* Return the wallet's combined onchain and offchain balances.
|
|
4095
4476
|
*/
|
|
@@ -4228,16 +4609,17 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
4228
4609
|
*/
|
|
4229
4610
|
getBoardingUtxos(): Promise<ExtendedCoin[]>;
|
|
4230
4611
|
/**
|
|
4231
|
-
* @internal {@link getBoardingUtxos} minus those an in-flight settle is spending
|
|
4232
|
-
* unresolved intent locks, for SDK picks. The getter itself lists them: callers that mirror it
|
|
4612
|
+
* @internal {@link getBoardingUtxos} minus those an in-flight settle is spending, an
|
|
4613
|
+
* 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
4614
|
* (the worker's cache and broadcasts, balances) must not see a settle's inputs vanish, and then
|
|
4234
4615
|
* stay gone if it fails.
|
|
4235
4616
|
*/
|
|
4236
4617
|
getSelectableBoardingUtxos(): Promise<ExtendedCoin[]>;
|
|
4237
4618
|
/**
|
|
4238
4619
|
* @internal {@link getSelectableBoardingUtxos} for every boarding address history shows,
|
|
4239
|
-
* current and deprecated signers, grouped by signer.
|
|
4240
|
-
*
|
|
4620
|
+
* current and deprecated signers, grouped by signer. The periodic settle takes the current
|
|
4621
|
+
* signer's groups except `delegated` ones; the boarding sweep takes them all: a unilateral
|
|
4622
|
+
* exit needs no operator, so it recovers coins that `settle` must not take.
|
|
4241
4623
|
*/
|
|
4242
4624
|
getSelectableBoardingUtxoGroups(): Promise<BoardingUtxoGroup[]>;
|
|
4243
4625
|
/** Boarding coins from the store, no network call; pending and confirmed spends excluded. */
|
|
@@ -4257,7 +4639,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
4257
4639
|
fetchPendingTxs(): Promise<string[]>;
|
|
4258
4640
|
/**
|
|
4259
4641
|
* Get all pkScript hex strings for the wallet's own addresses
|
|
4260
|
-
* (
|
|
4642
|
+
* (default, delegate and executor, current and historical).
|
|
4261
4643
|
*/
|
|
4262
4644
|
getWalletScripts(): Promise<string[]>;
|
|
4263
4645
|
/**
|
|
@@ -4344,6 +4726,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
4344
4726
|
static MIN_FEE_RATE: number;
|
|
4345
4727
|
readonly identity: Identity;
|
|
4346
4728
|
private readonly _delegateManager?;
|
|
4729
|
+
private readonly _executorManager?;
|
|
4347
4730
|
private _vtxoManager?;
|
|
4348
4731
|
private _vtxoManagerInitializing?;
|
|
4349
4732
|
private _walletAssetManager?;
|
|
@@ -4376,6 +4759,18 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
4376
4759
|
*/
|
|
4377
4760
|
settleServerInfoChanges(): Promise<void>;
|
|
4378
4761
|
private _receiveRotatorInstalled;
|
|
4762
|
+
/** Rotates the boarding address once the Executor boards a deposit at it. */
|
|
4763
|
+
private _executorBoardUnsub?;
|
|
4764
|
+
private _executorBootInstalled;
|
|
4765
|
+
private _executorBoardChain;
|
|
4766
|
+
private _executorRefreshedAt;
|
|
4767
|
+
private _executorBoot?;
|
|
4768
|
+
private _executorRefreshing?;
|
|
4769
|
+
/**
|
|
4770
|
+
* Set by dispose: a refresh stops between watches, and its queued writes do nothing. Rotations
|
|
4771
|
+
* still drain.
|
|
4772
|
+
*/
|
|
4773
|
+
private _executorStopping;
|
|
4379
4774
|
/**
|
|
4380
4775
|
* Descriptor-aware signer for inputs locked by rotated pubkeys (the rotator's instance).
|
|
4381
4776
|
* Undefined for static / non-HD wallets, which only sign with the identity.
|
|
@@ -4467,14 +4862,69 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
4467
4862
|
* {@link maybeRotateBoardingAfterBoard} on every settle consuming a boarding UTXO; retired
|
|
4468
4863
|
* addresses stay reachable through {@link getBoardingUtxos}.
|
|
4469
4864
|
*
|
|
4865
|
+
* While an Executor boarding watch is live, the new key gets a watch of its own, and this
|
|
4866
|
+
* returns its delegated address; if that registration fails or times out, the new key's own
|
|
4867
|
+
* address. It waits for the registration, unlike the rotation after a settle.
|
|
4868
|
+
*
|
|
4470
4869
|
* @deprecated Use {@link getNewAddresses} — it mints any combination of
|
|
4471
4870
|
* address types at one shared index, and reports the contract row behind
|
|
4472
4871
|
* each. Note the difference in display behaviour: this method *swaps* the
|
|
4473
4872
|
* advertised boarding address, where `getNewAddresses` mints side
|
|
4474
|
-
* addresses and leaves {@link getBoardingAddress} alone.
|
|
4475
|
-
*
|
|
4873
|
+
* addresses and leaves {@link getBoardingAddress} alone. It also registers
|
|
4874
|
+
* no Executor watch: a deposit at its boarding address waits for this
|
|
4875
|
+
* wallet's own settle. To keep this method's behaviour, keep calling this
|
|
4876
|
+
* method.
|
|
4476
4877
|
*/
|
|
4477
4878
|
getNewBoardingAddress(): Promise<string>;
|
|
4879
|
+
/**
|
|
4880
|
+
* Allocate the next boarding key, register its Executor watch, then swap the display.
|
|
4881
|
+
* Persisted before the swap, so a throw leaves the previous (watched) address displayed. The
|
|
4882
|
+
* row is tagged at allocation: a restart before the swap boots on the new key's own address,
|
|
4883
|
+
* as after a failed registration.
|
|
4884
|
+
*/
|
|
4885
|
+
private rotateBoarding;
|
|
4886
|
+
/**
|
|
4887
|
+
* Runs `task` after the rotations queued before it; its failure reaches only its caller. Never
|
|
4888
|
+
* call {@link getNewBoardingAddress} from a task: it would wait on itself.
|
|
4889
|
+
*/
|
|
4890
|
+
private onBoardChain;
|
|
4891
|
+
/**
|
|
4892
|
+
* Register the most recently registered live Executor boarding watch again for a rotated
|
|
4893
|
+
* key, so its deposits are boarded while the wallet is offline too. Not the displayed key's
|
|
4894
|
+
* own watch: it may have none, and the parameters are wallet policy. While renewal is on, the
|
|
4895
|
+
* registration pairs a renewal watch with it, after the boarding one, whose failure it never
|
|
4896
|
+
* undoes. Best-effort: on failure the key shows its own address, which the wallet boards once
|
|
4897
|
+
* online.
|
|
4898
|
+
*/
|
|
4899
|
+
private extendBoardingWatch;
|
|
4900
|
+
/**
|
|
4901
|
+
* Startup work for an Executor: refresh its watches (every wallet), then, with a descriptor
|
|
4902
|
+
* provider, rotate-on-board. The Executor boards a deposit into the renewal contract of its
|
|
4903
|
+
* key, so a coin there while that key is displayed means the address was used. Renewals and a
|
|
4904
|
+
* delegated coin's change land there too, and the trigger is still correct.
|
|
4905
|
+
*/
|
|
4906
|
+
private installExecutorBoot;
|
|
4907
|
+
/**
|
|
4908
|
+
* @internal Register again the Executor watches the service let lapse, see
|
|
4909
|
+
* {@link ExecutorManagerImpl.refreshWatches}; runs at startup for every wallet with an Executor
|
|
4910
|
+
* and from the poll of the {@link VtxoManager} every cycle. At most once a day, reloads
|
|
4911
|
+
* included. Its writes go on the board chain, so they never interleave a rotation's
|
|
4912
|
+
* registration, and a rotation waits for one write at most. Concurrent calls share one run.
|
|
4913
|
+
* Best-effort: never throws. Never call it from a board chain task: it would wait on itself.
|
|
4914
|
+
*/
|
|
4915
|
+
refreshExecutorWatches(): Promise<void>;
|
|
4916
|
+
private refreshExecutorWatchesNow;
|
|
4917
|
+
/**
|
|
4918
|
+
* Re-checked when it runs: an earlier rotation may have moved the displayed key, and the
|
|
4919
|
+
* deposit's own rotation must then not burn another index.
|
|
4920
|
+
*/
|
|
4921
|
+
private queueExecutorBoardRotation;
|
|
4922
|
+
/**
|
|
4923
|
+
* A coin that predates the subscription raises no event: a stored one, or one the contract
|
|
4924
|
+
* manager's boot sync writes, which is why this runs once that boot has finished. Any coin
|
|
4925
|
+
* counts: it proves the key was used. Best-effort: a failed read must not fail the boot.
|
|
4926
|
+
*/
|
|
4927
|
+
private rotateForExecutorCoinAtBoot;
|
|
4478
4928
|
/**
|
|
4479
4929
|
* Allocate a *fresh* address of each requested type, all at **one** new HD index. The way to
|
|
4480
4930
|
* issue a second address before the first is paid ({@link getAddress} only advances on
|
|
@@ -4634,6 +5084,11 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
4634
5084
|
restore(opts?: {
|
|
4635
5085
|
gapLimit?: number;
|
|
4636
5086
|
}): Promise<void>;
|
|
5087
|
+
/**
|
|
5088
|
+
* The delegations of the persisted Executor contracts, owner aside, so restore finds them at
|
|
5089
|
+
* every key: {@link watchExecutorContracts} before `restore()` covers the rotated ones too.
|
|
5090
|
+
*/
|
|
5091
|
+
private executorWatchTemplates;
|
|
4637
5092
|
private _runRestore;
|
|
4638
5093
|
readonly settlementConfig: SettlementConfig | false;
|
|
4639
5094
|
private _concurrentSpending;
|
|
@@ -4651,7 +5106,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
4651
5106
|
/** Overrides for the `batchExpiry` bounds; defaults derive from `network`. */
|
|
4652
5107
|
batchExpiryPolicy?: Partial<BatchExpiryPolicy> | undefined,
|
|
4653
5108
|
/** @see WalletConfig.oneShotSubmit */
|
|
4654
|
-
oneShotSubmit?: boolean);
|
|
5109
|
+
oneShotSubmit?: boolean, executorProvider?: ExecutorProvider);
|
|
4655
5110
|
get assetManager(): IAssetManager;
|
|
4656
5111
|
getVtxoManager(): Promise<VtxoManager>;
|
|
4657
5112
|
/** Also drops durable holds: a cleared wallet's holds would outlive their owner. */
|
|
@@ -4694,6 +5149,8 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
4694
5149
|
toReadonly(): Promise<ReadonlyWallet>;
|
|
4695
5150
|
/** Returns the delegate manager when delegation support is configured. */
|
|
4696
5151
|
getDelegateManager(): Promise<IDelegateManager | undefined>;
|
|
5152
|
+
/** Returns the Executor manager when an Executor is configured. */
|
|
5153
|
+
getExecutorManager(): Promise<IExecutorManager | undefined>;
|
|
4697
5154
|
/**
|
|
4698
5155
|
* Settle boarding inputs and/or virtual outputs into a finalized mainnet transaction.
|
|
4699
5156
|
*
|
|
@@ -4715,6 +5172,10 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
4715
5172
|
* Boarding has no on-chain receive event (the watcher sees only the L2 indexer), so a settle
|
|
4716
5173
|
* consuming a boarding UTXO (a non-VTXO, non-arknote input) is the trigger. No-op without a
|
|
4717
5174
|
* descriptor provider. Best-effort: the settle has committed, so failures are only logged.
|
|
5175
|
+
*
|
|
5176
|
+
* With an Executor the rotation runs in the background, as its watch is a network round the
|
|
5177
|
+
* settle (and the tx lock it holds) must not wait on. The old key's delegated address stays
|
|
5178
|
+
* displayed, still watched, until the new watch exists: the brief reuse is intended.
|
|
4718
5179
|
*/
|
|
4719
5180
|
private maybeRotateBoardingAfterBoard;
|
|
4720
5181
|
private handleSettlementFinalizationEvent;
|
|
@@ -4909,6 +5370,28 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
4909
5370
|
*/
|
|
4910
5371
|
send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
|
|
4911
5372
|
private _sendImpl;
|
|
5373
|
+
/**
|
|
5374
|
+
* Change follows its inputs: a send spending a coin at a live renewal watch returns the change
|
|
5375
|
+
* to that contract, so the Executor keeps renewing it. The own script otherwise. Fail-open: a
|
|
5376
|
+
* send must not fail over a delegation lookup.
|
|
5377
|
+
*/
|
|
5378
|
+
private changeTapscriptFor;
|
|
5379
|
+
/** The live Executor renewal watches under `signer`, the operator's x-only key. */
|
|
5380
|
+
private liveRenewalWatches;
|
|
5381
|
+
/** Whether the Executor can renew `amount` at `watch`: not for `maxFee + dust` or less. */
|
|
5382
|
+
private renews;
|
|
5383
|
+
/**
|
|
5384
|
+
* @internal Where the wallet's own renewals pay `amount`: the newest live Executor renewal
|
|
5385
|
+
* contract under the current operator, so the Executor renews the coin from then on. One the
|
|
5386
|
+
* displayed boarding key does not own comes first: a coin at that key's contract rotates the
|
|
5387
|
+
* boarding address. The wallet's address when none applies, for `maxFee + dust` or less, which
|
|
5388
|
+
* the Executor cannot renew, or when a renewed coin carries assets, which `settle()` places
|
|
5389
|
+
* only at the wallet's address. Also the wallet's address when any of `inputScripts` sits at a
|
|
5390
|
+
* live renewal contract, whatever the reason: the Executor had its chance at that coin, and
|
|
5391
|
+
* paying it back there only repeats the miss. Fail-open: a renewal must not fail over a
|
|
5392
|
+
* delegation lookup.
|
|
5393
|
+
*/
|
|
5394
|
+
renewalAddress(amount: bigint, inputScripts?: readonly string[]): Promise<string>;
|
|
4912
5395
|
/**
|
|
4913
5396
|
* Shared submit/persist tail of `send` and {@link sendSelectedVtxosToSelf}; callers own coin
|
|
4914
5397
|
* selection, outputs and the synchronous epoch snapshot.
|
|
@@ -5452,6 +5935,8 @@ interface ContractManagerConfig {
|
|
|
5452
5935
|
/** Enables onchain coin discovery and watching; needs `network` too. */
|
|
5453
5936
|
onchainProvider?: OnchainProvider;
|
|
5454
5937
|
network?: Network;
|
|
5938
|
+
/** Fired after a new onchain-scoped contract is saved: the onchain address set changed. */
|
|
5939
|
+
onOnchainContractCreated?: () => void;
|
|
5455
5940
|
}
|
|
5456
5941
|
/**
|
|
5457
5942
|
* Wallet-injected surface backing the HD look-ahead window; a callback bundle so the contracts
|
|
@@ -5809,6 +6294,11 @@ declare class ContractManager implements IContractManager {
|
|
|
5809
6294
|
unwatchScript(script: string | string[]): Promise<void>;
|
|
5810
6295
|
/** @see IContractManager.getWatchedScripts */
|
|
5811
6296
|
getWatchedScripts(): Promise<WatchedScript[]>;
|
|
6297
|
+
/**
|
|
6298
|
+
* The onchain side of hydrating new Executor contracts: stores their coins, and the sync's
|
|
6299
|
+
* retarget adds their addresses to the onchain watch. Best-effort: the next sync retries.
|
|
6300
|
+
*/
|
|
6301
|
+
private syncNewOnchain;
|
|
5812
6302
|
/** @see IContractManager.syncOnchain */
|
|
5813
6303
|
syncOnchain(scripts?: string[], fetched?: ReadonlyMap<string, Coin[]>): Promise<void>;
|
|
5814
6304
|
/**
|
|
@@ -6130,6 +6620,7 @@ interface DiscoveredContract {
|
|
|
6130
6620
|
address: string;
|
|
6131
6621
|
metadata?: Record<string, unknown>;
|
|
6132
6622
|
label?: string;
|
|
6623
|
+
scope?: ContractScope;
|
|
6133
6624
|
}
|
|
6134
6625
|
/**
|
|
6135
6626
|
* Read-only context the scanner injects into every `discoverAt` call. Never carries an external
|
|
@@ -6166,15 +6657,19 @@ interface DiscoveryDeps {
|
|
|
6166
6657
|
* no-ops.
|
|
6167
6658
|
*/
|
|
6168
6659
|
boardingTimelock?: RelativeTimelock;
|
|
6169
|
-
/**
|
|
6660
|
+
/** The configured delegator's key (x-only), the one new `delegate` contracts are minted with. */
|
|
6170
6661
|
delegatePubKey?: Uint8Array;
|
|
6662
|
+
/** Retired delegators' keys (x-only). Discovery only, never minted. */
|
|
6663
|
+
retiredDelegatePubKeys?: Uint8Array[];
|
|
6664
|
+
/** The wallet's Executor delegations, probed at every index; none when absent. */
|
|
6665
|
+
executorWatches?: readonly ExecutorWatchTemplate[];
|
|
6171
6666
|
}
|
|
6172
6667
|
/**
|
|
6173
6668
|
* The I/O-free subset of {@link DiscoveryDeps}: the axes a receive script can
|
|
6174
6669
|
* be anchored to. `DiscoveryDeps` satisfies it structurally, so one
|
|
6175
6670
|
* {@link Discoverable.candidatesAt} serves the scan and the look-ahead band.
|
|
6176
6671
|
*/
|
|
6177
|
-
type CandidateDeps = Pick<DiscoveryDeps, "network" | "serverPubKey" | "csvTimelocks"> & Pick<Partial<DiscoveryDeps>, "deprecatedSignerPubKeys" | "delegatePubKey">;
|
|
6672
|
+
type CandidateDeps = Pick<DiscoveryDeps, "network" | "serverPubKey" | "csvTimelocks"> & Pick<Partial<DiscoveryDeps>, "deprecatedSignerPubKeys" | "delegatePubKey" | "retiredDelegatePubKeys">;
|
|
6178
6673
|
/**
|
|
6179
6674
|
* Optional {@link ContractHandler} capability for `wallet.restore()`'s gap-limit scan. The scanner
|
|
6180
6675
|
* owns the index loop and gap counter; the handler answers "do I own a contract at this index?"
|
|
@@ -6649,6 +7144,12 @@ interface BaseWalletConfig {
|
|
|
6649
7144
|
onchainProvider?: OnchainProvider | ((network: NetworkName) => OnchainProvider);
|
|
6650
7145
|
/** Optional delegation service instance. */
|
|
6651
7146
|
delegateProvider?: DelegateProvider;
|
|
7147
|
+
/**
|
|
7148
|
+
* Optional Executor, the service that boards the wallet's deposits while it is offline. Only a
|
|
7149
|
+
* `Wallet` registers watches, through `getExecutorManager()`; a readonly wallet reads them.
|
|
7150
|
+
* Without one, the wallet behaves as it does without the Executor.
|
|
7151
|
+
*/
|
|
7152
|
+
executorProvider?: ExecutorProvider;
|
|
6652
7153
|
}
|
|
6653
7154
|
/**
|
|
6654
7155
|
* Configuration for a readonly (watch-only) wallet: query balance, addresses and transactions
|
|
@@ -7887,4 +8388,4 @@ declare function isBatchSignable(identity: Identity): identity is BatchSignableI
|
|
|
7887
8388
|
*/
|
|
7888
8389
|
declare function isSigningIdentity(value: unknown): value is Identity;
|
|
7889
8390
|
|
|
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 };
|
|
8391
|
+
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, MUTINYNET_EMULATOR_PUBKEY 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, type ExecutorTemplate as cA, type ExecutorWatchMetadata as cB, type ExecutorWatchRegistration as cC, type ExitCaptureMode as cD, type ExitChainResolver as cE, type ExitDataSource as cF, ForeignDescriptorError as cG, type GetArkadeInfoOptions as cH, type GetUtxosOptions as cI, type GroupMembership as cJ, type HandlerError as cK, HttpResponseError as cL, INTENT_TERMINAL_STATES as cM, type IncomingFunds as cN, IndexedDBWalletRepository as cO, IndexerTxType as cP, type IndexerUtxo as cQ, IndexerUtxosUnsupportedError as cR, Intent as cS, type IntentCoin as cT, type IntentFilter as cU, type IntentPageFilter as cV, type IntentRepository as cW, KeyringDescriptorProvider as cX, type KnownMetadata as cY, MAX_PAGE_SIZE as cZ, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD 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, ExecutorContractHandler as cq, type ExecutorContractKeys as cr, type ExecutorContractParams as cs, type ExecutorDefault as ct, type ExecutorDelegation as cu, type ExecutorDelegationDetails as cv, type ExecutorInfo as cw, ExecutorManagerImpl as cx, type ExecutorProvider as cy, ExecutorRequestError as cz, type WalletConfig as d, VtxoReservedError as d$, type MigrateDeprecatedSignerOptions as d0, type MigrationLegReport as d1, type MigrationVtxoRef as d2, type NewAddressType as d3, type Nonces as d4, type NotifiesIncomingFunds as d5, OnchainCosignAmbiguousError as d6, OnchainCosignRejectedError as d7, OnchainCosignUnsupportedError as d8, type Output as d9, ServerResponseMismatchError as dA, SettlementEventType as dB, type SignRequest as dC, type SignedIntent as dD, type SignerClassification as dE, type SignerSet as dF, SingleKey as dG, type SubscriptionFilter as dH, type SubscriptionResponse as dI, type SweepTxNotification as dJ, type TapLeaves as dK, type TimeHeight as dL, type TreeNoncesEvent as dM, type TreeSignatureEvent as dN, TreeSignerSession as dO, type TreeSigningStartedEvent as dP, type TreeTxEvent as dQ, type Tx as dR, type TxHistoryRecord as dS, type TxKey as dT, type TxNotification as dU, type TxTag as dV, type TxTreeNode as dW, TxType as dX, type Vtxo as dY, type VtxoChain as dZ, VtxoManager as d_, type PageResponse as da, PartialSig as db, type PrevTxSource as dc, PrevTxUnavailableError as dd, type ProofInput as de, type ProviderClass as df, type ProviderKind as dg, ProviderUnavailableError as dh, REGTEST_EMULATOR_PUBKEY as di, REGTEST_MIN_BATCH_EXPIRY_SECONDS as dj, type RawTxSource as dk, ReadonlySingleKey as dl, type ReadonlyWalletConfig as dm, type RecipientArkadeAddressContext as dn, type RegistrationOptions as dp, type RenewalSplit as dq, type RenewalSplitContext as dr, RestArkProvider as ds, RestDelegateProvider as dt, RestEmulatorProvider as du, RestExecutorProvider as dv, type ScanContractsOptions as dw, type ScanResult as dx, type ScheduledSession as dy, type ServerInfoSource as dz, type ArkadeReader as e, networkFromOperatorInfo as e$, type VtxoType as e0, type WaitForIncomingFundsOptions as e1, WalletCannotAllocateAddressError as e2, type WalletMode as e3, type WithPrevTx as e4, addArkadeCashRecord as e5, arkadeCashId as e6, arkadeCashResolver as e7, assertAllowedSighashTypes as e8, assertPageRequest as e9, getAllNormalizedVtxos as eA, getConfiguredEventSource as eB, getNetwork as eC, getNormalizedVtxos as eD, getRandomId as eE, hasCandidates as eF, isAddressAllocationCapable as eG, isArkError as eH, isBatchSignable as eI, isContractVtxoEvent as eJ, isCooperativelyMigratable as eK, isDiscoverable as eL, isEventSourceUnavailableError as eM, isHDAllocationCapable as eN, isHDWalletCapable as eO, isPastExpiry as eP, isSigningIdentity as eQ, isSubdust as eR, isTerminalBatchRegistrationState as eS, isTerminalIntentState as eT, isVirtualCoin as eU, isVtxoExpiringSoon as eV, isVtxoSpent as eW, iteratePages as eX, maybeArkError as eY, mergeArkadeCashRecord as eZ, networkFromArkadeInfo as e_, assertRecipientArkadeAddress as ea, assertValidBatchExpiry as eb, assetMintResolver as ec, attachPrevArkTxs as ed, attachPrevoutTxs as ee, boardingResolver as ef, canRecoverOnchain as eg, canSpendOffchain as eh, canSweepOnchain as ei, classifyAgainstSignerSet as ej, classifyContractSigner as ek, collabExitResolver as el, collectBatchRegistrations as em, collectContracts as en, collectIntents as eo, collectPages as ep, collectScriptVtxos as eq, collectTransactionHistory as er, collectUtxos as es, collectVtxos as et, configureEventSource as eu, createArkadeCashTracker as ev, createDefaultActivityRegistry as ew, createExitChainResolver as ex, defaultBatchExpiryPolicy as ey, defaultEmulatorPubkey as ez, type ArkadeBroadcaster as f, networks as f0, pageResult as f1, resolveBatchExpiryPolicy as f2, resolveDescriptorSigner as f3, resolveEmulatorPubkey as f4, resolveEventSource as f5, resolvePrevTxs as f6, selectVirtualCoins as f7, signerSetFromInfo as f8, signingDescriptorIndex as f9, strictSigningDescriptorIndex as fa, toOffchainInputFeeParams as fb, toXOnlySignerHex as fc, waitForIncomingFunds as fd, watchExecutorContracts as fe, withPrevTxs as ff, type TapscriptDeriving as fg, 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 };
|