@arkade-os/sdk 0.4.68 → 0.4.69

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 (74) hide show
  1. package/README.md +33 -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-DaZlVTbM.d.ts → asyncStorageTaskQueue-BgUJN-3X.d.ts} +1 -1
  9. package/dist/{asyncStorageTaskQueue-B2CcXIHU.d.cts → asyncStorageTaskQueue-Cstx6hS7.d.cts} +1 -1
  10. package/dist/{chunk-45FKMOJH.js → chunk-2PPL3O7Z.js} +3 -3
  11. package/dist/{chunk-45FKMOJH.js.map → chunk-2PPL3O7Z.js.map} +1 -1
  12. package/dist/{chunk-EJOFL5WH.cjs → chunk-5MLC2HU3.cjs} +3 -3
  13. package/dist/{chunk-EJOFL5WH.cjs.map → chunk-5MLC2HU3.cjs.map} +1 -1
  14. package/dist/{chunk-WCJVKFAP.cjs → chunk-EBYCTLET.cjs} +787 -479
  15. package/dist/chunk-EBYCTLET.cjs.map +1 -0
  16. package/dist/{chunk-PJR63FTK.cjs → chunk-GVHUHTRH.cjs} +17 -17
  17. package/dist/{chunk-PJR63FTK.cjs.map → chunk-GVHUHTRH.cjs.map} +1 -1
  18. package/dist/{chunk-4KCVS4ZN.cjs → chunk-HQ4DMGA4.cjs} +10 -10
  19. package/dist/{chunk-4KCVS4ZN.cjs.map → chunk-HQ4DMGA4.cjs.map} +1 -1
  20. package/dist/{chunk-4CMXV5SF.js → chunk-L5SCQYHF.js} +3 -3
  21. package/dist/{chunk-4CMXV5SF.js.map → chunk-L5SCQYHF.js.map} +1 -1
  22. package/dist/{chunk-G4I6PU5H.js → chunk-MNMPGEK2.js} +4 -4
  23. package/dist/{chunk-G4I6PU5H.js.map → chunk-MNMPGEK2.js.map} +1 -1
  24. package/dist/{chunk-VBHXBI7F.js → chunk-TA7XLEP2.js} +357 -50
  25. package/dist/chunk-TA7XLEP2.js.map +1 -0
  26. package/dist/{chunk-6YUACVX4.cjs → chunk-WIFL5QYZ.cjs} +49 -49
  27. package/dist/{chunk-6YUACVX4.cjs.map → chunk-WIFL5QYZ.cjs.map} +1 -1
  28. package/dist/{chunk-GQ4NMQGR.js → chunk-XLWDX7QZ.js} +4 -4
  29. package/dist/{chunk-GQ4NMQGR.js.map → chunk-XLWDX7QZ.js.map} +1 -1
  30. package/dist/{chunk-JGMSZIE4.cjs → chunk-XQPN5YP2.cjs} +17 -17
  31. package/dist/{chunk-JGMSZIE4.cjs.map → chunk-XQPN5YP2.cjs.map} +1 -1
  32. package/dist/{chunk-33Q2RFET.js → chunk-YG7T6LI3.js} +3 -3
  33. package/dist/{chunk-33Q2RFET.js.map → chunk-YG7T6LI3.js.map} +1 -1
  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-AomVWxO_.d.ts → delegate-BPdzTbwN.d.ts} +1 -1
  39. package/dist/{delegate-Bffc5f54.d.cts → delegate-DrwIar11.d.cts} +1 -1
  40. package/dist/{hdWalletCapable-DZdIVa23.d.ts → hdWalletCapable-D4WH35z0.d.cts} +49 -5
  41. package/dist/{hdWalletCapable-B5nRs3RH.d.cts → hdWalletCapable-DyxCiNVE.d.ts} +49 -5
  42. package/dist/{index-nfyQM33h.d.cts → index-BqhpAqqj.d.cts} +2 -2
  43. package/dist/{index-jouvy8FD.d.ts → index-TZJvbIaA.d.ts} +2 -2
  44. package/dist/{index-C7RZCfoY.d.cts → index-dWRqYSdS.d.cts} +53 -1
  45. package/dist/{index-C7RZCfoY.d.ts → index-dWRqYSdS.d.ts} +53 -1
  46. package/dist/index.cjs +294 -290
  47. package/dist/index.d.cts +25 -8
  48. package/dist/index.d.ts +25 -8
  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-D2vnpPBT.d.cts → taskRunner-CzYKyJ9c.d.cts} +1 -1
  59. package/dist/{taskRunner-DuwK9t8O.d.ts → taskRunner-D2fnbqYw.d.ts} +1 -1
  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-VBHXBI7F.js.map +0 -1
  74. package/dist/chunk-WCJVKFAP.cjs.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 PathSelection, h as NewAddress, aK as ContractEvent, aL as AssetDetails, aM as IssuanceResult, aN as DelegateInfo, aO as MigrationGlobalSkipReason, aP as MigrationLegSkipReason, aQ as SignerStatus, a3 as IReadonlyWallet, d as ActivityRegistry, aa as IReadonlyAssetManager, aR as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, m as IAssetManager, l as SendParams, i as IDelegateManager, aS as IVtxoManager, a5 as OnchainProvider, M as Network, ad as NetworkName, ai as Coin, aT as ExplorerTransaction, ae as ArkInfo, ao as SignedIntent, ap as Intent, aU as TreeNonces, aV as TreePartialSigs, T as TxNotificationEvent, aW as PendingTx, t as TapLeafScript, aX as EncodedVtxoScript, P as CSVMultisigTapscript, s as RelativeTimelock, V as VtxoScript, aY as Status, af as ArkAddress, aZ as ChainTx, r as IndexerProvider, X as TxTree, a_ as PathContext } from './index-C7RZCfoY.cjs';
