@arkade-os/sdk 0.4.71 → 0.4.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +29 -0
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/adapters/indexedDB.cjs +5 -5
  7. package/dist/adapters/indexedDB.js +4 -4
  8. package/dist/{asyncStorageTaskQueue-CjKAUiuj.d.ts → asyncStorageTaskQueue-DhhNZc4v.d.ts} +2 -2
  9. package/dist/{asyncStorageTaskQueue-DgXf4iuU.d.cts → asyncStorageTaskQueue-s5lUGWxu.d.cts} +2 -2
  10. package/dist/{chunk-I7ZNWBBU.cjs → chunk-4BWZ437E.cjs} +21 -17
  11. package/dist/chunk-4BWZ437E.cjs.map +1 -0
  12. package/dist/{chunk-FM263GKH.cjs → chunk-4C5PMGBB.cjs} +51 -25
  13. package/dist/chunk-4C5PMGBB.cjs.map +1 -0
  14. package/dist/{chunk-2ZX4Z2IP.js → chunk-5GQFYVWP.js} +30 -5
  15. package/dist/chunk-5GQFYVWP.js.map +1 -0
  16. package/dist/{chunk-5J5PDZRR.cjs → chunk-6FTHFJAN.cjs} +30 -4
  17. package/dist/chunk-6FTHFJAN.cjs.map +1 -0
  18. package/dist/{chunk-E5JNYFOF.js → chunk-BHLYB44A.js} +210 -53
  19. package/dist/chunk-BHLYB44A.js.map +1 -0
  20. package/dist/{chunk-ALZ2CZ3T.js → chunk-CB6QPAO5.js} +3 -3
  21. package/dist/{chunk-ALZ2CZ3T.js.map → chunk-CB6QPAO5.js.map} +1 -1
  22. package/dist/{chunk-NOWVA5CM.js → chunk-CZPBPMO2.js} +4 -4
  23. package/dist/{chunk-NOWVA5CM.js.map → chunk-CZPBPMO2.js.map} +1 -1
  24. package/dist/{chunk-ZT3EM4CE.js → chunk-IGER5FPC.js} +37 -11
  25. package/dist/chunk-IGER5FPC.js.map +1 -0
  26. package/dist/{chunk-7PHMT3T4.cjs → chunk-KDMHEWTD.cjs} +10 -10
  27. package/dist/{chunk-7PHMT3T4.cjs.map → chunk-KDMHEWTD.cjs.map} +1 -1
  28. package/dist/{chunk-P6EXRY5L.cjs → chunk-NPM5YZBC.cjs} +49 -49
  29. package/dist/{chunk-P6EXRY5L.cjs.map → chunk-NPM5YZBC.cjs.map} +1 -1
  30. package/dist/{chunk-SCSLCU66.js → chunk-S5PUFSXC.js} +8 -4
  31. package/dist/chunk-S5PUFSXC.js.map +1 -0
  32. package/dist/{chunk-MK5EPTTB.cjs → chunk-U5I3ITV7.cjs} +643 -485
  33. package/dist/chunk-U5I3ITV7.cjs.map +1 -0
  34. package/dist/contracts/handlers/index.cjs +9 -9
  35. package/dist/contracts/handlers/index.d.cts +3 -3
  36. package/dist/contracts/handlers/index.d.ts +3 -3
  37. package/dist/contracts/handlers/index.js +2 -2
  38. package/dist/{delegate-D-gEEqrP.d.cts → delegate-BJp8f6LT.d.cts} +1 -1
  39. package/dist/{delegate-CKJdsC99.d.ts → delegate-Ckz_TWzM.d.ts} +1 -1
  40. package/dist/{hdWalletCapable-CwLPmWct.d.cts → hdWalletCapable-DA9bJ5eB.d.cts} +2 -2
  41. package/dist/{hdWalletCapable-BJ4pvkai.d.ts → hdWalletCapable-DABgAD-T.d.ts} +2 -2
  42. package/dist/{index-Boppyqav.d.ts → index-B8xrELXY.d.ts} +2 -2
  43. package/dist/{index-BE1uFXrV.d.cts → index-DSbDm0Io.d.cts} +2 -2
  44. package/dist/{index-CyGnhCSS.d.ts → index-Dg0-TvBQ.d.cts} +51 -3
  45. package/dist/{index-CyGnhCSS.d.cts → index-Dg0-TvBQ.d.ts} +51 -3
  46. package/dist/index.cjs +306 -298
  47. package/dist/index.d.cts +54 -10
  48. package/dist/index.d.ts +54 -10
  49. package/dist/index.js +4 -4
  50. package/dist/repositories/realm/index.cjs +19 -19
  51. package/dist/repositories/realm/index.d.cts +2 -2
  52. package/dist/repositories/realm/index.d.ts +2 -2
  53. package/dist/repositories/realm/index.js +5 -5
  54. package/dist/repositories/sqlite/index.cjs +18 -18
  55. package/dist/repositories/sqlite/index.d.cts +2 -2
  56. package/dist/repositories/sqlite/index.d.ts +2 -2
  57. package/dist/repositories/sqlite/index.js +5 -5
  58. package/dist/{taskRunner-CjmMH_rW.d.cts → taskRunner-BH_FxaNI.d.cts} +2 -2
  59. package/dist/{taskRunner-l3zyfW_Q.d.ts → taskRunner-DrVz2QZs.d.ts} +2 -2
  60. package/dist/wallet/expo/background.cjs +14 -14
  61. package/dist/wallet/expo/background.d.cts +3 -3
  62. package/dist/wallet/expo/background.d.ts +3 -3
  63. package/dist/wallet/expo/background.js +6 -6
  64. package/dist/wallet/expo/index.cjs +14 -14
  65. package/dist/wallet/expo/index.d.cts +4 -4
  66. package/dist/wallet/expo/index.d.ts +4 -4
  67. package/dist/wallet/expo/index.js +5 -5
  68. package/dist/worker/expo/index.cjs +9 -9
  69. package/dist/worker/expo/index.d.cts +4 -4
  70. package/dist/worker/expo/index.d.ts +4 -4
  71. package/dist/worker/expo/index.js +5 -5
  72. package/package.json +1 -1
  73. package/dist/chunk-2ZX4Z2IP.js.map +0 -1
  74. package/dist/chunk-5J5PDZRR.cjs.map +0 -1
  75. package/dist/chunk-E5JNYFOF.js.map +0 -1
  76. package/dist/chunk-FM263GKH.cjs.map +0 -1
  77. package/dist/chunk-I7ZNWBBU.cjs.map +0 -1
  78. package/dist/chunk-MK5EPTTB.cjs.map +0 -1
  79. package/dist/chunk-SCSLCU66.js.map +0 -1
  80. package/dist/chunk-ZT3EM4CE.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,11 +1,11 @@
