@arkade-os/sdk 0.5.0-rc.0 → 0.5.0-rc.2

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 +34 -1
  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-CdF_ELX8.d.cts → asyncStorageTaskQueue-BuDvgWh6.d.cts} +1 -1
  9. package/dist/{asyncStorageTaskQueue-BCzN3Y45.d.ts → asyncStorageTaskQueue-C5rBYlru.d.ts} +1 -1
  10. package/dist/{chunk-KTU44AEH.js → chunk-3R476TDV.js} +4 -4
  11. package/dist/{chunk-KTU44AEH.js.map → chunk-3R476TDV.js.map} +1 -1
  12. package/dist/{chunk-HL7EC2Z5.cjs → chunk-43FKNLX4.cjs} +50 -50
  13. package/dist/{chunk-HL7EC2Z5.cjs.map → chunk-43FKNLX4.cjs.map} +1 -1
  14. package/dist/{chunk-FVTJJQNM.js → chunk-4PKLULWT.js} +3 -3
  15. package/dist/{chunk-FVTJJQNM.js.map → chunk-4PKLULWT.js.map} +1 -1
  16. package/dist/{chunk-ABJPM4JF.js → chunk-6DNR46C7.js} +4 -4
  17. package/dist/{chunk-ABJPM4JF.js.map → chunk-6DNR46C7.js.map} +1 -1
  18. package/dist/{chunk-PB5KJI4U.cjs → chunk-D25O4EGY.cjs} +10 -10
  19. package/dist/{chunk-PB5KJI4U.cjs.map → chunk-D25O4EGY.cjs.map} +1 -1
  20. package/dist/{chunk-5MJHZHG7.cjs → chunk-GMZZQXV5.cjs} +863 -484
  21. package/dist/chunk-GMZZQXV5.cjs.map +1 -0
  22. package/dist/{chunk-RXWKCEZP.cjs → chunk-HLCGYOIH.cjs} +17 -17
  23. package/dist/{chunk-RXWKCEZP.cjs.map → chunk-HLCGYOIH.cjs.map} +1 -1
  24. package/dist/{chunk-PPG6W34P.js → chunk-ISO4TI5J.js} +3 -3
  25. package/dist/{chunk-PPG6W34P.js.map → chunk-ISO4TI5J.js.map} +1 -1
  26. package/dist/{chunk-6AFUNKK7.cjs → chunk-JZWLXNHV.cjs} +3 -3
  27. package/dist/{chunk-6AFUNKK7.cjs.map → chunk-JZWLXNHV.cjs.map} +1 -1
  28. package/dist/{chunk-CZ32XADN.cjs → chunk-NVZJSKZS.cjs} +17 -17
  29. package/dist/{chunk-CZ32XADN.cjs.map → chunk-NVZJSKZS.cjs.map} +1 -1
  30. package/dist/{chunk-JYP7YXT2.js → chunk-ZOTXDOS5.js} +4 -4
  31. package/dist/{chunk-JYP7YXT2.js.map → chunk-ZOTXDOS5.js.map} +1 -1
  32. package/dist/{chunk-6F2Q32KA.js → chunk-ZRNQV6HV.js} +425 -52
  33. package/dist/chunk-ZRNQV6HV.js.map +1 -0
  34. package/dist/contracts/handlers/index.cjs +9 -9
  35. package/dist/contracts/handlers/index.d.cts +3 -3
  36. package/dist/contracts/handlers/index.d.ts +3 -3
  37. package/dist/contracts/handlers/index.js +2 -2
  38. package/dist/{delegate-DLIOBQ5x.d.cts → delegate-1yp1HyP7.d.cts} +1 -1
  39. package/dist/{delegate-Dyn5L80J.d.ts → delegate-BAX5QftB.d.ts} +1 -1
  40. package/dist/{hdWalletCapable-Dt3MUiGE.d.cts → hdWalletCapable-CmEU0NP1.d.ts} +49 -5
  41. package/dist/{hdWalletCapable-D9tooZ6F.d.ts → hdWalletCapable-eJgaT-ec.d.cts} +49 -5
  42. package/dist/{index-D9tXd-tN.d.ts → index-Bem5vKzX.d.ts} +2 -2
  43. package/dist/{index-Udm5V2xW.d.cts → index-DUxufw76.d.cts} +53 -1
  44. package/dist/{index-Udm5V2xW.d.ts → index-DUxufw76.d.ts} +53 -1
  45. package/dist/{index-D3hmsuKs.d.cts → index-W_oMcOmG.d.cts} +2 -2
  46. package/dist/index.cjs +318 -294
  47. package/dist/index.d.cts +81 -14
  48. package/dist/index.d.ts +81 -14
  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-ZdS16Ypm.d.ts → taskRunner-D_iPiZIi.d.ts} +1 -1
  59. package/dist/{taskRunner-DxZciNaa.d.cts → taskRunner-Dr3NStc0.d.cts} +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-5MJHZHG7.cjs.map +0 -1
  74. package/dist/chunk-6F2Q32KA.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,11 +1,11 @@