2
- export { a$ as ActivityIntent, b0 as ActivityResolver, b1 as ArkIntentState, b2 as ArkTapscript, b3 as AssetMetadata, b4 as BITCOIN_EMULATOR_PUBKEY, b5 as BaseWalletConfig, $ as BatchFailedEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, b6 as BatchInfo, b7 as BatchSignableIdentity, Q as BatchStartedEvent, b8 as CLTVMultisigTapscript, b9 as CandidateDeps, ba as ChainTxType, L as ChainedTxType, bb as CommitmentTx, bc as ConditionCSVMultisigTapscript, bd as ConditionMultisigTapscript, be as ContractBalance, bf as ContractEventCallback, bg as ContractHandler, aj as ContractManager, ak as ContractManagerConfig, bh as ContractState, bi as ContractVtxo, bj as ContractWatcher, bk as DEFAULT_VTXO_PAGE_SIZE, bl as DelegateManagerImpl, bm as DelegateOptions, a6 as DelegateProvider, bn as DelegatorManagerImpl, bo as DelegatorProvider, bp as DeprecatedSignerMigrationReport, bq as DeprecatedSignerReport, br as DigestMismatchError, bs as Discoverable, bt as DiscoveredContract, bu as DiscoveryDeps, bv as ESPLORA_URL, bw as EsploraProvider, bx as EventSourceCapable, by as EventSourceFactory, bz as EventSourceLike, bA as EventSourceUnavailableError, a8 as ExitCaptureMode, bB as ExitChainResolver, a9 as ExitDataSource, bC as ExtendedContractVtxo, bD as GroupMembership, bE as HandlerError, bF as IDelegatorManager, bG as INTENT_TERMINAL_STATES, bH as IndexerTxType, bI as IntentCoin, bJ as KnownMetadata, bK as MUTINYNET_EMULATOR_PUBKEY, bL as MigrateDeprecatedSignerOptions, bM as MigrationLegReport, bN as MigrationVtxoRef, bO as MultisigTapscript, bP as NewAddressType, bQ as Nonces, bR as Output, bS as PageResponse, bT as PaginationOptions, bU as PartialSig, bV as PrevTxSource, bW as PrevTxUnavailableError, bX as ProviderClass, bY as REGTEST_EMULATOR_PUBKEY, bZ as RawTxSource, a7 as ReadonlyWalletConfig, n as RestArkProvider, b_ as RestDelegateProvider, b$ as RestDelegatorProvider, o as RestIndexerProvider, c0 as ScanContractsOptions, c1 as ScanResult, c2 as ScheduledSession, c3 as SettlementEventType, c4 as SignRequest, c5 as SignerClassification, c6 as SignerSet, c7 as SubscriptionEvent, c8 as SubscriptionHeartbeat, p as SubscriptionResponse, c9 as SweepTxNotification, ca as TapLeaves, cb as TapTreeCoder, cc as TapscriptType, aq as TimeHeight, Y as TreeNoncesEvent, a1 as TreeSignatureEvent, U as TreeSigningStartedEvent, a0 as TreeTxEvent, cd as Tx, ce as TxHistoryRecord, cf as TxKey, cg as TxNotification, ch as TxTag, ci as TxTreeNode, cj as TxType, ck as VirtualStatus, cl as Vtxo, cm as VtxoChain, am as VtxoManager, cn as VtxoType, b as WalletConfig, co as WalletMode, cp as WithPrevTx, cq as assertAllowedSighashTypes, cr as assetMintResolver, cs as attachPrevArkTxs, ct as attachPrevoutTxs, cu as boardingResolver, cv as canRecoverOnchain, cw as canSpendOffchain, cx as canSweepOnchain, cy as classifyAgainstSignerSet, cz as classifyContractSigner, cA as collabExitResolver, cB as configureEventSource, cC as createDefaultActivityRegistry, cD as createExitChainResolver, cE as decodeTapscript, cF as defaultEmulatorPubkey, cG as getConfiguredEventSource, cH as getNetwork, cI as getRandomId, cJ as getSequence, cK as hasCandidates, cL as hasTerminalSpend, cM as isBatchSignable, cN as isCooperativelyMigratable, cO as isDiscoverable, cP as isEventSourceUnavailableError, cQ as isExpired, cR as isPastExpiry, cS as isRecoverable, cT as isSigningIdentity, cU as isSpendable, cV as isSubdust, cW as isTerminalIntentState, cX as isVirtualCoin, cY as isVtxoExpiringSoon, cZ as networks, c_ as resolveEmulatorPubkey, c$ as resolveEventSource, d0 as resolvePrevTxs, d1 as scriptFromTapLeafScript, d2 as signerSetFromInfo, d3 as toXOnlySignerHex, d4 as withPrevTxs } from './index-C7RZCfoY.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-B5nRs3RH.cjs';
4
- export { f as ArkError, g as ArkErrorName, h as ArkadeCashClaimResult, i as ArkadeCashCreateError, j as ArkadeCashUnclaimedReason, k as ArkadeCashUnclaimedVtxo, l as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, m as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, n as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, o as ProviderKind, p as ProviderUnavailableError, q as REGTEST_MIN_BATCH_EXPIRY_SECONDS, r as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, s as ServerInfoSource, t as ServerResponseMismatchError, u as WalletCannotAllocateAddressError, v as assertValidBatchExpiry, w as assertValidServerUnrollScript, x as defaultBatchExpiryPolicy, y as defaultCheckpointExitDelayPolicy, z as isAddressAllocationCapable, E as isArkError, G as isHDAllocationCapable, J as isHDWalletCapable, K as maybeArkError, L as resolveBatchExpiryPolicy, N as resolveCheckpointExitDelayPolicy, O as resolveDescriptorSigner, Q as selectVirtualCoins, T as signingDescriptorIndex, U as strictSigningDescriptorIndex, V as waitForIncomingFunds } from './hdWalletCapable-B5nRs3RH.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-nfyQM33h.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-nfyQM33h.cjs';
7
- import { D as DefaultVtxo } from './delegate-Bffc5f54.cjs';
8
- export { a as DelegateVtxo } from './delegate-Bffc5f54.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 PathSelection, h as NewAddress, aK as ContractEvent, aL as AssetDetails, aM as IssuanceResult, aN as DelegateInfo, aO as MigrationGlobalSkipReason, aP as MigrationLegSkipReason, aQ as SignerStatus, a3 as IReadonlyWallet, d as ActivityRegistry, aa as IReadonlyAssetManager, aR as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, m as IAssetManager, l as SendParams, i as IDelegateManager, aS as IVtxoManager, a5 as OnchainProvider, M as Network, ad as NetworkName, ai as Coin, aT as ExplorerTransaction, ae as ArkInfo, ao as SignedIntent, ap as Intent, aU as TreeNonces, aV as TreePartialSigs, T as TxNotificationEvent, aW as PendingTx, t as TapLeafScript, aX as EncodedVtxoScript, P as CSVMultisigTapscript, s as RelativeTimelock, V as VtxoScript, aY as Status, af as ArkAddress, aZ as ChainTx, r as IndexerProvider, X as TxTree, a_ as PathContext } from './index-dWRqYSdS.cjs';
2
+ export { a$ as ActivityIntent, b0 as ActivityResolver, b1 as ArkIntentState, b2 as ArkTapscript, b3 as AssetMetadata, b4 as BITCOIN_EMULATOR_PUBKEY, b5 as BaseWalletConfig, $ as BatchFailedEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, b6 as BatchInfo, b7 as BatchSignableIdentity, Q as BatchStartedEvent, b8 as CLTVMultisigTapscript, b9 as CandidateDeps, ba as ChainTxType, L as ChainedTxType, bb as CommitmentTx, bc as ConditionCSVMultisigTapscript, bd as ConditionMultisigTapscript, be as ContractBalance, bf as ContractEventCallback, bg as ContractHandler, aj as ContractManager, ak as ContractManagerConfig, bh as ContractState, bi as ContractVtxo, bj as ContractWatcher, bk as DEFAULT_VTXO_PAGE_SIZE, bl as DelegateManagerImpl, bm as DelegateOptions, a6 as DelegateProvider, bn as DelegatorManagerImpl, bo as DelegatorProvider, bp as DeprecatedSignerMigrationReport, bq as DeprecatedSignerReport, br as DigestMismatchError, bs as Discoverable, bt as DiscoveredContract, bu as DiscoveryDeps, bv as ESPLORA_URL, bw as EsploraProvider, bx as EventSourceCapable, by as EventSourceFactory, bz as EventSourceLike, bA as EventSourceUnavailableError, a8 as ExitCaptureMode, bB as ExitChainResolver, a9 as ExitDataSource, bC as ExtendedContractVtxo, bD as GroupMembership, bE as HandlerError, bF as IDelegatorManager, bG as INTENT_TERMINAL_STATES, bH as IndexerTxType, bI as IntentCoin, bJ as KnownMetadata, bK as MUTINYNET_EMULATOR_PUBKEY, bL as MigrateDeprecatedSignerOptions, bM as MigrationLegReport, bN as MigrationVtxoRef, bO as MultisigTapscript, bP as NewAddressType, bQ as Nonces, bR as Output, bS as PageResponse, bT as PaginationOptions, bU as PartialSig, bV as PrevTxSource, bW as PrevTxUnavailableError, bX as ProviderClass, bY as REGTEST_EMULATOR_PUBKEY, bZ as RawTxSource, a7 as ReadonlyWalletConfig, n as RestArkProvider, b_ as RestDelegateProvider, b$ as RestDelegatorProvider, o as RestIndexerProvider, c0 as ScanContractsOptions, c1 as ScanResult, c2 as ScheduledSession, c3 as SettlementEventType, c4 as SignRequest, c5 as SignerClassification, c6 as SignerSet, c7 as SubscriptionEvent, c8 as SubscriptionHeartbeat, p as SubscriptionResponse, c9 as SweepTxNotification, ca as TapLeaves, cb as TapTreeCoder, cc as TapscriptType, aq as TimeHeight, Y as TreeNoncesEvent, a1 as TreeSignatureEvent, U as TreeSigningStartedEvent, a0 as TreeTxEvent, cd as Tx, ce as TxHistoryRecord, cf as TxKey, cg as TxNotification, ch as TxTag, ci as TxTreeNode, cj as TxType, ck as VirtualStatus, cl as Vtxo, cm as VtxoChain, am as VtxoManager, cn as VtxoType, b as WalletConfig, co as WalletMode, cp as WithPrevTx, cq as assertAllowedSighashTypes, cr as assetMintResolver, cs as attachPrevArkTxs, ct as attachPrevoutTxs, cu as boardingResolver, cv as canRecoverOnchain, cw as canSpendOffchain, cx as canSweepOnchain, cy as classifyAgainstSignerSet, cz as classifyContractSigner, cA as collabExitResolver, cB as configureEventSource, cC as createDefaultActivityRegistry, cD as createExitChainResolver, cE as decodeTapscript, cF as defaultEmulatorPubkey, cG as getConfiguredEventSource, cH as getNetwork, cI as getRandomId, cJ as getSequence, cK as hasCandidates, cL as hasTerminalSpend, cM as isBatchSignable, cN as isCooperativelyMigratable, cO as isDiscoverable, cP as isEventSourceUnavailableError, cQ as isExpired, cR as isPastExpiry, cS as isRecoverable, cT as isSigningIdentity, cU as isSpendable, cV as isSubdust, cW as isTerminalIntentState, cX as isVirtualCoin, cY as isVtxoExpiringSoon, cZ as networks, c_ as resolveEmulatorPubkey, c$ as resolveEventSource, d0 as resolvePrevTxs, d1 as scriptFromTapLeafScript, d2 as signerSetFromInfo, d3 as toXOnlySignerHex, d4 as withPrevTxs } from './index-dWRqYSdS.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-D4WH35z0.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-D4WH35z0.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-BqhpAqqj.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-BqhpAqqj.cjs';
7
+ import { D as DefaultVtxo } from './delegate-DrwIar11.cjs';
8
+ export { a as DelegateVtxo } from './delegate-DrwIar11.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';
@@ -3889,6 +3889,8 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
3889
3889
  private ws;