1
- import { a4 as ReadonlyIdentity, a as Identity, ar as DescriptorSigningRequest, as as Transaction, an as SignerSession, a2 as DescriptorProvider, at as IntentFeeConfig, au as OffchainInput, av as FeeAmount, aw as OnchainInput, ax as FeeOutput, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch, W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, v as Contract, C as ContractRepository, z as ContractFilter, I as IWallet, q as ArkProvider, al as SettlementConfig, ay as ContractWatcherConfig, az as Asset, R as Recipient, aA as FeeInfo, k as SettlementEvent, j as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aB as CreateContractParams, aC as GetContractsFilter, u as VirtualCoin, aD as GetSpendablePathsOptions, aE as GetAllSpendingPathsOptions, g as GetNewAddressesOptions, aF as IssuanceParams, aG as ReissuanceParams, aH as BurnParams, aI as RenewVtxosOptions, c as WalletBalance, ab as ContractSyncState, ag as ContractWithVtxos, aJ as WatchedScript, aK as PathSelection, h as NewAddress, aL as ContractEvent, aM as AssetDetails, aN as IssuanceResult, aO as DelegateInfo, aP as MigrationGlobalSkipReason, aQ as MigrationLegSkipReason, aR as SignerStatus, a3 as IReadonlyWallet, d as ActivityRegistry, aa as IReadonlyAssetManager, aS as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, m as IAssetManager, l as SendParams, i as IDelegateManager, aT as IVtxoManager, a5 as OnchainProvider, M as Network, ad as NetworkName, ai as Coin, aU as ExplorerTransaction, ae as ArkInfo, ao as SignedIntent, ap as Intent, aV as TreeNonces, aW as TreePartialSigs, T as TxNotificationEvent, aX as PendingTx, t as TapLeafScript, aY as EncodedVtxoScript, P as CSVMultisigTapscript, s as RelativeTimelock, V as VtxoScript, aZ as Status, af as ArkAddress, a_ as ChainTx, r as IndexerProvider, X as TxTree, a$ as PathContext } from './index-CyGnhCSS.cjs';
2
- export { b0 as ActivityIntent, b1 as ActivityResolver, b2 as ArkIntentState, b3 as ArkTapscript, b4 as AssetMetadata, b5 as BITCOIN_EMULATOR_PUBKEY, b6 as BaseWalletConfig, $ as BatchFailedEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, b7 as BatchInfo, b8 as BatchSignableIdentity, Q as BatchStartedEvent, b9 as CLTVMultisigTapscript, ba as CandidateDeps, bb as ChainTxType, L as ChainedTxType, bc as CommitmentTx, bd as ConditionCSVMultisigTapscript, be as ConditionMultisigTapscript, bf as ContractBalance, bg as ContractEventCallback, bh as ContractHandler, aj as ContractManager, ak as ContractManagerConfig, bi as ContractState, bj as ContractVtxo, bk as ContractVtxoEvent, bl as ContractWatcher, bm as DEFAULT_VTXO_PAGE_SIZE, bn as DelegateManagerImpl, bo as DelegateOptions, a6 as DelegateProvider, bp as DelegatorManagerImpl, bq as DelegatorProvider, br as DeprecatedSignerMigrationReport, bs as DeprecatedSignerReport, bt as DigestMismatchError, bu as Discoverable, bv as DiscoveredContract, bw as DiscoveryDeps, bx as ESPLORA_URL, by as EsploraProvider, bz as EventSourceCapable, bA as EventSourceFactory, bB as EventSourceLike, bC as EventSourceUnavailableError, a8 as ExitCaptureMode, bD as ExitChainResolver, a9 as ExitDataSource, bE as ExtendedContractVtxo, bF as GroupMembership, bG as HandlerError, bH as IDelegatorManager, bI as INTENT_TERMINAL_STATES, bJ as IndexerTxType, bK as IntentCoin, bL as KnownMetadata, bM as MUTINYNET_EMULATOR_PUBKEY, bN as MigrateDeprecatedSignerOptions, bO as MigrationLegReport, bP as MigrationVtxoRef, bQ as MultisigTapscript, bR as NewAddressType, bS as Nonces, bT as Output, bU as PageResponse, bV as PaginationOptions, bW as PartialSig, bX as PrevTxSource, bY as PrevTxUnavailableError, bZ as ProviderClass, b_ as REGTEST_EMULATOR_PUBKEY, b$ as RawTxSource, a7 as ReadonlyWalletConfig, n as RestArkProvider, c0 as RestDelegateProvider, c1 as RestDelegatorProvider, o as RestIndexerProvider, c2 as ScanContractsOptions, c3 as ScanResult, c4 as ScheduledSession, c5 as SettlementEventType, c6 as SignRequest, c7 as SignerClassification, c8 as SignerSet, c9 as SubscriptionEvent, ca as SubscriptionHeartbeat, p as SubscriptionResponse, cb as SweepTxNotification, cc as TapLeaves, cd as TapTreeCoder, ce as TapscriptType, aq as TimeHeight, Y as TreeNoncesEvent, a1 as TreeSignatureEvent, U as TreeSigningStartedEvent, a0 as TreeTxEvent, cf as Tx, cg as TxHistoryRecord, ch as TxKey, ci as TxNotification, cj as TxTag, ck as TxTreeNode, cl as TxType, cm as VirtualStatus, cn as Vtxo, co as VtxoChain, am as VtxoManager, cp as VtxoType, b as WalletConfig, cq as WalletMode, cr as WithPrevTx, cs as assertAllowedSighashTypes, ct as assetMintResolver, cu as attachPrevArkTxs, cv as attachPrevoutTxs, cw as boardingResolver, cx as canRecoverOnchain, cy as canSpendOffchain, cz as canSweepOnchain, cA as classifyAgainstSignerSet, cB as classifyContractSigner, cC as collabExitResolver, cD as configureEventSource, cE as createDefaultActivityRegistry, cF as createExitChainResolver, cG as decodeTapscript, cH as defaultEmulatorPubkey, cI as getConfiguredEventSource, cJ as getNetwork, cK as getRandomId, cL as getSequence, cM as hasCandidates, cN as hasTerminalSpend, cO as isBatchSignable, cP as isContractVtxoEvent, cQ as isCooperativelyMigratable, cR as isDiscoverable, cS as isEventSourceUnavailableError, cT as isExpired, cU as isPastExpiry, cV as isRecoverable, cW as isSigningIdentity, cX as isSpendable, cY as isSubdust, cZ as isTerminalIntentState, c_ as isVirtualCoin, c$ as isVtxoExpiringSoon, d0 as networks, d1 as resolveEmulatorPubkey, d2 as resolveEventSource, d3 as resolvePrevTxs, d4 as scriptFromTapLeafScript, d5 as signerSetFromInfo, d6 as toXOnlySignerHex, d7 as withPrevTxs } from './index-CyGnhCSS.cjs';
3
- import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './hdWalletCapable-CwLPmWct.cjs';
4
- export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashUnclaimedReason, l as ArkadeCashUnclaimedVtxo, m as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, n as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, o as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ProviderKind, q as ProviderUnavailableError, r as REGTEST_MIN_BATCH_EXPIRY_SECONDS, s as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, t as ServerInfoSource, u as ServerResponseMismatchError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as assertValidServerUnrollScript, z as defaultBatchExpiryPolicy, E as defaultCheckpointExitDelayPolicy, G as isAddressAllocationCapable, J as isArkError, K as isHDAllocationCapable, L as isHDWalletCapable, N as maybeArkError, O as resolveBatchExpiryPolicy, Q as resolveCheckpointExitDelayPolicy, T as resolveDescriptorSigner, U as selectVirtualCoins, V as signingDescriptorIndex, X as strictSigningDescriptorIndex, Y as waitForIncomingFunds } from './hdWalletCapable-CwLPmWct.cjs';
5
- import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-BE1uFXrV.cjs';
6
- export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from './index-BE1uFXrV.cjs';
7
- import { D as DefaultVtxo } from './delegate-D-gEEqrP.cjs';
8
- export { a as DelegateVtxo } from './delegate-D-gEEqrP.cjs';
1
+ import { a4 as ReadonlyIdentity, a as Identity, ar as DescriptorSigningRequest, as as Transaction, an as SignerSession, a2 as DescriptorProvider, at as IntentFeeConfig, au as OffchainInput, av as FeeAmount, aw as OnchainInput, ax as FeeOutput, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch, W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, v as Contract, C as ContractRepository, z as ContractFilter, I as IWallet, q as ArkProvider, al as SettlementConfig, ay as ContractWatcherConfig, az as Asset, R as Recipient, aA as FeeInfo, k as SettlementEvent, j as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aB as CreateContractParams, aC as GetContractsFilter, u as VirtualCoin, aD as GetSpendablePathsOptions, aE as GetAllSpendingPathsOptions, g as GetNewAddressesOptions, aF as IssuanceParams, aG as ReissuanceParams, aH as BurnParams, aI as RenewVtxosOptions, c as WalletBalance, ab as ContractSyncState, ag as ContractWithVtxos, aJ as WatchedScript, aK as PathSelection, h as NewAddress, aL as ContractEvent, aM as AssetDetails, aN as IssuanceResult, aO as DelegateInfo, aP as MigrationGlobalSkipReason, aQ as MigrationLegSkipReason, aR as SignerStatus, a3 as IReadonlyWallet, d as ActivityRegistry, aa as IReadonlyAssetManager, aS as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, m as IAssetManager, l as SendParams, i as IDelegateManager, aT as IVtxoManager, a5 as OnchainProvider, M as Network, ad as NetworkName, ai as Coin, aU as ExplorerTransaction, ae as ArkInfo, ao as SignedIntent, ap as Intent, aV as TreeNonces, aW as TreePartialSigs, T as TxNotificationEvent, aX as PendingTx, t as TapLeafScript, aY as EncodedVtxoScript, P as CSVMultisigTapscript, s as RelativeTimelock, V as VtxoScript, aZ as Status, af as ArkAddress, a_ as ChainTx, r as IndexerProvider, X as TxTree, a$ as PathContext } from './index-Dg0-TvBQ.cjs';
2
+ export { b0 as ActivityIntent, b1 as ActivityResolver, b2 as ArkIntentState, b3 as ArkTapscript, b4 as AssetMetadata, b5 as BITCOIN_EMULATOR_PUBKEY, b6 as BaseWalletConfig, $ as BatchFailedEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, b7 as BatchInfo, b8 as BatchSignableIdentity, Q as BatchStartedEvent, b9 as CLTVMultisigTapscript, ba as CandidateDeps, bb as ChainTxType, L as ChainedTxType, bc as CommitmentTx, bd as ConditionCSVMultisigTapscript, be as ConditionMultisigTapscript, bf as ContractBalance, bg as ContractEventCallback, bh as ContractHandler, aj as ContractManager, ak as ContractManagerConfig, bi as ContractState, bj as ContractVtxo, bk as ContractVtxoEvent, bl as ContractWatcher, bm as DEFAULT_VTXO_PAGE_SIZE, bn as DelegateManagerImpl, bo as DelegateOptions, a6 as DelegateProvider, bp as DelegatorManagerImpl, bq as DelegatorProvider, br as DeprecatedSignerMigrationReport, bs as DeprecatedSignerReport, bt as DigestMismatchError, bu as Discoverable, bv as DiscoveredContract, bw as DiscoveryDeps, bx as ESPLORA_URL, by as EsploraProvider, bz as EventSourceCapable, bA as EventSourceFactory, bB as EventSourceLike, bC as EventSourceUnavailableError, a8 as ExitCaptureMode, bD as ExitChainResolver, a9 as ExitDataSource, bE as ExtendedContractVtxo, bF as GroupMembership, bG as HandlerError, bH as IDelegatorManager, bI as INTENT_TERMINAL_STATES, bJ as IndexerTxType, bK as IntentCoin, bL as KnownMetadata, bM as MUTINYNET_EMULATOR_PUBKEY, bN as MigrateDeprecatedSignerOptions, bO as MigrationLegReport, bP as MigrationVtxoRef, bQ as MultisigTapscript, bR as NewAddressType, bS as Nonces, bT as Output, bU as PageResponse, bV as PaginationOptions, bW as PartialSig, bX as PrevTxSource, bY as PrevTxUnavailableError, bZ as ProviderClass, b_ as REGTEST_EMULATOR_PUBKEY, b$ as RawTxSource, a7 as ReadonlyWalletConfig, n as RestArkProvider, c0 as RestDelegateProvider, c1 as RestDelegatorProvider, o as RestIndexerProvider, c2 as ScanContractsOptions, c3 as ScanResult, c4 as ScheduledSession, c5 as SettlementEventType, c6 as SignRequest, c7 as SignerClassification, c8 as SignerSet, c9 as SubscriptionEvent, ca as SubscriptionHeartbeat, p as SubscriptionResponse, cb as SweepTxNotification, cc as TapLeaves, cd as TapTreeCoder, ce as TapscriptType, aq as TimeHeight, Y as TreeNoncesEvent, a1 as TreeSignatureEvent, U as TreeSigningStartedEvent, a0 as TreeTxEvent, cf as Tx, cg as TxHistoryRecord, ch as TxKey, ci as TxNotification, cj as TxTag, ck as TxTreeNode, cl as TxType, cm as VirtualStatus, cn as Vtxo, co as VtxoChain, am as VtxoManager, cp as VtxoType, b as WalletConfig, cq as WalletMode, cr as WithPrevTx, cs as assertAllowedSighashTypes, ct as assetMintResolver, cu as attachPrevArkTxs, cv as attachPrevoutTxs, cw as boardingResolver, cx as canRecoverOnchain, cy as canSpendOffchain, cz as canSweepOnchain, cA as classifyAgainstSignerSet, cB as classifyContractSigner, cC as collabExitResolver, cD as configureEventSource, cE as createDefaultActivityRegistry, cF as createExitChainResolver, cG as decodeTapscript, cH as defaultEmulatorPubkey, cI as getConfiguredEventSource, cJ as getNetwork, cK as getRandomId, cL as getSequence, cM as hasCandidates, cN as hasTerminalSpend, cO as isBatchSignable, cP as isContractVtxoEvent, cQ as isCooperativelyMigratable, cR as isDiscoverable, cS as isEventSourceUnavailableError, cT as isExpired, cU as isPastExpiry, cV as isRecoverable, cW as isSigningIdentity, cX as isSpendable, cY as isSubdust, cZ as isTerminalIntentState, c_ as isVirtualCoin, c$ as isVtxoExpiringSoon, d0 as networks, d1 as resolveEmulatorPubkey, d2 as resolveEventSource, d3 as resolvePrevTxs, d4 as scriptFromTapLeafScript, d5 as signerSetFromInfo, d6 as toXOnlySignerHex, d7 as withPrevTxs } from './index-Dg0-TvBQ.cjs';
3
+ import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './hdWalletCapable-DA9bJ5eB.cjs';
4
+ export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashUnclaimedReason, l as ArkadeCashUnclaimedVtxo, m as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, n as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, o as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ProviderKind, q as ProviderUnavailableError, r as REGTEST_MIN_BATCH_EXPIRY_SECONDS, s as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, t as ServerInfoSource, u as ServerResponseMismatchError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as assertValidServerUnrollScript, z as defaultBatchExpiryPolicy, E as defaultCheckpointExitDelayPolicy, G as isAddressAllocationCapable, J as isArkError, K as isHDAllocationCapable, L as isHDWalletCapable, N as maybeArkError, O as resolveBatchExpiryPolicy, Q as resolveCheckpointExitDelayPolicy, T as resolveDescriptorSigner, U as selectVirtualCoins, V as signingDescriptorIndex, X as strictSigningDescriptorIndex, Y as waitForIncomingFunds } from './hdWalletCapable-DA9bJ5eB.cjs';
5
+ import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-DSbDm0Io.cjs';
6
+ export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from './index-DSbDm0Io.cjs';
7
+ import { D as DefaultVtxo } from './delegate-BJp8f6LT.cjs';
8
+ export { a as DelegateVtxo } from './delegate-BJp8f6LT.cjs';
9
9
  import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
