@arkade-os/sdk 0.4.68 → 0.5.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -5
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{asyncStorageTaskQueue-DaZlVTbM.d.ts → asyncStorageTaskQueue-BCzN3Y45.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-B2CcXIHU.d.cts → asyncStorageTaskQueue-CdF_ELX8.d.cts} +1 -1
- package/dist/{chunk-WCJVKFAP.cjs → chunk-5MJHZHG7.cjs} +726 -468
- package/dist/chunk-5MJHZHG7.cjs.map +1 -0
- package/dist/{chunk-EJOFL5WH.cjs → chunk-6AFUNKK7.cjs} +19 -7
- package/dist/chunk-6AFUNKK7.cjs.map +1 -0
- package/dist/{chunk-VBHXBI7F.js → chunk-6F2Q32KA.js} +298 -41
- package/dist/chunk-6F2Q32KA.js.map +1 -0
- package/dist/{chunk-GQ4NMQGR.js → chunk-ABJPM4JF.js} +4 -4
- package/dist/{chunk-GQ4NMQGR.js.map → chunk-ABJPM4JF.js.map} +1 -1
- package/dist/{chunk-PJR63FTK.cjs → chunk-CZ32XADN.cjs} +17 -17
- package/dist/{chunk-PJR63FTK.cjs.map → chunk-CZ32XADN.cjs.map} +1 -1
- package/dist/{chunk-33Q2RFET.js → chunk-FVTJJQNM.js} +3 -3
- package/dist/{chunk-33Q2RFET.js.map → chunk-FVTJJQNM.js.map} +1 -1
- package/dist/{chunk-6YUACVX4.cjs → chunk-HL7EC2Z5.cjs} +52 -53
- package/dist/chunk-HL7EC2Z5.cjs.map +1 -0
- package/dist/{chunk-G4I6PU5H.js → chunk-JYP7YXT2.js} +4 -4
- package/dist/{chunk-G4I6PU5H.js.map → chunk-JYP7YXT2.js.map} +1 -1
- package/dist/{chunk-45FKMOJH.js → chunk-KTU44AEH.js} +6 -7
- package/dist/chunk-KTU44AEH.js.map +1 -0
- package/dist/{chunk-4KCVS4ZN.cjs → chunk-PB5KJI4U.cjs} +10 -10
- package/dist/{chunk-4KCVS4ZN.cjs.map → chunk-PB5KJI4U.cjs.map} +1 -1
- package/dist/{chunk-4CMXV5SF.js → chunk-PPG6W34P.js} +18 -8
- package/dist/chunk-PPG6W34P.js.map +1 -0
- package/dist/{chunk-JGMSZIE4.cjs → chunk-RXWKCEZP.cjs} +17 -17
- package/dist/{chunk-JGMSZIE4.cjs.map → chunk-RXWKCEZP.cjs.map} +1 -1
- package/dist/contracts/handlers/index.cjs +9 -9
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-Bffc5f54.d.cts → delegate-DLIOBQ5x.d.cts} +1 -1
- package/dist/{delegate-AomVWxO_.d.ts → delegate-Dyn5L80J.d.ts} +1 -1
- package/dist/{hdWalletCapable-B5nRs3RH.d.cts → hdWalletCapable-D9tooZ6F.d.ts} +102 -27
- package/dist/{hdWalletCapable-DZdIVa23.d.ts → hdWalletCapable-Dt3MUiGE.d.cts} +102 -27
- package/dist/{index-jouvy8FD.d.ts → index-D3hmsuKs.d.cts} +6 -6
- package/dist/{index-nfyQM33h.d.cts → index-D9tXd-tN.d.ts} +6 -6
- package/dist/{index-C7RZCfoY.d.cts → index-Udm5V2xW.d.cts} +168 -19
- package/dist/{index-C7RZCfoY.d.ts → index-Udm5V2xW.d.ts} +168 -19
- package/dist/index.cjs +306 -290
- package/dist/index.d.cts +121 -29
- package/dist/index.d.ts +121 -29
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +19 -19
- package/dist/repositories/realm/index.d.cts +2 -2
- package/dist/repositories/realm/index.d.ts +2 -2
- package/dist/repositories/realm/index.js +5 -5
- package/dist/repositories/sqlite/index.cjs +18 -18
- package/dist/repositories/sqlite/index.d.cts +2 -2
- package/dist/repositories/sqlite/index.d.ts +2 -2
- package/dist/repositories/sqlite/index.js +5 -5
- package/dist/{taskRunner-D2vnpPBT.d.cts → taskRunner-DxZciNaa.d.cts} +1 -1
- package/dist/{taskRunner-DuwK9t8O.d.ts → taskRunner-ZdS16Ypm.d.ts} +1 -1
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +23 -14
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +7 -4
- package/dist/wallet/expo/index.d.ts +7 -4
- package/dist/wallet/expo/index.js +14 -5
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +3 -2
- package/dist/chunk-45FKMOJH.js.map +0 -1
- package/dist/chunk-4CMXV5SF.js.map +0 -1
- package/dist/chunk-6YUACVX4.cjs.map +0 -1
- package/dist/chunk-EJOFL5WH.cjs.map +0 -1
- package/dist/chunk-VBHXBI7F.js.map +0 -1
- package/dist/chunk-WCJVKFAP.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as RelativeTimelock, X as Network, Y as CSVMultisigTapscript, Z as BatchStartedEvent, _ as TreeSigningStartedEvent, $ as TxTree, a0 as TreeNoncesEvent, a1 as BatchFinalizationEvent, a2 as BatchFinalizedEvent, a3 as BatchFailedEvent, a4 as TreeTxEvent, a5 as TreeSignatureEvent, o as SettlementEvent, b as WalletConfig, W as WalletRepository, C as ContractRepository, a6 as DescriptorProvider, j as IContractManager, a7 as IReadonlyWallet, a8 as ReadonlyIdentity, a9 as OnchainProvider, u as ArkProvider, v as IndexerProvider, aa as DelegateProvider, ab as ReadonlyWalletConfig, J as IntentRepository, M as VirtualTxRepository, ac as ExitCaptureMode, ad as ExitDataSource, h as ActivityRegistry, ae as IReadonlyAssetManager, af as ContractSyncState, ag as RecipientArkadeAddressContext, G as GetArkadeInfoOptions, A as ArkadeInfo, c as ArkadeReader, ah as NetworkName, ai as ArkAddress, e as WalletBalance, f as GetVtxosFilter, N as NormalizedExtendedVirtualCoin, aj as ContractWithVtxos, ak as selectPendingRecoveryOutpoints, g as ArkTransaction, i as Activity, E as ExtendedCoin, al as Coin, B as ExtendedVirtualCoin, am as ContractManager, an as ContractManagerConfig, I as IWallet, a as Identity, k as GetNewAddressesOptions, l as NewAddress, ao as SettlementConfig, d as ArkadeBroadcaster, q as IAssetManager, ap as VtxoManager, m as IDelegateManager, S as SendBitcoinParams, n as SettleParams, R as Recipient, aq as SignerSession, ar as SignedIntent, as as Intent, p as SendParams, at as TimeHeight } from './index-Udm5V2xW.cjs';
|
|
2
2
|
import { Transaction } from '@scure/btc-signer';
|
|
3
3
|
import { TransactionOutput } from '@scure/btc-signer/psbt.js';
|
|
4
4
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
5
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
5
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DLIOBQ5x.cjs';
|
|
6
6
|
|
|
7
7
|
/** Wall-clock floor for `batchExpiry` outside regtest. */
|
|
8
8
|
declare const DEFAULT_MIN_BATCH_EXPIRY_SECONDS = 86400n;
|
|
@@ -48,10 +48,11 @@ declare const DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS = 86400n;
|
|
|
48
48
|
/**
|
|
49
49
|
* Wall-clock floor for the checkpoint exit delay on regtest (~2 blocks nominal).
|
|
50
50
|
*
|
|
51
|
-
* Deliberately lower than {@link REGTEST_MIN_BATCH_EXPIRY_SECONDS "../wallet/batchExpiry"} —
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
51
|
+
* Deliberately lower than {@link REGTEST_MIN_BATCH_EXPIRY_SECONDS "../wallet/batchExpiry"} — it
|
|
52
|
+
* was sized to clear an `ARKD_CHECKPOINT_EXIT_DELAY` of 5 blocks while still rejecting a 1-block
|
|
53
|
+
* attack. No env in this repo goes below 20 any more (the 5-block one shipped with the removed
|
|
54
|
+
* boltz-swap package), so there is room to tighten this; left as-is until someone confirms no
|
|
55
|
+
* external regtest deployment relies on the lower bound.
|
|
55
56
|
*/
|
|
56
57
|
declare const REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS = 1200n;
|
|
57
58
|
/**
|
|
@@ -75,7 +76,7 @@ declare const MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS = 4096n;
|
|
|
75
76
|
* mutinynet does.
|
|
76
77
|
*/
|
|
77
78
|
declare const SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS = 86016n;
|
|
78
|
-
/** Bounds applied to a server-supplied `
|
|
79
|
+
/** Bounds applied to a server-supplied `ArkadeInfo.checkpointTapscript`. */
|
|
79
80
|
type CheckpointExitDelayPolicy = {
|
|
80
81
|
/** Minimum wall-clock delay in seconds, after normalization. */
|
|
81
82
|
minSeconds: bigint;
|
|
@@ -90,7 +91,7 @@ type CheckpointExitDelayPolicy = {
|
|
|
90
91
|
* arkd always builds the checkpoint tapscript from its own `forfeitPubkey`
|
|
91
92
|
* (`internal/core/application/service.go`), so this should be the
|
|
92
93
|
* `forfeitPubkey` the caller already trusts — pinned wallet state where one
|
|
93
|
-
* exists, otherwise the same `
|
|
94
|
+
* exists, otherwise the same `ArkadeInfo` response's own `forfeitPubkey` field
|
|
94
95
|
* as a self-consistency check.
|
|
95
96
|
*/
|
|
96
97
|
advertisedForfeitPubkey?: Bytes;
|
|
@@ -211,7 +212,7 @@ declare class ServerResponseMismatchError extends Error {
|
|
|
211
212
|
*/
|
|
212
213
|
declare function maybeArkError(error: any): ArkError | undefined;
|
|
213
214
|
|
|
214
|
-
/** Where the {@link
|
|
215
|
+
/** Where the {@link ArkadeInfo} used to construct a wallet came from. */
|
|
215
216
|
type ServerInfoSource = "live" | "cache";
|
|
216
217
|
|
|
217
218
|
/**
|
|
@@ -729,6 +730,13 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
729
730
|
readonly identity: ReadonlyIdentity;
|
|
730
731
|
readonly network: Network;
|
|
731
732
|
readonly onchainProvider: OnchainProvider;
|
|
733
|
+
/**
|
|
734
|
+
* Narrowed to what a readonly wallet legitimately needs — the only use
|
|
735
|
+
* here is {@link getArkadeInfo}. `protected` stops an outside caller
|
|
736
|
+
* reaching it; the `Pick` stops this class growing a use for
|
|
737
|
+
* `submitTx`. `Wallet` re-widens both below.
|
|
738
|
+
*/
|
|
739
|
+
protected readonly arkProvider: Pick<ArkProvider, "getInfo">;
|
|
732
740
|
readonly indexerProvider: IndexerProvider;
|
|
733
741
|
readonly dustAmount: bigint;
|
|
734
742
|
readonly walletRepository: WalletRepository;
|
|
@@ -793,26 +801,33 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
793
801
|
*/
|
|
794
802
|
protected _arkServerPublicKey: Bytes;
|
|
795
803
|
/**
|
|
796
|
-
* Whether
|
|
797
|
-
*
|
|
798
|
-
* (`"cache"`).
|
|
804
|
+
* Whether the LATEST server-info resolution answered live (`"live"`) or
|
|
805
|
+
* from the cached snapshot because the operator was unreachable
|
|
806
|
+
* (`"cache"`). Seeded at construction and updated by every
|
|
807
|
+
* {@link getArkadeInfo} read, so a wallet that booted offline and
|
|
808
|
+
* recovered stops reporting degraded — and one that just fell back stops
|
|
809
|
+
* claiming online. Freshness signal for
|
|
810
|
+
* {@link getProviderConnectionState}.
|
|
799
811
|
*/
|
|
800
812
|
protected _serverInfoSource: ServerInfoSource;
|
|
801
813
|
/**
|
|
802
|
-
* Epoch-ms of the last known live operator contact:
|
|
803
|
-
*
|
|
814
|
+
* Epoch-ms of the last known live operator contact: the most recent live
|
|
815
|
+
* resolution (construction or a later {@link getArkadeInfo}), or the
|
|
816
|
+
* cached snapshot's `savedAt` when the latest resolution fell back.
|
|
804
817
|
*/
|
|
805
818
|
protected _serverInfoLastOnlineAt?: number;
|
|
806
819
|
/** @see {@link _serverInfoSource} */
|
|
807
820
|
get serverInfoSource(): ServerInfoSource;
|
|
808
821
|
/**
|
|
809
|
-
* Composed provider-connection freshness: the
|
|
810
|
-
* (
|
|
811
|
-
* manager
|
|
812
|
-
*
|
|
813
|
-
*
|
|
822
|
+
* Composed provider-connection freshness: the LATEST server-info
|
|
823
|
+
* resolution (boot, or any later {@link getArkadeInfo} read) combined with
|
|
824
|
+
* the contract-manager's indexer-sync health, if the manager has been
|
|
825
|
+
* initialized. Reads no live provider state — it never forces a
|
|
826
|
+
* `ContractManager` to construct — so it is safe for readonly callers
|
|
827
|
+
* that only use address/balance APIs.
|
|
814
828
|
*
|
|
815
|
-
* -
|
|
829
|
+
* - Latest resolution fell back to the cached snapshot → degraded on
|
|
830
|
+
* `arkade` (`cache`).
|
|
816
831
|
* - Otherwise, if the contract manager has degraded to repository data →
|
|
817
832
|
* degraded on `indexer` (`repository`).
|
|
818
833
|
* - Otherwise online.
|
|
@@ -829,10 +844,17 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
829
844
|
* (e.g. the service-worker sync-state message).
|
|
830
845
|
*/
|
|
831
846
|
getContractSyncState(): ContractSyncState;
|
|
832
|
-
protected constructor(identity: ReadonlyIdentity, network: Network, onchainProvider: OnchainProvider,
|
|
847
|
+
protected constructor(identity: ReadonlyIdentity, network: Network, onchainProvider: OnchainProvider,
|
|
848
|
+
/**
|
|
849
|
+
* Narrowed to what a readonly wallet legitimately needs — the only use
|
|
850
|
+
* here is {@link getArkadeInfo}. `protected` stops an outside caller
|
|
851
|
+
* reaching it; the `Pick` stops this class growing a use for
|
|
852
|
+
* `submitTx`. `Wallet` re-widens both below.
|
|
853
|
+
*/
|
|
854
|
+
arkProvider: Pick<ArkProvider, "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[]);
|
|
833
855
|
/**
|
|
834
856
|
* x-only hex of the operator's deprecated signer keys (from
|
|
835
|
-
* `
|
|
857
|
+
* `ArkadeInfo.deprecatedSigners`), cached for the OFFLINE read/watch paths.
|
|
836
858
|
* The boarding watch/history surfaces ({@link getBoardingAddresses},
|
|
837
859
|
* {@link getBoardingTxs}) fan out over {current} ∪ this set so a deposit at
|
|
838
860
|
* a boarding address minted under a now-rotated operator signer keeps being
|
|
@@ -869,7 +891,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
869
891
|
* against mid-flight rotation pass their snapshot, so the check reads from
|
|
870
892
|
* one rotation epoch.
|
|
871
893
|
*/
|
|
872
|
-
protected recipientAddressContext(serverPubKey?: Bytes):
|
|
894
|
+
protected recipientAddressContext(serverPubKey?: Bytes): RecipientArkadeAddressContext;
|
|
873
895
|
/**
|
|
874
896
|
* Currently-active receive tapscript. Read-only from the outside;
|
|
875
897
|
* mutated only via {@link Wallet.setOffchainTapscriptForRotation}
|
|
@@ -884,6 +906,45 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
884
906
|
* span a rotation.
|
|
885
907
|
*/
|
|
886
908
|
get arkServerPublicKey(): Bytes;
|
|
909
|
+
/**
|
|
910
|
+
* Server info for the Arkade server this wallet is connected to, resolved
|
|
911
|
+
* exactly as construction resolves it: live wins, a retryable failure
|
|
912
|
+
* falls back to the snapshot persisted at boot, a terminal one propagates.
|
|
913
|
+
*
|
|
914
|
+
* Live rather than the pinned boot snapshot because the fields callers
|
|
915
|
+
* come here for — `signerPubkey`, `checkpointTapscript`, `fees` — are the
|
|
916
|
+
* ones a mid-session rotation moves, and a covenant built against a
|
|
917
|
+
* superseded signer is unspendable.
|
|
918
|
+
*
|
|
919
|
+
* One rotation caveat: reading does NOT re-pin the wallet —
|
|
920
|
+
* {@link arkServerPublicKey}, {@link dustAmount} and the tapscripts move
|
|
921
|
+
* only through `handleServerInfoChanged`/`rotateServerSigner` — so inside
|
|
922
|
+
* a rotation window this can report epoch N+1 while the wallet still
|
|
923
|
+
* spends on N. The window closes on its own: a read that observes a moved
|
|
924
|
+
* digest makes the provider emit `onServerInfoChanged`, which is what
|
|
925
|
+
* drives that rotation. A caller about to bind the answer into a covenant
|
|
926
|
+
* passes `{ requireLive: true }` and fails closed instead of receiving
|
|
927
|
+
* the boot snapshot.
|
|
928
|
+
*
|
|
929
|
+
* @returns The Arkade server's info
|
|
930
|
+
* @see ArkadeInfo
|
|
931
|
+
*/
|
|
932
|
+
getArkadeInfo(opts?: GetArkadeInfoOptions): Promise<ArkadeInfo>;
|
|
933
|
+
/**
|
|
934
|
+
* Chain reads against this wallet's server for scripts it does not own.
|
|
935
|
+
*
|
|
936
|
+
* Binds the wallet's own `indexerProvider` — which may be an Expo or
|
|
937
|
+
* injected one that a caller's hand-built `RestIndexerProvider` would
|
|
938
|
+
* silently bypass. `getVtxos` goes through
|
|
939
|
+
* {@link getNormalizedVtxos}, which is what makes every VTXO leaving the
|
|
940
|
+
* seam carry its canonical facts.
|
|
941
|
+
*
|
|
942
|
+
* A bound object rather than the provider itself, so an `IReadonlyWallet`
|
|
943
|
+
* holder gets `getVtxos`/`getVirtualTxs` and nothing else at runtime.
|
|
944
|
+
* (`indexerProvider` is still public on the concrete classes, unlike
|
|
945
|
+
* `arkProvider`, so this narrows the interface rather than the field.)
|
|
946
|
+
*/
|
|
947
|
+
getArkadeReader(): Promise<ArkadeReader>;
|
|
887
948
|
/**
|
|
888
949
|
* The wallet's current boarding tapscript (the on-chain onboarding
|
|
889
950
|
* target). Read-only from the outside; mutated only via
|
|
@@ -931,7 +992,7 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
931
992
|
dustAmount: bigint;
|
|
932
993
|
walletRepository: WalletRepository;
|
|
933
994
|
contractRepository: ContractRepository;
|
|
934
|
-
info:
|
|
995
|
+
info: ArkadeInfo;
|
|
935
996
|
serverInfoSource: ServerInfoSource;
|
|
936
997
|
serverInfoLastOnlineAt: number | undefined;
|
|
937
998
|
delegateProvider: DelegateProvider | undefined;
|
|
@@ -1224,7 +1285,6 @@ declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
1224
1285
|
* ```
|
|
1225
1286
|
*/
|
|
1226
1287
|
declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable, AddressAllocationCapable {
|
|
1227
|
-
readonly arkProvider: ArkProvider;
|
|
1228
1288
|
readonly forfeitOutputScript: Bytes;
|
|
1229
1289
|
readonly forfeitPubkey: Bytes;
|
|
1230
1290
|
/** Overrides for the `batchExpiry` bounds; defaults derive from `network`. */
|
|
@@ -1346,7 +1406,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
1346
1406
|
/**
|
|
1347
1407
|
* Output script for checkpoint transactions, decoded from the server's
|
|
1348
1408
|
* `checkpointTapscript`. Server-controlled state: pinned at construction
|
|
1349
|
-
* and re-sourced from a fresh `
|
|
1409
|
+
* and re-sourced from a fresh `ArkadeInfo` on server-signer rotation. Read it
|
|
1350
1410
|
* through {@link serverUnrollScript}; write it only through
|
|
1351
1411
|
* {@link setServerUnrollScriptForRotation}.
|
|
1352
1412
|
*/
|
|
@@ -1355,7 +1415,7 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
1355
1415
|
/**
|
|
1356
1416
|
* @internal Sole write path for `serverUnrollScript` after construction.
|
|
1357
1417
|
* Called by {@link Wallet._doRotateServerSigner} with the checkpoint script
|
|
1358
|
-
* sourced from the fresh `
|
|
1418
|
+
* sourced from the fresh `ArkadeInfo` that triggered the rotation, so the send
|
|
1359
1419
|
* path builds checkpoints against the new server epoch. External code must
|
|
1360
1420
|
* treat `serverUnrollScript` as read-only.
|
|
1361
1421
|
*/
|
|
@@ -1638,6 +1698,21 @@ declare class Wallet extends ReadonlyWallet implements IWallet, HDWalletCapable,
|
|
|
1638
1698
|
thresholdMs: number;
|
|
1639
1699
|
};
|
|
1640
1700
|
readonly settlementConfig: SettlementConfig | false;
|
|
1701
|
+
/**
|
|
1702
|
+
* Re-widened to public: a full wallet's provider is part of its API
|
|
1703
|
+
* (`ExpoWallet` and the delegate manager read it), while `ReadonlyWallet`
|
|
1704
|
+
* keeps it protected so a readonly view cannot hand out `submitTx`.
|
|
1705
|
+
*/
|
|
1706
|
+
readonly arkProvider: ArkProvider;
|
|
1707
|
+
/**
|
|
1708
|
+
* Broadcast access bound to this wallet's server, so a plugin needs only
|
|
1709
|
+
* the wallet.
|
|
1710
|
+
*
|
|
1711
|
+
* Defined here and not on {@link ReadonlyWallet} for the same reason
|
|
1712
|
+
* `arkProvider` is protected there: a readonly wallet, and every
|
|
1713
|
+
* `toReadonly()` view, must not be able to submit.
|
|
1714
|
+
*/
|
|
1715
|
+
getArkadeBroadcaster(): Promise<ArkadeBroadcaster>;
|
|
1641
1716
|
protected constructor(identity: Identity, network: Network, onchainProvider: OnchainProvider, arkProvider: ArkProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script | DelegateVtxo.Script, boardingTapscript: DefaultVtxo.Script, serverUnrollScript: CSVMultisigTapscript.Type, forfeitOutputScript: Bytes, forfeitPubkey: Bytes, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository,
|
|
1642
1717
|
/** @deprecated Use settlementConfig */
|
|
1643
1718
|
renewalConfig?: WalletConfig["renewalConfig"], delegateProvider?: DelegateProvider, watcherConfig?: WalletConfig["watcherConfig"], settlementConfig?: WalletConfig["settlementConfig"], walletContractTimelocks?: RelativeTimelock[], receiveRotator?: WalletReceiveRotator, descriptorProvider?: DescriptorProvider, lookAheadWindow?: number,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { bn as ContractHandler, w as RelativeTimelock, bz as Discoverable, V as VtxoScript, x as TapLeafScript, df as TapscriptDeriving } from './index-Udm5V2xW.cjs';
|
|
2
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DLIOBQ5x.cjs';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -482,7 +482,7 @@ interface VHTLCV2ContractParams {
|
|
|
482
482
|
/**
|
|
483
483
|
* Handler for {@link VHTLC.ScriptV2} — the VHTLC whose preimage leaves carry an
|
|
484
484
|
* explicit `OP_SIZE 32 OP_EQUALVERIFY` before the hash check, and which the RFQ
|
|
485
|
-
* swap corridor builds (`@arkade-os/swap`'s `
|
|
485
|
+
* swap corridor builds (`@arkade-os/swap`'s `lightningSendContract`).
|
|
486
486
|
*
|
|
487
487
|
* **Why a separate type string rather than a flag on `vhtlc`.** A handler's
|
|
488
488
|
* `type` names the script class it derives, the way every other registered type
|
|
@@ -541,7 +541,7 @@ declare const VHTLCV2ContractHandler: ContractHandler<VHTLCV2ContractParams, VHT
|
|
|
541
541
|
* (`pubKey` / `serverPubKey` / `csvTimelock`) rather than inventing
|
|
542
542
|
* boarding-specific names — the boarding semantics come from the
|
|
543
543
|
* contract type and from populating `csvTimelock` with the server's
|
|
544
|
-
* boarding-exit delay (`
|
|
544
|
+
* boarding-exit delay (`ArkadeInfo.boardingExitDelay`) instead of the
|
|
545
545
|
* offchain unilateral-exit delay.
|
|
546
546
|
*/
|
|
547
547
|
type BoardingContractParams = DefaultContractParams;
|
|
@@ -557,8 +557,8 @@ type BoardingContractParams = DefaultContractParams;
|
|
|
557
557
|
*
|
|
558
558
|
* Boarding semantics come entirely from the contract type and from
|
|
559
559
|
* sourcing the CSV timelock from the server's boarding-exit delay
|
|
560
|
-
* (`
|
|
561
|
-
* offchain `default` contract is built from `
|
|
560
|
+
* (`ArkadeInfo.boardingExitDelay`), not from renamed parameters. The
|
|
561
|
+
* offchain `default` contract is built from `ArkadeInfo.unilateralExitDelay`
|
|
562
562
|
* instead, so the two share a script shape but differ in their CSV
|
|
563
563
|
* timelock value. Parameters round-trip through the same
|
|
564
564
|
* `timelockToSequence` / `sequenceToTimelock` helpers and BIP68 sequence
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
1
|
+
import { bn as ContractHandler, w as RelativeTimelock, bz as Discoverable, V as VtxoScript, x as TapLeafScript, df as TapscriptDeriving } from './index-Udm5V2xW.js';
|
|
2
|
+
import { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Dyn5L80J.js';
|
|
3
3
|
import { Bytes } from '@scure/btc-signer/utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -482,7 +482,7 @@ interface VHTLCV2ContractParams {
|
|
|
482
482
|
/**
|
|
483
483
|
* Handler for {@link VHTLC.ScriptV2} — the VHTLC whose preimage leaves carry an
|
|
484
484
|
* explicit `OP_SIZE 32 OP_EQUALVERIFY` before the hash check, and which the RFQ
|
|
485
|
-
* swap corridor builds (`@arkade-os/swap`'s `
|
|
485
|
+
* swap corridor builds (`@arkade-os/swap`'s `lightningSendContract`).
|
|
486
486
|
*
|
|
487
487
|
* **Why a separate type string rather than a flag on `vhtlc`.** A handler's
|
|
488
488
|
* `type` names the script class it derives, the way every other registered type
|
|
@@ -541,7 +541,7 @@ declare const VHTLCV2ContractHandler: ContractHandler<VHTLCV2ContractParams, VHT
|
|
|
541
541
|
* (`pubKey` / `serverPubKey` / `csvTimelock`) rather than inventing
|
|
542
542
|
* boarding-specific names — the boarding semantics come from the
|
|
543
543
|
* contract type and from populating `csvTimelock` with the server's
|
|
544
|
-
* boarding-exit delay (`
|
|
544
|
+
* boarding-exit delay (`ArkadeInfo.boardingExitDelay`) instead of the
|
|
545
545
|
* offchain unilateral-exit delay.
|
|
546
546
|
*/
|
|
547
547
|
type BoardingContractParams = DefaultContractParams;
|
|
@@ -557,8 +557,8 @@ type BoardingContractParams = DefaultContractParams;
|
|
|
557
557
|
*
|
|
558
558
|
* Boarding semantics come entirely from the contract type and from
|
|
559
559
|
* sourcing the CSV timelock from the server's boarding-exit delay
|
|
560
|
-
* (`
|
|
561
|
-
* offchain `default` contract is built from `
|
|
560
|
+
* (`ArkadeInfo.boardingExitDelay`), not from renamed parameters. The
|
|
561
|
+
* offchain `default` contract is built from `ArkadeInfo.unilateralExitDelay`
|
|
562
562
|
* instead, so the two share a script shape but differ in their CSV
|
|
563
563
|
* timelock value. Parameters round-trip through the same
|
|
564
564
|
* `timelockToSequence` / `sequenceToTimelock` helpers and BIP68 sequence
|