3890
3890
  private network;
3891
3891
  private chain;
3892
+ private mtpCache?;
3893
+ private mtpInflight?;
3892
3894
  constructor(ws: ElectrumWS, network: Network);
3893
3895
  getCoins(address: string): Promise<Coin[]>;
3894
3896
  getFeeRate(): Promise<number | undefined>;
@@ -3949,11 +3951,24 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
3949
3951
  blockTime: number;
3950
3952
  blockHeight: number;
3951
3953
  }>;
3954
+ /** `time` is median-time-past, per {@link OnchainProvider.getChainTip};
3955
+ * Electrum serves raw headers and no MTP, so it is computed here. */
3952
3956
  getChainTip(): Promise<{
3953
3957
  height: number;
3954
3958
  time: number;
3955
3959
  hash: string;
3956
3960
  }>;
3961
+ /**
3962
+ * Consensus's `GetMedianTimePast`, ending at and including `height`.
3963
+ *
3964
+ * Cached per tip HASH, not height: this runs on every balance read, and
3965
+ * hashing means a reorg at the same height recomputes rather than serving
3966
+ * the orphaned chain's median.
3967
+ */
3968
+ private medianTimePast;
3969
+ /** Degrades to the tip's `nTime` rather than throwing — a caller that
3970
+ * cannot read the tip at all is worse off. */
3971
+ private readMedianTimePast;
3957
3972
  watchAddresses(addresses: string[], eventCallback: (txs: ExplorerTransaction[]) => void): Promise<() => void>;