10
10
  import { P2TR } from '@scure/btc-signer/payment.js';
11
11
  import { Transaction as Transaction$1, OP, Script, ScriptType } from '@scure/btc-signer';
@@ -720,6 +720,8 @@ type ExcludableVtxo = {
720
720
  vout: number;
721
721
  script?: string;
722
722
  };
723
+ /** {@link gatedContracts}' answer, as callers that only read it should take it. */
724
+ type GatedContracts = ReadonlyMap<string, string>;
723
725
  /**
724
726
  * Why generic spending skips a VTXO, or `undefined` when it does not — phrased
725
727
  * to follow the outpoint in a log line.
@@ -741,7 +743,7 @@ type VtxoExclusion = (vtxo: ExcludableVtxo) => string | undefined;
741
743
  * already available here, so the message can tell them apart instead of
742
744
  * collapsing both into one sentence that reads as the same case either way.
743
745
  */
744
- declare function gateExclusion(gated: ReadonlyMap<string, string>): VtxoExclusion;
746
+ declare function gateExclusion(gated: GatedContracts): VtxoExclusion;
745
747
  /** Outpoints excluded for a shared reason, e.g. an intent-lock set. */
746
748
  declare function outpointExclusion(outpoints: ReadonlySet<string>, reason: string): VtxoExclusion;
