@arkade-os/sdk 0.4.59 → 0.4.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +34 -6
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +4 -4
  4. package/dist/adapters/expo.d.ts +4 -4
  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-CYHXFfvn.d.cts → asyncStorageTaskQueue-BWDxp3Dr.d.cts} +2 -2
  9. package/dist/{asyncStorageTaskQueue-BwuWQ1Qc.d.ts → asyncStorageTaskQueue-Cq9FpKv6.d.ts} +2 -2
  10. package/dist/{chunk-V2KENVN6.cjs → chunk-2JHN5RCY.cjs} +22 -15
  11. package/dist/chunk-2JHN5RCY.cjs.map +1 -0
  12. package/dist/{chunk-DYNB6POO.cjs → chunk-3NUDA3MB.cjs} +4423 -2934
  13. package/dist/chunk-3NUDA3MB.cjs.map +1 -0
  14. package/dist/{chunk-PN5RD7ZI.js → chunk-6O5OLYTZ.js} +1685 -1138
  15. package/dist/chunk-6O5OLYTZ.js.map +1 -0
  16. package/dist/{chunk-OVSNY3HC.js → chunk-AUEXB42T.js} +3965 -2503
  17. package/dist/chunk-AUEXB42T.js.map +1 -0
  18. package/dist/{chunk-DSTYXT2D.cjs → chunk-FNCQJLR2.cjs} +44 -6
  19. package/dist/chunk-FNCQJLR2.cjs.map +1 -0
  20. package/dist/{chunk-VSHY5TBY.js → chunk-GDI2A65Z.js} +4 -4
  21. package/dist/{chunk-VSHY5TBY.js.map → chunk-GDI2A65Z.js.map} +1 -1
  22. package/dist/{chunk-FIMOVH25.js → chunk-PVY6DMN5.js} +40 -7
  23. package/dist/chunk-PVY6DMN5.js.map +1 -0
  24. package/dist/{chunk-2XO43UHI.cjs → chunk-SF5NKAUA.cjs} +1731 -1180
  25. package/dist/chunk-SF5NKAUA.cjs.map +1 -0
  26. package/dist/{chunk-7FA36NOA.cjs → chunk-XFYFREPH.cjs} +17 -17
  27. package/dist/{chunk-7FA36NOA.cjs.map → chunk-XFYFREPH.cjs.map} +1 -1
  28. package/dist/{chunk-H342JPPZ.js → chunk-XLHN5L2O.js} +5 -5
  29. package/dist/chunk-XLHN5L2O.js.map +1 -0
  30. package/dist/{chunk-IPFGYVF3.cjs → chunk-XMRB74HA.cjs} +10 -10
  31. package/dist/chunk-XMRB74HA.cjs.map +1 -0
  32. package/dist/{chunk-YEHGCHIL.js → chunk-YVQNHELA.js} +12 -5
  33. package/dist/chunk-YVQNHELA.js.map +1 -0
  34. package/dist/contracts/handlers/index.cjs +12 -8
  35. package/dist/contracts/handlers/index.d.cts +5 -5
  36. package/dist/contracts/handlers/index.d.ts +5 -5
  37. package/dist/contracts/handlers/index.js +2 -2
  38. package/dist/{delegate-D0eGaz3J.d.cts → delegate-BySzD37I.d.ts} +1 -1
  39. package/dist/{delegate-B_oKWm1k.d.ts → delegate-C4Rl6h9l.d.cts} +1 -1
  40. package/dist/{ark-C9DsPSm8.d.cts → index-BcRCHnzN.d.cts} +4887 -4331
  41. package/dist/{ark-C9DsPSm8.d.ts → index-BcRCHnzN.d.ts} +4887 -4331
  42. package/dist/{index-BmK6tEqf.d.ts → index-Butfkm-K.d.cts} +224 -68
  43. package/dist/{index-BG2AL2Ie.d.cts → index-C29VNcxC.d.ts} +224 -68
  44. package/dist/index.cjs +374 -230
  45. package/dist/index.d.cts +522 -82
  46. package/dist/index.d.ts +522 -82
  47. package/dist/index.js +4 -4
  48. package/dist/repositories/realm/index.cjs +43 -23
  49. package/dist/repositories/realm/index.cjs.map +1 -1
  50. package/dist/repositories/realm/index.d.cts +23 -11
  51. package/dist/repositories/realm/index.d.ts +23 -11
  52. package/dist/repositories/realm/index.js +29 -9
  53. package/dist/repositories/realm/index.js.map +1 -1
  54. package/dist/repositories/sqlite/index.cjs +48 -23
  55. package/dist/repositories/sqlite/index.cjs.map +1 -1
  56. package/dist/repositories/sqlite/index.d.cts +11 -5
  57. package/dist/repositories/sqlite/index.d.ts +11 -5
  58. package/dist/repositories/sqlite/index.js +35 -10
  59. package/dist/repositories/sqlite/index.js.map +1 -1
  60. package/dist/{taskRunner-Cy4Gh8n7.d.ts → taskRunner-BTq3rMpI.d.cts} +2 -2
  61. package/dist/{taskRunner-CBvKIttE.d.cts → taskRunner-DxMJYJ7Y.d.ts} +2 -2
  62. package/dist/wallet/expo/background.cjs +14 -14
  63. package/dist/wallet/expo/background.d.cts +5 -5
  64. package/dist/wallet/expo/background.d.ts +5 -5
  65. package/dist/wallet/expo/background.js +6 -6
  66. package/dist/wallet/expo/index.cjs +37 -14
  67. package/dist/wallet/expo/index.cjs.map +1 -1
  68. package/dist/wallet/expo/index.d.cts +13 -5
  69. package/dist/wallet/expo/index.d.ts +13 -5
  70. package/dist/wallet/expo/index.js +28 -5
  71. package/dist/wallet/expo/index.js.map +1 -1
  72. package/dist/{wallet-EyVDhqzP.d.ts → wallet-BVIfg2ic.d.ts} +222 -19
  73. package/dist/{wallet-DlXemAzP.d.cts → wallet-DrSsUden.d.cts} +222 -19
  74. package/dist/worker/expo/index.cjs +9 -9
  75. package/dist/worker/expo/index.d.cts +7 -7
  76. package/dist/worker/expo/index.d.ts +7 -7
  77. package/dist/worker/expo/index.js +5 -5
  78. package/package.json +4 -2
  79. package/dist/chunk-2XO43UHI.cjs.map +0 -1
  80. package/dist/chunk-DSTYXT2D.cjs.map +0 -1
  81. package/dist/chunk-DYNB6POO.cjs.map +0 -1
  82. package/dist/chunk-FIMOVH25.js.map +0 -1
  83. package/dist/chunk-H342JPPZ.js.map +0 -1
  84. package/dist/chunk-IPFGYVF3.cjs.map +0 -1
  85. package/dist/chunk-OVSNY3HC.js.map +0 -1
  86. package/dist/chunk-PN5RD7ZI.js.map +0 -1
  87. package/dist/chunk-V2KENVN6.cjs.map +0 -1
  88. package/dist/chunk-YEHGCHIL.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { a2 as ReadonlyIdentity, a as Identity, am as DescriptorSigningRequest, an as Transaction, ai as SignerSession, a0 as DescriptorProvider, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, ao as IntentFeeConfig, ap as OffchainInput, aq as FeeAmount, ar as OnchainInput, as as FeeOutput, n as ArkProvider, ag as SettlementConfig, at as ContractWatcherConfig, au as Asset, R as Recipient, I as IWallet, av as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, aw as CreateContractParams, ax as GetContractsFilter, r as VirtualCoin, ay as GetSpendablePathsOptions, az as GetAllSpendingPathsOptions, aA as IssuanceParams, aB as ReissuanceParams, aC as BurnParams, aD as RenewVtxosOptions, c as WalletBalance, a9 as ContractSyncState, aE as ContractWithVtxos, aF as PathSelection, aG as ContractEvent, aH as AssetDetails, aI as IssuanceResult, aJ as DelegateInfo, aK as MigrationGlobalSkipReason, aL as MigrationLegSkipReason, aM as SignerStatus, a1 as IReadonlyWallet, d as ActivityRegistry, a8 as IReadonlyAssetManager, aN as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, j as IAssetManager, g as IDelegateManager, aO as IVtxoManager, a3 as OnchainProvider, J as Network, aa as NetworkName, ad as Coin, aP as ExplorerTransaction, q as TapLeafScript, aQ as EncodedVtxoScript, K as CSVMultisigTapscript, p as RelativeTimelock, V as VtxoScript, aR as Status, ac as ArkAddress, ak as Intent, aS as ChainTx, o as IndexerProvider, Q as TxTree, aT as PathContext } from './ark-C9DsPSm8.js';