3958
3973
  /** Close the underlying WebSocket connection. */
3959
3974
  close(): Promise<void>;
@@ -6087,6 +6102,8 @@ interface PaymentHandle {
6087
6102
  *
6088
6103
  * Rails whose underlying primitive *deducts* its fee (the collaborative exit)
6089
6104
  * gross the amount up to honour this; rails that add it on top pass it through.
6105
+ * A rail that does not perform the deducting spend cannot gross up to a fee it
6106
+ * never chooses, and flags that instead: see `claimFeeDeductedFromPayout`.
6090
6107
  *
6091
6108
  * `fee` is a pre-send estimate wherever the true cost is only fixed later: the
6092
6109
  * swap rails quote from Boltz's advertised pricing and are superseded by the
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 PathSelection, h as NewAddress, aK as ContractEvent, aL as AssetDetails, aM as IssuanceResult, aN as DelegateInfo, aO as MigrationGlobalSkipReason, aP as MigrationLegSkipReason, aQ as SignerStatus, a3 as IReadonlyWallet, d as ActivityRegistry, aa as IReadonlyAssetManager, aR as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, m as IAssetManager, l as SendParams, i as IDelegateManager, aS as IVtxoManager, a5 as OnchainProvider, M as Network, ad as NetworkName, ai as Coin, aT as ExplorerTransaction, ae as ArkInfo, ao as SignedIntent, ap as Intent, aU as TreeNonces, aV as TreePartialSigs, T as TxNotificationEvent, aW as PendingTx, t as TapLeafScript, aX as EncodedVtxoScript, P as CSVMultisigTapscript, s as RelativeTimelock, V as VtxoScript, aY as Status, af as ArkAddress, aZ as ChainTx, r as IndexerProvider, X as TxTree, a_ as PathContext } from './index-C7RZCfoY.js';
2
- export { a$ as ActivityIntent, b0 as ActivityResolver, b1 as ArkIntentState, b2 as ArkTapscript, b3 as AssetMetadata, b4 as BITCOIN_EMULATOR_PUBKEY, b5 as BaseWalletConfig, $ as BatchFailedEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, b6 as BatchInfo, b7 as BatchSignableIdentity, Q as BatchStartedEvent, b8 as CLTVMultisigTapscript, b9 as CandidateDeps, ba as ChainTxType, L as ChainedTxType, bb as CommitmentTx, bc as ConditionCSVMultisigTapscript, bd as ConditionMultisigTapscript, be as ContractBalance, bf as ContractEventCallback, bg as ContractHandler, aj as ContractManager, ak as ContractManagerConfig, bh as ContractState, bi as ContractVtxo, bj as ContractWatcher, bk as DEFAULT_VTXO_PAGE_SIZE, bl as DelegateManagerImpl, bm as DelegateOptions, a6 as DelegateProvider, bn as DelegatorManagerImpl, bo as DelegatorProvider, bp as DeprecatedSignerMigrationReport, bq as DeprecatedSignerReport, br as DigestMismatchError, bs as Discoverable, bt as DiscoveredContract, bu as DiscoveryDeps, bv as ESPLORA_URL, bw as EsploraProvider, bx as EventSourceCapable, by as EventSourceFactory, bz as EventSourceLike, bA as EventSourceUnavailableError, a8 as ExitCaptureMode, bB as ExitChainResolver, a9 as ExitDataSource, bC as ExtendedContractVtxo, bD as GroupMembership, bE as HandlerError, bF as IDelegatorManager, bG as INTENT_TERMINAL_STATES, bH as IndexerTxType, bI as IntentCoin, bJ as KnownMetadata, bK as MUTINYNET_EMULATOR_PUBKEY, bL as MigrateDeprecatedSignerOptions, bM as MigrationLegReport, bN as MigrationVtxoRef, bO as MultisigTapscript, bP as NewAddressType, bQ as Nonces, bR as Output, bS as PageResponse, bT as PaginationOptions, bU as PartialSig, bV as PrevTxSource, bW as PrevTxUnavailableError, bX as ProviderClass, bY as REGTEST_EMULATOR_PUBKEY, bZ as RawTxSource, a7 as ReadonlyWalletConfig, n as RestArkProvider, b_ as RestDelegateProvider, b$ as RestDelegatorProvider, o as RestIndexerProvider, c0 as ScanContractsOptions, c1 as ScanResult, c2 as ScheduledSession, c3 as SettlementEventType, c4 as SignRequest, c5 as SignerClassification, c6 as SignerSet, c7 as SubscriptionEvent, c8 as SubscriptionHeartbeat, p as SubscriptionResponse, c9 as SweepTxNotification, ca as TapLeaves, cb as TapTreeCoder, cc as TapscriptType, aq as TimeHeight, Y as TreeNoncesEvent, a1 as TreeSignatureEvent, U as TreeSigningStartedEvent, a0 as TreeTxEvent, cd as Tx, ce as TxHistoryRecord, cf as TxKey, cg as TxNotification, ch as TxTag, ci as TxTreeNode, cj as TxType, ck as VirtualStatus, cl as Vtxo, cm as VtxoChain, am as VtxoManager, cn as VtxoType, b as WalletConfig, co as WalletMode, cp as WithPrevTx, cq as assertAllowedSighashTypes, cr as assetMintResolver, cs as attachPrevArkTxs, ct as attachPrevoutTxs, cu as boardingResolver, cv as canRecoverOnchain, cw as canSpendOffchain, cx as canSweepOnchain, cy as classifyAgainstSignerSet, cz as classifyContractSigner, cA as collabExitResolver, cB as configureEventSource, cC as createDefaultActivityRegistry, cD as createExitChainResolver, cE as decodeTapscript, cF as defaultEmulatorPubkey, cG as getConfiguredEventSource, cH as getNetwork, cI as getRandomId, cJ as getSequence, cK as hasCandidates, cL as hasTerminalSpend, cM as isBatchSignable, cN as isCooperativelyMigratable, cO as isDiscoverable, cP as isEventSourceUnavailableError, cQ as isExpired, cR as isPastExpiry, cS as isRecoverable, cT as isSigningIdentity, cU as isSpendable, cV as isSubdust, cW as isTerminalIntentState, cX as isVirtualCoin, cY as isVtxoExpiringSoon, cZ as networks, c_ as resolveEmulatorPubkey, c$ as resolveEventSource, d0 as resolvePrevTxs, d1 as scriptFromTapLeafScript, d2 as signerSetFromInfo, d3 as toXOnlySignerHex, d4 as withPrevTxs } from './index-C7RZCfoY.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-DZdIVa23.js';
4
- export { f as ArkError, g as ArkErrorName, h as ArkadeCashClaimResult, i as ArkadeCashCreateError, j as ArkadeCashUnclaimedReason, k as ArkadeCashUnclaimedVtxo, l as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, m as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, n as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, o as ProviderKind, p as ProviderUnavailableError, q as REGTEST_MIN_BATCH_EXPIRY_SECONDS, r as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, s as ServerInfoSource, t as ServerResponseMismatchError, u as WalletCannotAllocateAddressError, v as assertValidBatchExpiry, w as assertValidServerUnrollScript, x as defaultBatchExpiryPolicy, y as defaultCheckpointExitDelayPolicy, z as isAddressAllocationCapable, E as isArkError, G as isHDAllocationCapable, J as isHDWalletCapable, K as maybeArkError, L as resolveBatchExpiryPolicy, N as resolveCheckpointExitDelayPolicy, O as resolveDescriptorSigner, Q as selectVirtualCoins, T as signingDescriptorIndex, U as strictSigningDescriptorIndex, V as waitForIncomingFunds } from './hdWalletCapable-DZdIVa23.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-jouvy8FD.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-jouvy8FD.js';
7
- import { D as DefaultVtxo } from './delegate-AomVWxO_.js';
8
- export { a as DelegateVtxo } from './delegate-AomVWxO_.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 PathSelection, h as NewAddress, aK as ContractEvent, aL as AssetDetails, aM as IssuanceResult, aN as DelegateInfo, aO as MigrationGlobalSkipReason, aP as MigrationLegSkipReason, aQ as SignerStatus, a3 as IReadonlyWallet, d as ActivityRegistry, aa as IReadonlyAssetManager, aR as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, m as IAssetManager, l as SendParams, i as IDelegateManager, aS as IVtxoManager, a5 as OnchainProvider, M as Network, ad as NetworkName, ai as Coin, aT as ExplorerTransaction, ae as ArkInfo, ao as SignedIntent, ap as Intent, aU as TreeNonces, aV as TreePartialSigs, T as TxNotificationEvent, aW as PendingTx, t as TapLeafScript, aX as EncodedVtxoScript, P as CSVMultisigTapscript, s as RelativeTimelock, V as VtxoScript, aY as Status, af as ArkAddress, aZ as ChainTx, r as IndexerProvider, X as TxTree, a_ as PathContext } from './index-dWRqYSdS.js';
2
+ export { a$ as ActivityIntent, b0 as ActivityResolver, b1 as ArkIntentState, b2 as ArkTapscript, b3 as AssetMetadata, b4 as BITCOIN_EMULATOR_PUBKEY, b5 as BaseWalletConfig, $ as BatchFailedEvent, Z as BatchFinalizationEvent, _ as BatchFinalizedEvent, b6 as BatchInfo, b7 as BatchSignableIdentity, Q as BatchStartedEvent, b8 as CLTVMultisigTapscript, b9 as CandidateDeps, ba as ChainTxType, L as ChainedTxType, bb as CommitmentTx, bc as ConditionCSVMultisigTapscript, bd as ConditionMultisigTapscript, be as ContractBalance, bf as ContractEventCallback, bg as ContractHandler, aj as ContractManager, ak as ContractManagerConfig, bh as ContractState, bi as ContractVtxo, bj as ContractWatcher, bk as DEFAULT_VTXO_PAGE_SIZE, bl as DelegateManagerImpl, bm as DelegateOptions, a6 as DelegateProvider, bn as DelegatorManagerImpl, bo as DelegatorProvider, bp as DeprecatedSignerMigrationReport, bq as DeprecatedSignerReport, br as DigestMismatchError, bs as Discoverable, bt as DiscoveredContract, bu as DiscoveryDeps, bv as ESPLORA_URL, bw as EsploraProvider, bx as EventSourceCapable, by as EventSourceFactory, bz as EventSourceLike, bA as EventSourceUnavailableError, a8 as ExitCaptureMode, bB as ExitChainResolver, a9 as ExitDataSource, bC as ExtendedContractVtxo, bD as GroupMembership, bE as HandlerError, bF as IDelegatorManager, bG as INTENT_TERMINAL_STATES, bH as IndexerTxType, bI as IntentCoin, bJ as KnownMetadata, bK as MUTINYNET_EMULATOR_PUBKEY, bL as MigrateDeprecatedSignerOptions, bM as MigrationLegReport, bN as MigrationVtxoRef, bO as MultisigTapscript, bP as NewAddressType, bQ as Nonces, bR as Output, bS as PageResponse, bT as PaginationOptions, bU as PartialSig, bV as PrevTxSource, bW as PrevTxUnavailableError, bX as ProviderClass, bY as REGTEST_EMULATOR_PUBKEY, bZ as RawTxSource, a7 as ReadonlyWalletConfig, n as RestArkProvider, b_ as RestDelegateProvider, b$ as RestDelegatorProvider, o as RestIndexerProvider, c0 as ScanContractsOptions, c1 as ScanResult, c2 as ScheduledSession, c3 as SettlementEventType, c4 as SignRequest, c5 as SignerClassification, c6 as SignerSet, c7 as SubscriptionEvent, c8 as SubscriptionHeartbeat, p as SubscriptionResponse, c9 as SweepTxNotification, ca as TapLeaves, cb as TapTreeCoder, cc as TapscriptType, aq as TimeHeight, Y as TreeNoncesEvent, a1 as TreeSignatureEvent, U as TreeSigningStartedEvent, a0 as TreeTxEvent, cd as Tx, ce as TxHistoryRecord, cf as TxKey, cg as TxNotification, ch as TxTag, ci as TxTreeNode, cj as TxType, ck as VirtualStatus, cl as Vtxo, cm as VtxoChain, am as VtxoManager, cn as VtxoType, b as WalletConfig, co as WalletMode, cp as WithPrevTx, cq as assertAllowedSighashTypes, cr as assetMintResolver, cs as attachPrevArkTxs, ct as attachPrevoutTxs, cu as boardingResolver, cv as canRecoverOnchain, cw as canSpendOffchain, cx as canSweepOnchain, cy as classifyAgainstSignerSet, cz as classifyContractSigner, cA as collabExitResolver, cB as configureEventSource, cC as createDefaultActivityRegistry, cD as createExitChainResolver, cE as decodeTapscript, cF as defaultEmulatorPubkey, cG as getConfiguredEventSource, cH as getNetwork, cI as getRandomId, cJ as getSequence, cK as hasCandidates, cL as hasTerminalSpend, cM as isBatchSignable, cN as isCooperativelyMigratable, cO as isDiscoverable, cP as isEventSourceUnavailableError, cQ as isExpired, cR as isPastExpiry, cS as isRecoverable, cT as isSigningIdentity, cU as isSpendable, cV as isSubdust, cW as isTerminalIntentState, cX as isVirtualCoin, cY as isVtxoExpiringSoon, cZ as networks, c_ as resolveEmulatorPubkey, c$ as resolveEventSource, d0 as resolvePrevTxs, d1 as scriptFromTapLeafScript, d2 as signerSetFromInfo, d3 as toXOnlySignerHex, d4 as withPrevTxs } from './index-dWRqYSdS.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-DyxCiNVE.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-DyxCiNVE.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-TZJvbIaA.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-TZJvbIaA.js';
7
+ import { D as DefaultVtxo } from './delegate-BPdzTbwN.js';
8
+ export { a as DelegateVtxo } from './delegate-BPdzTbwN.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';
@@ -3889,6 +3889,8 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
3889
3889
  private ws;