1
- import { a8 as ReadonlyIdentity, a as Identity, au as DescriptorSigningRequest, av as Transaction, aq as SignerSession, a6 as DescriptorProvider, aw as IntentFeeConfig, ax as OffchainInput, ay as FeeAmount, az as OnchainInput, aA as FeeOutput, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch, W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, z as Contract, C as ContractRepository, H as ContractFilter, I as IWallet, u as ArkProvider, ao as SettlementConfig, aB as ContractWatcherConfig, aC as Asset, R as Recipient, aD as FeeInfo, o as SettlementEvent, n as SettleParams, S as SendBitcoinParams, G as GetArkadeInfoOptions, aE as GetVtxosOptions, aF as PaginationOptions, f as GetVtxosFilter, aG as CreateContractParams, aH as GetContractsFilter, y as VirtualCoin, aI as GetSpendablePathsOptions, aJ as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aK as IssuanceParams, aL as ReissuanceParams, aM as BurnParams, aN as RenewVtxosOptions, A as ArkadeInfo, aO as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, af as ContractSyncState, aj as ContractWithVtxos, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a7 as IReadonlyWallet, h as ActivityRegistry, ae as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, q as IAssetManager, p as SendParams, m as IDelegateManager, aY as IVtxoManager, a9 as OnchainProvider, X as Network, ah as NetworkName, al as Coin, aZ as ExplorerTransaction, a_ as ArkInfo, ar as SignedIntent, as as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, x as TapLeafScript, b2 as EncodedVtxoScript, Y as CSVMultisigTapscript, w as RelativeTimelock, V as VtxoScript, b3 as Status, ai as ArkAddress, b4 as ChainTx, v as IndexerProvider, $ as TxTree, b5 as PathContext } from './index-Udm5V2xW.cjs';
2
- export { b6 as ActivityIntent, b7 as ActivityResolver, b8 as ArkIntentState, b9 as ArkTapscript, ba as AssetMetadata, bb as BITCOIN_EMULATOR_PUBKEY, bc as BaseWalletConfig, a3 as BatchFailedEvent, a1 as BatchFinalizationEvent, a2 as BatchFinalizedEvent, bd as BatchInfo, be as BatchSignableIdentity, Z as BatchStartedEvent, bf as CLTVMultisigTapscript, bg as CandidateDeps, bh as ChainTxType, U as ChainedTxType, bi as CommitmentTx, bj as ConditionCSVMultisigTapscript, bk as ConditionMultisigTapscript, bl as ContractBalance, bm as ContractEventCallback, bn as ContractHandler, am as ContractManager, an as ContractManagerConfig, bo as ContractState, bp as ContractVtxo, bq as ContractWatcher, br as DEFAULT_VTXO_PAGE_SIZE, bs as DelegateManagerImpl, bt as DelegateOptions, aa as DelegateProvider, bu as DelegatorManagerImpl, bv as DelegatorProvider, bw as DeprecatedSignerMigrationReport, bx as DeprecatedSignerReport, by as DigestMismatchError, bz as Discoverable, bA as DiscoveredContract, bB as DiscoveryDeps, bC as ESPLORA_URL, bD as EsploraProvider, bE as EventSourceCapable, bF as EventSourceFactory, bG as EventSourceLike, bH as EventSourceUnavailableError, ac as ExitCaptureMode, bI as ExitChainResolver, ad as ExitDataSource, bJ as ExtendedContractVtxo, bK as GroupMembership, bL as HandlerError, bM as IDelegatorManager, bN as INTENT_TERMINAL_STATES, bO as IndexerTxType, bP as IntentCoin, bQ as KnownMetadata, bR as MUTINYNET_EMULATOR_PUBKEY, bS as MigrateDeprecatedSignerOptions, bT as MigrationLegReport, bU as MigrationVtxoRef, bV as MultisigTapscript, bW as NewAddressType, bX as Nonces, bY as Output, bZ as PageResponse, b_ as PartialSig, b$ as PrevTxSource, c0 as PrevTxUnavailableError, c1 as ProviderClass, c2 as REGTEST_EMULATOR_PUBKEY, c3 as RawTxSource, ab as ReadonlyWalletConfig, ag as RecipientArkadeAddressContext, r as RestArkProvider, c4 as RestDelegateProvider, c5 as RestDelegatorProvider, s as RestIndexerProvider, c6 as ScanContractsOptions, c7 as ScanResult, c8 as ScheduledSession, c9 as SettlementEventType, ca as SignRequest, cb as SignerClassification, cc as SignerSet, cd as SubscriptionEvent, ce as SubscriptionHeartbeat, t as SubscriptionResponse, cf as SweepTxNotification, cg as TapLeaves, ch as TapTreeCoder, ci as TapscriptType, at as TimeHeight, a0 as TreeNoncesEvent, a5 as TreeSignatureEvent, _ as TreeSigningStartedEvent, a4 as TreeTxEvent, cj as Tx, ck as TxHistoryRecord, cl as TxKey, cm as TxNotification, cn as TxTag, co as TxTreeNode, cp as TxType, cq as VirtualStatus, cr as Vtxo, cs as VtxoChain, ap as VtxoManager, ct as VtxoType, b as WalletConfig, cu as WalletMode, cv as WithPrevTx, cw as assertAllowedSighashTypes, cx as assertRecipientArkadeAddress, cy as assetMintResolver, cz as attachPrevArkTxs, cA as attachPrevoutTxs, cB as boardingResolver, cC as canRecoverOnchain, cD as canSpendOffchain, cE as canSweepOnchain, cF as classifyAgainstSignerSet, cG as classifyContractSigner, cH as collabExitResolver, cI as configureEventSource, cJ as createDefaultActivityRegistry, cK as createExitChainResolver, cL as decodeTapscript, cM as defaultEmulatorPubkey, cN as getAllNormalizedVtxos, cO as getConfiguredEventSource, cP as getNetwork, cQ as getNormalizedVtxos, 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, c_ as isPastExpiry, c$ as isRecoverable, d0 as isSigningIdentity, d1 as isSpendable, d2 as isSubdust, d3 as isTerminalIntentState, d4 as isVirtualCoin, d5 as isVtxoExpiringSoon, d6 as networkFromArkadeInfo, d7 as networks, d8 as resolveEmulatorPubkey, d9 as resolveEventSource, da as resolvePrevTxs, db as scriptFromTapLeafScript, dc as signerSetFromInfo, dd as toXOnlySignerHex, de as withPrevTxs } from './index-Udm5V2xW.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-Dt3MUiGE.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-Dt3MUiGE.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-D3hmsuKs.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-D3hmsuKs.cjs';
7
- import { D as DefaultVtxo } from './delegate-DLIOBQ5x.cjs';
8
- export { a as DelegateVtxo } from './delegate-DLIOBQ5x.cjs';
1
+ import { a8 as ReadonlyIdentity, a as Identity, au as DescriptorSigningRequest, av as Transaction, aq as SignerSession, a6 as DescriptorProvider, aw as IntentFeeConfig, ax as OffchainInput, ay as FeeAmount, az as OnchainInput, aA as FeeOutput, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch, W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, z as Contract, C as ContractRepository, H as ContractFilter, I as IWallet, u as ArkProvider, ao as SettlementConfig, aB as ContractWatcherConfig, aC as Asset, R as Recipient, aD as FeeInfo, o as SettlementEvent, n as SettleParams, S as SendBitcoinParams, G as GetArkadeInfoOptions, aE as GetVtxosOptions, aF as PaginationOptions, f as GetVtxosFilter, aG as CreateContractParams, aH as GetContractsFilter, y as VirtualCoin, aI as GetSpendablePathsOptions, aJ as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aK as IssuanceParams, aL as ReissuanceParams, aM as BurnParams, aN as RenewVtxosOptions, A as ArkadeInfo, aO as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, af as ContractSyncState, aj as ContractWithVtxos, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a7 as IReadonlyWallet, h as ActivityRegistry, ae as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, q as IAssetManager, p as SendParams, m as IDelegateManager, aY as IVtxoManager, a9 as OnchainProvider, X as Network, ah as NetworkName, al as Coin, aZ as ExplorerTransaction, a_ as ArkInfo, ar as SignedIntent, as as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, x as TapLeafScript, b2 as EncodedVtxoScript, Y as CSVMultisigTapscript, w as RelativeTimelock, V as VtxoScript, b3 as Status, ai as ArkAddress, b4 as ChainTx, v as IndexerProvider, $ as TxTree, b5 as PathContext } from './index-DUxufw76.cjs';
2
+ export { b6 as ActivityIntent, b7 as ActivityResolver, b8 as ArkIntentState, b9 as ArkTapscript, ba as AssetMetadata, bb as BITCOIN_EMULATOR_PUBKEY, bc as BaseWalletConfig, a3 as BatchFailedEvent, a1 as BatchFinalizationEvent, a2 as BatchFinalizedEvent, bd as BatchInfo, be as BatchSignableIdentity, Z as BatchStartedEvent, bf as CLTVMultisigTapscript, bg as CandidateDeps, bh as ChainTxType, U as ChainedTxType, bi as CommitmentTx, bj as ConditionCSVMultisigTapscript, bk as ConditionMultisigTapscript, bl as ContractBalance, bm as ContractEventCallback, bn as ContractHandler, am as ContractManager, an as ContractManagerConfig, bo as ContractState, bp as ContractVtxo, bq as ContractWatcher, br as DEFAULT_VTXO_PAGE_SIZE, bs as DelegateManagerImpl, bt as DelegateOptions, aa as DelegateProvider, bu as DelegatorManagerImpl, bv as DelegatorProvider, bw as DeprecatedSignerMigrationReport, bx as DeprecatedSignerReport, by as DigestMismatchError, bz as Discoverable, bA as DiscoveredContract, bB as DiscoveryDeps, bC as ESPLORA_URL, bD as EsploraProvider, bE as EventSourceCapable, bF as EventSourceFactory, bG as EventSourceLike, bH as EventSourceUnavailableError, ac as ExitCaptureMode, bI as ExitChainResolver, ad as ExitDataSource, bJ as ExtendedContractVtxo, bK as GroupMembership, bL as HandlerError, bM as IDelegatorManager, bN as INTENT_TERMINAL_STATES, bO as IndexerTxType, bP as IntentCoin, bQ as KnownMetadata, bR as MUTINYNET_EMULATOR_PUBKEY, bS as MigrateDeprecatedSignerOptions, bT as MigrationLegReport, bU as MigrationVtxoRef, bV as MultisigTapscript, bW as NewAddressType, bX as Nonces, bY as Output, bZ as PageResponse, b_ as PartialSig, b$ as PrevTxSource, c0 as PrevTxUnavailableError, c1 as ProviderClass, c2 as REGTEST_EMULATOR_PUBKEY, c3 as RawTxSource, ab as ReadonlyWalletConfig, ag as RecipientArkadeAddressContext, r as RestArkProvider, c4 as RestDelegateProvider, c5 as RestDelegatorProvider, s as RestIndexerProvider, c6 as ScanContractsOptions, c7 as ScanResult, c8 as ScheduledSession, c9 as SettlementEventType, ca as SignRequest, cb as SignerClassification, cc as SignerSet, cd as SubscriptionEvent, ce as SubscriptionHeartbeat, t as SubscriptionResponse, cf as SweepTxNotification, cg as TapLeaves, ch as TapTreeCoder, ci as TapscriptType, at as TimeHeight, a0 as TreeNoncesEvent, a5 as TreeSignatureEvent, _ as TreeSigningStartedEvent, a4 as TreeTxEvent, cj as Tx, ck as TxHistoryRecord, cl as TxKey, cm as TxNotification, cn as TxTag, co as TxTreeNode, cp as TxType, cq as VirtualStatus, cr as Vtxo, cs as VtxoChain, ap as VtxoManager, ct as VtxoType, b as WalletConfig, cu as WalletMode, cv as WithPrevTx, cw as assertAllowedSighashTypes, cx as assertRecipientArkadeAddress, cy as assetMintResolver, cz as attachPrevArkTxs, cA as attachPrevoutTxs, cB as boardingResolver, cC as canRecoverOnchain, cD as canSpendOffchain, cE as canSweepOnchain, cF as classifyAgainstSignerSet, cG as classifyContractSigner, cH as collabExitResolver, cI as configureEventSource, cJ as createDefaultActivityRegistry, cK as createExitChainResolver, cL as decodeTapscript, cM as defaultEmulatorPubkey, cN as getAllNormalizedVtxos, cO as getConfiguredEventSource, cP as getNetwork, cQ as getNormalizedVtxos, 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, c_ as isPastExpiry, c$ as isRecoverable, d0 as isSigningIdentity, d1 as isSpendable, d2 as isSubdust, d3 as isTerminalIntentState, d4 as isVirtualCoin, d5 as isVtxoExpiringSoon, d6 as networkFromArkadeInfo, d7 as networks, d8 as resolveEmulatorPubkey, d9 as resolveEventSource, da as resolvePrevTxs, db as scriptFromTapLeafScript, dc as signerSetFromInfo, dd as toXOnlySignerHex, de as withPrevTxs } from './index-DUxufw76.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-eJgaT-ec.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-eJgaT-ec.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-W_oMcOmG.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-W_oMcOmG.cjs';
7
+ import { D as DefaultVtxo } from './delegate-1yp1HyP7.cjs';
8
+ export { a as DelegateVtxo } from './delegate-1yp1HyP7.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';
@@ -3970,6 +3970,8 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
3970
3970
  private ws;