2
- export { aU as ActivityIntent, aV as ActivityResolver, ab as ArkInfo, aW as ArkIntentState, aX as ArkTapscript, aY as AssetMetadata, aZ as BITCOIN_EMULATOR_PUBKEY, a_ as BaseWalletConfig, Z as BatchFailedEvent, X as BatchFinalizationEvent, Y as BatchFinalizedEvent, a$ as BatchInfo, b0 as BatchSignableIdentity, M as BatchStartedEvent, b1 as CLTVMultisigTapscript, b2 as CandidateDeps, b3 as ChainTxType, H as ChainedTxType, b4 as CommitmentTx, b5 as ConditionCSVMultisigTapscript, b6 as ConditionMultisigTapscript, b7 as ContractBalance, b8 as ContractEventCallback, b9 as ContractHandler, ae as ContractManager, af as ContractManagerConfig, ba as ContractState, bb as ContractVtxo, bc as ContractWatcher, bd as DelegateManagerImpl, be as DelegateOptions, a4 as DelegateProvider, bf as DelegatorManagerImpl, bg as DelegatorProvider, bh as DeprecatedSignerMigrationReport, bi as DeprecatedSignerReport, bj as DigestMismatchError, bk as Discoverable, bl as DiscoveredContract, bm as DiscoveryDeps, bn as ESPLORA_URL, bo as EsploraProvider, a6 as ExitCaptureMode, bp as ExitChainResolver, a7 as ExitDataSource, bq as ExtendedContractVtxo, br as GroupMembership, bs as HandlerError, bt as IDelegatorManager, bu as INTENT_TERMINAL_STATES, bv as IndexerTxType, bw as KnownMetadata, bx as MUTINYNET_EMULATOR_PUBKEY, by as MigrateDeprecatedSignerOptions, bz as MigrationLegReport, bA as MigrationVtxoRef, bB as MultisigTapscript, bC as Nonces, bD as Output, bE as PageResponse, bF as PaginationOptions, bG as PartialSig, bH as ProviderClass, bI as REGTEST_EMULATOR_PUBKEY, a5 as ReadonlyWalletConfig, k as RestArkProvider, bJ as RestDelegateProvider, bK as RestDelegatorProvider, l as RestIndexerProvider, bL as ScanContractsOptions, bM as ScanResult, bN as ScheduledSession, bO as SettlementEventType, bP as SignRequest, aj as SignedIntent, bQ as SignerClassification, L as SignerSet, bR as SubscriptionEvent, bS as SubscriptionHeartbeat, m as SubscriptionResponse, bT as TapLeaves, bU as TapTreeCoder, bV as TapscriptType, al as TimeHeight, bW as TreeNonces, U as TreeNoncesEvent, bX as TreePartialSigs, $ as TreeSignatureEvent, P as TreeSigningStartedEvent, _ as TreeTxEvent, bY as Tx, bZ as TxHistoryRecord, b_ as TxKey, T as TxNotification, b$ as TxTag, c0 as TxTreeNode, c1 as TxType, c2 as VirtualStatus, c3 as Vtxo, c4 as VtxoChain, ah as VtxoManager, c5 as VtxoType, b as WalletConfig, c6 as WalletMode, c7 as assetMintResolver, c8 as boardingResolver, c9 as canRecoverOnchain, ca as canSpendOffchain, cb as classifyAgainstSignerSet, cc as classifyContractSigner, cd as collabExitResolver, ce as createDefaultActivityRegistry, cf as createExitChainResolver, cg as decodeTapscript, ch as defaultEmulatorPubkey, ci as getNetwork, cj as getSequence, ck as hasCandidates, cl as hasTerminalSpend, cm as isBatchSignable, cn as isCooperativelyMigratable, co as isDiscoverable, cp as isExpired, cq as isPastExpiry, cr as isRecoverable, cs as isSpendable, ct as isSubdust, cu as isTerminalIntentState, cv as isVirtualCoin, cw as isVtxoExpiringSoon, cx as networks, cy as resolveEmulatorPubkey, cz as scriptFromTapLeafScript, cA as signerSetFromInfo, cB as toXOnlySignerHex } from './ark-C9DsPSm8.js';
3
- import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot, P as ProviderConnectionState, B as BatchExpiryPolicy, d as Batch } from './wallet-EyVDhqzP.js';
4
- export { A as ArkError, e as ArkErrorName, f as ArkadeCashClaimResult, g as ArkadeCashCreateError, h as ArkadeCashUnclaimedReason, i as ArkadeCashUnclaimedVtxo, j as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, k as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, H as HDWalletCapable, I as IncomingFunds, M as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, l as ProviderKind, m as ProviderUnavailableError, n as REGTEST_MIN_BATCH_EXPIRY_SECONDS, o as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, p as ServerInfoSource, q as ServerResponseMismatchError, r as assertValidBatchExpiry, s as assertValidServerUnrollScript, t as defaultBatchExpiryPolicy, u as defaultCheckpointExitDelayPolicy, v as getRandomId, w as isArkError, x as isHDWalletCapable, y as maybeArkError, z as resolveBatchExpiryPolicy, E as resolveCheckpointExitDelayPolicy, F as selectVirtualCoins, G as waitForIncomingFunds } from './wallet-EyVDhqzP.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-BmK6tEqf.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 contractHandlers } from './index-BmK6tEqf.js';
7
- import { D as DefaultVtxo } from './delegate-B_oKWm1k.js';
8
- export { a as DelegateVtxo } from './delegate-B_oKWm1k.js';
1
+ import { a1 as ReadonlyIdentity, a as Identity, ao as DescriptorSigningRequest, ap as Transaction, ak as SignerSession, J as DescriptorProvider, aq as IntentFeeConfig, ar as OffchainInput, as as FeeAmount, at as OnchainInput, au as FeeOutput, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, t as ExtendedVirtualCoin, u as VtxoRepositoryKey, E as ExtendedCoin, A as ArkTransaction, v as WalletState, s as Contract, C as ContractRepository, w as ContractFilter, I as IWallet, n as ArkProvider, ai as SettlementConfig, av as ContractWatcherConfig, aw as Asset, R as Recipient, ax as FeeInfo, i as SettlementEvent, h as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, ay as CreateContractParams, az as GetContractsFilter, r as VirtualCoin, aA as GetSpendablePathsOptions, aB as GetAllSpendingPathsOptions, aC as IssuanceParams, aD as ReissuanceParams, aE as BurnParams, aF as RenewVtxosOptions, c as WalletBalance, a8 as ContractSyncState, ad as ContractWithVtxos, aG as PathSelection, aH as ContractEvent, aI as AssetDetails, aJ as IssuanceResult, aK as DelegateInfo, aL as MigrationGlobalSkipReason, aM as MigrationLegSkipReason, aN as SignerStatus, a0 as IReadonlyWallet, d as ActivityRegistry, a7 as IReadonlyAssetManager, aO as StorageConfig, e as Activity, N as NormalizedExtendedVirtualCoin, f as IContractManager, j as IAssetManager, g as IDelegateManager, aP as IVtxoManager, a2 as OnchainProvider, K as Network, aa as NetworkName, af as Coin, aQ as ExplorerTransaction, q as TapLeafScript, aR as EncodedVtxoScript, L as CSVMultisigTapscript, p as RelativeTimelock, V as VtxoScript, aS as Status, ac as ArkAddress, am as Intent, aT as ChainTx, o as IndexerProvider, Q as TxTree, aU as PathContext } from './index-BcRCHnzN.js';
2
+ export { aV as ActivityIntent, aW as ActivityResolver, ab as ArkInfo, aX as ArkIntentState, aY as ArkTapscript, aZ as AssetMetadata, a_ as BITCOIN_EMULATOR_PUBKEY, a$ as BaseWalletConfig, Z as BatchFailedEvent, X as BatchFinalizationEvent, Y as BatchFinalizedEvent, b0 as BatchInfo, b1 as BatchSignableIdentity, M as BatchStartedEvent, b2 as CLTVMultisigTapscript, b3 as CandidateDeps, b4 as ChainTxType, H as ChainedTxType, b5 as CommitmentTx, b6 as ConditionCSVMultisigTapscript, b7 as ConditionMultisigTapscript, b8 as ContractBalance, b9 as ContractEventCallback, ba as ContractHandler, ag as ContractManager, ah as ContractManagerConfig, bb as ContractState, bc as ContractVtxo, bd as ContractWatcher, be as DelegateManagerImpl, bf as DelegateOptions, a3 as DelegateProvider, bg as DelegatorManagerImpl, bh as DelegatorProvider, bi as DeprecatedSignerMigrationReport, bj as DeprecatedSignerReport, bk as DigestMismatchError, bl as Discoverable, bm as DiscoveredContract, bn as DiscoveryDeps, bo as ESPLORA_URL, bp as EsploraProvider, bq as EventSourceCapable, br as EventSourceFactory, bs as EventSourceLike, bt as EventSourceUnavailableError, a5 as ExitCaptureMode, bu as ExitChainResolver, a6 as ExitDataSource, bv as ExtendedContractVtxo, bw as GroupMembership, bx as HandlerError, by as IDelegatorManager, bz as INTENT_TERMINAL_STATES, bA as IndexerTxType, bB as KnownMetadata, bC as MUTINYNET_EMULATOR_PUBKEY, bD as MigrateDeprecatedSignerOptions, bE as MigrationLegReport, bF as MigrationVtxoRef, bG as MultisigTapscript, bH as Nonces, bI as Output, bJ as PageResponse, bK as PaginationOptions, bL as PartialSig, bM as ProviderClass, bN as REGTEST_EMULATOR_PUBKEY, a4 as ReadonlyWalletConfig, k as RestArkProvider, bO as RestDelegateProvider, bP as RestDelegatorProvider, l as RestIndexerProvider, bQ as ScanContractsOptions, bR as ScanResult, bS as ScheduledSession, bT as SettlementEventType, bU as SignRequest, al as SignedIntent, bV as SignerClassification, bW as SignerSet, bX as SubscriptionEvent, bY as SubscriptionHeartbeat, m as SubscriptionResponse, bZ as TapLeaves, b_ as TapTreeCoder, b$ as TapscriptType, an as TimeHeight, c0 as TreeNonces, U as TreeNoncesEvent, c1 as TreePartialSigs, $ as TreeSignatureEvent, P as TreeSigningStartedEvent, _ as TreeTxEvent, c2 as Tx, c3 as TxHistoryRecord, c4 as TxKey, T as TxNotification, c5 as TxTag, c6 as TxTreeNode, c7 as TxType, c8 as VirtualStatus, c9 as Vtxo, ca as VtxoChain, aj as VtxoManager, cb as VtxoType, b as WalletConfig, cc as WalletMode, cd as assetMintResolver, ce as boardingResolver, cf as canRecoverOnchain, cg as canSpendOffchain, ch as classifyAgainstSignerSet, ci as classifyContractSigner, cj as collabExitResolver, ck as configureEventSource, cl as createDefaultActivityRegistry, cm as createExitChainResolver, cn as decodeTapscript, co as defaultEmulatorPubkey, cp as getConfiguredEventSource, cq as getNetwork, cr as getRandomId, cs as getSequence, ct as hasCandidates, cu as hasTerminalSpend, cv as isBatchSignable, cw as isCooperativelyMigratable, cx as isDiscoverable, cy as isEventSourceUnavailableError, cz as isExpired, cA as isPastExpiry, cB as isRecoverable, cC as isSigningIdentity, cD as isSpendable, cE as isSubdust, cF as isTerminalIntentState, cG as isVirtualCoin, cH as isVtxoExpiringSoon, cI as networks, cJ as resolveEmulatorPubkey, cK as resolveEventSource, cL as scriptFromTapLeafScript, cM as signerSetFromInfo, cN as toXOnlySignerHex } from './index-BcRCHnzN.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, B as BatchExpiryPolicy, e as Batch } from './wallet-BVIfg2ic.js';
4
+ export { A as ArkError, f as ArkErrorName, g as ArkadeCashClaimResult, h as ArkadeCashCreateError, i as ArkadeCashUnclaimedReason, j as ArkadeCashUnclaimedVtxo, k as BoardingUtxoGroup, C as CheckpointExitDelayPolicy, D as DEFAULT_MIN_BATCH_EXPIRY_SECONDS, l as DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, F as ForeignDescriptorError, I as IncomingFunds, M as MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, m as MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, n as ProviderKind, o as ProviderUnavailableError, p as REGTEST_MIN_BATCH_EXPIRY_SECONDS, q as REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, S as SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, r as ServerInfoSource, s as ServerResponseMismatchError, t as assertValidBatchExpiry, u as assertValidServerUnrollScript, v as defaultBatchExpiryPolicy, w as defaultCheckpointExitDelayPolicy, x as isArkError, y as isHDAllocationCapable, z as isHDWalletCapable, E as maybeArkError, G as resolveBatchExpiryPolicy, J as resolveCheckpointExitDelayPolicy, K as resolveDescriptorSigner, L as selectVirtualCoins, N as signingDescriptorIndex, O as strictSigningDescriptorIndex, Q as waitForIncomingFunds } from './wallet-BVIfg2ic.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-C29VNcxC.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-C29VNcxC.js';
7
+ import { D as DefaultVtxo } from './delegate-BySzD37I.js';
8
+ export { a as DelegateVtxo } from './delegate-BySzD37I.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';
@@ -363,6 +363,21 @@ declare class ReadonlyDescriptorIdentity implements ReadonlyHDCapableIdentity {
363
363
  isOurs(descriptor: string): boolean;
364
364
  }