3890
3890
  private network;
3891
3891
  private chain;
3892
+ private mtpCache?;
3893
+ private mtpInflight?;
3892
3894
  constructor(ws: ElectrumWS, network: Network);
3893
3895
  getCoins(address: string): Promise<Coin[]>;
3894
3896
  getFeeRate(): Promise<number | undefined>;
@@ -3949,11 +3951,24 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
3949
3951
  blockTime: number;
3950
3952
  blockHeight: number;
3951
3953
  }>;
3954
+ /** `time` is median-time-past, per {@link OnchainProvider.getChainTip};
3955
+ * Electrum serves raw headers and no MTP, so it is computed here. */
3952
3956
  getChainTip(): Promise<{
3953
3957
  height: number;
3954
3958
  time: number;
3955
3959
  hash: string;
3956
3960
  }>;
3961
+ /**
3962
+ * Consensus's `GetMedianTimePast`, ending at and including `height`.
3963
+ *
3964
+ * Cached per tip HASH, not height: this runs on every balance read, and
3965
+ * hashing means a reorg at the same height recomputes rather than serving
3966
+ * the orphaned chain's median.
3967
+ */
3968
+ private medianTimePast;
3969
+ /** Degrades to the tip's `nTime` rather than throwing — a caller that
3970
+ * cannot read the tip at all is worse off. */
3971
+ private readMedianTimePast;
3957
3972
  watchAddresses(addresses: string[], eventCallback: (txs: ExplorerTransaction[]) => void): Promise<() => void>;
3958
3973
  /** Close the underlying WebSocket connection. */
3959
3974
  close(): Promise<void>;
@@ -6087,6 +6102,8 @@ interface PaymentHandle {
6087
6102
  *
6088
6103
  * Rails whose underlying primitive *deducts* its fee (the collaborative exit)
6089
6104
  * gross the amount up to honour this; rails that add it on top pass it through.
6105
+ * A rail that does not perform the deducting spend cannot gross up to a fee it
6106
+ * never chooses, and flags that instead: see `claimFeeDeductedFromPayout`.
6090
6107
  *
6091
6108
  * `fee` is a pre-send estimate wherever the true cost is only fixed later: the
6092
6109
  * swap rails quote from Boltz's advertised pricing and are superseded by the
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, 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, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, 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, 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, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, withPrevTxs } from './chunk-VBHXBI7F.js';
2
- export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-33Q2RFET.js';
3
- export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-45FKMOJH.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-4CMXV5SF.js';
1
+ export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, 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, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, 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, 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, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, withPrevTxs } from './chunk-TA7XLEP2.js';
2
+ export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-YG7T6LI3.js';
3
+ export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-2PPL3O7Z.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-L5SCQYHF.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 chunkWCJVKFAP_cjs = require('../../chunk-WCJVKFAP.cjs');
4
- require('../../chunk-PJR63FTK.cjs');
5
- require('../../chunk-6YUACVX4.cjs');
6
- require('../../chunk-EJOFL5WH.cjs');
3
+ var chunkEBYCTLET_cjs = require('../../chunk-EBYCTLET.cjs');
4
+ require('../../chunk-GVHUHTRH.cjs');
5
+ require('../../chunk-WIFL5QYZ.cjs');
6
+ require('../../chunk-5MLC2HU3.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 = chunkWCJVKFAP_cjs.serializeVtxo(vtxo);
41
+ const s = chunkEBYCTLET_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 (!chunkWCJVKFAP_cjs.isVtxoForScript(vtxo, key.script)) {
89
+ if (!chunkEBYCTLET_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 = chunkWCJVKFAP_cjs.serializeUtxo(utxo);
114
+ const s = chunkEBYCTLET_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(chunkWCJVKFAP_cjs.serializeAssets(tx.assets)) : null
167
+ assetsJson: tx.assets ? JSON.stringify(chunkEBYCTLET_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 ?? chunkWCJVKFAP_cjs.scriptFromArkAddress(obj.address)
237
+ script: obj.script ?? chunkEBYCTLET_cjs.scriptFromArkAddress(obj.address)
238
238
  };
239
- return chunkWCJVKFAP_cjs.deserializeVtxo(serialized);
239
+ return chunkEBYCTLET_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 chunkWCJVKFAP_cjs.deserializeUtxo(serialized);
258
+ return chunkEBYCTLET_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 = chunkWCJVKFAP_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
273
+ tx.assets = chunkEBYCTLET_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
- chunkWCJVKFAP_cjs.assertIntentIdUnique(intent, clashes);
453
+ chunkEBYCTLET_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) => chunkWCJVKFAP_cjs.intentMatchesFilter(i, filter)) : all;
483
- const { skip, end } = chunkWCJVKFAP_cjs.intentPageBounds(filter, out.length);
482
+ const out = filter ? all.filter((i) => chunkEBYCTLET_cjs.intentMatchesFilter(i, filter)) : all;
483
+ const { skip, end } = chunkEBYCTLET_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 (!chunkWCJVKFAP_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
489
+ if (!chunkEBYCTLET_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: chunkWCJVKFAP_cjs.mergeChainedTxType(t.type, prev?.type)
531
+ type: chunkEBYCTLET_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 = chunkWCJVKFAP_cjs.scriptFromArkAddress(newVtxo.address);
765
+ newVtxo.script = chunkEBYCTLET_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 chunkWCJVKFAP_cjs.ChainedTxType; }
782
+ get: function () { return chunkEBYCTLET_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-C7RZCfoY.cjs';
2
- export { L as ChainedTxType } from '../../index-C7RZCfoY.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-dWRqYSdS.cjs';
2
+ export { L as ChainedTxType } from '../../index-dWRqYSdS.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-C7RZCfoY.js';
2
- export { L as ChainedTxType } from '../../index-C7RZCfoY.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-dWRqYSdS.js';
2
+ export { L as ChainedTxType } from '../../index-dWRqYSdS.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-VBHXBI7F.js';
2
- export { ChainedTxType } from '../../chunk-VBHXBI7F.js';
3
- import '../../chunk-33Q2RFET.js';
4
- import '../../chunk-45FKMOJH.js';
5
- import '../../chunk-4CMXV5SF.js';
1
+ import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets, assertIntentIdUnique, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-TA7XLEP2.js';
2
+ export { ChainedTxType } from '../../chunk-TA7XLEP2.js';
3
+ import '../../chunk-YG7T6LI3.js';
4
+ import '../../chunk-2PPL3O7Z.js';
5
+ import '../../chunk-L5SCQYHF.js';
6
6
  import '../../chunk-NSBPE2FW.js';
7
7
 
8
8
  // src/repositories/realm/walletRepository.ts
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkWCJVKFAP_cjs = require('../../chunk-WCJVKFAP.cjs');
4
- require('../../chunk-PJR63FTK.cjs');
5
- require('../../chunk-6YUACVX4.cjs');
6
- require('../../chunk-EJOFL5WH.cjs');
3
+ var chunkEBYCTLET_cjs = require('../../chunk-EBYCTLET.cjs');
4
+ require('../../chunk-GVHUHTRH.cjs');
5
+ require('../../chunk-WIFL5QYZ.cjs');
6
+ require('../../chunk-5MLC2HU3.cjs');
7
7
  require('../../chunk-5BLDMQED.cjs');
8
8
 
9
9
  // src/repositories/sqlite/transaction.ts
@@ -154,7 +154,7 @@ var SQLiteWalletRepository = class {
154
154
  for (const row of nullRows) {
155
155
  await this.db.run(
156
156
  `UPDATE ${this.tables.vtxos} SET script = ? WHERE txid = ? AND vout = ?`,
157
- [chunkWCJVKFAP_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
157
+ [chunkEBYCTLET_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
158
158
  );
159
159
  }
160
160
  const tempName = `${this.tables.vtxos}__migrate_tmp`;
@@ -225,7 +225,7 @@ var SQLiteWalletRepository = class {
225
225
  async saveVtxos(address, vtxos) {
226
226
  await this.ensureInit();
227
227
  for (const vtxo of vtxos) {
228
- const s = chunkWCJVKFAP_cjs.serializeVtxo(vtxo);
228
+ const s = chunkEBYCTLET_cjs.serializeVtxo(vtxo);
229
229
  await this.db.run(
230
230
  `INSERT OR REPLACE INTO ${this.tables.vtxos}
231
231
  (txid, vout, value, address,
@@ -280,7 +280,7 @@ var SQLiteWalletRepository = class {
280
280
  throw new Error("SQLiteWalletRepository requires an address");
281
281
  }
282
282
  for (const vtxo of vtxos) {
283
- if (!chunkWCJVKFAP_cjs.isVtxoForScript(vtxo, key.script)) {
283
+ if (!chunkEBYCTLET_cjs.isVtxoForScript(vtxo, key.script)) {
284
284
  throw new Error(
285
285
  `VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
286
286
  );
@@ -304,7 +304,7 @@ var SQLiteWalletRepository = class {
304
304
  async saveUtxos(address, utxos) {
305
305
  await this.ensureInit();
306
306
  for (const utxo of utxos) {
307
- const s = chunkWCJVKFAP_cjs.serializeUtxo(utxo);
307
+ const s = chunkEBYCTLET_cjs.serializeUtxo(utxo);
308
308
  await this.db.run(
309
309
  `INSERT OR REPLACE INTO ${this.tables.utxos}
310
310
  (txid, vout, value, address,
@@ -360,7 +360,7 @@ var SQLiteWalletRepository = class {
360
360
  tx.amount,
361
361
  tx.settled ? 1 : 0,
362
362
  tx.createdAt,
363
- tx.assets ? JSON.stringify(chunkWCJVKFAP_cjs.serializeAssets(tx.assets)) : null
363
+ tx.assets ? JSON.stringify(chunkEBYCTLET_cjs.serializeAssets(tx.assets)) : null
364
364
  ]
365
365
  );
366
366
  }
@@ -434,9 +434,9 @@ function vtxoRowToDomain(row) {
434
434
  // Post-migration every row has `script`, but the backfill is
435
435
  // idempotent: derive from `address` if the legacy column is still
436
436
  // null (e.g. the migration hasn't run yet on this handle).
437
- script: row.script ?? chunkWCJVKFAP_cjs.scriptFromArkAddress(row.address)
437
+ script: row.script ?? chunkEBYCTLET_cjs.scriptFromArkAddress(row.address)
438
438
  };
439
- return chunkWCJVKFAP_cjs.deserializeVtxo(serialized);
439
+ return chunkEBYCTLET_cjs.deserializeVtxo(serialized);
440
440
  }
441
441
  function utxoRowToDomain(row) {
442
442
  const serialized = {
@@ -455,7 +455,7 @@ function utxoRowToDomain(row) {
455
455
  status: JSON.parse(row.status_json),
456
456
  extraWitness: row.extra_witness_json ? JSON.parse(row.extra_witness_json) : void 0
457
457
  };
458
- return chunkWCJVKFAP_cjs.deserializeUtxo(serialized);
458
+ return chunkEBYCTLET_cjs.deserializeUtxo(serialized);
459
459
  }
460
460
  function txRowToDomain(row) {
461
461
  const tx = {
@@ -470,7 +470,7 @@ function txRowToDomain(row) {
470
470
  createdAt: row.created_at
471
471
  };
472
472
  if (row.assets_json) {
473
- tx.assets = chunkWCJVKFAP_cjs.deserializeAssets(JSON.parse(row.assets_json));
473
+ tx.assets = chunkEBYCTLET_cjs.deserializeAssets(JSON.parse(row.assets_json));
474
474
  }
475
475
  return tx;
476
476
  }
@@ -743,8 +743,8 @@ var SQLiteIntentRepository = class {
743
743
  `SELECT * FROM ${this.t} ORDER BY created_at ASC, intent_tx_id ASC`
744
744
  );
745
745
  let out = rows.map(rowToIntent);
746
- if (filter) out = out.filter((i) => chunkWCJVKFAP_cjs.intentMatchesFilter(i, filter));
747
- const { skip, end } = chunkWCJVKFAP_cjs.intentPageBounds(filter, out.length);
746
+ if (filter) out = out.filter((i) => chunkEBYCTLET_cjs.intentMatchesFilter(i, filter));
747
+ const { skip, end } = chunkEBYCTLET_cjs.intentPageBounds(filter, out.length);
748
748
  return out.slice(skip, end);
749
749
  }
750
750
  async getLockedVtxoOutpoints() {
@@ -752,7 +752,7 @@ var SQLiteIntentRepository = class {
752
752
  const rows = await this.db.all(`SELECT * FROM ${this.t}`);
753
753
  const out = [];
754
754
  for (const r of rows) {
755
- if (chunkWCJVKFAP_cjs.isTerminalIntentState(r.state)) continue;
755
+ if (chunkEBYCTLET_cjs.isTerminalIntentState(r.state)) continue;
756
756
  for (const o of JSON.parse(r.intent_vtxos_json)) out.push(o);
757
757
  }
758
758
  return out;
@@ -847,7 +847,7 @@ var SQLiteVirtualTxRepository = class {
847
847
  const prev = prevByTxid.get(t.txid);
848
848
  const psbt = t.psbt ?? prev?.psbt ?? null;
849
849
  const expires = t.expiresAt ?? prev?.expires_at ?? null;
850
- const type = chunkWCJVKFAP_cjs.mergeChainedTxType(t.type, prev?.type);
850
+ const type = chunkEBYCTLET_cjs.mergeChainedTxType(t.type, prev?.type);
851
851
  await this.db.run(
852
852
  `INSERT OR REPLACE INTO ${this.tTx} (txid, psbt, expires_at, type) VALUES (?, ?, ?, ?)`,
853
853
  [t.txid, psbt, expires, type]
@@ -940,7 +940,7 @@ function sanitizeTablePrefix(p) {
940
940
 
941
941
  Object.defineProperty(exports, "ChainedTxType", {
942
942
  enumerable: true,
943
- get: function () { return chunkWCJVKFAP_cjs.ChainedTxType; }
943
+ get: function () { return chunkEBYCTLET_cjs.ChainedTxType; }
944
944
  });
945
945
  exports.SQLiteContractRepository = SQLiteContractRepository;
946
946
  exports.SQLiteIntentRepository = SQLiteIntentRepository;
@@ -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-C7RZCfoY.cjs';
2
- export { L as ChainedTxType } from '../../index-C7RZCfoY.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-dWRqYSdS.cjs';
2
+ export { L as ChainedTxType } from '../../index-dWRqYSdS.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-C7RZCfoY.js';
2
- export { L as ChainedTxType } from '../../index-C7RZCfoY.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-dWRqYSdS.js';
2
+ export { L as ChainedTxType } from '../../index-dWRqYSdS.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 { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-VBHXBI7F.js';
2
- export { ChainedTxType } from '../../chunk-VBHXBI7F.js';
3
- import '../../chunk-33Q2RFET.js';
4
- import '../../chunk-45FKMOJH.js';
5
- import '../../chunk-4CMXV5SF.js';
1
+ import { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets, intentMatchesFilter, intentPageBounds, isTerminalIntentState, mergeChainedTxType } from '../../chunk-TA7XLEP2.js';
2
+ export { ChainedTxType } from '../../chunk-TA7XLEP2.js';
3
+ import '../../chunk-YG7T6LI3.js';
4
+ import '../../chunk-2PPL3O7Z.js';
5
+ import '../../chunk-L5SCQYHF.js';
6
6
  import '../../chunk-NSBPE2FW.js';
7
7
 
8
8
  // src/repositories/sqlite/transaction.ts
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, C as ContractRepository, r as IndexerProvider, q as ArkProvider, u as VirtualCoin, v as Contract, w as ExtendedVirtualCoin } from './index-C7RZCfoY.cjs';
1
+ import { W as WalletRepository, C as ContractRepository, r as IndexerProvider, q as ArkProvider, u as VirtualCoin, v as Contract, w as ExtendedVirtualCoin } from './index-dWRqYSdS.cjs';
2
2
 
3
3
  /**
4
4
  * A task item represents a unit of work in the inbox.
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, C as ContractRepository, r as IndexerProvider, q as ArkProvider, u as VirtualCoin, v as Contract, w as ExtendedVirtualCoin } from './index-C7RZCfoY.js';
1
+ import { W as WalletRepository, C as ContractRepository, r as IndexerProvider, q as ArkProvider, u as VirtualCoin, v as Contract, w as ExtendedVirtualCoin } from './index-dWRqYSdS.js';
2
2
 
3
3
  /**
4
4
  * A task item represents a unit of work in the inbox.