747
749
  /**
@@ -1021,6 +1023,12 @@ declare class ContractRepositoryImpl implements ContractRepository {
1021
1023
  [Symbol.asyncDispose](): Promise<void>;
1022
1024
  }
1023
1025
 
1026
+ interface WalletRestoreHook {
1027
+ id: string;
1028
+ restore(wallet: IWallet): Promise<void>;
1029
+ }
1030
+ declare function registerWalletRestoreHook(wallet: IWallet, hook: WalletRestoreHook): () => void;
1031
+
1024
1032
  /**
1025
1033
  * Domain separator for the preimage derivation.
1026
1034
  *
@@ -3173,6 +3181,13 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
3173
3181
  /**
3174
3182
  * Build transaction history from cached virtual outputs, hitting the indexer only for
3175
3183
  * uncached timestamps. Best-effort, like the plain Wallet path.
3184
+ *
3185
+ * Takes its own {@link repoSnapshot} rather than a caller-supplied VTXO
3186
+ * list: the coins and the gate that judges them have to come off one read
3187
+ * or they answer about different instants, and being the worker's only
3188
+ * history builder means neither caller can supply one without the other.
3189
+ * The snapshot and the boarding read are independent, so they run together
3190
+ * — the same pairing `handleGetBalance` makes.
3176
3191
  */
3177
3192
  private buildTransactionHistoryFromCache;
3178
3193
  private ensureContractEventBroadcasting;
@@ -3463,6 +3478,7 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
3463
3478
  readonly identity: Identity;
3464
3479
  private readonly _assetManager;
3465
3480
  private readonly hasDelegate;
3481
+ private _restoreInFlight?;
3466
3482
  protected constructor(serviceWorker: ServiceWorker, identity: Identity, walletRepository: WalletRepository, contractRepository: ContractRepository, messageTag: string, hasDelegate: boolean);
3467
3483
  get assetManager(): IAssetManager;
3468
3484
  protected serializeIdentity(): Promise<SerializedIdentity>;
@@ -3540,6 +3556,7 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
3540
3556
  restore(opts?: {
3541
3557
  gapLimit?: number;
3542
3558
  }): Promise<void>;
3559
+ private _restoreWorkerWallet;
3543
3560
  send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
3544
3561
  getDelegateManager(): Promise<IDelegateManager | undefined>;
3545
3562
  /** @deprecated alias for @see ServiceWorkerWallet.getDelegateManager */