3971
3971
  private network;
3972
3972
  private chain;
3973
+ private mtpCache?;
3974
+ private mtpInflight?;
3973
3975
  constructor(ws: ElectrumWS, network: Network);
3974
3976
  getCoins(address: string): Promise<Coin[]>;
3975
3977
  getFeeRate(): Promise<number | undefined>;
@@ -4030,11 +4032,24 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
4030
4032
  blockTime: number;
4031
4033
  blockHeight: number;
4032
4034
  }>;
4035
+ /** `time` is median-time-past, per {@link OnchainProvider.getChainTip};
4036
+ * Electrum serves raw headers and no MTP, so it is computed here. */
4033
4037
  getChainTip(): Promise<{
4034
4038
  height: number;
4035
4039
  time: number;
4036
4040
  hash: string;
4037
4041
  }>;
4042
+ /**
4043
+ * Consensus's `GetMedianTimePast`, ending at and including `height`.
4044
+ *
4045
+ * Cached per tip HASH, not height: this runs on every balance read, and
4046
+ * hashing means a reorg at the same height recomputes rather than serving
4047
+ * the orphaned chain's median.
4048
+ */
4049
+ private medianTimePast;
4050
+ /** Degrades to the tip's `nTime` rather than throwing — a caller that
4051
+ * cannot read the tip at all is worse off. */
4052
+ private readMedianTimePast;
4038
4053
  watchAddresses(addresses: string[], eventCallback: (txs: ExplorerTransaction[]) => void): Promise<() => void>;
4039
4054
  /** Close the underlying WebSocket connection. */
4040
4055
  close(): Promise<void>;