365
365
 
366
+ /**
367
+ * Normalize a value to descriptor format.
368
+ * If already a descriptor, return as-is. If hex pubkey, wrap as tr(pubkey).
369
+ * Throws when the value is empty or not a string so we never produce
370
+ * malformed descriptors like `tr()` that downstream parsers would reject.
371
+ */
372
+ declare function normalizeToDescriptor(value: string): string;
373
+ /**
374
+ * Extract the x-only (32-byte) pubkey from a materialized descriptor.
375
+ * Handles both static `tr(pubkey)` and materialized HD
376
+ * `tr([fp/..]xpub/0/<i>)` shapes via the descriptors-scure expansion map.
377
+ * Throws a plain Error when the descriptor is non-rangeable / unparseable;
378
+ * callers that need a typed error wrap this.
379
+ */
380
+ declare function deriveDescriptorLeafPubKey(descriptor: string): Uint8Array;
366
381
  /**
367
382
  * Compressed (33-byte) counterpart of {@link deriveDescriptorLeafPubKey}, for
368
383
  * protocols that key on the parity byte (Boltz swap keys).
@@ -371,6 +386,33 @@ declare class ReadonlyDescriptorIdentity implements ReadonlyHDCapableIdentity {
371
386
  * synthesizing `02||xonly` would silently produce the wrong key half the time.
372
387
  */
373
388
  declare function deriveDescriptorLeafCompressedPubKey(descriptor: string): Uint8Array;
389
+ /** Parsed HD descriptor components. */
390
+ interface ParsedHDDescriptor {
391
+ fingerprint: string;
392
+ basePath: string;
393
+ xpub: string;
394
+ derivationPath: string;
395
+ }
396
+ /**
397
+ * Parse an HD descriptor into its components.
398
+ * HD descriptors have the format: tr([fingerprint/path']xpub/derivation)
399
+ * Returns null if the descriptor is not in HD format.
400
+ */
401
+ declare function parseHDDescriptor(descriptor: string): ParsedHDDescriptor | null;
402
+ /**
403
+ * The descriptor that names an identity's own key: the whole of a static
404
+ * wallet's key policy, and the descriptor a record bound before an `auto`
405
+ * wallet became HD carries.
406
+ *
407
+ * One spelling, deliberately. Every site that mints this must produce
408
+ * byte-identical output for one identity, or a stored descriptor stops
409
+ * round-tripping through `signerForDescriptor` and `contractSigner`'s
410
+ * pubkey-equality check — a record the wallet can sign for, refused as
411
+ * foreign.
412
+ */
413
+ declare function identityDescriptor(identity: {
414
+ xOnlyPublicKey(): Promise<Uint8Array>;
415
+ }): Promise<string>;
374
416
 