@@ -4480,6 +4497,12 @@ declare class ArkadeCash {
4480
4497
  *
4481
4498
  * The emulator is a signing service that executes Arkade scripts
4482
4499
  * and co-signs transactions when the scripts pass validation.
4500
+ *
4501
+ * The read here goes through `baseFetch`, the SDK's shared fetch boundary, so
4502
+ * it picks up whatever policy that boundary carries. The four submit calls
4503
+ * deliberately do not: aborting a submit would not tell the caller whether the
4504
+ * emulator signed, and none of them has a way to find out, so they stay on the
4505
+ * global `fetch` with their transport-error type unchanged.
4483
4506
  */
4484
4507
 
4485
4508
  interface EmulatorInfo {
@@ -6154,6 +6177,18 @@ interface RouteQuote {
6154
6177
  fee: number;
6155
6178
  /** `amount + fee` — what leaves the wallet. */
6156
6179
  total: number;
6180
+ /**
6181
+ * Unix seconds after which the counterparty stops honouring this quote.
6182
+ *
6183
+ * Absent means "nothing to observe", not "never expires": a rail with no
6184
+ * counterparty and no quote book — an Arkade transfer, an asset transfer, a
6185
+ * collaborative exit — has no validity to state. A caller holding a quote
6186
+ * across user think-time should read absence as "no check possible", and must
6187
+ * still expect {@link send} to refuse either way: the swap rails re-check
6188
+ * validity there, which is the only point that can judge it against the
6189
+ * moment of spending.
6190
+ */
6191
+ validUntil?: number;
6157
6192
  /**
6158
6193
  * @experimental The asset shape is provisional. The v2 swap client models
6159
6194
  * assets as `give`/`take`/`amountOn` over `AssetRef`, and the two
@@ -6453,6 +6488,15 @@ declare class FetchError extends Error {
6453
6488
  cause?: unknown;
6454
6489
  });
6455
6490
  }
6491
+ /**
6492
+ * Deadline applied to a read that carries no `AbortSignal` of its own.
6493
+ *
6494
+ * `fetch` has no default timeout, so a connection the network dropped silently
6495
+ * stays pending until the runtime gives up — and every bound built on top of it
6496
+ * waits with it. A retry ladder, a bounded queue or a mutex only work if the
6497
+ * call underneath them terminates.
6498
+ */
6499
+ declare const READ_TIMEOUT_MS = 30000;
6456
6500
 
6457
6501
  /**
6458
6502
  * How long a blocked upgrade waits before the open is reported as failed.
@@ -6662,4 +6706,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
6662
6706
  burn(params: BurnParams): Promise<string>;
6663
6707
  }
6664
6708
 
6665
- export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetNewAddressesOptions, GetVtxosFilter, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WatchedScript, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveAssetAmount, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
6709
+ export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetNewAddressesOptions, GetVtxosFilter, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, READ_TIMEOUT_MS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, type WalletRestoreHook, WatchedScript, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, requiresMigration, resolveAssetAmount, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { a4 as ReadonlyIdentity, a as Identity, ar as DescriptorSigningRequest, as as Transaction, an as SignerSession, a2 as DescriptorProvider, at as IntentFeeConfig, au as OffchainInput, av as FeeAmount, aw as OnchainInput, ax as FeeOutput, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch, W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, v as Contract, C as ContractRepository, z as ContractFilter, I as IWallet, q as ArkProvider, al as SettlementConfig, ay as ContractWatcherConfig, az as Asset, R as Recipient, aA as FeeInfo, k as SettlementEvent, j as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aB as CreateContractParams, aC as GetContractsFilter, u as VirtualCoin, aD as GetSpendablePathsOptions, aE as GetAllSpendingPathsOptions, g as GetNewAddressesOptions, aF as IssuanceParams, aG as ReissuanceParams, aH as BurnParams, aI as RenewVtxosOptions, c as WalletBalance, ab as ContractSyncState, ag as ContractWithVtxos, aJ as WatchedScript, aK as PathSelection, h as NewAddress, aL as ContractEvent, aM as AssetDetails, aN as IssuanceResult, aO as DelegateInfo, aP as MigrationGlobalSkipReason, aQ as MigrationLegSkipReason, aR as SignerStatus, a3 as IReadonlyWallet, d as ActivityRegistry, aa as IReadonlyAssetManager, aS as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, m as IAssetManager, l as SendParams, i as IDelegateManager, aT as IVtxoManager, a5 as OnchainProvider, M as Network, ad as NetworkName, ai as Coin, aU as ExplorerTransaction, ae as ArkInfo, ao as SignedIntent, ap as Intent, aV as TreeNonces, aW as TreePartialSigs, T as TxNotificationEvent, aX as PendingTx, t as TapLeafScript, aY as EncodedVtxoScript, P as CSVMultisigTapscript, s as RelativeTimelock, V as VtxoScript, aZ as Status, af as ArkAddress, a_ as ChainTx, r as IndexerProvider, X as TxTree, a$ as PathContext } from './index-CyGnhCSS.js';
2
- export { b0 as ActivityIntent, b1 as ActivityResolver, b2 as ArkIntentState, b3 as ArkTapscript, b4 as AssetMetadata, b5 as BITCOIN_EMULATOR_PUBKEY, b6 as BaseWalletConfig, $ as BatchFailedEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, b7 as BatchInfo, b8 as BatchSignableIdentity, Q as BatchStartedEvent, b9 as CLTVMultisigTapscript, ba as CandidateDeps, bb as ChainTxType, L as ChainedTxType, bc as CommitmentTx, bd as ConditionCSVMultisigTapscript, be as ConditionMultisigTapscript, bf as ContractBalance, bg as ContractEventCallback, bh as ContractHandler, aj as ContractManager, ak as ContractManagerConfig, bi as ContractState, bj as ContractVtxo, bk as ContractVtxoEvent, bl as ContractWatcher, bm as DEFAULT_VTXO_PAGE_SIZE, bn as DelegateManagerImpl, bo as DelegateOptions, a6 as DelegateProvider, bp as DelegatorManagerImpl, bq as DelegatorProvider, br as DeprecatedSignerMigrationReport, bs as DeprecatedSignerReport, bt as DigestMismatchError, bu as Discoverable, bv as DiscoveredContract, bw as DiscoveryDeps, bx as ESPLORA_URL, by as EsploraProvider, bz as EventSourceCapable, bA as EventSourceFactory, bB as EventSourceLike, bC as EventSourceUnavailableError, a8 as ExitCaptureMode, bD as ExitChainResolver, a9 as ExitDataSource, bE as ExtendedContractVtxo, bF as GroupMembership, bG as HandlerError, bH as IDelegatorManager, bI as INTENT_TERMINAL_STATES, bJ as IndexerTxType, bK as IntentCoin, bL as KnownMetadata, bM as MUTINYNET_EMULATOR_PUBKEY, bN as MigrateDeprecatedSignerOptions, bO as MigrationLegReport, bP as MigrationVtxoRef, bQ as MultisigTapscript, bR as NewAddressType, bS as Nonces, bT as Output, bU as PageResponse, bV as PaginationOptions, bW as PartialSig, bX as PrevTxSource, bY as PrevTxUnavailableError, bZ as ProviderClass, b_ as REGTEST_EMULATOR_PUBKEY, b$ as RawTxSource, a7 as ReadonlyWalletConfig, n as RestArkProvider, c0 as RestDelegateProvider, c1 as RestDelegatorProvider, o as RestIndexerProvider, c2 as ScanContractsOptions, c3 as ScanResult, c4 as ScheduledSession, c5 as SettlementEventType, c6 as SignRequest, c7 as SignerClassification, c8 as SignerSet, c9 as SubscriptionEvent, ca as SubscriptionHeartbeat, p as SubscriptionResponse, cb as SweepTxNotification, cc as TapLeaves, cd as TapTreeCoder, ce as TapscriptType, aq as TimeHeight, Y as TreeNoncesEvent, a1 as TreeSignatureEvent, U as TreeSigningStartedEvent, a0 as TreeTxEvent, cf as Tx, cg as TxHistoryRecord, ch as TxKey, ci as TxNotification, cj as TxTag, ck as TxTreeNode, cl as TxType, cm as VirtualStatus, cn as Vtxo, co as VtxoChain, am as VtxoManager, cp as VtxoType, b as WalletConfig, cq as WalletMode, cr as WithPrevTx, cs as assertAllowedSighashTypes, ct as assetMintResolver, cu as attachPrevArkTxs, cv as attachPrevoutTxs, cw as boardingResolver, cx as canRecoverOnchain, cy as canSpendOffchain, cz as canSweepOnchain, cA as classifyAgainstSignerSet, cB as classifyContractSigner, cC as collabExitResolver, cD as configureEventSource, cE as createDefaultActivityRegistry, cF as createExitChainResolver, cG as decodeTapscript, cH as defaultEmulatorPubkey, cI as getConfiguredEventSource, cJ as getNetwork, cK as getRandomId, cL as getSequence, cM as hasCandidates, cN as hasTerminalSpend, cO as isBatchSignable, cP as isContractVtxoEvent, cQ as isCooperativelyMigratable, cR as isDiscoverable, cS as isEventSourceUnavailableError, cT as isExpired, cU as isPastExpiry, cV as isRecoverable, cW as isSigningIdentity, cX as isSpendable, cY as isSubdust, cZ as isTerminalIntentState, c_ as isVirtualCoin, c$ as isVtxoExpiringSoon, d0 as networks, d1 as resolveEmulatorPubkey, d2 as resolveEventSource, d3 as resolvePrevTxs, d4 as scriptFromTapLeafScript, d5 as signerSetFromInfo, d6 as toXOnlySignerHex, d7 as withPrevTxs } from './index-CyGnhCSS.js';
3
- import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './hdWalletCapable-BJ4pvkai.js';
4
- export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashUnclaimedReason, l as ArkadeCashUnclaimedVtxo, m as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, n as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, o as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ProviderKind, q as ProviderUnavailableError, r as REGTEST_MIN_BATCH_EXPIRY_SECONDS, s as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, t as ServerInfoSource, u as ServerResponseMismatchError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as assertValidServerUnrollScript, z as defaultBatchExpiryPolicy, E as defaultCheckpointExitDelayPolicy, G as isAddressAllocationCapable, J as isArkError, K as isHDAllocationCapable, L as isHDWalletCapable, N as maybeArkError, O as resolveBatchExpiryPolicy, Q as resolveCheckpointExitDelayPolicy, T as resolveDescriptorSigner, U as selectVirtualCoins, V as signingDescriptorIndex, X as strictSigningDescriptorIndex, Y as waitForIncomingFunds } from './hdWalletCapable-BJ4pvkai.js';
5
- import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-Boppyqav.js';
6
- export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from './index-Boppyqav.js';
7
- import { D as DefaultVtxo } from './delegate-CKJdsC99.js';
8
- export { a as DelegateVtxo } from './delegate-CKJdsC99.js';
1
+ import { a4 as ReadonlyIdentity, a as Identity, ar as DescriptorSigningRequest, as as Transaction, an as SignerSession, a2 as DescriptorProvider, at as IntentFeeConfig, au as OffchainInput, av as FeeAmount, aw as OnchainInput, ax as FeeOutput, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch, W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, v as Contract, C as ContractRepository, z as ContractFilter, I as IWallet, q as ArkProvider, al as SettlementConfig, ay as ContractWatcherConfig, az as Asset, R as Recipient, aA as FeeInfo, k as SettlementEvent, j as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aB as CreateContractParams, aC as GetContractsFilter, u as VirtualCoin, aD as GetSpendablePathsOptions, aE as GetAllSpendingPathsOptions, g as GetNewAddressesOptions, aF as IssuanceParams, aG as ReissuanceParams, aH as BurnParams, aI as RenewVtxosOptions, c as WalletBalance, ab as ContractSyncState, ag as ContractWithVtxos, aJ as WatchedScript, aK as PathSelection, h as NewAddress, aL as ContractEvent, aM as AssetDetails, aN as IssuanceResult, aO as DelegateInfo, aP as MigrationGlobalSkipReason, aQ as MigrationLegSkipReason, aR as SignerStatus, a3 as IReadonlyWallet, d as ActivityRegistry, aa as IReadonlyAssetManager, aS as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, m as IAssetManager, l as SendParams, i as IDelegateManager, aT as IVtxoManager, a5 as OnchainProvider, M as Network, ad as NetworkName, ai as Coin, aU as ExplorerTransaction, ae as ArkInfo, ao as SignedIntent, ap as Intent, aV as TreeNonces, aW as TreePartialSigs, T as TxNotificationEvent, aX as PendingTx, t as TapLeafScript, aY as EncodedVtxoScript, P as CSVMultisigTapscript, s as RelativeTimelock, V as VtxoScript, aZ as Status, af as ArkAddress, a_ as ChainTx, r as IndexerProvider, X as TxTree, a$ as PathContext } from './index-Dg0-TvBQ.js';
2
+ export { b0 as ActivityIntent, b1 as ActivityResolver, b2 as ArkIntentState, b3 as ArkTapscript, b4 as AssetMetadata, b5 as BITCOIN_EMULATOR_PUBKEY, b6 as BaseWalletConfig, $ as BatchFailedEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, b7 as BatchInfo, b8 as BatchSignableIdentity, Q as BatchStartedEvent, b9 as CLTVMultisigTapscript, ba as CandidateDeps, bb as ChainTxType, L as ChainedTxType, bc as CommitmentTx, bd as ConditionCSVMultisigTapscript, be as ConditionMultisigTapscript, bf as ContractBalance, bg as ContractEventCallback, bh as ContractHandler, aj as ContractManager, ak as ContractManagerConfig, bi as ContractState, bj as ContractVtxo, bk as ContractVtxoEvent, bl as ContractWatcher, bm as DEFAULT_VTXO_PAGE_SIZE, bn as DelegateManagerImpl, bo as DelegateOptions, a6 as DelegateProvider, bp as DelegatorManagerImpl, bq as DelegatorProvider, br as DeprecatedSignerMigrationReport, bs as DeprecatedSignerReport, bt as DigestMismatchError, bu as Discoverable, bv as DiscoveredContract, bw as DiscoveryDeps, bx as ESPLORA_URL, by as EsploraProvider, bz as EventSourceCapable, bA as EventSourceFactory, bB as EventSourceLike, bC as EventSourceUnavailableError, a8 as ExitCaptureMode, bD as ExitChainResolver, a9 as ExitDataSource, bE as ExtendedContractVtxo, bF as GroupMembership, bG as HandlerError, bH as IDelegatorManager, bI as INTENT_TERMINAL_STATES, bJ as IndexerTxType, bK as IntentCoin, bL as KnownMetadata, bM as MUTINYNET_EMULATOR_PUBKEY, bN as MigrateDeprecatedSignerOptions, bO as MigrationLegReport, bP as MigrationVtxoRef, bQ as MultisigTapscript, bR as NewAddressType, bS as Nonces, bT as Output, bU as PageResponse, bV as PaginationOptions, bW as PartialSig, bX as PrevTxSource, bY as PrevTxUnavailableError, bZ as ProviderClass, b_ as REGTEST_EMULATOR_PUBKEY, b$ as RawTxSource, a7 as ReadonlyWalletConfig, n as RestArkProvider, c0 as RestDelegateProvider, c1 as RestDelegatorProvider, o as RestIndexerProvider, c2 as ScanContractsOptions, c3 as ScanResult, c4 as ScheduledSession, c5 as SettlementEventType, c6 as SignRequest, c7 as SignerClassification, c8 as SignerSet, c9 as SubscriptionEvent, ca as SubscriptionHeartbeat, p as SubscriptionResponse, cb as SweepTxNotification, cc as TapLeaves, cd as TapTreeCoder, ce as TapscriptType, aq as TimeHeight, Y as TreeNoncesEvent, a1 as TreeSignatureEvent, U as TreeSigningStartedEvent, a0 as TreeTxEvent, cf as Tx, cg as TxHistoryRecord, ch as TxKey, ci as TxNotification, cj as TxTag, ck as TxTreeNode, cl as TxType, cm as VirtualStatus, cn as Vtxo, co as VtxoChain, am as VtxoManager, cp as VtxoType, b as WalletConfig, cq as WalletMode, cr as WithPrevTx, cs as assertAllowedSighashTypes, ct as assetMintResolver, cu as attachPrevArkTxs, cv as attachPrevoutTxs, cw as boardingResolver, cx as canRecoverOnchain, cy as canSpendOffchain, cz as canSweepOnchain, cA as classifyAgainstSignerSet, cB as classifyContractSigner, cC as collabExitResolver, cD as configureEventSource, cE as createDefaultActivityRegistry, cF as createExitChainResolver, cG as decodeTapscript, cH as defaultEmulatorPubkey, cI as getConfiguredEventSource, cJ as getNetwork, cK as getRandomId, cL as getSequence, cM as hasCandidates, cN as hasTerminalSpend, cO as isBatchSignable, cP as isContractVtxoEvent, cQ as isCooperativelyMigratable, cR as isDiscoverable, cS as isEventSourceUnavailableError, cT as isExpired, cU as isPastExpiry, cV as isRecoverable, cW as isSigningIdentity, cX as isSpendable, cY as isSubdust, cZ as isTerminalIntentState, c_ as isVirtualCoin, c$ as isVtxoExpiringSoon, d0 as networks, d1 as resolveEmulatorPubkey, d2 as resolveEventSource, d3 as resolvePrevTxs, d4 as scriptFromTapLeafScript, d5 as signerSetFromInfo, d6 as toXOnlySignerHex, d7 as withPrevTxs } from './index-Dg0-TvBQ.js';
3
+ import { W as Wallet, R as ReadonlyWallet, b as ReceiveRotatorFactory, c as ReceiveRotatorBootOpts, d as ReceiveRotatorBoot, P as ProviderConnectionState, H as HDWalletCapable, a as HDAllocationCapable, A as AddressAllocationCapable, B as BatchExpiryPolicy, e as Batch } from './hdWalletCapable-DABgAD-T.js';
4
+ export { f as AbortError, g as ArkError, h as ArkErrorName, i as ArkadeCashClaimResult, j as ArkadeCashCreateError, k as ArkadeCashUnclaimedReason, l as ArkadeCashUnclaimedVtxo, m as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, n as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, o as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ProviderKind, q as ProviderUnavailableError, r as REGTEST_MIN_BATCH_EXPIRY_SECONDS, s as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, t as ServerInfoSource, u as ServerResponseMismatchError, v as WaitForIncomingFundsOptions, w as WalletCannotAllocateAddressError, x as assertValidBatchExpiry, y as assertValidServerUnrollScript, z as defaultBatchExpiryPolicy, E as defaultCheckpointExitDelayPolicy, G as isAddressAllocationCapable, J as isArkError, K as isHDAllocationCapable, L as isHDWalletCapable, N as maybeArkError, O as resolveBatchExpiryPolicy, Q as resolveCheckpointExitDelayPolicy, T as resolveDescriptorSigner, U as selectVirtualCoins, V as signingDescriptorIndex, X as strictSigningDescriptorIndex, Y as waitForIncomingFunds } from './hdWalletCapable-DABgAD-T.js';
5
+ import { P as Program, A as ArkadeParamValue, a as ArkadeProgramScript, b as ProgramKeys, c as ArkadeArgValue, C as CompiledProgramFunction, d as ArkadeFunction, I as InputRef, e as InputDef, f as ArkadeValueType, g as ArkadeArgType, h as ArkadeContractParams, i as ArkadeSegment, j as AsmToken, S as SUPPORTED_PROGRAM_VERSION, k as SignerRef, T as TapscriptSegment, W as WitnessRef, l as deserializeArkadeContractParams, p as parseArtifact, r as resolveAsm, s as serializeArkadeContractParams, m as stringifyArtifact, v as validateProgram, w as witnessRefToBytes } from './index-B8xrELXY.js';
6
+ export { n as ArkadeContractHandler, B as BoardingContractHandler, o as BoardingContractParams, D as DefaultContractHandler, q as DefaultContractParams, t as DelegateContractHandler, u as DelegateContractParams, V as VHTLC, x as VHTLCContractHandler, y as VHTLCContractParams, z as VHTLCV2ContractHandler, E as VHTLCV2ContractParams, F as contractHandlers } from './index-B8xrELXY.js';
7
+ import { D as DefaultVtxo } from './delegate-Ckz_TWzM.js';
8
+ export { a as DelegateVtxo } from './delegate-Ckz_TWzM.js';
9
9
  import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
10
10
  import { P2TR } from '@scure/btc-signer/payment.js';
11
11
  import { Transaction as Transaction$1, OP, Script, ScriptType } from '@scure/btc-signer';
@@ -720,6 +720,8 @@ type ExcludableVtxo = {
720
720
  vout: number;
721
721
  script?: string;
722
722
  };
723
+ /** {@link gatedContracts}' answer, as callers that only read it should take it. */
724
+ type GatedContracts = ReadonlyMap<string, string>;
723
725
  /**
724
726
  * Why generic spending skips a VTXO, or `undefined` when it does not — phrased
725
727
  * to follow the outpoint in a log line.
@@ -741,7 +743,7 @@ type VtxoExclusion = (vtxo: ExcludableVtxo) => string | undefined;
741
743
  * already available here, so the message can tell them apart instead of
742
744
  * collapsing both into one sentence that reads as the same case either way.
743
745
  */
744
- declare function gateExclusion(gated: ReadonlyMap<string, string>): VtxoExclusion;
746
+ declare function gateExclusion(gated: GatedContracts): VtxoExclusion;
745
747
  /** Outpoints excluded for a shared reason, e.g. an intent-lock set. */
746
748
  declare function outpointExclusion(outpoints: ReadonlySet<string>, reason: string): VtxoExclusion;
747
749
  /**
@@ -1021,6 +1023,12 @@ declare class ContractRepositoryImpl implements ContractRepository {
1021
1023
  [Symbol.asyncDispose](): Promise<void>;
1022
1024
  }
1023
1025
 
1026
+ interface WalletRestoreHook {
1027
+ id: string;
1028
+ restore(wallet: IWallet): Promise<void>;
1029
+ }
1030
+ declare function registerWalletRestoreHook(wallet: IWallet, hook: WalletRestoreHook): () => void;
1031
+
1024
1032
  /**
1025
1033
  * Domain separator for the preimage derivation.
1026
1034
  *
@@ -3173,6 +3181,13 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
3173
3181
  /**
3174
3182
  * Build transaction history from cached virtual outputs, hitting the indexer only for
3175
3183
  * uncached timestamps. Best-effort, like the plain Wallet path.
3184
+ *
3185
+ * Takes its own {@link repoSnapshot} rather than a caller-supplied VTXO
3186
+ * list: the coins and the gate that judges them have to come off one read
3187
+ * or they answer about different instants, and being the worker's only
3188
+ * history builder means neither caller can supply one without the other.
3189
+ * The snapshot and the boarding read are independent, so they run together
3190
+ * — the same pairing `handleGetBalance` makes.
3176
3191
  */
3177
3192
  private buildTransactionHistoryFromCache;
3178
3193
  private ensureContractEventBroadcasting;
@@ -3463,6 +3478,7 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
3463
3478
  readonly identity: Identity;
3464
3479
  private readonly _assetManager;
3465
3480
  private readonly hasDelegate;
3481
+ private _restoreInFlight?;
3466
3482
  protected constructor(serviceWorker: ServiceWorker, identity: Identity, walletRepository: WalletRepository, contractRepository: ContractRepository, messageTag: string, hasDelegate: boolean);
3467
3483
  get assetManager(): IAssetManager;
3468
3484
  protected serializeIdentity(): Promise<SerializedIdentity>;
@@ -3540,6 +3556,7 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
3540
3556
  restore(opts?: {
3541
3557
  gapLimit?: number;
3542
3558
  }): Promise<void>;
3559
+ private _restoreWorkerWallet;
3543
3560
  send(...args: [SendParams] | [Recipient, ...Recipient[]]): Promise<string>;
3544
3561
  getDelegateManager(): Promise<IDelegateManager | undefined>;
3545
3562
  /** @deprecated alias for @see ServiceWorkerWallet.getDelegateManager */
@@ -4480,6 +4497,12 @@ declare class ArkadeCash {
4480
4497
  *
4481
4498
  * The emulator is a signing service that executes Arkade scripts
4482
4499
  * and co-signs transactions when the scripts pass validation.
4500
+ *
4501
+ * The read here goes through `baseFetch`, the SDK's shared fetch boundary, so
4502
+ * it picks up whatever policy that boundary carries. The four submit calls
4503
+ * deliberately do not: aborting a submit would not tell the caller whether the
4504
+ * emulator signed, and none of them has a way to find out, so they stay on the
4505
+ * global `fetch` with their transport-error type unchanged.
4483
4506
  */
4484
4507
 
4485
4508
  interface EmulatorInfo {
@@ -6154,6 +6177,18 @@ interface RouteQuote {
6154
6177
  fee: number;
6155
6178
  /** `amount + fee` — what leaves the wallet. */
6156
6179
  total: number;
6180
+ /**
6181
+ * Unix seconds after which the counterparty stops honouring this quote.
6182
+ *
6183
+ * Absent means "nothing to observe", not "never expires": a rail with no
6184
+ * counterparty and no quote book — an Arkade transfer, an asset transfer, a
6185
+ * collaborative exit — has no validity to state. A caller holding a quote
6186
+ * across user think-time should read absence as "no check possible", and must
6187
+ * still expect {@link send} to refuse either way: the swap rails re-check
6188
+ * validity there, which is the only point that can judge it against the
6189
+ * moment of spending.
6190
+ */
6191
+ validUntil?: number;
6157
6192
  /**
6158
6193
  * @experimental The asset shape is provisional. The v2 swap client models
6159
6194
  * assets as `give`/`take`/`amountOn` over `AssetRef`, and the two
@@ -6453,6 +6488,15 @@ declare class FetchError extends Error {
6453
6488
  cause?: unknown;
6454
6489
  });
6455
6490
  }
6491
+ /**
6492
+ * Deadline applied to a read that carries no `AbortSignal` of its own.
6493
+ *
6494
+ * `fetch` has no default timeout, so a connection the network dropped silently
6495
+ * stays pending until the runtime gives up — and every bound built on top of it
6496
+ * waits with it. A retry ladder, a bounded queue or a mutex only work if the
6497
+ * call underneath them terminates.
6498
+ */
6499
+ declare const READ_TIMEOUT_MS = 30000;
6456
6500
 
6457
6501
  /**
6458
6502
  * How long a blocked upgrade waits before the open is reported as failed.
@@ -6662,4 +6706,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
6662
6706
  burn(params: BurnParams): Promise<string>;
6663
6707
  }
6664
6708
 
6665
- export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetNewAddressesOptions, GetVtxosFilter, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WatchedScript, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveAssetAmount, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
6709
+ export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetNewAddressesOptions, GetVtxosFilter, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, READ_TIMEOUT_MS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, type WalletRestoreHook, WatchedScript, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, requiresMigration, resolveAssetAmount, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, walletFeeSource };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, PrevTxUnavailableError, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isContractVtxoEvent, isCooperativelyMigratable, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveAssetAmount, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, withPrevTxs } from './chunk-E5JNYFOF.js';
2
- export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-ZT3EM4CE.js';
3
- export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-ALZ2CZ3T.js';
4
- export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, REGTEST_EMULATOR_PUBKEY, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, assertAllowedSighashTypes, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getArkPsbtFields, getConfiguredEventSource, getNetwork, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-2ZX4Z2IP.js';
1
+ export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, PrevTxUnavailableError, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isContractVtxoEvent, isCooperativelyMigratable, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, promisifyRequest, provisionClaimSecret, provisionRefundKey, registerWalletRestoreHook, requiresMigration, resolveAssetAmount, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, walletFeeSource, withPrevTxs } from './chunk-BHLYB44A.js';
2
+ export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-IGER5FPC.js';
3
+ export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-CB6QPAO5.js';
4
+ export { ArkAddress, ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, BITCOIN_EMULATOR_PUBKEY, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, ConditionWitness, CosignerPublicKey, DigestMismatchError, EventSourceUnavailableError, FetchError, Intent, MUTINYNET_EMULATOR_PUBKEY, MultisigTapscript, PrevArkTxField, PrevoutTxField, ProviderUnavailableError, READ_TIMEOUT_MS, REGTEST_EMULATOR_PUBKEY, RestArkProvider, ServerResponseMismatchError, SettlementEventType, TapTreeCoder, Transaction, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, assembleBtcdTaprootTree, assertAllowedSighashTypes, buildVersion, canRecoverOnchain, canSpendOffchain, canSweepOnchain, configureEventSource, decodeTapscript, defaultEmulatorPubkey, getArkPsbtFields, getConfiguredEventSource, getNetwork, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-5GQFYVWP.js';
5
5
  import './chunk-NSBPE2FW.js';
6
6
  //# sourceMappingURL=index.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkMK5EPTTB_cjs = require('../../chunk-MK5EPTTB.cjs');
4
- require('../../chunk-FM263GKH.cjs');
5
- require('../../chunk-P6EXRY5L.cjs');
6
- require('../../chunk-5J5PDZRR.cjs');
3
+ var chunkU5I3ITV7_cjs = require('../../chunk-U5I3ITV7.cjs');
4
+ require('../../chunk-4C5PMGBB.cjs');
5
+ require('../../chunk-NPM5YZBC.cjs');
6
+ require('../../chunk-6FTHFJAN.cjs');
7
7
  require('../../chunk-5BLDMQED.cjs');
8
8
 
9
9
  // src/repositories/realm/walletRepository.ts
@@ -38,7 +38,7 @@ var RealmWalletRepository = class {
38
38
  await this.ensureInit();
39
39
  this.realm.write(() => {
40
40
  for (const vtxo of vtxos) {
41
- const s = chunkMK5EPTTB_cjs.serializeVtxo(vtxo);
41
+ const s = chunkU5I3ITV7_cjs.serializeVtxo(vtxo);
42
42
  this.realm.create(
43
43
  "ArkVtxo",
44
44
  {
@@ -86,7 +86,7 @@ var RealmWalletRepository = class {
86
86
  throw new Error("RealmWalletRepository requires an address");
87
87
  }
88
88
  for (const vtxo of vtxos) {
89
- if (!chunkMK5EPTTB_cjs.isVtxoForScript(vtxo, key.script)) {
89
+ if (!chunkU5I3ITV7_cjs.isVtxoForScript(vtxo, key.script)) {
90
90
  throw new Error(
91
91
  `VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
92
92
  );
@@ -111,7 +111,7 @@ var RealmWalletRepository = class {
111
111
  await this.ensureInit();
112
112
  this.realm.write(() => {
113
113
  for (const utxo of utxos) {
114
- const s = chunkMK5EPTTB_cjs.serializeUtxo(utxo);
114
+ const s = chunkU5I3ITV7_cjs.serializeUtxo(utxo);
115
115
  this.realm.create(
116
116
  "ArkUtxo",
117
117
  {
@@ -164,7 +164,7 @@ var RealmWalletRepository = class {
164
164
  amount: tx.amount,
165
165
  settled: tx.settled,
166
166
  createdAt: tx.createdAt,
167
- assetsJson: tx.assets ? JSON.stringify(chunkMK5EPTTB_cjs.serializeAssets(tx.assets)) : null
167
+ assetsJson: tx.assets ? JSON.stringify(chunkU5I3ITV7_cjs.serializeAssets(tx.assets)) : null
168
168
  },
169
169
  "modified"
170
170
  );
@@ -234,9 +234,9 @@ function vtxoObjectToDomain(obj) {
234
234
  // Post-migration every row has `script`, but the backfill is
235
235
  // idempotent: derive from `address` if the legacy column is still
236
236
  // null (e.g. the migration hasn't run yet on this handle).
237
- script: obj.script ?? chunkMK5EPTTB_cjs.scriptFromArkAddress(obj.address)
237
+ script: obj.script ?? chunkU5I3ITV7_cjs.scriptFromArkAddress(obj.address)
238
238
  };
239
- return chunkMK5EPTTB_cjs.deserializeVtxo(serialized);
239
+ return chunkU5I3ITV7_cjs.deserializeVtxo(serialized);
240
240
  }
241
241
  function utxoObjectToDomain(obj) {
242
242
  const serialized = {
@@ -255,7 +255,7 @@ function utxoObjectToDomain(obj) {
255
255
  status: JSON.parse(obj.statusJson),
256
256
  extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
257
257
  };
258
- return chunkMK5EPTTB_cjs.deserializeUtxo(serialized);
258
+ return chunkU5I3ITV7_cjs.deserializeUtxo(serialized);
259
259
  }
260
260
  function txObjectToDomain(obj) {
261
261
  const tx = {
@@ -270,7 +270,7 @@ function txObjectToDomain(obj) {
270
270
  createdAt: obj.createdAt
271
271
  };
272
272
  if (obj.assetsJson) {
273
- tx.assets = chunkMK5EPTTB_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
273
+ tx.assets = chunkU5I3ITV7_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
274
274
  }
275
275
  return tx;
276
276
  }
@@ -450,7 +450,7 @@ var RealmIntentRepository = class {
450
450
  const clashes = [
451
451
  ...this.realm.objects("ArkIntent").filtered("intentId == $0", intent.intentId)
452
452
  ].map(toIntent);
453
- chunkMK5EPTTB_cjs.assertIntentIdUnique(intent, clashes);
453
+ chunkU5I3ITV7_cjs.assertIntentIdUnique(intent, clashes);
454
454
  }
455
455
  this.realm.create(
456
456
  "ArkIntent",
@@ -479,14 +479,14 @@ var RealmIntentRepository = class {
479
479
  }
480
480
  async getIntents(filter) {
481
481
  const all = [...this.realm.objects("ArkIntent")].map(toIntent).sort((a, b) => a.createdAt - b.createdAt || a.intentTxId.localeCompare(b.intentTxId));
482
- const out = filter ? all.filter((i) => chunkMK5EPTTB_cjs.intentMatchesFilter(i, filter)) : all;
483
- const { skip, end } = chunkMK5EPTTB_cjs.intentPageBounds(filter, out.length);
482
+ const out = filter ? all.filter((i) => chunkU5I3ITV7_cjs.intentMatchesFilter(i, filter)) : all;
483
+ const { skip, end } = chunkU5I3ITV7_cjs.intentPageBounds(filter, out.length);
484
484
  return out.slice(skip, end);
485
485
  }
486
486
  async getLockedVtxoOutpoints() {
487
487
  const out = [];
488
488
  for (const o of [...this.realm.objects("ArkIntent")].map(toIntent))
489
- if (!chunkMK5EPTTB_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
489
+ if (!chunkU5I3ITV7_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
490
490
  return out;
491
491
  }
492
492
  async [Symbol.asyncDispose]() {
@@ -528,7 +528,7 @@ var RealmVirtualTxRepository = class {
528
528
  txid: t.txid,
529
529
  psbt: t.psbt ?? prev?.psbt ?? null,
530
530
  expiresAt: t.expiresAt ?? prev?.expiresAt ?? null,
531
- type: chunkMK5EPTTB_cjs.mergeChainedTxType(t.type, prev?.type)
531
+ type: chunkU5I3ITV7_cjs.mergeChainedTxType(t.type, prev?.type)
532
532
  },
533
533
  "modified"
534
534
  );
@@ -762,7 +762,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
762
762
  for (let i = 0; i < newVtxos.length; i++) {
763
763
  const newVtxo = newVtxos[i];
764
764
  if (!newVtxo.script) {
765
- newVtxo.script = chunkMK5EPTTB_cjs.scriptFromArkAddress(newVtxo.address);
765
+ newVtxo.script = chunkU5I3ITV7_cjs.scriptFromArkAddress(newVtxo.address);
766
766
  }
767
767
  }
768
768
  const oldHasVirtualTx = Array.isArray(oldRealm?.schema) && oldRealm.schema.some((s) => s.name === "ArkVirtualTx");
@@ -779,7 +779,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
779
779
 
780
780
  Object.defineProperty(exports, "ChainedTxType", {
781
781
  enumerable: true,
782
- get: function () { return chunkMK5EPTTB_cjs.ChainedTxType; }
782
+ get: function () { return chunkU5I3ITV7_cjs.ChainedTxType; }
783
783
  });
784
784
  exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
785
785
  exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;
@@ -1,5 +1,5 @@
1
- import { W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, C as ContractRepository, z as ContractFilter, v as Contract, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch } from '../../index-CyGnhCSS.cjs';
2
- export { L as ChainedTxType } from '../../index-CyGnhCSS.cjs';
1
+ import { W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, C as ContractRepository, z as ContractFilter, v as Contract, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch } from '../../index-Dg0-TvBQ.cjs';
2
+ export { L as ChainedTxType } from '../../index-Dg0-TvBQ.cjs';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
@@ -1,5 +1,5 @@
1
- import { W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, C as ContractRepository, z as ContractFilter, v as Contract, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch } from '../../index-CyGnhCSS.js';
2
- export { L as ChainedTxType } from '../../index-CyGnhCSS.js';
1
+ import { W as WalletRepository, w as ExtendedVirtualCoin, x as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, y as WalletState, C as ContractRepository, z as ContractFilter, v as Contract, B as IntentRepository, D as ArkIntent, F as IntentFilter, O as Outpoint, H as VirtualTxRepository, J as VirtualTx, K as VtxoBranch } from '../../index-Dg0-TvBQ.js';
2
+ export { L as ChainedTxType } from '../../index-Dg0-TvBQ.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer';
@@ -1,8 +1,8 @@
1
- import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-E5JNYFOF.js';
2
- export { ChainedTxType } from '../../chunk-E5JNYFOF.js';
3
- import '../../chunk-ZT3EM4CE.js';
4
- import '../../chunk-ALZ2CZ3T.js';
5
- import '../../chunk-2ZX4Z2IP.js';
1
+ import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-BHLYB44A.js';
2
+ export { ChainedTxType } from '../../chunk-BHLYB44A.js';
3
+ import '../../chunk-IGER5FPC.js';
4
+ import '../../chunk-CB6QPAO5.js';
5
+ import '../../chunk-5GQFYVWP.js';
6
6
  import '../../chunk-NSBPE2FW.js';
7
7
 
8
8
  // src/repositories/realm/walletRepository.ts