@@ -6188,6 +6203,8 @@ interface PaymentHandle {
6188
6203
  *
6189
6204
  * Rails whose underlying primitive *deducts* its fee (the collaborative exit)
6190
6205
  * gross the amount up to honour this; rails that add it on top pass it through.
6206
+ * A rail that does not perform the deducting spend cannot gross up to a fee it
6207
+ * never chooses, and flags that instead: see `claimFeeDeductedFromPayout`.
6191
6208
  *
6192
6209
  * `fee` is a pre-send estimate wherever the true cost is only fixed later: the
6193
6210
  * collaborative exit does not include the per-input intent fees, which depend
@@ -6202,6 +6219,25 @@ interface RouteQuote {
6202
6219
  fee: number;
6203
6220
  /** `amount + fee` — what leaves the wallet. */
6204
6221
  total: number;
6222
+ /**
6223
+ * @experimental The asset shape is provisional. The v2 swap client models
6224
+ * assets as `give`/`take`/`amountOn` over `AssetRef`, and the two
6225
+ * vocabularies are expected to converge on v0.5; do not treat this field as
6226
+ * stable 0.4.x API.
6227
+ *
6228
+ * The asset view; absent means BTC only. The sats fields keep their
6229
+ * meaning — an asset rides a sats-carrying output, so `amount` is the
6230
+ * carrier, not zero.
6231
+ *
6232
+ * A pair, not a triple: on a cross-asset route these name DIFFERENT
6233
+ * assets, so `total = amount + fee` cannot hold across the two units —
6234
+ * which forces the purchase price into `fee`. Prefer `assets.spent` for a
6235
+ * cost display.
6236
+ */
6237
+ assets?: {
6238
+ delivered: Asset;
6239
+ spent: Asset;
6240
+ };
6205
6241
  /** Execute. Returns an observable handle, never a bare result. */
6206
6242
  send(): Promise<PaymentHandle>;
6207
6243
  meta?: Record<string, unknown>;
@@ -6218,14 +6254,18 @@ interface RouterContext {
6218
6254
  wallet: Wallet;
6219
6255
  prefs: RouterPreferences;
6220
6256
  }
6221
- /** A payment request: the raw target plus an optional explicit amount. Rails
6222
- * self-extract their target from `raw` (bare address/invoice or a BIP21 URI);
6223
- * `amount` supplements or overrides any amount encoded in `raw`. */
6257
+ /** Mirrors {@link Recipient}: an Arkade address is the same string for BTC and
6258
+ * for an asset, so the AMOUNT names the asset, never the target. */
6224
6259
  interface PaymentRequest {
6225
6260
  /** Raw target: bare address/invoice, or a BIP21 URI. */
6226
6261
  raw: string;
6227
6262
  /** Explicit sats; supplements/overrides any amount encoded in `raw`. */
6228
6263
  amount?: number;
6264
+ /** @experimental — provisional, see {@link RouteQuote.assets}.
6265
+ *
6266
+ * Additive: an asset transfer also moves sats, so a 500 USDX request
6267
+ * legitimately has both. A rail that cannot deliver assets must REFUSE. */
6268
+ assets?: Asset[];
6229
6269
  }
6230
6270
  /** A payment rail — registered by id, mirrors the ActivityRegistry resolver shape. */
6231
6271
  interface PaymentRail {
@@ -6293,6 +6333,14 @@ declare function resolveSendAmount(railId: string, raw: string, amount?: number)
6293
6333
  * distinction is left to `resolveSendAmount` at quote time.
6294
6334
  */
6295
6335
  declare function tryResolveSendAmount(raw: string, amount?: number): number | undefined;
6336
+ /** The assets a request asks for — `[]` when it names none. */
6337
+ declare function assetsOf(req: PaymentRequest): Asset[];
6338
+ /** For a BTC-only rail: refusing is what leaves the router free to rank an
6339
+ * asset-capable one, instead of paying the carrier and dropping the asset. */
6340
+ declare function assertNoAssets(railId: string, req: PaymentRequest): void;
6341
+ /** Exactly one: `Wallet.send` takes a list because one output can carry
6342
+ * several, but a routed PAYMENT is one thing being paid. */
6343
+ declare function resolveAssetAmount(railId: string, req: PaymentRequest): Asset;
6296
6344
 
6297
6345
  type Update = {
6298
6346
  status: PaymentStatus;
@@ -6341,9 +6389,23 @@ declare class PaymentRouter {
6341
6389
  * The only rail that is receiver-exact for free: an off-chain send delivers the
6342
6390
  * full amount and carries no counterparty or on-chain fee, so `fee` is 0 and
6343
6391
  * `total` equals `amount` (see {@link RouteQuote}).
6392
+ *
6393
+ * BTC only: a request naming an asset drops this rail rather than paying its
6394
+ * sats and dropping the asset, leaving `ark-asset` to rank.
6344
6395
  */
6345
6396
  declare function arkRail(): PaymentRail;
6346
6397
 
6398
+ /** The sats carrier an asset rides on; mirrors `Recipient.amount`'s default. */
6399
+ declare const ASSET_CARRIER_SATS = 330;
6400
+ /**
6401
+ * Off-chain Arkade send of an ASSET — the sibling of `ark`.
6402
+ *
6403
+ * They split on `available()` rather than `match()` because both legitimately
6404
+ * match the address; which one can pay is a question about the amount, so
6405
+ * `options()` returns exactly one and their relative priority is immaterial.
6406
+ */
6407
+ declare function arkAssetRail(): PaymentRail;
6408
+
6347
6409
  /**
6348
6410
  * On-chain BTC send via collaborative exit — the Wallet-only on-chain path (no
6349
6411
  * swap). Matches a bare BTC address or the on-chain part of a unified BIP21 URI
@@ -6363,8 +6425,13 @@ declare function arkRail(): PaymentRail;
6363
6425
  declare function onchainRail(): PaymentRail;
6364
6426
 
6365
6427
  /**
6366
- * Default payment router with the Wallet-only rails: `ark` (off-chain send) and
6367
- * `onchain` (collaborative exit), ranked in that order.
6428
+ * Default payment router with the Wallet-only rails: `ark` (off-chain BTC send),
6429
+ * `ark-asset` (off-chain asset send) and `onchain` (collaborative exit).
6430
+ * Solver-routed rails live in `@arkade-os/swap` and are registered by the app.
6431
+ *
6432
+ * The default priority is `["ark", "ark-asset", "onchain"]`.
6433
+ * `ark` and `ark-asset` never compete — the amount decides which is
6434
+ * available — so their order between themselves is immaterial.
6368
6435
  */
6369
6436
  declare function createDefaultPaymentRouter(wallet: Wallet): PaymentRouter;
6370
6437
 
@@ -6643,4 +6710,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
6643
6710
  burn(params: BurnParams): Promise<string>;
6644
6711
  }
6645
6712
 
6646
- export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
6713
+ export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveAssetAmount, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { a8 as ReadonlyIdentity, a as Identity, au as DescriptorSigningRequest, av as Transaction, aq as SignerSession, a6 as DescriptorProvider, aw as IntentFeeConfig, ax as OffchainInput, ay as FeeAmount, az as OnchainInput, aA as FeeOutput, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch, W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, z as Contract, C as ContractRepository, H as ContractFilter, I as IWallet, u as ArkProvider, ao as SettlementConfig, aB as ContractWatcherConfig, aC as Asset, R as Recipient, aD as FeeInfo, o as SettlementEvent, n as SettleParams, S as SendBitcoinParams, G as GetArkadeInfoOptions, aE as GetVtxosOptions, aF as PaginationOptions, f as GetVtxosFilter, aG as CreateContractParams, aH as GetContractsFilter, y as VirtualCoin, aI as GetSpendablePathsOptions, aJ as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aK as IssuanceParams, aL as ReissuanceParams, aM as BurnParams, aN as RenewVtxosOptions, A as ArkadeInfo, aO as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, af as ContractSyncState, aj as ContractWithVtxos, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a7 as IReadonlyWallet, h as ActivityRegistry, ae as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, q as IAssetManager, p as SendParams, m as IDelegateManager, aY as IVtxoManager, a9 as OnchainProvider, X as Network, ah as NetworkName, al as Coin, aZ as ExplorerTransaction, a_ as ArkInfo, ar as SignedIntent, as as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, x as TapLeafScript, b2 as EncodedVtxoScript, Y as CSVMultisigTapscript, w as RelativeTimelock, V as VtxoScript, b3 as Status, ai as ArkAddress, b4 as ChainTx, v as IndexerProvider, $ as TxTree, b5 as PathContext } from './index-Udm5V2xW.js';
2
- export { b6 as ActivityIntent, b7 as ActivityResolver, b8 as ArkIntentState, b9 as ArkTapscript, ba as AssetMetadata, bb as BITCOIN_EMULATOR_PUBKEY, bc as BaseWalletConfig, a3 as BatchFailedEvent, a1 as BatchFinalizationEvent, a2 as BatchFinalizedEvent, bd as BatchInfo, be as BatchSignableIdentity, Z as BatchStartedEvent, bf as CLTVMultisigTapscript, bg as CandidateDeps, bh as ChainTxType, U as ChainedTxType, bi as CommitmentTx, bj as ConditionCSVMultisigTapscript, bk as ConditionMultisigTapscript, bl as ContractBalance, bm as ContractEventCallback, bn as ContractHandler, am as ContractManager, an as ContractManagerConfig, bo as ContractState, bp as ContractVtxo, bq as ContractWatcher, br as DEFAULT_VTXO_PAGE_SIZE, bs as DelegateManagerImpl, bt as DelegateOptions, aa as DelegateProvider, bu as DelegatorManagerImpl, bv as DelegatorProvider, bw as DeprecatedSignerMigrationReport, bx as DeprecatedSignerReport, by as DigestMismatchError, bz as Discoverable, bA as DiscoveredContract, bB as DiscoveryDeps, bC as ESPLORA_URL, bD as EsploraProvider, bE as EventSourceCapable, bF as EventSourceFactory, bG as EventSourceLike, bH as EventSourceUnavailableError, ac as ExitCaptureMode, bI as ExitChainResolver, ad as ExitDataSource, bJ as ExtendedContractVtxo, bK as GroupMembership, bL as HandlerError, bM as IDelegatorManager, bN as INTENT_TERMINAL_STATES, bO as IndexerTxType, bP as IntentCoin, bQ as KnownMetadata, bR as MUTINYNET_EMULATOR_PUBKEY, bS as MigrateDeprecatedSignerOptions, bT as MigrationLegReport, bU as MigrationVtxoRef, bV as MultisigTapscript, bW as NewAddressType, bX as Nonces, bY as Output, bZ as PageResponse, b_ as PartialSig, b$ as PrevTxSource, c0 as PrevTxUnavailableError, c1 as ProviderClass, c2 as REGTEST_EMULATOR_PUBKEY, c3 as RawTxSource, ab as ReadonlyWalletConfig, ag as RecipientArkadeAddressContext, r as RestArkProvider, c4 as RestDelegateProvider, c5 as RestDelegatorProvider, s as RestIndexerProvider, c6 as ScanContractsOptions, c7 as ScanResult, c8 as ScheduledSession, c9 as SettlementEventType, ca as SignRequest, cb as SignerClassification, cc as SignerSet, cd as SubscriptionEvent, ce as SubscriptionHeartbeat, t as SubscriptionResponse, cf as SweepTxNotification, cg as TapLeaves, ch as TapTreeCoder, ci as TapscriptType, at as TimeHeight, a0 as TreeNoncesEvent, a5 as TreeSignatureEvent, _ as TreeSigningStartedEvent, a4 as TreeTxEvent, cj as Tx, ck as TxHistoryRecord, cl as TxKey, cm as TxNotification, cn as TxTag, co as TxTreeNode, cp as TxType, cq as VirtualStatus, cr as Vtxo, cs as VtxoChain, ap as VtxoManager, ct as VtxoType, b as WalletConfig, cu as WalletMode, cv as WithPrevTx, cw as assertAllowedSighashTypes, cx as assertRecipientArkadeAddress, cy as assetMintResolver, cz as attachPrevArkTxs, cA as attachPrevoutTxs, cB as boardingResolver, cC as canRecoverOnchain, cD as canSpendOffchain, cE as canSweepOnchain, cF as classifyAgainstSignerSet, cG as classifyContractSigner, cH as collabExitResolver, cI as configureEventSource, cJ as createDefaultActivityRegistry, cK as createExitChainResolver, cL as decodeTapscript, cM as defaultEmulatorPubkey, cN as getAllNormalizedVtxos, cO as getConfiguredEventSource, cP as getNetwork, cQ as getNormalizedVtxos, 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, c_ as isPastExpiry, c$ as isRecoverable, d0 as isSigningIdentity, d1 as isSpendable, d2 as isSubdust, d3 as isTerminalIntentState, d4 as isVirtualCoin, d5 as isVtxoExpiringSoon, d6 as networkFromArkadeInfo, d7 as networks, d8 as resolveEmulatorPubkey, d9 as resolveEventSource, da as resolvePrevTxs, db as scriptFromTapLeafScript, dc as signerSetFromInfo, dd as toXOnlySignerHex, de as withPrevTxs } from './index-Udm5V2xW.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-D9tooZ6F.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-D9tooZ6F.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-D9tXd-tN.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-D9tXd-tN.js';
7
- import { D as DefaultVtxo } from './delegate-Dyn5L80J.js';
8
- export { a as DelegateVtxo } from './delegate-Dyn5L80J.js';
1
+ import { a8 as ReadonlyIdentity, a as Identity, au as DescriptorSigningRequest, av as Transaction, aq as SignerSession, a6 as DescriptorProvider, aw as IntentFeeConfig, ax as OffchainInput, ay as FeeAmount, az as OnchainInput, aA as FeeOutput, J as IntentRepository, K as ArkIntent, L as IntentFilter, O as Outpoint, M as VirtualTxRepository, P as VirtualTx, Q as VtxoBranch, W as WalletRepository, B as ExtendedVirtualCoin, D as VtxoRepositoryKey, E as ExtendedCoin, g as ArkTransaction, F as WalletState, z as Contract, C as ContractRepository, H as ContractFilter, I as IWallet, u as ArkProvider, ao as SettlementConfig, aB as ContractWatcherConfig, aC as Asset, R as Recipient, aD as FeeInfo, o as SettlementEvent, n as SettleParams, S as SendBitcoinParams, G as GetArkadeInfoOptions, aE as GetVtxosOptions, aF as PaginationOptions, f as GetVtxosFilter, aG as CreateContractParams, aH as GetContractsFilter, y as VirtualCoin, aI as GetSpendablePathsOptions, aJ as GetAllSpendingPathsOptions, k as GetNewAddressesOptions, aK as IssuanceParams, aL as ReissuanceParams, aM as BurnParams, aN as RenewVtxosOptions, A as ArkadeInfo, aO as NormalizedVtxoPage, c as ArkadeReader, d as ArkadeBroadcaster, e as WalletBalance, af as ContractSyncState, aj as ContractWithVtxos, aP as PathSelection, l as NewAddress, aQ as ContractEvent, aR as AssetDetails, aS as IssuanceResult, aT as DelegateInfo, aU as MigrationGlobalSkipReason, aV as MigrationLegSkipReason, aW as SignerStatus, a7 as IReadonlyWallet, h as ActivityRegistry, ae as IReadonlyAssetManager, aX as StorageConfig, i as Activity, N as NormalizedExtendedVirtualCoin, j as IContractManager, q as IAssetManager, p as SendParams, m as IDelegateManager, aY as IVtxoManager, a9 as OnchainProvider, X as Network, ah as NetworkName, al as Coin, aZ as ExplorerTransaction, a_ as ArkInfo, ar as SignedIntent, as as Intent, a$ as TreeNonces, b0 as TreePartialSigs, T as TxNotificationEvent, b1 as PendingTx, x as TapLeafScript, b2 as EncodedVtxoScript, Y as CSVMultisigTapscript, w as RelativeTimelock, V as VtxoScript, b3 as Status, ai as ArkAddress, b4 as ChainTx, v as IndexerProvider, $ as TxTree, b5 as PathContext } from './index-DUxufw76.js';
2
+ export { b6 as ActivityIntent, b7 as ActivityResolver, b8 as ArkIntentState, b9 as ArkTapscript, ba as AssetMetadata, bb as BITCOIN_EMULATOR_PUBKEY, bc as BaseWalletConfig, a3 as BatchFailedEvent, a1 as BatchFinalizationEvent, a2 as BatchFinalizedEvent, bd as BatchInfo, be as BatchSignableIdentity, Z as BatchStartedEvent, bf as CLTVMultisigTapscript, bg as CandidateDeps, bh as ChainTxType, U as ChainedTxType, bi as CommitmentTx, bj as ConditionCSVMultisigTapscript, bk as ConditionMultisigTapscript, bl as ContractBalance, bm as ContractEventCallback, bn as ContractHandler, am as ContractManager, an as ContractManagerConfig, bo as ContractState, bp as ContractVtxo, bq as ContractWatcher, br as DEFAULT_VTXO_PAGE_SIZE, bs as DelegateManagerImpl, bt as DelegateOptions, aa as DelegateProvider, bu as DelegatorManagerImpl, bv as DelegatorProvider, bw as DeprecatedSignerMigrationReport, bx as DeprecatedSignerReport, by as DigestMismatchError, bz as Discoverable, bA as DiscoveredContract, bB as DiscoveryDeps, bC as ESPLORA_URL, bD as EsploraProvider, bE as EventSourceCapable, bF as EventSourceFactory, bG as EventSourceLike, bH as EventSourceUnavailableError, ac as ExitCaptureMode, bI as ExitChainResolver, ad as ExitDataSource, bJ as ExtendedContractVtxo, bK as GroupMembership, bL as HandlerError, bM as IDelegatorManager, bN as INTENT_TERMINAL_STATES, bO as IndexerTxType, bP as IntentCoin, bQ as KnownMetadata, bR as MUTINYNET_EMULATOR_PUBKEY, bS as MigrateDeprecatedSignerOptions, bT as MigrationLegReport, bU as MigrationVtxoRef, bV as MultisigTapscript, bW as NewAddressType, bX as Nonces, bY as Output, bZ as PageResponse, b_ as PartialSig, b$ as PrevTxSource, c0 as PrevTxUnavailableError, c1 as ProviderClass, c2 as REGTEST_EMULATOR_PUBKEY, c3 as RawTxSource, ab as ReadonlyWalletConfig, ag as RecipientArkadeAddressContext, r as RestArkProvider, c4 as RestDelegateProvider, c5 as RestDelegatorProvider, s as RestIndexerProvider, c6 as ScanContractsOptions, c7 as ScanResult, c8 as ScheduledSession, c9 as SettlementEventType, ca as SignRequest, cb as SignerClassification, cc as SignerSet, cd as SubscriptionEvent, ce as SubscriptionHeartbeat, t as SubscriptionResponse, cf as SweepTxNotification, cg as TapLeaves, ch as TapTreeCoder, ci as TapscriptType, at as TimeHeight, a0 as TreeNoncesEvent, a5 as TreeSignatureEvent, _ as TreeSigningStartedEvent, a4 as TreeTxEvent, cj as Tx, ck as TxHistoryRecord, cl as TxKey, cm as TxNotification, cn as TxTag, co as TxTreeNode, cp as TxType, cq as VirtualStatus, cr as Vtxo, cs as VtxoChain, ap as VtxoManager, ct as VtxoType, b as WalletConfig, cu as WalletMode, cv as WithPrevTx, cw as assertAllowedSighashTypes, cx as assertRecipientArkadeAddress, cy as assetMintResolver, cz as attachPrevArkTxs, cA as attachPrevoutTxs, cB as boardingResolver, cC as canRecoverOnchain, cD as canSpendOffchain, cE as canSweepOnchain, cF as classifyAgainstSignerSet, cG as classifyContractSigner, cH as collabExitResolver, cI as configureEventSource, cJ as createDefaultActivityRegistry, cK as createExitChainResolver, cL as decodeTapscript, cM as defaultEmulatorPubkey, cN as getAllNormalizedVtxos, cO as getConfiguredEventSource, cP as getNetwork, cQ as getNormalizedVtxos, 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, c_ as isPastExpiry, c$ as isRecoverable, d0 as isSigningIdentity, d1 as isSpendable, d2 as isSubdust, d3 as isTerminalIntentState, d4 as isVirtualCoin, d5 as isVtxoExpiringSoon, d6 as networkFromArkadeInfo, d7 as networks, d8 as resolveEmulatorPubkey, d9 as resolveEventSource, da as resolvePrevTxs, db as scriptFromTapLeafScript, dc as signerSetFromInfo, dd as toXOnlySignerHex, de as withPrevTxs } from './index-DUxufw76.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-CmEU0NP1.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-CmEU0NP1.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-Bem5vKzX.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-Bem5vKzX.js';
7
+ import { D as DefaultVtxo } from './delegate-BAX5QftB.js';
8
+ export { a as DelegateVtxo } from './delegate-BAX5QftB.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';
@@ -3970,6 +3970,8 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
3970
3970
  private ws;
3971
3971
  private network;
3972
3972
  private chain;
3973
+ private mtpCache?;
3974
+ private mtpInflight?;
3973
3975
  constructor(ws: ElectrumWS, network: Network);
3974
3976
  getCoins(address: string): Promise<Coin[]>;
3975
3977
  getFeeRate(): Promise<number | undefined>;
@@ -4030,11 +4032,24 @@ declare class ElectrumOnchainProvider implements OnchainProvider {
4030
4032
  blockTime: number;
4031
4033
  blockHeight: number;
4032
4034
  }>;
4035
+ /** `time` is median-time-past, per {@link OnchainProvider.getChainTip};
4036
+ * Electrum serves raw headers and no MTP, so it is computed here. */
4033
4037
  getChainTip(): Promise<{
4034
4038
  height: number;
4035
4039
  time: number;
4036
4040
  hash: string;
4037
4041
  }>;
4042
+ /**
4043
+ * Consensus's `GetMedianTimePast`, ending at and including `height`.
4044
+ *
4045
+ * Cached per tip HASH, not height: this runs on every balance read, and
4046
+ * hashing means a reorg at the same height recomputes rather than serving
4047
+ * the orphaned chain's median.
4048
+ */
4049
+ private medianTimePast;
4050
+ /** Degrades to the tip's `nTime` rather than throwing — a caller that
4051
+ * cannot read the tip at all is worse off. */
4052
+ private readMedianTimePast;
4038
4053
  watchAddresses(addresses: string[], eventCallback: (txs: ExplorerTransaction[]) => void): Promise<() => void>;
4039
4054
  /** Close the underlying WebSocket connection. */
4040
4055
  close(): Promise<void>;
@@ -6188,6 +6203,8 @@ interface PaymentHandle {
6188
6203
  *
6189
6204
  * Rails whose underlying primitive *deducts* its fee (the collaborative exit)
6190
6205
  * gross the amount up to honour this; rails that add it on top pass it through.
6206
+ * A rail that does not perform the deducting spend cannot gross up to a fee it
6207
+ * never chooses, and flags that instead: see `claimFeeDeductedFromPayout`.
6191
6208
  *
6192
6209
  * `fee` is a pre-send estimate wherever the true cost is only fixed later: the
6193
6210
  * collaborative exit does not include the per-input intent fees, which depend
@@ -6202,6 +6219,25 @@ interface RouteQuote {
6202
6219
  fee: number;
6203
6220
  /** `amount + fee` — what leaves the wallet. */
6204
6221
  total: number;
6222
+ /**
6223
+ * @experimental The asset shape is provisional. The v2 swap client models
6224
+ * assets as `give`/`take`/`amountOn` over `AssetRef`, and the two
6225
+ * vocabularies are expected to converge on v0.5; do not treat this field as
6226
+ * stable 0.4.x API.
6227
+ *
6228
+ * The asset view; absent means BTC only. The sats fields keep their
6229
+ * meaning — an asset rides a sats-carrying output, so `amount` is the
6230
+ * carrier, not zero.
6231
+ *
6232
+ * A pair, not a triple: on a cross-asset route these name DIFFERENT
6233
+ * assets, so `total = amount + fee` cannot hold across the two units —
6234
+ * which forces the purchase price into `fee`. Prefer `assets.spent` for a
6235
+ * cost display.
6236
+ */
6237
+ assets?: {
6238
+ delivered: Asset;
6239
+ spent: Asset;
6240
+ };
6205
6241
  /** Execute. Returns an observable handle, never a bare result. */
6206
6242
  send(): Promise<PaymentHandle>;
6207
6243
  meta?: Record<string, unknown>;
@@ -6218,14 +6254,18 @@ interface RouterContext {
6218
6254
  wallet: Wallet;
6219
6255
  prefs: RouterPreferences;
6220
6256
  }
6221
- /** A payment request: the raw target plus an optional explicit amount. Rails
6222
- * self-extract their target from `raw` (bare address/invoice or a BIP21 URI);
6223
- * `amount` supplements or overrides any amount encoded in `raw`. */
6257
+ /** Mirrors {@link Recipient}: an Arkade address is the same string for BTC and
6258
+ * for an asset, so the AMOUNT names the asset, never the target. */
6224
6259
  interface PaymentRequest {
6225
6260
  /** Raw target: bare address/invoice, or a BIP21 URI. */
6226
6261
  raw: string;
6227
6262
  /** Explicit sats; supplements/overrides any amount encoded in `raw`. */
6228
6263
  amount?: number;
6264
+ /** @experimental — provisional, see {@link RouteQuote.assets}.
6265
+ *
6266
+ * Additive: an asset transfer also moves sats, so a 500 USDX request
6267
+ * legitimately has both. A rail that cannot deliver assets must REFUSE. */
6268
+ assets?: Asset[];
6229
6269
  }
6230
6270
  /** A payment rail — registered by id, mirrors the ActivityRegistry resolver shape. */
6231
6271
  interface PaymentRail {
@@ -6293,6 +6333,14 @@ declare function resolveSendAmount(railId: string, raw: string, amount?: number)
6293
6333
  * distinction is left to `resolveSendAmount` at quote time.
6294
6334
  */
6295
6335
  declare function tryResolveSendAmount(raw: string, amount?: number): number | undefined;
6336
+ /** The assets a request asks for — `[]` when it names none. */
6337
+ declare function assetsOf(req: PaymentRequest): Asset[];
6338
+ /** For a BTC-only rail: refusing is what leaves the router free to rank an
6339
+ * asset-capable one, instead of paying the carrier and dropping the asset. */
6340
+ declare function assertNoAssets(railId: string, req: PaymentRequest): void;
6341
+ /** Exactly one: `Wallet.send` takes a list because one output can carry
6342
+ * several, but a routed PAYMENT is one thing being paid. */
6343
+ declare function resolveAssetAmount(railId: string, req: PaymentRequest): Asset;
6296
6344
 
6297
6345
  type Update = {
6298
6346
  status: PaymentStatus;
@@ -6341,9 +6389,23 @@ declare class PaymentRouter {
6341
6389
  * The only rail that is receiver-exact for free: an off-chain send delivers the
6342
6390
  * full amount and carries no counterparty or on-chain fee, so `fee` is 0 and
6343
6391
  * `total` equals `amount` (see {@link RouteQuote}).
6392
+ *
6393
+ * BTC only: a request naming an asset drops this rail rather than paying its
6394
+ * sats and dropping the asset, leaving `ark-asset` to rank.
6344
6395
  */
6345
6396
  declare function arkRail(): PaymentRail;
6346
6397
 
6398
+ /** The sats carrier an asset rides on; mirrors `Recipient.amount`'s default. */
6399
+ declare const ASSET_CARRIER_SATS = 330;
6400
+ /**
6401
+ * Off-chain Arkade send of an ASSET — the sibling of `ark`.
6402
+ *
6403
+ * They split on `available()` rather than `match()` because both legitimately
6404
+ * match the address; which one can pay is a question about the amount, so
6405
+ * `options()` returns exactly one and their relative priority is immaterial.
6406
+ */
6407
+ declare function arkAssetRail(): PaymentRail;
6408
+
6347
6409
  /**
6348
6410
  * On-chain BTC send via collaborative exit — the Wallet-only on-chain path (no
6349
6411
  * swap). Matches a bare BTC address or the on-chain part of a unified BIP21 URI
@@ -6363,8 +6425,13 @@ declare function arkRail(): PaymentRail;
6363
6425
  declare function onchainRail(): PaymentRail;
6364
6426
 
6365
6427
  /**
6366
- * Default payment router with the Wallet-only rails: `ark` (off-chain send) and
6367
- * `onchain` (collaborative exit), ranked in that order.
6428
+ * Default payment router with the Wallet-only rails: `ark` (off-chain BTC send),
6429
+ * `ark-asset` (off-chain asset send) and `onchain` (collaborative exit).
6430
+ * Solver-routed rails live in `@arkade-os/swap` and are registered by the app.
6431
+ *
6432
+ * The default priority is `["ark", "ark-asset", "onchain"]`.
6433
+ * `ark` and `ark-asset` never compete — the amount decides which is
6434
+ * available — so their order between themselves is immaterial.
6368
6435
  */
6369
6436
  declare function createDefaultPaymentRouter(wallet: Wallet): PaymentRouter;
6370
6437
 
@@ -6643,4 +6710,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
6643
6710
  burn(params: BurnParams): Promise<string>;
6644
6711
  }
6645
6712
 
6646
- export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
6713
+ export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, Activity, ActivityRegistry, AddressAllocationCapable, AmbiguousRouteError, type AnchorBumper, ArkAddress, ArkInfo, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, type ArkadeBatchInput, ArkadeBroadcaster, ArkadeCash, ArkadeContractParams, type ArkadeExtendedCoin, type ArkadeExtendedVirtualCoin, ArkadeInfo, ArkadeReader, Asset, AssetDetails, AssetManager, BIP21, BIP21Error, type BIP21Params, type BIP21ParseResult, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, BatchExpiryPolicy, BurnParams, CSVMultisigTapscript, CachingArkProvider, ChainTx, Coin, ConditionWitness, ConnectionDisposedError, type ConnectorTreeNode, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DatabaseUpgradeBlockedError, DefaultVtxo, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, DescriptorIdentity, type DescriptorIdentityOptions, type DescriptorOptions, type DescriptorSigner, DescriptorSigningProviderMissingError, type DeterministicSigner, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, type EmulatorEntry, type EmulatorInfo, EmulatorPacket, type EmulatorProvider, EncodedVtxoScript, Estimator, type ExcludableVtxo, type ExecutorEvent, type ExecutorOptions, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, Extension, ExtensionNotFoundError, type ExtensionPacket, FeeAmount, FeeInfo, FeeOutput, FetchError, GetArkadeInfoOptions, GetNewAddressesOptions, GetVtxosFilter, GetVtxosOptions, HDAllocationCapable, HDDescriptorProvider, type HDDeterministicSignCapable, HDWalletCapable, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, Intent, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, type ManagedConnection, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, NewAddress, NormalizedVtxoPage, OffchainInput, type OffchainTx, type OnExitObserved, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, PaginationOptions, type ParsedArkContract, PathContext, PathSelection, type PaymentHandle, type PaymentOption, type PaymentRail, type PaymentRequest, PaymentRouter, type PaymentStatus, PrevArkTxField, PrevoutTxField, ProviderConnectionState, type ProvisionedClaimSecret, type ProvisionedKey, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, RestEmulatorProvider, type RouteQuote, type RouteResult, type RouterContext, type RouterPreferences, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, SendParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignedIntent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TreeNonces, TreePartialSigs, TxNotificationEvent, TxTree, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, type VSize, type VerifyServerSignatures, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, type VtxoExclusion, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, index as arkade, assembleBtcdTaprootTree, assertFinalCommitmentMatchesValidated, assertNoAssets, assertSendableAmount, assertSubmittedArkTxid, index$1 as asset, assetsOf, awaitTransaction, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, buildVersion, claimWithPreimageIdentity, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultPaymentRouter, createManagedConnection, decodeArkContract, deleteByIndex, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getArkPsbtFields, getMigrationStatus, hasBoardingTxExpired, identityDescriptor, invoiceTarget, isArkContract, isBtcAddress, isCltvSatisfied, isContractGenericallySpendable, isCsvSpendable, isDeterministicSigner, isHDDeterministicSignCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isRetryableProviderError, isValidArkAddress, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, normalizeToDescriptor, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, parseHDDescriptor, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveAssetAmount, resolveSendAmount, rollbackMigration, sdkVersion, selectCoinsWithAsset, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, signAndSubmitOffchainTx, timelockToSequence, toXOnly, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
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, assertRecipientArkadeAddress, 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-6F2Q32KA.js';
2
- export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-FVTJJQNM.js';
3
- export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-KTU44AEH.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, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networkFromArkadeInfo, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-PPG6W34P.js';
1
+ export { ARKADE_MAGIC, ARKADE_SALTED_PREIMAGE_TAG, ARKADE_SWAP_PREIMAGE_TAG, ASSET_CARRIER_SATS, AbortError, ActivityRegistry, AmbiguousRouteError, ArkNote, ArkadeCash, ArkadeCashCreateError, AssetManager, BIP21, BIP21Error, BIP322, BLOCKED_UPGRADE_TIMEOUT_MS, Batch, CachingArkProvider, ChainedTxType, ConnectionDisposedError, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DEFAULT_MIN_BATCH_EXPIRY_SECONDS, DEFAULT_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, DatabaseUpgradeBlockedError, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorIdentity, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EmulatorPacket, EsploraProvider, Estimator, Extension, ExtensionNotFoundError, ForeignDescriptorError, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MAX_USED_SIGNING_DESCRIPTORS_LOOK_AHEAD, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MUTINYNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, PaymentRouter, PrevTxUnavailableError, REGTEST_MIN_BATCH_EXPIRY_SECONDS, REGTEST_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, RestEmulatorProvider, SIGNET_MIN_CHECKPOINT_EXIT_DELAY_SECONDS, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnannotatableInputError, UnilateralExit, UnknownPacket, Unroll, VtxoManager, Wallet, WalletCannotAllocateAddressError, WalletCannotSignError, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, adoptContractDescriptor, arkAssetRail, arkRail, arkTarget, arkade_exports as arkade, assertFinalCommitmentMatchesValidated, assertNoAssets, assertRecipientArkadeAddress, assertSendableAmount, assertSubmittedArkTxid, assertValidBatchExpiry, assertValidServerUnrollScript, assetMintResolver, assetsOf, attachPrevArkTxs, attachPrevoutTxs, awaitTransaction, boardingResolver, btcTarget, buildForfeitTx, buildOffchainTx, buildPreimageMessage, buildSaltedPreimageMessage, claimWithPreimageIdentity, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, collabExitResolver, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, contractPreimage, contractSigner, createAssetPacket, createDefaultActivityRegistry, createDefaultPaymentRouter, createExitChainResolver, createManagedConnection, decodeArkContract, defaultBatchExpiryPolicy, defaultCheckpointExitDelayPolicy, deleteByIndex, deserializeExitPackage, encodeArkContract, exitObserverFor, gateExclusion, gatedContracts, getAllByIndexValues, getMigrationStatus, getRandomId, hasBoardingTxExpired, hasCandidates, invoiceTarget, isAddressAllocationCapable, isArkContract, isBatchSignable, isBtcAddress, isContractGenericallySpendable, isCooperativelyMigratable, isDeterministicSigner, isDiscoverable, isHDAllocationCapable, isHDDeterministicSignCapable, isHDWalletCapable, isLightningInvoice, isLnurl, isMessageBusInitializingError, isMessageBusNotInitializedError, isPerArtifactDescriptor, isSigningIdentity, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, logExcludedVtxos, makeHandle, matchServerCheckpoints, migrateWalletRepository, notifyExitObserved, onchainRail, openDatabase, outpointExclusion, outpointReasons, promisifyRequest, provisionClaimSecret, provisionRefundKey, requiresMigration, resolveAssetAmount, resolveBatchExpiryPolicy, resolveCheckpointExitDelayPolicy, resolveDescriptorSigner, resolvePrevTxs, resolveSendAmount, rollbackMigration, selectCoinsWithAsset, selectVirtualCoins, serializeExitPackage, setupServiceWorker, signAndSubmitOffchainTx, signerSetFromInfo, signingDescriptorIndex, strictSigningDescriptorIndex, toXOnlySignerHex, tryResolveSendAmount, validateBatchRecipients, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds, withPrevTxs } from './chunk-ZRNQV6HV.js';
2
+ export { ChainTxType, DEFAULT_VTXO_PAGE_SIZE, IndexerTxType, RestIndexerProvider, asset_exports as asset } from './chunk-4PKLULWT.js';
3
+ export { ArkadeContractHandler, BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, VHTLCV2ContractHandler, contractHandlers, deriveDescriptorLeafCompressedPubKey, deriveDescriptorLeafPubKey, identityDescriptor, isCltvSatisfied, isCsvSpendable, normalizeToDescriptor, parseHDDescriptor, toXOnly } from './chunk-3R476TDV.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, getAllNormalizedVtxos, getArkPsbtFields, getConfiguredEventSource, getNetwork, getNormalizedVtxos, getSequence, hasTerminalSpend, isArkError, isEventSourceUnavailableError, isExpired, isPastExpiry, isRecoverable, isRetryableProviderError, isSpendable, isVirtualCoin, maybeArkError, networkFromArkadeInfo, networks, resolveEmulatorPubkey, resolveEventSource, scriptFromTapLeafScript, sdkVersion, sequenceToTimelock, setArkPsbtField, timelockToSequence } from './chunk-ISO4TI5J.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 chunk5MJHZHG7_cjs = require('../../chunk-5MJHZHG7.cjs');
4
- require('../../chunk-CZ32XADN.cjs');
5
- require('../../chunk-HL7EC2Z5.cjs');
6
- require('../../chunk-6AFUNKK7.cjs');
3
+ var chunkGMZZQXV5_cjs = require('../../chunk-GMZZQXV5.cjs');
4
+ require('../../chunk-NVZJSKZS.cjs');
5
+ require('../../chunk-43FKNLX4.cjs');
6
+ require('../../chunk-JZWLXNHV.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 = chunk5MJHZHG7_cjs.serializeVtxo(vtxo);
41
+ const s = chunkGMZZQXV5_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 (!chunk5MJHZHG7_cjs.isVtxoForScript(vtxo, key.script)) {
89
+ if (!chunkGMZZQXV5_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 = chunk5MJHZHG7_cjs.serializeUtxo(utxo);
114
+ const s = chunkGMZZQXV5_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(chunk5MJHZHG7_cjs.serializeAssets(tx.assets)) : null
167
+ assetsJson: tx.assets ? JSON.stringify(chunkGMZZQXV5_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 ?? chunk5MJHZHG7_cjs.scriptFromArkAddress(obj.address)
237
+ script: obj.script ?? chunkGMZZQXV5_cjs.scriptFromArkAddress(obj.address)
238
238
  };
239
- return chunk5MJHZHG7_cjs.deserializeVtxo(serialized);
239
+ return chunkGMZZQXV5_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 chunk5MJHZHG7_cjs.deserializeUtxo(serialized);
258
+ return chunkGMZZQXV5_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 = chunk5MJHZHG7_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
273
+ tx.assets = chunkGMZZQXV5_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
- chunk5MJHZHG7_cjs.assertIntentIdUnique(intent, clashes);
453
+ chunkGMZZQXV5_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) => chunk5MJHZHG7_cjs.intentMatchesFilter(i, filter)) : all;
483
- const { skip, end } = chunk5MJHZHG7_cjs.intentPageBounds(filter, out.length);
482
+ const out = filter ? all.filter((i) => chunkGMZZQXV5_cjs.intentMatchesFilter(i, filter)) : all;
483
+ const { skip, end } = chunkGMZZQXV5_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 (!chunk5MJHZHG7_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
489
+ if (!chunkGMZZQXV5_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: chunk5MJHZHG7_cjs.mergeChainedTxType(t.type, prev?.type)
531
+ type: chunkGMZZQXV5_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 = chunk5MJHZHG7_cjs.scriptFromArkAddress(newVtxo.address);
765
+ newVtxo.script = chunkGMZZQXV5_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 chunk5MJHZHG7_cjs.ChainedTxType; }
782
+ get: function () { return chunkGMZZQXV5_cjs.ChainedTxType; }
783
783
  });
784
784
  exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
785
785
  exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;