375
417
  /**
376
418
  * Descriptor-scoped signing surface — the two members every
@@ -494,6 +536,55 @@ declare class ReadonlySingleKey implements ReadonlyIdentity {
494
536
  compressedPublicKey(): Promise<Uint8Array>;
495
537
  }
496
538
 
539
+ /**
540
+ * Estimator evaluates CEL expressions to calculate fees for Arkade intents
541
+ */
542
+ declare class Estimator {
543
+ readonly config: IntentFeeConfig;
544
+ private intentOffchainInput?;
545
+ private intentOnchainInput?;
546
+ private intentOffchainOutput?;
547
+ private intentOnchainOutput?;
548
+ /**
549
+ * Creates a new Estimator with the given config
550
+ * @param config - Configuration containing CEL programs for fee calculation
551
+ */
552
+ constructor(config: IntentFeeConfig);
553
+ /**
554
+ * Evaluates the fee for a given vtxo input
555
+ * @param input - The offchain input to evaluate
556
+ * @returns The fee amount for this input
557
+ */
558
+ evalOffchainInput(input: OffchainInput): FeeAmount;
559
+ /**
560
+ * Evaluates the fee for a given boarding input
561
+ * @param input - The onchain input to evaluate
562
+ * @returns The fee amount for this input
563
+ */
564
+ evalOnchainInput(input: OnchainInput): FeeAmount;
565
+ /**
566
+ * Evaluates the fee for a given vtxo output
567
+ * @param output - The output to evaluate
568
+ * @returns The fee amount for this output
569
+ */
570
+ evalOffchainOutput(output: FeeOutput): FeeAmount;
571
+ /**
572
+ * Evaluates the fee for a given collaborative exit output
573
+ * @param output - The output to evaluate
574
+ * @returns The fee amount for this output
575
+ */
576
+ evalOnchainOutput(output: FeeOutput): FeeAmount;
577
+ /**
578
+ * Evaluates the fee for a given set of inputs and outputs
579
+ * @param offchainInputs - Array of offchain inputs to evaluate
580
+ * @param onchainInputs - Array of onchain inputs to evaluate
581
+ * @param offchainOutputs - Array of offchain outputs to evaluate
582
+ * @param onchainOutputs - Array of onchain outputs to evaluate
583
+ * @returns The total fee amount
584
+ */
585
+ evaluate(offchainInputs: OffchainInput[], onchainInputs: OnchainInput[], offchainOutputs: FeeOutput[], onchainOutputs: FeeOutput[]): FeeAmount;
586
+ }
587
+
497
588
  declare class InMemoryIntentRepository implements IntentRepository {
498
589
  readonly version: 1;
499
590
  private byId;
@@ -589,6 +680,73 @@ declare class InMemoryWalletRepository implements WalletRepository {
589
680
  [Symbol.asyncDispose](): Promise<void>;
590
681
  }
591
682
 
683
+ /**
684
+ * Whether generic wallet spending may select this contract's VTXOs.
685
+ *
686
+ * Default closed: a type whose handler declares nothing — a custom type, a
687
+ * plugin type, a row whose handler is not registered in this context — is not
688
+ * spendable. Every shipped handler answers explicitly.
689
+ *
690
+ * @see ContractHandler.isGenericallySpendable
691
+ */
692
+ declare function isContractGenericallySpendable(contract: Contract): boolean;
693
+ /**
694
+ * The contracts generic spending must skip, as `script → type`. VTXOs are keyed
695
+ * to their contract by `script`, so membership answers the per-VTXO question too.
696
+ */
697
+ declare function gatedContracts(contracts: readonly Contract[]): Map<string, string>;
698
+ /** The minimum a VTXO must carry to be matched against an exclusion set. */
699
+ type ExcludableVtxo = {
700
+ txid: string;
701
+ vout: number;
702
+ script?: string;
703
+ };
704
+ /**
705
+ * Why generic spending skips a VTXO, or `undefined` when it does not — phrased
706
+ * to follow the outpoint in a log line.
707
+ *
708
+ * Generic spending applies three exclusions (the contract gate, pending
709
+ * recovery, intent locks) that key on different things — script, script,
710
+ * outpoint. Stating each as a reason-or-undefined lets all three report through
711
+ * one path, so no exclusion can drop a coin silently while another logs.
712
+ */
713
+ type VtxoExclusion = (vtxo: ExcludableVtxo) => string | undefined;
714
+ /** The contract gate as an exclusion, naming the type that closed it. */
715
+ declare function gateExclusion(gated: ReadonlyMap<string, string>): VtxoExclusion;
716
+ /** Outpoints excluded for a shared reason, e.g. an intent-lock set. */
717
+ declare function outpointExclusion(outpoints: ReadonlySet<string>, reason: string): VtxoExclusion;
718
+ /**
719
+ * Outpoints excluded for individually-named reasons — a per-input timelock,
720
+ * where one shared reason would be wrong because the inputs differ.
721
+ *
722
+ * Unlike {@link gateExclusion}, the reasons are the handlers' own sentences and
723
+ * are not rephrased to follow the outpoint: that text is what tells the reader
724
+ * when to retry, and a paraphrase here would be a second spelling to keep in
725
+ * step with it.
726
+ *
727
+ * @see outpointExclusion for the shared-reason form.
728
+ */
729
+ declare function outpointReasons(reasons: ReadonlyMap<string, string>): VtxoExclusion;
730
+ /**
731
+ * Report VTXOs an exclusion dropped — the only field-diagnosable signal for why
732
+ * a coin is missing from a spend, or why an explicitly named one will fail.
733
+ * Debug level, one line per VTXO per reason.
734
+ */
735
+ declare function logExcludedVtxos(source: string, vtxos: readonly ExcludableVtxo[], exclusions: readonly VtxoExclusion[]): void;
736
+ /**
737
+ * Thrown when a spend names VTXOs whose contract can no longer be annotated —
738
+ * its handler is not registered here, its handler rejects the stored params, or
739
+ * it has no contract row at all.
740
+ *
741
+ * Raised before submission on purpose. Spending reads the tapscripts stored on
742
+ * each coin rather than re-deriving them, so such a spend would otherwise build
743
+ * and broadcast normally and only fail in the bookkeeping afterwards, leaving
744
+ * the transaction on the network and the local state behind it.
745
+ */
746
+ declare class UnannotatableInputError extends Error {
747
+ readonly name = "UnannotatableInputError";
748
+ }
749
+
592
750
  /**
593
751
  * Encode a contract to the arkcontract string format.
594
752
  *
@@ -688,12 +846,35 @@ declare function contractFromArkContractWithAddress(encoded: string, serverPubKe
688
846
  */
689
847
  declare function isArkContract(str: string): boolean;
690
848
 
849
+ /**
850
+ * Thrown when a descriptor-capable contract (default, delegate, or boarding)
851
+ * cannot be routed to any signer: its owner key (`params.pubKey`) is not this
852
+ * wallet's baseline signing key, and the record carries no
853
+ * `metadata.signingDescriptor` to send it to a descriptor-aware signer.
854
+ *
855
+ * Note that this can arise also when a contract belongs to a different identity (storage reuse).
856
+ */
857
+ declare class MissingSigningDescriptorError extends Error {
858
+ readonly contractScript: string;
859
+ readonly contractType: "default" | "delegate" | "boarding";
860
+ readonly name = "MissingSigningDescriptorError";
861
+ constructor(contractScript: string, contractType: "default" | "delegate" | "boarding");
862
+ }
863
+ /**
864
+ * Thrown when an input needs descriptor-aware signing but no
865
+ * DescriptorProvider was wired into the wallet.
866
+ */
867
+ declare class DescriptorSigningProviderMissingError extends Error {
868
+ readonly name = "DescriptorSigningProviderMissingError";
869
+ constructor();
870
+ }
871
+
691
872
  /**
692
873
  * In-memory implementation of ContractRepository.
693
874
  * Data is ephemeral and scoped to the instance.
694
875
  */
695
876
  declare class InMemoryContractRepository implements ContractRepository {
696
- readonly version: 1;
877
+ readonly version: 2;
697
878
  private readonly contractData;
698
879
  private readonly collections;
699
880
  private readonly contractsByScript;
@@ -711,7 +892,7 @@ declare class InMemoryContractRepository implements ContractRepository {
711
892
  */
712
893
  declare class IndexedDBContractRepository implements ContractRepository {
713
894
  private readonly dbName;
714
- readonly version: 1;
895
+ readonly version: 2;
715
896
  private db;
716
897
  constructor(dbName?: string);
717
898
  clear(): Promise<void>;
@@ -798,9 +979,9 @@ declare class WalletRepositoryImpl implements WalletRepository {
798
979
  * @deprecated This is only to be used in migration from storage V1
799
980
  */
800
981
  declare class ContractRepositoryImpl implements ContractRepository {
801
- readonly version: 1;
802
982
  private storage;
803
983
  constructor(storage: StorageAdapter);
984
+ get version(): 2;
804
985
  getContractData<T>(contractId: string, key: string): Promise<T | null>;
805
986
  setContractData<T>(contractId: string, key: string, data: T): Promise<void>;
806
987
  deleteContractData(contractId: string, key: string): Promise<void>;
@@ -815,76 +996,145 @@ declare class ContractRepositoryImpl implements ContractRepository {
815
996
  }
816
997
 
817
998
  /**
818
- * Estimator evaluates CEL expressions to calculate fees for Arkade intents
999
+ * Domain separator for the preimage derivation.
1000
+ *
1001
+ * Protocol-scoped and versioned, mirroring NArk's `Arkade-Boltz-Preimage-v1`
1002
+ * (`SwapsManagementService.cs:128`), so any Arkade SDK implementing this
1003
+ * scheme reproduces the same preimage and can recover an artifact another
1004
+ * SDK created. Deliberately distinct from the Boltz tag: a shared tag would
1005
+ * make one wallet key derive one preimage for both corridors.
819
1006
  */
820
- declare class Estimator {
821
- readonly config: IntentFeeConfig;
822
- private intentOffchainInput?;
823
- private intentOnchainInput?;
824
- private intentOffchainOutput?;
825
- private intentOnchainOutput?;
826
- /**
827
- * Creates a new Estimator with the given config
828
- * @param config - Configuration containing CEL programs for fee calculation
829
- */
830
- constructor(config: IntentFeeConfig);
831
- /**
832
- * Evaluates the fee for a given vtxo input
833
- * @param input - The offchain input to evaluate
834
- * @returns The fee amount for this input
835
- */
836
- evalOffchainInput(input: OffchainInput): FeeAmount;
837
- /**
838
- * Evaluates the fee for a given boarding input
839
- * @param input - The onchain input to evaluate
840
- * @returns The fee amount for this input
841
- */
842
- evalOnchainInput(input: OnchainInput): FeeAmount;
843
- /**
844
- * Evaluates the fee for a given vtxo output
845
- * @param output - The output to evaluate
846
- * @returns The fee amount for this output
847
- */
848
- evalOffchainOutput(output: FeeOutput): FeeAmount;
1007
+ declare const ARKADE_SWAP_PREIMAGE_TAG = "Arkade-RFQ-Preimage-v1";
1008
+ /**
1009
+ * `TAG ‖ xonly(32) ‖ u32le(index)` — the message that gets BIP-340 signed.
1010
+ *
1011
+ * Anchored on the canonical x-only key rather than the descriptor string: a
1012
+ * restore reconstructs a bare descriptor that serialises differently from the
1013
+ * signing descriptor used at creation, and only the key agrees across both.
1014
+ */
1015
+ declare function buildPreimageMessage(xonly: Uint8Array, index: number): Uint8Array;
1016
+ /**
1017
+ * True iff `descriptor` names one artifact — an HD child. A bare `tr(pubkey)`
1018
+ * is the same key every time it is handed out, so anything deriving
1019
+ * per-artifact secrets must branch on this, never on the wallet's type.
1020
+ */
1021
+ declare function isPerArtifactDescriptor(descriptor: string): boolean;
1022
+ /** A key the wallet provisioned for a contract we must be able to spend. */
1023
+ interface ProvisionedKey {
1024
+ /** x-only pubkey to bind into the covenant. */
1025
+ pubkey: Uint8Array;
849
1026
  /**
850
- * Evaluates the fee for a given collaborative exit output
851
- * @param output - The output to evaluate
852
- * @returns The fee amount for this output
1027
+ * The wallet descriptor it came from. Public persist it with the
1028
+ * artifact; {@link contractSigner} resolves it back to a signer.
853
1029
  */
854
- evalOnchainOutput(output: FeeOutput): FeeAmount;
1030
+ descriptor: string;
1031
+ }
1032
+ /** A claim key together with the preimage it claims with. */
1033
+ interface ProvisionedClaimSecret extends ProvisionedKey {
1034
+ preimage: Uint8Array;
1035
+ /** `sha256(preimage)` — what the contract commits to. */
1036
+ paymentHash: Uint8Array;
855
1037
  /**
856
- * Evaluates the fee for a given set of inputs and outputs
857
- * @param offchainInputs - Array of offchain inputs to evaluate
858
- * @param onchainInputs - Array of onchain inputs to evaluate
859
- * @param offchainOutputs - Array of offchain outputs to evaluate
860
- * @param onchainOutputs - Array of onchain outputs to evaluate
861
- * @returns The total fee amount
1038
+ * Persist `preimage` with the artifact: this wallet cannot re-derive it.
1039
+ * True when the caller supplied P, or when the descriptor is shared across
1040
+ * artifacts. When false the preimage re-derives from the seed and nothing
1041
+ * secret needs to be stored.
862
1042
  */
863
- evaluate(offchainInputs: OffchainInput[], onchainInputs: OnchainInput[], offchainOutputs: FeeOutput[], onchainOutputs: FeeOutput[]): FeeAmount;
1043
+ mustPersistPreimage: boolean;
864
1044
  }
865
-
866
1045
  /**
867
- * Thrown when a descriptor-capable contract (default, delegate, or boarding)
868
- * cannot be routed to any signer: its owner key (`params.pubKey`) is not this
869
- * wallet's baseline signing key, and the record carries no
870
- * `metadata.signingDescriptor` to send it to a descriptor-aware signer.
1046
+ * The key that spends a leg we fund — the refund key of an HTLC, the user key
1047
+ * of a covenant's cancel path.
871
1048
  *
872
- * Note that this can arise also when a contract belongs to a different identity (storage reuse).
1049
+ * The returned `pubkey` is taken from a signer the wallet produced, never
1050
+ * from the descriptor string alone. That is the difference between an
1051
+ * invariant and a comment: deriving the leaf key is pure parsing and would
1052
+ * succeed just as well for a key this wallet cannot sign for — a descriptor
1053
+ * allocated by a worker rebound to another identity, a record restored onto
1054
+ * the wrong seed — and the covenant would bind it, the leg would fund, and
1055
+ * the failure would surface at refund time with the money already committed.
1056
+ * Throws {@link ForeignDescriptorError} instead, before there is a quote.
1057
+ *
1058
+ * On an HD wallet this consumes an index even if the artifact is never built,
1059
+ * and a swap index never becomes a funded receive contract, so a long run of
1060
+ * them widens the gap a seed-only restore scan sees.
873
1061
  */
874
- declare class MissingSigningDescriptorError extends Error {
875
- readonly contractScript: string;
876
- readonly contractType: "default" | "delegate" | "boarding";
877
- readonly name = "MissingSigningDescriptorError";
878
- constructor(contractScript: string, contractType: "default" | "delegate" | "boarding");
1062
+ declare function provisionRefundKey(wallet: IWallet): Promise<ProvisionedKey>;
1063
+ /**
1064
+ * The key that spends a leg we claim, plus the preimage that unlocks it.
1065
+ *
1066
+ * Pass `opts.preimage` to bring your own 32-byte P; it comes back verbatim
1067
+ * with `mustPersistPreimage` set, since the wallet cannot re-derive what it
1068
+ * did not choose.
1069
+ */
1070
+ declare function provisionClaimSecret(wallet: IWallet, opts?: {
1071
+ preimage?: Uint8Array;
1072
+ }): Promise<ProvisionedClaimSecret>;
1073
+ /**
1074
+ * The signer for a provisioned descriptor, verified to actually be that
1075
+ * descriptor's key.
1076
+ *
1077
+ * The verification is a public-key equality, never a wallet-type probe: a
1078
+ * wallet that answers with the wrong key — another seed's, after a restore
1079
+ * mix-up — would sign happily, and the failure would surface only as a
1080
+ * counterparty rejection or a dead script.
1081
+ *
1082
+ * Know its limit. It catches a wallet that substitutes its *baseline*
1083
+ * identity, which is the failure this exists for. It cannot catch one that
1084
+ * returns a descriptor-scoped identity built over the same descriptor, since
1085
+ * such an identity reads its pubkey back out of the descriptor string and the
1086
+ * comparison becomes a tautology. What rules that case out is
1087
+ * {@link resolveDescriptorSigner}'s `isOurs` test, which both shipped wallets
1088
+ * resolve through — so this is the backstop for a hand-rolled `IWallet`, not
1089
+ * the primary guarantee.
1090
+ */
1091
+ declare function contractSigner(wallet: IWallet, descriptor: string): Promise<Identity>;
1092
+ /**
1093
+ * A wallet that holds a contract's key but cannot sign with it: a watch-only
1094
+ * identity, or a remote signer whose transport is absent.
1095
+ *
1096
+ * Distinct from {@link ForeignDescriptorError} because the remedy differs —
1097
+ * that one says "wrong wallet", this one says "this wallet, without its
1098
+ * signer". Raised at provisioning as well as at signing, so a wallet that
1099
+ * could never spend the leg finds out before it funds one.
1100
+ */
1101
+ declare class WalletCannotSignError extends Error {
1102
+ readonly descriptor: string;
1103
+ readonly name = "WalletCannotSignError";
1104
+ constructor(descriptor: string);
879
1105
  }
880
1106
  /**
881
- * Thrown when an input needs descriptor-aware signing but no
882
- * DescriptorProvider was wired into the wallet.
1107
+ * The preimage for a provisioned descriptor: `stored` when the artifact kept
1108
+ * one, otherwise re-derived from the seed.
1109
+ *
1110
+ * Throws for a descriptor shared across artifacts and no stored preimage —
1111
+ * deriving there would hand two artifacts one preimage, and the caller was
1112
+ * told to persist it (`mustPersistPreimage`).
883
1113
  */
884
- declare class DescriptorSigningProviderMissingError extends Error {
885
- readonly name = "DescriptorSigningProviderMissingError";
886
- constructor();
1114
+ declare function contractPreimage(wallet: IWallet, descriptor: string, stored?: Uint8Array): Promise<Uint8Array>;
1115
+ /** An identity that signs with `aux_rand = 0`, which is what makes the
1116
+ * derivation reproducible. `DescriptorIdentity` satisfies it, and throws
1117
+ * rather than degrading to a random-aux signer. */
1118
+ interface DeterministicSigner extends ReadonlyIdentity {
1119
+ signSchnorrDeterministic(messageHash: Uint8Array): Promise<Uint8Array>;
887
1120
  }
1121
+ declare function isDeterministicSigner(value: unknown): value is DeterministicSigner;
1122
+ /**
1123
+ * Claim a restored artifact's index so a later allocation cannot reissue it —
1124
+ * which would derive that artifact's preimage a second time, for a different
1125
+ * one.
1126
+ *
1127
+ * Monotonic, and a no-op wherever there is no index to reserve — a shared-key
1128
+ * descriptor, or another seed's artifact. Restores iterate whole histories, so
1129
+ * an artifact this wallet has nothing to adopt for must not abort the loop.
1130
+ *
1131
+ * Telling "another seed's" apart from a failure needs
1132
+ * {@link HDWalletCapable.signerForDescriptor}, so an allocation-capable wallet
1133
+ * that does not also implement it gets only the watermark call's own untyped
1134
+ * refusal, and a foreign artifact reaches the caller as an error rather than a
1135
+ * skip. Every wallet shipped here implements both.
1136
+ */
1137
+ declare function adoptContractDescriptor(wallet: IWallet, descriptor: string): Promise<void>;
888
1138
 
889
1139
  type RequestEnvelope = {
890
1140
  tag: string;
@@ -951,6 +1201,16 @@ type Options = {
951
1201
  * every (re-)init.
952
1202
  */
953
1203
  messageTimeoutOverrides?: Record<string, number>;
1204
+ /**
1205
+ * Optional intent-lifecycle repository, handed to the worker's wallet as
1206
+ * `storage.intentRepository`. Same opt-in as a main-thread wallet: without
1207
+ * it the worker persists no settlement intent, reconciles none on restart,
1208
+ * and counts intent-locked VTXOs as available. Pass the same repository the
1209
+ * main thread uses so both sides read one intent state.
1210
+ *
1211
+ * Ignored when `buildServices` is supplied — that override owns `storage`.
1212
+ */
1213
+ intentRepository?: IntentRepository;
954
1214
  debug?: boolean;
955
1215
  buildServices?: (config: Initialize["config"]) => Promise<{
956
1216
  arkProvider: ArkProvider;
@@ -1015,8 +1275,9 @@ declare class MessageBus {
1015
1275
  private pendingInitCount;
1016
1276
  private readonly buildServicesFn;
1017
1277
  private readonly boundOnMessage;
1278
+ private readonly intentRepository?;
1018
1279
  /** Create the service-worker message bus with repositories and handler configuration. */
1019
- constructor(walletRepository: WalletRepository, contractRepository: ContractRepository, { messageHandlers, tickIntervalMs, messageTimeoutMs, messageTimeoutOverrides, debug, buildServices, }: Options);
1280
+ constructor(walletRepository: WalletRepository, contractRepository: ContractRepository, { messageHandlers, tickIntervalMs, messageTimeoutMs, messageTimeoutOverrides, intentRepository, debug, buildServices, }: Options);
1020
1281
  /** Start the message bus and attach service-worker event listeners. */
1021
1282
  start(): Promise<void>;
1022
1283
  /** Stop the message bus, cancel ticks, and stop all registered handlers. */
@@ -1804,7 +2065,7 @@ declare class Ramps {
1804
2065
  * @param eventCallback - Optional callback that receives settlement events
1805
2066
  * @returns The Arkade transaction id created by settlement
1806
2067
  * @throws Error if no virtual outputs remain after fee deduction or the destination address cannot be decoded
1807
- * @see IWallet.getVtxos
2068
+ * @see IWallet.getSpendableVtxos
1808
2069
  * @see IWallet.settle
1809
2070
  * @example
1810
2071
  * ```typescript
@@ -1886,10 +2147,13 @@ declare class HDDescriptorProvider implements DescriptorProvider, ReceiveRotator
1886
2147
  * `getNextSigningDescriptor()` skips indices discovered by a restore
1887
2148
  * scan. Never rewinds: a lower or equal `index` is a no-op.
1888
2149
  *
1889
- * An invalid `index` (non-integer / negative) is ignored (no-op):
1890
- * persisting it would corrupt `lastIndexUsed` and make the next
1891
- * `parseSettings()` throw, mirroring the validation parseSettings
1892
- * already enforces.
2150
+ * An invalid `index` (non-integer / negative / past the BIP32
2151
+ * non-hardened ceiling) is ignored (no-op): persisting it would corrupt
2152
+ * `lastIndexUsed` and make the next `parseSettings()` throw, mirroring
2153
+ * the validation parseSettings already enforces. The upper bound matters
2154
+ * because the damage outlives the call — `materializeDescriptorAt` cannot
2155
+ * derive at or above 2^31, so a watermark parked there would fail every
2156
+ * subsequent allocation for the life of the repo.
1893
2157
  */
1894
2158
  advanceLastIndexUsed(index: number): Promise<void>;
1895
2159
  /**
@@ -2041,6 +2305,18 @@ type ResponseGetVtxos = ResponseEnvelope & {
2041
2305
  vtxos: Awaited<ReturnType<IWallet["getVtxos"]>>;
2042
2306
  };
2043
2307
  };
2308
+ type RequestGetSpendableVtxos = RequestEnvelope & {
2309
+ type: "GET_SPENDABLE_VTXOS";
2310
+ payload: {
2311
+ filter?: GetVtxosFilter;
2312
+ };
2313
+ };
2314
+ type ResponseGetSpendableVtxos = ResponseEnvelope & {
2315
+ type: "SPENDABLE_VTXOS";
2316
+ payload: {
2317
+ vtxos: Awaited<ReturnType<IWallet["getSpendableVtxos"]>>;
2318
+ };
2319
+ };
2044
2320
  type RequestGetBoardingUtxos = RequestEnvelope & {
2045
2321
  type: "GET_BOARDING_UTXOS";
2046
2322
  };
@@ -2225,6 +2501,45 @@ type RequestRefreshOutpoints = RequestEnvelope & {
2225
2501
  type ResponseRefreshOutpoints = ResponseEnvelope & {
2226
2502
  type: "REFRESH_OUTPOINTS_SUCCESS";
2227
2503
  };
2504
+ type RequestGetCurrentSigningDescriptor = RequestEnvelope & {
2505
+ type: "GET_CURRENT_SIGNING_DESCRIPTOR";
2506
+ };
2507
+ type ResponseGetCurrentSigningDescriptor = ResponseEnvelope & {
2508
+ type: "CURRENT_SIGNING_DESCRIPTOR";
2509
+ payload: {
2510
+ descriptor?: string;
2511
+ };
2512
+ };
2513
+ type RequestGetNextSigningDescriptor = RequestEnvelope & {
2514
+ type: "GET_NEXT_SIGNING_DESCRIPTOR";
2515
+ };
2516
+ type ResponseGetNextSigningDescriptor = ResponseEnvelope & {
2517
+ type: "NEXT_SIGNING_DESCRIPTOR";
2518
+ payload: {
2519
+ descriptor?: string;
2520
+ };
2521
+ };
2522
+ type RequestGetUsedSigningDescriptors = RequestEnvelope & {
2523
+ type: "GET_USED_SIGNING_DESCRIPTORS";
2524
+ payload?: {
2525
+ lookAhead?: number;
2526
+ };
2527
+ };
2528
+ type ResponseGetUsedSigningDescriptors = ResponseEnvelope & {
2529
+ type: "USED_SIGNING_DESCRIPTORS";
2530
+ payload: {
2531
+ descriptors: string[];
2532
+ };
2533
+ };
2534
+ type RequestAdvanceSigningDescriptorWatermark = RequestEnvelope & {
2535
+ type: "ADVANCE_SIGNING_DESCRIPTOR_WATERMARK";
2536
+ payload: {
2537
+ descriptor: string;
2538
+ };
2539
+ };
2540
+ type ResponseAdvanceSigningDescriptorWatermark = ResponseEnvelope & {
2541
+ type: "SIGNING_DESCRIPTOR_WATERMARK_ADVANCED";
2542
+ };
2228
2543
  type RequestGetAllSpendingPaths = RequestEnvelope & {
2229
2544
  type: "GET_ALL_SPENDING_PATHS";
2230
2545
  payload: {
@@ -2499,8 +2814,8 @@ type RequestRestoreWallet = RequestEnvelope & {
2499
2814
  type ResponseRestoreWallet = ResponseEnvelope & {
2500
2815
  type: "RESTORE_WALLET_SUCCESS";
2501
2816
  };
2502
- type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestSendBitcoin | RequestGetAddress | RequestGetBoardingAddress | RequestGetBalance | RequestGetVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestGetContractSyncState | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestSend | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
2503
- type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseSendBitcoin | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetBalance | ResponseGetVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseGetContractSyncState | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseContractEvent | ResponseSend | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
2817
+ type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestSendBitcoin | RequestGetAddress | RequestGetBoardingAddress | RequestGetBalance | RequestGetVtxos | RequestGetSpendableVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestGetContractSyncState | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestGetCurrentSigningDescriptor | RequestGetNextSigningDescriptor | RequestGetUsedSigningDescriptors | RequestAdvanceSigningDescriptorWatermark | RequestSend | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
2818
+ type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseSendBitcoin | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetBalance | ResponseGetVtxos | ResponseGetSpendableVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseGetContractSyncState | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseGetCurrentSigningDescriptor | ResponseGetNextSigningDescriptor | ResponseGetUsedSigningDescriptors | ResponseAdvanceSigningDescriptorWatermark | ResponseContractEvent | ResponseSend | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
2504
2819
  declare class WalletMessageHandler implements MessageHandler<WalletUpdaterRequest, WalletUpdaterResponse> {
2505
2820
  readonly messageTag: string;
2506
2821
  private wallet;
@@ -2528,12 +2843,16 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
2528
2843
  isLongRunning(message: WalletUpdaterRequest): boolean;
2529
2844
  handleMessage(message: WalletUpdaterRequest): Promise<WalletUpdaterResponse>;
2530
2845
  private handleInitWallet;
2531
- private handleGetBalance;
2532
- private getAllBoardingUtxos;
2533
2846
  /**
2534
- * Get spendable vtxos from the repository
2847
+ * The worker's own balance. Same bucketing rules as `Wallet.getBalance` —
2848
+ * both call {@link computeOffchainBalance} — but deliberately a different
2849
+ * freshness: this reads the repository directly, with no indexer sync, so a
2850
+ * polling UI never pays for a network round-trip. That rules out
2851
+ * `pendingRecoveryOutpoints()`, whose snapshot syncs; the same classification
2852
+ * runs over this method's local snapshot instead.
2535
2853
  */
2536
- private getSpendableVtxos;
2854
+ private handleGetBalance;
2855
+ private getAllBoardingUtxos;
2537
2856
  private onWalletInitialized;
2538
2857
  /**
2539
2858
  * Refresh virtual outputs, boarding inputs, and transaction history from cache.
@@ -2551,6 +2870,9 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
2551
2870
  private handleSendBitcoin;
2552
2871
  private handleSignTransaction;
2553
2872
  private handleDelegate;
2873
+ /**
2874
+ * Ungated repository read mirroring `Wallet.getVtxos`, the raw reporting read.
2875
+ */
2554
2876
  private handleGetVtxos;
2555
2877
  /** Tear down handler subscriptions, then delegate the full wipe to the wallet. */
2556
2878
  private clear;
@@ -2559,6 +2881,20 @@ declare class WalletMessageHandler implements MessageHandler<WalletUpdaterReques
2559
2881
  * addresses and the wallet's primary address, with deduplication.
2560
2882
  */
2561
2883
  private getVtxosFromRepo;
2884
+ /**
2885
+ * The worker's equivalent of `ReadonlyWallet.contractSnapshot`: contracts
2886
+ * paired with the VTXOs the repository holds for them, plus the flat
2887
+ * deduplicated list. Purely local — unlike the main-thread snapshot it never
2888
+ * syncs against the indexer.
2889
+ *
2890
+ * One read of the contract rows serves both halves. Reading them twice
2891
+ * (once for the VTXO buckets, once for the gate) races the contract
2892
+ * manager's own writes: a contract registered between the two reads yields
2893
+ * VTXOs with no matching row in the gate, and `gatedContracts` lists only
2894
+ * what it knows is closed — so the coins of a just-registered escrowed
2895
+ * contract would count as available until the next poll.
2896
+ */
2897
+ private repoSnapshot;
2562
2898
  /**
2563
2899
  * Build transaction history from cached virtual outputs, hitting the indexer only for
2564
2900
  * uncached timestamps. Best-effort, like the plain Wallet path.
@@ -2825,6 +3161,18 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
2825
3161
  getActivityHistory(): Promise<Activity[]>;
2826
3162
  getTransactionHistory(): Promise<ArkTransaction[]>;
2827
3163
  getVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
3164
+ /**
3165
+ * The gate has to run *inside* the worker (no plugin object or contract row
3166
+ * metadata exists on this side), so this is its own message rather than a
3167
+ * post-filter over `GET_VTXOS`.
3168
+ *
3169
+ * A worker predating this message answers "Unknown message" and the call
3170
+ * throws. That is deliberate: service workers activate asynchronously, so
3171
+ * new page code runs against a stale worker for a window on every deploy,
3172
+ * and falling back to `GET_VTXOS` there would silently spend ungated coins.
3173
+ * Fail closed — loud and recoverable — rather than make the gate advisory.
3174
+ */
3175
+ getSpendableVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
2828
3176
  /**
2829
3177
  * Trigger a wallet reload inside the service worker.
2830
3178
  *
@@ -2833,7 +3181,7 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
2833
3181
  reload(): Promise<boolean>;
2834
3182
  getContractManager(): Promise<IContractManager>;
2835
3183
  }
2836
- declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements IWallet {
3184
+ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements IWallet, HDWalletCapable, HDAllocationCapable {
2837
3185
  readonly serviceWorker: ServiceWorker;
2838
3186
  readonly walletRepository: WalletRepository;
2839
3187
  readonly contractRepository: ContractRepository;
@@ -2858,6 +3206,33 @@ declare class ServiceWorkerWallet extends ServiceWorkerReadonlyWallet implements
2858
3206
  * ```
2859
3207
  */
2860
3208
  static setup(options: ServiceWorkerWalletSetupOptions): Promise<ServiceWorkerWallet>;
3209
+ /** @see HDWalletCapable.getCurrentSigningDescriptor */
3210
+ getCurrentSigningDescriptor(): Promise<string | undefined>;
3211
+ /** @see HDAllocationCapable.getNextSigningDescriptor */
3212
+ getNextSigningDescriptor(): Promise<string | undefined>;
3213
+ /** @see HDWalletCapable.getUsedSigningDescriptors */
3214
+ getUsedSigningDescriptors(opts?: {
3215
+ lookAhead?: number;
3216
+ }): Promise<string[]>;
3217
+ /** @see HDAllocationCapable.advanceSigningDescriptorWatermark */
3218
+ advanceSigningDescriptorWatermark(descriptor: string): Promise<void>;
3219
+ /**
3220
+ * @see HDWalletCapable.signerForDescriptor
3221
+ *
3222
+ * Runs page-side: an `Identity` cannot cross the message bus, and it does
3223
+ * not need to — the page owns the signing identity, and resolving a
3224
+ * descriptor reads no allocation state. Shares
3225
+ * {@link resolveDescriptorSigner} with {@link Wallet.signerForDescriptor}
3226
+ * so the two sides of the bus cannot answer differently for one
3227
+ * descriptor.
3228
+ *
3229
+ * No provider is passed, and none is needed: `HDDescriptorProvider`'s
3230
+ * `isOurs` and signing members all delegate to the identity, which the
3231
+ * page holds. Building one here would only add a page-side read of the
3232
+ * wallet state the worker allocates from — shared mutable state on a path
3233
+ * that has no business touching it.
3234
+ */
3235
+ signerForDescriptor(descriptor: string): Promise<Identity>;
2861
3236
  sendBitcoin(params: SendBitcoinParams): Promise<string>;
2862
3237
  settle(params?: SettleParams, callback?: (event: SettlementEvent) => void): Promise<string>;
2863
3238
  /**
@@ -3381,6 +3756,20 @@ declare function combineTapscriptSigs(signedTx: Transaction, originalTx: Transac
3381
3756
  * @returns True if the address is valid, false otherwise.
3382
3757
  */
3383
3758
  declare function isValidArkAddress(address: string): boolean;
3759
+ /**
3760
+ * Minimal Ark provider surface required to submit and finalize an offchain
3761
+ * transaction. Both {@link ArkProvider} implementations satisfy it
3762
+ * structurally, so declaring it here keeps this module free of a provider
3763
+ * import (and of the dependency cycle that would create).
3764
+ */
3765
+ interface OffchainTxSubmitProvider {
3766
+ submitTx(signedArkTx: string, checkpointTxs: string[]): Promise<{
3767
+ arkTxid: string;
3768
+ finalArkTx?: string;
3769
+ signedCheckpointTxs: string[];
3770
+ }>;
3771
+ finalizeTx(arkTxid: string, finalCheckpointTxs: string[]): Promise<void>;
3772
+ }
3384
3773
  /**
3385
3774
  * Pair each server-returned checkpoint PSBT with the locally built checkpoint
3386
3775
  * of the same txid, rejecting anything else.
@@ -3420,6 +3809,57 @@ declare function assertSubmittedArkTxid(response: {
3420
3809
  arkTxid: string;
3421
3810
  finalArkTx?: string;
3422
3811
  }, signedArkTx: Transaction, context: string): void;
3812
+ /**
3813
+ * Opt-in proof that the server co-signed what it handed back.
3814
+ *
3815
+ * Be precise about what this buys, because it is less than it sounds like. It
3816
+ * does NOT protect a preimage or any other condition value: those reach the
3817
+ * server at `submitTx`, before any of this runs. What it buys is a loud,
3818
+ * immediate failure instead of a caller reporting success, watching nothing
3819
+ * confirm, and learning the truth when the counterparty's refund lands.
3820
+ */
3821
+ interface VerifyServerSignatures {
3822
+ /** The Ark server's key; x-only or compressed, both accepted. */
3823
+ serverPubkey: Uint8Array;
3824
+ }
3825
+ /**
3826
+ * Build, sign, submit, and finalize an offchain transaction whose every input
3827
+ * is controlled by a single key — the "thin signer" path.
3828
+ *
3829
+ * Needs no wallet, repository, or contract state: just an identity that can
3830
+ * sign, an Ark provider, the inputs (already carrying their spend leaf and tap
3831
+ * tree), the outputs, and the server unroll script. Used by the ArkadeCash sweep
3832
+ * to move bearer coins to the receiver's address without spinning up a full
3833
+ * background-managed wallet on shared repositories.
3834
+ *
3835
+ * @returns The Ark transaction id.
3836
+ */
3837
+ declare function signAndSubmitOffchainTx(params: {
3838
+ identity: {
3839
+ sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
3840
+ };
3841
+ provider: OffchainTxSubmitProvider;
3842
+ inputs: ArkTxInput[];
3843
+ outputs: TransactionOutput[];
3844
+ serverUnrollScript: CSVMultisigTapscript.Type;
3845
+ /** Forwarded to {@link submitOffchainTx}; omitted, nothing is checked. */
3846
+ verifyServerSignatures?: VerifyServerSignatures;
3847
+ }): Promise<string>;
3848
+ /**
3849
+ * Decorate a signer so it reveals `preimage` on every input it signs.
3850
+ *
3851
+ * The ordering encoded here is the whole point: the condition witness is NOT
3852
+ * part of what is signed, so attaching it before signing leaves a signature
3853
+ * over a PSBT that no longer matches once the field is present — which the
3854
+ * server rejects as `INVALID_SIGNATURE`. Decorate per spend, never wallet-wide.
3855
+ *
3856
+ * For any condition-leaf spend (VHTLC claims on both swap directions); the
3857
+ * generic signature keeps the decorated identity's own type, so the result is
3858
+ * still whatever was passed in.
3859
+ */
3860
+ declare function claimWithPreimageIdentity<T extends {
3861
+ sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
3862
+ }>(identity: T, preimage: Uint8Array): T;
3423
3863
 
3424
3864
  /**
3425
3865
  * ArkPsbtFieldKey are the available key names for the Arkade PSBT custom fields.
@@ -5566,4 +6006,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
5566
6006
  burn(params: BurnParams): Promise<string>;
5567
6007
  }
5568
6008
 
5569
- export { ARKADE_MAGIC, Activity, ActivityRegistry, AmbiguousRouteError, type AnchorBumper, ArkAddress, 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, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, 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 ExecutorEvent, 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, GetVtxosFilter, HDDescriptorProvider, type HDDeterministicSignCapable, 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, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, 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, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, UnilateralExit, UnknownPacket, Unroll, type VSize, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, btcTarget, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createAssetPacket, createDefaultPaymentRouter, decodeArkContract, deriveDescriptorLeafCompressedPubKey, deserializeExitPackage, encodeArkContract, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isCsvSpendable, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isRetryableProviderError, isValidArkAddress, makeHandle, matchServerCheckpoints, migrateWalletRepository, onchainRail, openDatabase, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, timelockToSequence, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
6009
+ export { ARKADE_MAGIC, ARKADE_SWAP_PREIMAGE_TAG, Activity, ActivityRegistry, AmbiguousRouteError, type AnchorBumper, ArkAddress, 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, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, 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 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, 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, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, 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, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, 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, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, decodeArkContract, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, gateExclusion, gatedContracts, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };