@arkade-os/sdk 0.4.44 → 0.4.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +35 -0
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +2 -2
  4. package/dist/adapters/expo.d.ts +2 -2
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/adapters/indexedDB.cjs +5 -5
  7. package/dist/adapters/indexedDB.js +4 -4
  8. package/dist/{ark-I8jfe5VE.d.cts → ark-C9ognsOV.d.cts} +94 -2
  9. package/dist/{ark-I8jfe5VE.d.ts → ark-C9ognsOV.d.ts} +94 -2
  10. package/dist/{asyncStorageTaskQueue-BtSOVZFn.d.ts → asyncStorageTaskQueue-BAKZ5cS5.d.ts} +2 -2
  11. package/dist/{asyncStorageTaskQueue-Dap7qUlF.d.cts → asyncStorageTaskQueue-CmBYVlxw.d.cts} +2 -2
  12. package/dist/{chunk-32YKLQPS.cjs → chunk-4KXOCVXP.cjs} +32 -29
  13. package/dist/chunk-4KXOCVXP.cjs.map +1 -0
  14. package/dist/{chunk-RJ6XVCX4.cjs → chunk-6TQJOD72.cjs} +7 -7
  15. package/dist/{chunk-RJ6XVCX4.cjs.map → chunk-6TQJOD72.cjs.map} +1 -1
  16. package/dist/{chunk-UBYY2TPK.cjs → chunk-7IYIFMF4.cjs} +178 -79
  17. package/dist/chunk-7IYIFMF4.cjs.map +1 -0
  18. package/dist/{chunk-LJ35HPJW.js → chunk-CWJ7ZCP7.js} +171 -75
  19. package/dist/chunk-CWJ7ZCP7.js.map +1 -0
  20. package/dist/{chunk-XIVCG6EP.cjs → chunk-D46YDM36.cjs} +1173 -425
  21. package/dist/chunk-D46YDM36.cjs.map +1 -0
  22. package/dist/{chunk-BE5MUB7T.js → chunk-FWG4TSPN.js} +7 -2
  23. package/dist/chunk-FWG4TSPN.js.map +1 -0
  24. package/dist/{chunk-V7WIZR2B.js → chunk-JTCQ6QXQ.js} +4 -4
  25. package/dist/{chunk-V7WIZR2B.js.map → chunk-JTCQ6QXQ.js.map} +1 -1
  26. package/dist/{chunk-HXDZ2QTW.cjs → chunk-MQB5H4X5.cjs} +7 -2
  27. package/dist/chunk-MQB5H4X5.cjs.map +1 -0
  28. package/dist/{chunk-FMI2GKYO.js → chunk-P6VBP3CT.js} +977 -231
  29. package/dist/chunk-P6VBP3CT.js.map +1 -0
  30. package/dist/{chunk-YNEDJTX2.js → chunk-QKC2T54O.js} +6 -3
  31. package/dist/chunk-QKC2T54O.js.map +1 -0
  32. package/dist/{chunk-LCQQPOIT.js → chunk-R2SVAM5Q.js} +3 -3
  33. package/dist/{chunk-LCQQPOIT.js.map → chunk-R2SVAM5Q.js.map} +1 -1
  34. package/dist/{chunk-X37EKDIH.cjs → chunk-SOXGAA52.cjs} +14 -14
  35. package/dist/{chunk-X37EKDIH.cjs.map → chunk-SOXGAA52.cjs.map} +1 -1
  36. package/dist/contracts/handlers/index.cjs +7 -7
  37. package/dist/contracts/handlers/index.d.cts +3 -3
  38. package/dist/contracts/handlers/index.d.ts +3 -3
  39. package/dist/contracts/handlers/index.js +2 -2
  40. package/dist/{delegate-BRqbh2fW.d.cts → delegate-DVEgyRwI.d.cts} +1 -1
  41. package/dist/{delegate-CgjVjYOP.d.ts → delegate-aOd5qINr.d.ts} +1 -1
  42. package/dist/{index-DvWNB_rl.d.ts → index-CPzL4tqg.d.ts} +2 -2
  43. package/dist/{index-DHuXlDEg.d.cts → index-D8vmtWWO.d.cts} +2 -2
  44. package/dist/index.cjs +176 -156
  45. package/dist/index.d.cts +45 -20
  46. package/dist/index.d.ts +45 -20
  47. package/dist/index.js +4 -4
  48. package/dist/repositories/realm/index.cjs +23 -19
  49. package/dist/repositories/realm/index.cjs.map +1 -1
  50. package/dist/repositories/realm/index.d.cts +2 -2
  51. package/dist/repositories/realm/index.d.ts +2 -2
  52. package/dist/repositories/realm/index.js +9 -5
  53. package/dist/repositories/realm/index.js.map +1 -1
  54. package/dist/repositories/sqlite/index.cjs +22 -18
  55. package/dist/repositories/sqlite/index.cjs.map +1 -1
  56. package/dist/repositories/sqlite/index.d.cts +2 -2
  57. package/dist/repositories/sqlite/index.d.ts +2 -2
  58. package/dist/repositories/sqlite/index.js +9 -5
  59. package/dist/repositories/sqlite/index.js.map +1 -1
  60. package/dist/{taskRunner-Bptw9UMa.d.ts → taskRunner-B48-V-Pb.d.ts} +2 -2
  61. package/dist/{taskRunner-CeFxKhSH.d.cts → taskRunner-nNecmQ2C.d.cts} +2 -2
  62. package/dist/wallet/expo/background.cjs +14 -14
  63. package/dist/wallet/expo/background.d.cts +3 -3
  64. package/dist/wallet/expo/background.d.ts +3 -3
  65. package/dist/wallet/expo/background.js +6 -6
  66. package/dist/wallet/expo/index.cjs +27 -14
  67. package/dist/wallet/expo/index.cjs.map +1 -1
  68. package/dist/wallet/expo/index.d.cts +11 -4
  69. package/dist/wallet/expo/index.d.ts +11 -4
  70. package/dist/wallet/expo/index.js +18 -5
  71. package/dist/wallet/expo/index.js.map +1 -1
  72. package/dist/{wallet-BsqRU8KM.d.cts → wallet-BUg3D4WJ.d.cts} +139 -3
  73. package/dist/{wallet-D9z7wssl.d.ts → wallet-DM0oShTu.d.ts} +139 -3
  74. package/dist/worker/expo/index.cjs +10 -9
  75. package/dist/worker/expo/index.cjs.map +1 -1
  76. package/dist/worker/expo/index.d.cts +4 -4
  77. package/dist/worker/expo/index.d.ts +4 -4
  78. package/dist/worker/expo/index.js +6 -5
  79. package/dist/worker/expo/index.js.map +1 -1
  80. package/package.json +2 -2
  81. package/dist/chunk-32YKLQPS.cjs.map +0 -1
  82. package/dist/chunk-BE5MUB7T.js.map +0 -1
  83. package/dist/chunk-FMI2GKYO.js.map +0 -1
  84. package/dist/chunk-HXDZ2QTW.cjs.map +0 -1
  85. package/dist/chunk-LJ35HPJW.js.map +0 -1
  86. package/dist/chunk-UBYY2TPK.cjs.map +0 -1
  87. package/dist/chunk-XIVCG6EP.cjs.map +0 -1
  88. package/dist/chunk-YNEDJTX2.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { K as ReadonlyIdentity, a as Identity, af as DescriptorSigningRequest, ag as Transaction, a3 as SignerSession, P as IntentRepository, a9 as ArkIntent, aa as IntentFilter, ab as Outpoint, Q as VirtualTxRepository, ac as VirtualTx, ad as VtxoBranch, W as WalletRepository, E as ExtendedVirtualCoin, a6 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a7 as WalletState, t as Contract, C as ContractRepository, a8 as ContractFilter, ah as IntentFeeConfig, ai as OffchainInput, aj as FeeAmount, ak as OnchainInput, al as FeeOutput, o as ArkProvider, a1 as SettlementConfig, am as ContractWatcherConfig, I as IWallet, an as FeeInfo, j as SettlementEvent, H as DescriptorProvider, i as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, ao as CreateContractParams, ap as GetContractsFilter, s as VirtualCoin, aq as GetSpendablePathsOptions, ar as GetAllSpendingPathsOptions, R as Recipient, as as IssuanceParams, at as ReissuanceParams, au as BurnParams, av as RenewVtxosOptions, c as WalletBalance, aw as ContractWithVtxos, ax as PathSelection, ay as ContractEvent, az as AssetDetails, aA as IssuanceResult, aB as DelegateInfo, aC as MigrationGlobalSkipReason, aD as MigrationLegSkipReason, aE as SignerStatus, J as IReadonlyWallet, e as ActivityRegistry, U as IReadonlyAssetManager, aF as StorageConfig, f as Activity, g as IContractManager, k as IAssetManager, h as IDelegateManager, aG as IVtxoManager, O as OnchainProvider, N as Network, X as NetworkName, _ as Coin, aH as ExplorerTransaction, r as TapLeafScript, aI as EncodedVtxoScript, a0 as CSVMultisigTapscript, q as RelativeTimelock, V as VtxoScript, aJ as Status, aK as ChainTx, p as IndexerProvider, v as TxTree, aL as PathContext } from './ark-I8jfe5VE.cjs';
2
- export { aM as ActivityIntent, aN as ActivityResolver, Z as ArkAddress, Y as ArkInfo, aO as ArkIntentState, aP as ArkTapscript, aQ as Asset, aR as AssetMetadata, aS as BaseWalletConfig, z as BatchFailedEvent, x as BatchFinalizationEvent, y as BatchFinalizedEvent, aT as BatchInfo, aU as BatchSignableIdentity, B as BatchStartedEvent, aV as CLTVMultisigTapscript, aW as ChainTxType, ae as ChainedTxType, aX as CommitmentTx, aY as ConditionCSVMultisigTapscript, aZ as ConditionMultisigTapscript, a_ as ContractBalance, a$ as ContractEventCallback, b0 as ContractHandler, $ as ContractManager, b1 as ContractManagerConfig, b2 as ContractState, b3 as ContractVtxo, b4 as ContractWatcher, b5 as DelegateManagerImpl, b6 as DelegateOptions, L as DelegateProvider, b7 as DelegatorManagerImpl, b8 as DelegatorProvider, b9 as DeprecatedSignerMigrationReport, ba as DeprecatedSignerReport, bb as DigestMismatchError, bc as Discoverable, bd as DiscoveredContract, be as DiscoveryDeps, bf as ESPLORA_URL, bg as EsploraProvider, bh as ExtendedContractVtxo, bi as GroupMembership, bj as HandlerError, bk as IDelegatorManager, bl as INTENT_TERMINAL_STATES, bm as IndexerTxType, a5 as Intent, bn as KnownMetadata, bo as MigrateDeprecatedSignerOptions, bp as MigrationLegReport, bq as MigrationVtxoRef, br as MultisigTapscript, bs as Nonces, bt as Output, bu as PageResponse, bv as PaginationOptions, bw as PartialSig, bx as ProviderClass, M as ReadonlyWalletConfig, l as RestArkProvider, by as RestDelegateProvider, bz as RestDelegatorProvider, m as RestIndexerProvider, bA as ScanContractsOptions, bB as ScanResult, bC as ScheduledSession, bD as SettlementEventType, bE as SignRequest, a4 as SignedIntent, bF as SignerClassification, bG as SignerSet, bH as SubscriptionEvent, bI as SubscriptionHeartbeat, n as SubscriptionResponse, bJ as TapLeaves, bK as TapTreeCoder, bL as TapscriptType, bM as TreeNonces, w as TreeNoncesEvent, bN as TreePartialSigs, F as TreeSignatureEvent, u as TreeSigningStartedEvent, D as TreeTxEvent, bO as Tx, bP as TxHistoryRecord, bQ as TxKey, T as TxNotification, bR as TxTreeNode, bS as TxType, bT as VirtualStatus, bU as Vtxo, bV as VtxoChain, a2 as VtxoManager, bW as VtxoType, b as WalletConfig, bX as WalletMode, bY as boardingResolver, bZ as classifyAgainstSignerSet, b_ as classifyContractSigner, b$ as createDefaultActivityRegistry, c0 as decodeTapscript, c1 as getNetwork, c2 as getSequence, c3 as isBatchSignable, c4 as isCooperativelyMigratable, c5 as isDiscoverable, c6 as isExpired, c7 as isRecoverable, c8 as isSpendable, c9 as isSubdust, ca as isTerminalIntentState, cb as isVtxoExpiringSoon, cc as networks, cd as signerSetFromInfo, ce as toXOnlySignerHex } from './ark-I8jfe5VE.cjs';
3
- export { B as BoardingContractHandler, a as BoardingContractParams, D as DefaultContractHandler, b as DefaultContractParams, c as DelegateContractHandler, d as DelegateContractParams, V as VHTLC, e as VHTLCContractHandler, f as VHTLCContractParams, g as contractHandlers } from './index-DHuXlDEg.cjs';
4
- export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BRqbh2fW.cjs';
5
- import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-BsqRU8KM.cjs';
6
- export { B as Batch, d as BoardingUtxoGroup, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-BsqRU8KM.cjs';
1
+ import { _ as ReadonlyIdentity, a as Identity, ai as DescriptorSigningRequest, aj as Transaction, af as SignerSession, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, E as ExtendedVirtualCoin, u as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, v as WalletState, t as Contract, C as ContractRepository, w as ContractFilter, ak as IntentFeeConfig, al as OffchainInput, am as FeeAmount, an as OnchainInput, ao as FeeOutput, o as ArkProvider, ad as SettlementConfig, ap as ContractWatcherConfig, I as IWallet, aq as FeeInfo, j as SettlementEvent, Y as DescriptorProvider, i as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, ar as CreateContractParams, as as GetContractsFilter, s as VirtualCoin, at as GetSpendablePathsOptions, au as GetAllSpendingPathsOptions, R as Recipient, av as IssuanceParams, aw as ReissuanceParams, ax as BurnParams, ay as RenewVtxosOptions, c as WalletBalance, a6 as ContractSyncState, az as ContractWithVtxos, aA as PathSelection, aB as ContractEvent, aC as AssetDetails, aD as IssuanceResult, aE as DelegateInfo, aF as MigrationGlobalSkipReason, aG as MigrationLegSkipReason, aH as SignerStatus, Z as IReadonlyWallet, e as ActivityRegistry, a5 as IReadonlyAssetManager, aI as StorageConfig, f as Activity, g as IContractManager, k as IAssetManager, h as IDelegateManager, aJ as IVtxoManager, a0 as OnchainProvider, $ as Network, a7 as NetworkName, aa as Coin, aK as ExplorerTransaction, r as TapLeafScript, aL as EncodedVtxoScript, ac as CSVMultisigTapscript, q as RelativeTimelock, V as VtxoScript, aM as Status, aN as ChainTx, p as IndexerProvider, L as TxTree, aO as PathContext } from './ark-C9ognsOV.cjs';
2
+ export { aP as ActivityIntent, aQ as ActivityResolver, a9 as ArkAddress, a8 as ArkInfo, aR as ArkIntentState, aS as ArkTapscript, aT as Asset, aU as AssetMetadata, aV as BaseWalletConfig, Q as BatchFailedEvent, N as BatchFinalizationEvent, P as BatchFinalizedEvent, aW as BatchInfo, aX as BatchSignableIdentity, J as BatchStartedEvent, aY as CLTVMultisigTapscript, aZ as ChainTxType, H as ChainedTxType, a_ as CommitmentTx, a$ as ConditionCSVMultisigTapscript, b0 as ConditionMultisigTapscript, b1 as ContractBalance, b2 as ContractEventCallback, b3 as ContractHandler, ab as ContractManager, b4 as ContractManagerConfig, b5 as ContractState, b6 as ContractVtxo, b7 as ContractWatcher, b8 as DelegateManagerImpl, b9 as DelegateOptions, a1 as DelegateProvider, ba as DelegatorManagerImpl, bb as DelegatorProvider, bc as DeprecatedSignerMigrationReport, bd as DeprecatedSignerReport, be as DigestMismatchError, bf as Discoverable, bg as DiscoveredContract, bh as DiscoveryDeps, bi as ESPLORA_URL, bj as EsploraProvider, a3 as ExitCaptureMode, bk as ExitChainResolver, a4 as ExitDataSource, bl as ExtendedContractVtxo, bm as GroupMembership, bn as HandlerError, bo as IDelegatorManager, bp as INTENT_TERMINAL_STATES, bq as IndexerTxType, ah as Intent, br as KnownMetadata, bs as MigrateDeprecatedSignerOptions, bt as MigrationLegReport, bu as MigrationVtxoRef, bv as MultisigTapscript, bw as Nonces, bx as Output, by as PageResponse, bz as PaginationOptions, bA as PartialSig, bB as ProviderClass, a2 as ReadonlyWalletConfig, l as RestArkProvider, bC as RestDelegateProvider, bD as RestDelegatorProvider, m as RestIndexerProvider, bE as ScanContractsOptions, bF as ScanResult, bG as ScheduledSession, bH as SettlementEventType, bI as SignRequest, ag as SignedIntent, bJ as SignerClassification, bK as SignerSet, bL as SubscriptionEvent, bM as SubscriptionHeartbeat, n as SubscriptionResponse, bN as TapLeaves, bO as TapTreeCoder, bP as TapscriptType, bQ as TreeNonces, M as TreeNoncesEvent, bR as TreePartialSigs, X as TreeSignatureEvent, K as TreeSigningStartedEvent, U as TreeTxEvent, bS as Tx, bT as TxHistoryRecord, bU as TxKey, T as TxNotification, bV as TxTreeNode, bW as TxType, bX as VirtualStatus, bY as Vtxo, bZ as VtxoChain, ae as VtxoManager, b_ as VtxoType, b as WalletConfig, b$ as WalletMode, c0 as boardingResolver, c1 as classifyAgainstSignerSet, c2 as classifyContractSigner, c3 as createDefaultActivityRegistry, c4 as createExitChainResolver, c5 as decodeTapscript, c6 as getNetwork, c7 as getSequence, c8 as isBatchSignable, c9 as isCooperativelyMigratable, ca as isDiscoverable, cb as isExpired, cc as isRecoverable, cd as isSpendable, ce as isSubdust, cf as isTerminalIntentState, cg as isVtxoExpiringSoon, ch as networks, ci as signerSetFromInfo, cj as toXOnlySignerHex } from './ark-C9ognsOV.cjs';
3
+ export { B as BoardingContractHandler, a as BoardingContractParams, D as DefaultContractHandler, b as DefaultContractParams, c as DelegateContractHandler, d as DelegateContractParams, V as VHTLC, e as VHTLCContractHandler, f as VHTLCContractParams, g as contractHandlers } from './index-D8vmtWWO.cjs';
4
+ export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DVEgyRwI.cjs';
5
+ import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot, P as ProviderConnectionState } from './wallet-BUg3D4WJ.cjs';
6
+ export { A as ArkError, d as ArkErrorName, B as Batch, e as BoardingUtxoGroup, I as IncomingFunds, f as ProviderKind, g as ProviderUnavailableError, S as ServerInfoSource, i as isArkError, m as maybeArkError, w as waitForIncomingFunds } from './wallet-BUg3D4WJ.cjs';
7
7
  import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
8
8
  import { P2TR } from '@scure/btc-signer/payment.js';
9
9
  import { Transaction as Transaction$1 } from '@scure/btc-signer';
@@ -1379,6 +1379,16 @@ type ResponseGetStatus = ResponseEnvelope & {
1379
1379
  payload: {
1380
1380
  walletInitialized: boolean;
1381
1381
  xOnlyPublicKey: Uint8Array | undefined;
1382
+ providerConnectionState?: ProviderConnectionState;
1383
+ };
1384
+ };
1385
+ type RequestGetContractSyncState = RequestEnvelope & {
1386
+ type: "GET_CONTRACT_SYNC_STATE";
1387
+ };
1388
+ type ResponseGetContractSyncState = ResponseEnvelope & {
1389
+ type: "CONTRACT_SYNC_STATE";
1390
+ payload: {
1391
+ syncState: ContractSyncState;
1382
1392
  };
1383
1393
  };
1384
1394
  type RequestClear = RequestEnvelope & {
@@ -1801,8 +1811,8 @@ type RequestRestoreWallet = RequestEnvelope & {
1801
1811
  type ResponseRestoreWallet = ResponseEnvelope & {
1802
1812
  type: "RESTORE_WALLET_SUCCESS";
1803
1813
  };
1804
- type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestSendBitcoin | RequestGetAddress | RequestGetBoardingAddress | RequestGetBalance | RequestGetVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestSend | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
1805
- type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseSendBitcoin | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetBalance | ResponseGetVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseContractEvent | ResponseSend | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
1814
+ type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestSendBitcoin | RequestGetAddress | RequestGetBoardingAddress | RequestGetBalance | RequestGetVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestGetContractSyncState | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestSend | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
1815
+ type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseSendBitcoin | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetBalance | ResponseGetVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseGetContractSyncState | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseContractEvent | ResponseSend | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
1806
1816
  declare class WalletMessageHandler implements MessageHandler<WalletUpdaterRequest, WalletUpdaterResponse> {
1807
1817
  readonly messageTag: string;
1808
1818
  private wallet;
@@ -2095,6 +2105,13 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
2095
2105
  * @returns Current service-worker wallet status payload including `walletInitalized` and `xOnlyPublicKey`
2096
2106
  */
2097
2107
  getStatus(): Promise<ResponseGetStatus["payload"]>;
2108
+ /**
2109
+ * Wallet-level provider-connection freshness, delegated to the worker via
2110
+ * `GET_STATUS`. Async by necessity (the worker boundary is asynchronous); no
2111
+ * synchronous variant is offered because it would have the same transport
2112
+ * mismatch as the contract-manager proxy's cached `getSyncState()`.
2113
+ */
2114
+ getProviderConnectionState(): Promise<ProviderConnectionState>;
2098
2115
  getActivityHistory(): Promise<Activity[]>;
2099
2116
  getTransactionHistory(): Promise<ArkTransaction[]>;
2100
2117
  getVtxos(filter?: GetVtxosFilter): Promise<ExtendedVirtualCoin[]>;
@@ -3244,19 +3261,27 @@ declare const UnilateralExit: {
3244
3261
  readonly Executor: typeof Executor;
3245
3262
  };
3246
3263
 
3247
- declare class ArkError extends Error {
3248
- readonly code: number;
3249
- readonly message: string;
3250
- readonly name: string;
3251
- readonly metadata?: Record<string, string> | undefined;
3252
- constructor(code: number, message: string, name: string, metadata?: Record<string, string> | undefined);
3253
- }
3254
3264
  /**
3255
- * Try to convert an error to an ArkError class, returning undefined if the error is not an ArkError
3256
- * @param error - The error to parse
3257
- * @returns The parsed ArkError, or undefined if the error is not an ArkError
3265
+ * Whether a provider error is a *retryable* availability failure (operator or
3266
+ * indexer temporarily unreachable) rather than a terminal one.
3267
+ *
3268
+ * Retryable:
3269
+ * - {@link ProviderUnavailableError} — already-classified 5xx/429/unavailable
3270
+ * (see e.g. {@link https | RestArkProvider.getInfo}'s non-2xx branch);
3271
+ * - {@link FetchError} — transport-level `fetch` rejection (DNS failure,
3272
+ * connection refused, TLS/CORS), which also carries undici timeouts as its
3273
+ * `cause`;
3274
+ * - {@link isFetchTimeoutError} — header/body timeouts that surface directly.
3275
+ *
3276
+ * Everything else (4xx, invalid JSON, schema violations, network mismatch,
3277
+ * unsupported network) is terminal and returns `false`.
3278
+ *
3279
+ * NOTE (Step 2, Scope 2): this classifies the errors currently produced by the
3280
+ * boot-critical `getInfo` path. Normalizing the indexer's per-branch
3281
+ * `!res.ok` throws and the remaining Ark RPC methods into
3282
+ * {@link ProviderUnavailableError} is the broader Scope-2 work still pending.
3258
3283
  */
3259
- declare function maybeArkError(error: any): ArkError | undefined;
3284
+ declare function isRetryableProviderError(error: unknown): boolean;
3260
3285
 
3261
3286
  declare function validateConnectorsTxGraph(settlementTxB64: string, connectorsGraph: TxTree): void;
3262
3287
  declare function validateVtxoTxGraph(graph: TxTree, roundTransaction: Transaction$2, sweepTapTreeRoot: Uint8Array): void;
@@ -3986,4 +4011,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
3986
4011
  burn(params: BurnParams): Promise<string>;
3987
4012
  }
3988
4013
 
3989
- export { Activity, ActivityRegistry, type AnchorBumper, ArkError, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, AssetDetails, AssetManager, BIP322, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, type DescriptorOptions, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, EncodedVtxoScript, Estimator, type ExecutorEvent, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, FeeAmount, FeeInfo, FeeOutput, FetchError, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, UnilateralExit, Unroll, type VSize, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, assembleBtcdTaprootTree, index as asset, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, deserializeExitPackage, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sdkVersion, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
4014
+ export { Activity, ActivityRegistry, type AnchorBumper, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, AssetDetails, AssetManager, BIP322, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, type DescriptorOptions, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, EncodedVtxoScript, Estimator, type ExecutorEvent, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, FeeAmount, FeeInfo, FeeOutput, FetchError, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, ProviderConnectionState, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, UnilateralExit, Unroll, type VSize, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, assembleBtcdTaprootTree, index as asset, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, deserializeExitPackage, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isRetryableProviderError, isValidArkAddress, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sdkVersion, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { K as ReadonlyIdentity, a as Identity, af as DescriptorSigningRequest, ag as Transaction, a3 as SignerSession, P as IntentRepository, a9 as ArkIntent, aa as IntentFilter, ab as Outpoint, Q as VirtualTxRepository, ac as VirtualTx, ad as VtxoBranch, W as WalletRepository, E as ExtendedVirtualCoin, a6 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a7 as WalletState, t as Contract, C as ContractRepository, a8 as ContractFilter, ah as IntentFeeConfig, ai as OffchainInput, aj as FeeAmount, ak as OnchainInput, al as FeeOutput, o as ArkProvider, a1 as SettlementConfig, am as ContractWatcherConfig, I as IWallet, an as FeeInfo, j as SettlementEvent, H as DescriptorProvider, i as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, ao as CreateContractParams, ap as GetContractsFilter, s as VirtualCoin, aq as GetSpendablePathsOptions, ar as GetAllSpendingPathsOptions, R as Recipient, as as IssuanceParams, at as ReissuanceParams, au as BurnParams, av as RenewVtxosOptions, c as WalletBalance, aw as ContractWithVtxos, ax as PathSelection, ay as ContractEvent, az as AssetDetails, aA as IssuanceResult, aB as DelegateInfo, aC as MigrationGlobalSkipReason, aD as MigrationLegSkipReason, aE as SignerStatus, J as IReadonlyWallet, e as ActivityRegistry, U as IReadonlyAssetManager, aF as StorageConfig, f as Activity, g as IContractManager, k as IAssetManager, h as IDelegateManager, aG as IVtxoManager, O as OnchainProvider, N as Network, X as NetworkName, _ as Coin, aH as ExplorerTransaction, r as TapLeafScript, aI as EncodedVtxoScript, a0 as CSVMultisigTapscript, q as RelativeTimelock, V as VtxoScript, aJ as Status, aK as ChainTx, p as IndexerProvider, v as TxTree, aL as PathContext } from './ark-I8jfe5VE.js';
2
- export { aM as ActivityIntent, aN as ActivityResolver, Z as ArkAddress, Y as ArkInfo, aO as ArkIntentState, aP as ArkTapscript, aQ as Asset, aR as AssetMetadata, aS as BaseWalletConfig, z as BatchFailedEvent, x as BatchFinalizationEvent, y as BatchFinalizedEvent, aT as BatchInfo, aU as BatchSignableIdentity, B as BatchStartedEvent, aV as CLTVMultisigTapscript, aW as ChainTxType, ae as ChainedTxType, aX as CommitmentTx, aY as ConditionCSVMultisigTapscript, aZ as ConditionMultisigTapscript, a_ as ContractBalance, a$ as ContractEventCallback, b0 as ContractHandler, $ as ContractManager, b1 as ContractManagerConfig, b2 as ContractState, b3 as ContractVtxo, b4 as ContractWatcher, b5 as DelegateManagerImpl, b6 as DelegateOptions, L as DelegateProvider, b7 as DelegatorManagerImpl, b8 as DelegatorProvider, b9 as DeprecatedSignerMigrationReport, ba as DeprecatedSignerReport, bb as DigestMismatchError, bc as Discoverable, bd as DiscoveredContract, be as DiscoveryDeps, bf as ESPLORA_URL, bg as EsploraProvider, bh as ExtendedContractVtxo, bi as GroupMembership, bj as HandlerError, bk as IDelegatorManager, bl as INTENT_TERMINAL_STATES, bm as IndexerTxType, a5 as Intent, bn as KnownMetadata, bo as MigrateDeprecatedSignerOptions, bp as MigrationLegReport, bq as MigrationVtxoRef, br as MultisigTapscript, bs as Nonces, bt as Output, bu as PageResponse, bv as PaginationOptions, bw as PartialSig, bx as ProviderClass, M as ReadonlyWalletConfig, l as RestArkProvider, by as RestDelegateProvider, bz as RestDelegatorProvider, m as RestIndexerProvider, bA as ScanContractsOptions, bB as ScanResult, bC as ScheduledSession, bD as SettlementEventType, bE as SignRequest, a4 as SignedIntent, bF as SignerClassification, bG as SignerSet, bH as SubscriptionEvent, bI as SubscriptionHeartbeat, n as SubscriptionResponse, bJ as TapLeaves, bK as TapTreeCoder, bL as TapscriptType, bM as TreeNonces, w as TreeNoncesEvent, bN as TreePartialSigs, F as TreeSignatureEvent, u as TreeSigningStartedEvent, D as TreeTxEvent, bO as Tx, bP as TxHistoryRecord, bQ as TxKey, T as TxNotification, bR as TxTreeNode, bS as TxType, bT as VirtualStatus, bU as Vtxo, bV as VtxoChain, a2 as VtxoManager, bW as VtxoType, b as WalletConfig, bX as WalletMode, bY as boardingResolver, bZ as classifyAgainstSignerSet, b_ as classifyContractSigner, b$ as createDefaultActivityRegistry, c0 as decodeTapscript, c1 as getNetwork, c2 as getSequence, c3 as isBatchSignable, c4 as isCooperativelyMigratable, c5 as isDiscoverable, c6 as isExpired, c7 as isRecoverable, c8 as isSpendable, c9 as isSubdust, ca as isTerminalIntentState, cb as isVtxoExpiringSoon, cc as networks, cd as signerSetFromInfo, ce as toXOnlySignerHex } from './ark-I8jfe5VE.js';
3
- export { B as BoardingContractHandler, a as BoardingContractParams, D as DefaultContractHandler, b as DefaultContractParams, c as DelegateContractHandler, d as DelegateContractParams, V as VHTLC, e as VHTLCContractHandler, f as VHTLCContractParams, g as contractHandlers } from './index-DvWNB_rl.js';
4
- export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-CgjVjYOP.js';
5
- import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-D9z7wssl.js';
6
- export { B as Batch, d as BoardingUtxoGroup, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-D9z7wssl.js';
1
+ import { _ as ReadonlyIdentity, a as Identity, ai as DescriptorSigningRequest, aj as Transaction, af as SignerSession, x as IntentRepository, y as ArkIntent, z as IntentFilter, O as Outpoint, B as VirtualTxRepository, D as VirtualTx, F as VtxoBranch, W as WalletRepository, E as ExtendedVirtualCoin, u as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, v as WalletState, t as Contract, C as ContractRepository, w as ContractFilter, ak as IntentFeeConfig, al as OffchainInput, am as FeeAmount, an as OnchainInput, ao as FeeOutput, o as ArkProvider, ad as SettlementConfig, ap as ContractWatcherConfig, I as IWallet, aq as FeeInfo, j as SettlementEvent, Y as DescriptorProvider, i as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, ar as CreateContractParams, as as GetContractsFilter, s as VirtualCoin, at as GetSpendablePathsOptions, au as GetAllSpendingPathsOptions, R as Recipient, av as IssuanceParams, aw as ReissuanceParams, ax as BurnParams, ay as RenewVtxosOptions, c as WalletBalance, a6 as ContractSyncState, az as ContractWithVtxos, aA as PathSelection, aB as ContractEvent, aC as AssetDetails, aD as IssuanceResult, aE as DelegateInfo, aF as MigrationGlobalSkipReason, aG as MigrationLegSkipReason, aH as SignerStatus, Z as IReadonlyWallet, e as ActivityRegistry, a5 as IReadonlyAssetManager, aI as StorageConfig, f as Activity, g as IContractManager, k as IAssetManager, h as IDelegateManager, aJ as IVtxoManager, a0 as OnchainProvider, $ as Network, a7 as NetworkName, aa as Coin, aK as ExplorerTransaction, r as TapLeafScript, aL as EncodedVtxoScript, ac as CSVMultisigTapscript, q as RelativeTimelock, V as VtxoScript, aM as Status, aN as ChainTx, p as IndexerProvider, L as TxTree, aO as PathContext } from './ark-C9ognsOV.js';
2
+ export { aP as ActivityIntent, aQ as ActivityResolver, a9 as ArkAddress, a8 as ArkInfo, aR as ArkIntentState, aS as ArkTapscript, aT as Asset, aU as AssetMetadata, aV as BaseWalletConfig, Q as BatchFailedEvent, N as BatchFinalizationEvent, P as BatchFinalizedEvent, aW as BatchInfo, aX as BatchSignableIdentity, J as BatchStartedEvent, aY as CLTVMultisigTapscript, aZ as ChainTxType, H as ChainedTxType, a_ as CommitmentTx, a$ as ConditionCSVMultisigTapscript, b0 as ConditionMultisigTapscript, b1 as ContractBalance, b2 as ContractEventCallback, b3 as ContractHandler, ab as ContractManager, b4 as ContractManagerConfig, b5 as ContractState, b6 as ContractVtxo, b7 as ContractWatcher, b8 as DelegateManagerImpl, b9 as DelegateOptions, a1 as DelegateProvider, ba as DelegatorManagerImpl, bb as DelegatorProvider, bc as DeprecatedSignerMigrationReport, bd as DeprecatedSignerReport, be as DigestMismatchError, bf as Discoverable, bg as DiscoveredContract, bh as DiscoveryDeps, bi as ESPLORA_URL, bj as EsploraProvider, a3 as ExitCaptureMode, bk as ExitChainResolver, a4 as ExitDataSource, bl as ExtendedContractVtxo, bm as GroupMembership, bn as HandlerError, bo as IDelegatorManager, bp as INTENT_TERMINAL_STATES, bq as IndexerTxType, ah as Intent, br as KnownMetadata, bs as MigrateDeprecatedSignerOptions, bt as MigrationLegReport, bu as MigrationVtxoRef, bv as MultisigTapscript, bw as Nonces, bx as Output, by as PageResponse, bz as PaginationOptions, bA as PartialSig, bB as ProviderClass, a2 as ReadonlyWalletConfig, l as RestArkProvider, bC as RestDelegateProvider, bD as RestDelegatorProvider, m as RestIndexerProvider, bE as ScanContractsOptions, bF as ScanResult, bG as ScheduledSession, bH as SettlementEventType, bI as SignRequest, ag as SignedIntent, bJ as SignerClassification, bK as SignerSet, bL as SubscriptionEvent, bM as SubscriptionHeartbeat, n as SubscriptionResponse, bN as TapLeaves, bO as TapTreeCoder, bP as TapscriptType, bQ as TreeNonces, M as TreeNoncesEvent, bR as TreePartialSigs, X as TreeSignatureEvent, K as TreeSigningStartedEvent, U as TreeTxEvent, bS as Tx, bT as TxHistoryRecord, bU as TxKey, T as TxNotification, bV as TxTreeNode, bW as TxType, bX as VirtualStatus, bY as Vtxo, bZ as VtxoChain, ae as VtxoManager, b_ as VtxoType, b as WalletConfig, b$ as WalletMode, c0 as boardingResolver, c1 as classifyAgainstSignerSet, c2 as classifyContractSigner, c3 as createDefaultActivityRegistry, c4 as createExitChainResolver, c5 as decodeTapscript, c6 as getNetwork, c7 as getSequence, c8 as isBatchSignable, c9 as isCooperativelyMigratable, ca as isDiscoverable, cb as isExpired, cc as isRecoverable, cd as isSpendable, ce as isSubdust, cf as isTerminalIntentState, cg as isVtxoExpiringSoon, ch as networks, ci as signerSetFromInfo, cj as toXOnlySignerHex } from './ark-C9ognsOV.js';
3
+ export { B as BoardingContractHandler, a as BoardingContractParams, D as DefaultContractHandler, b as DefaultContractParams, c as DelegateContractHandler, d as DelegateContractParams, V as VHTLC, e as VHTLCContractHandler, f as VHTLCContractParams, g as contractHandlers } from './index-CPzL4tqg.js';
4
+ export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-aOd5qINr.js';
5
+ import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot, P as ProviderConnectionState } from './wallet-DM0oShTu.js';
6
+ export { A as ArkError, d as ArkErrorName, B as Batch, e as BoardingUtxoGroup, I as IncomingFunds, f as ProviderKind, g as ProviderUnavailableError, S as ServerInfoSource, i as isArkError, m as maybeArkError, w as waitForIncomingFunds } from './wallet-DM0oShTu.js';
7
7
  import { Bytes, BTC_NETWORK } from '@scure/btc-signer/utils.js';
8
8
  import { P2TR } from '@scure/btc-signer/payment.js';
9
9
  import { Transaction as Transaction$1 } from '@scure/btc-signer';
@@ -1379,6 +1379,16 @@ type ResponseGetStatus = ResponseEnvelope & {
1379
1379
  payload: {
1380
1380
  walletInitialized: boolean;
1381
1381
  xOnlyPublicKey: Uint8Array | undefined;
1382
+ providerConnectionState?: ProviderConnectionState;
1383
+ };
1384
+ };
1385
+ type RequestGetContractSyncState = RequestEnvelope & {
1386
+ type: "GET_CONTRACT_SYNC_STATE";
1387
+ };
1388
+ type ResponseGetContractSyncState = ResponseEnvelope & {
1389
+ type: "CONTRACT_SYNC_STATE";
1390
+ payload: {
1391
+ syncState: ContractSyncState;
1382
1392
  };
1383
1393
  };
1384
1394
  type RequestClear = RequestEnvelope & {
@@ -1801,8 +1811,8 @@ type RequestRestoreWallet = RequestEnvelope & {
1801
1811
  type ResponseRestoreWallet = ResponseEnvelope & {
1802
1812
  type: "RESTORE_WALLET_SUCCESS";
1803
1813
  };
1804
- type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestSendBitcoin | RequestGetAddress | RequestGetBoardingAddress | RequestGetBalance | RequestGetVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestSend | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
1805
- type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseSendBitcoin | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetBalance | ResponseGetVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseContractEvent | ResponseSend | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
1814
+ type WalletUpdaterRequest = RequestInitWallet | RequestSettle | RequestSendBitcoin | RequestGetAddress | RequestGetBoardingAddress | RequestGetBalance | RequestGetVtxos | RequestGetBoardingUtxos | RequestGetTransactionHistory | RequestGetStatus | RequestGetContractSyncState | RequestClear | RequestReloadWallet | RequestSignTransaction | RequestCreateContract | RequestGetContracts | RequestGetContractsWithVtxos | RequestAnnotateVtxos | RequestUpdateContract | RequestDeleteContract | RequestGetSpendablePaths | RequestGetAllSpendingPaths | RequestIsContractManagerWatching | RequestRefreshVtxos | RequestRefreshOutpoints | RequestSend | RequestGetAssetDetails | RequestIssue | RequestReissue | RequestBurn | RequestDelegate | RequestGetDelegateInfo | RequestRecoverVtxos | RequestGetRecoverableBalance | RequestGetExpiringVtxos | RequestRenewVtxos | RequestGetExpiredBoardingUtxos | RequestSweepExpiredBoardingUtxos | RequestMigrateDeprecatedSignerVtxos | RequestGetDeprecatedSignerStatus | RequestRestoreWallet;
1815
+ type WalletUpdaterResponse = ResponseEnvelope & (ResponseInitWallet | ResponseSettle | ResponseSettleEvent | ResponseSendBitcoin | ResponseGetAddress | ResponseGetBoardingAddress | ResponseGetBalance | ResponseGetVtxos | ResponseGetBoardingUtxos | ResponseGetTransactionHistory | ResponseGetStatus | ResponseGetContractSyncState | ResponseClear | ResponseReloadWallet | ResponseUtxoUpdate | ResponseVtxoUpdate | ResponseSignTransaction | ResponseCreateContract | ResponseGetContracts | ResponseGetContractsWithVtxos | ResponseAnnotateVtxos | ResponseUpdateContract | ResponseDeleteContract | ResponseGetSpendablePaths | ResponseGetAllSpendingPaths | ResponseIsContractManagerWatching | ResponseRefreshVtxos | ResponseRefreshOutpoints | ResponseContractEvent | ResponseSend | ResponseGetAssetDetails | ResponseIssue | ResponseReissue | ResponseBurn | ResponseDelegate | ResponseGetDelegateInfo | ResponseRecoverVtxos | ResponseRecoverVtxosEvent | ResponseGetRecoverableBalance | ResponseGetExpiringVtxos | ResponseRenewVtxos | ResponseRenewVtxosEvent | ResponseGetExpiredBoardingUtxos | ResponseSweepExpiredBoardingUtxos | ResponseMigrateDeprecatedSignerVtxos | ResponseMigrateDeprecatedSignerVtxosEvent | ResponseGetDeprecatedSignerStatus | ResponseRestoreWallet);
1806
1816
  declare class WalletMessageHandler implements MessageHandler<WalletUpdaterRequest, WalletUpdaterResponse> {
1807
1817
  readonly messageTag: string;
1808
1818
  private wallet;
@@ -2095,6 +2105,13 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
2095
2105
  * @returns Current service-worker wallet status payload including `walletInitalized` and `xOnlyPublicKey`
2096
2106
  */
2097
2107
  getStatus(): Promise<ResponseGetStatus["payload"]>;
2108
+ /**
2109
+ * Wallet-level provider-connection freshness, delegated to the worker via
2110
+ * `GET_STATUS`. Async by necessity (the worker boundary is asynchronous); no
2111
+ * synchronous variant is offered because it would have the same transport
2112
+ * mismatch as the contract-manager proxy's cached `getSyncState()`.
2113
+ */
2114
+ getProviderConnectionState(): Promise<ProviderConnectionState>;
2098
2115
  getActivityHistory(): Promise<Activity[]>;
2099
2116
  getTransactionHistory(): Promise<ArkTransaction[]>;
2100
2117
  getVtxos(filter?: GetVtxosFilter): Promise<ExtendedVirtualCoin[]>;
@@ -3244,19 +3261,27 @@ declare const UnilateralExit: {
3244
3261
  readonly Executor: typeof Executor;
3245
3262
  };
3246
3263
 
3247
- declare class ArkError extends Error {
3248
- readonly code: number;
3249
- readonly message: string;
3250
- readonly name: string;
3251
- readonly metadata?: Record<string, string> | undefined;
3252
- constructor(code: number, message: string, name: string, metadata?: Record<string, string> | undefined);
3253
- }
3254
3264
  /**
3255
- * Try to convert an error to an ArkError class, returning undefined if the error is not an ArkError
3256
- * @param error - The error to parse
3257
- * @returns The parsed ArkError, or undefined if the error is not an ArkError
3265
+ * Whether a provider error is a *retryable* availability failure (operator or
3266
+ * indexer temporarily unreachable) rather than a terminal one.
3267
+ *
3268
+ * Retryable:
3269
+ * - {@link ProviderUnavailableError} — already-classified 5xx/429/unavailable
3270
+ * (see e.g. {@link https | RestArkProvider.getInfo}'s non-2xx branch);
3271
+ * - {@link FetchError} — transport-level `fetch` rejection (DNS failure,
3272
+ * connection refused, TLS/CORS), which also carries undici timeouts as its
3273
+ * `cause`;
3274
+ * - {@link isFetchTimeoutError} — header/body timeouts that surface directly.
3275
+ *
3276
+ * Everything else (4xx, invalid JSON, schema violations, network mismatch,
3277
+ * unsupported network) is terminal and returns `false`.
3278
+ *
3279
+ * NOTE (Step 2, Scope 2): this classifies the errors currently produced by the
3280
+ * boot-critical `getInfo` path. Normalizing the indexer's per-branch
3281
+ * `!res.ok` throws and the remaining Ark RPC methods into
3282
+ * {@link ProviderUnavailableError} is the broader Scope-2 work still pending.
3258
3283
  */
3259
- declare function maybeArkError(error: any): ArkError | undefined;
3284
+ declare function isRetryableProviderError(error: unknown): boolean;
3260
3285
 
3261
3286
  declare function validateConnectorsTxGraph(settlementTxB64: string, connectorsGraph: TxTree): void;
3262
3287
  declare function validateVtxoTxGraph(graph: TxTree, roundTransaction: Transaction$2, sweepTapTreeRoot: Uint8Array): void;
@@ -3986,4 +4011,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
3986
4011
  burn(params: BurnParams): Promise<string>;
3987
4012
  }
3988
4013
 
3989
- export { Activity, ActivityRegistry, type AnchorBumper, ArkError, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, AssetDetails, AssetManager, BIP322, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, type DescriptorOptions, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, EncodedVtxoScript, Estimator, type ExecutorEvent, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, FeeAmount, FeeInfo, FeeOutput, FetchError, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, UnilateralExit, Unroll, type VSize, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, assembleBtcdTaprootTree, index as asset, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, deserializeExitPackage, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sdkVersion, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
4014
+ export { Activity, ActivityRegistry, type AnchorBumper, ArkIntent, ArkNote, ArkProvider, type ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ArkTransaction, type ArkTxInput, AssetDetails, AssetManager, BIP322, BurnParams, CSVMultisigTapscript, ChainTx, Coin, ConditionWitness, Contract, ContractEvent, ContractRepository, ContractRepositoryImpl, ContractSyncState, ContractWatcherConfig, ContractWithVtxos, CosignerPublicKey, CreateContractParams, DEFAULT_MESSAGE_TIMEOUTS, DelegateInfo, DelegateNotConfiguredError, DelegatorNotConfiguredError, type DescriptorOptions, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, type BlockHeader as ElectrumBlockHeader, ElectrumOnchainProvider, type TransactionHistory as ElectrumTransactionHistory, type Unspent as ElectrumUnspent, EncodedVtxoScript, Estimator, type ExecutorEvent, type ExitDelay, type ExitFeeWallet, type ExitMode, type ExitOptions, type ExitPackage, type ExitQuote, type ExitStep, type ExitTotals, type ExitVtxoInfo, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, FeeAmount, FeeInfo, FeeOutput, FetchError, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, IndexerProvider, IntentFeeConfig, IntentFilter, IntentRepository, IssuanceParams, IssuanceResult, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, type MessageHandler, type MessageTimeouts, MigrationGlobalSkipReason, MigrationLegSkipReason, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, PathContext, PathSelection, ProviderConnectionState, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlyIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, Recipient, ReissuanceParams, RelativeTimelock, RenewVtxosOptions, type RequestEnvelope, type ResponseEnvelope, SeedIdentity, type SeedIdentityOptions, SendBitcoinParams, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, type ServiceWorkerWalletMode, SettleParams, SettlementConfig, SettlementEvent, SignerSession, SignerStatus, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, UnilateralExit, Unroll, type VSize, VirtualCoin, VirtualTx, VirtualTxRepository, VtxoBranch, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, assembleBtcdTaprootTree, index as asset, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, deserializeExitPackage, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isRetryableProviderError, isValidArkAddress, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sdkVersion, sequenceToTimelock, serializeExitPackage, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export { ActivityRegistry, ArkNote, AssetManager, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EsploraProvider, Estimator, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, Unroll, VtxoManager, Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, boardingResolver, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createDefaultActivityRegistry, decodeArkContract, deserializeExitPackage, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isBatchSignable, isCooperativelyMigratable, isDiscoverable, isExpired, isRecoverable, isSpendable, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, serializeExitPackage, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-FMI2GKYO.js';
2
- export { ArkError, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ChainTxType, ConditionWitness, CosignerPublicKey, DigestMismatchError, FetchError, IndexerTxType, Intent, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports as asset, buildVersion, getArkPsbtFields, maybeArkError, sdkVersion, setArkPsbtField } from './chunk-LJ35HPJW.js';
3
- export { BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, contractHandlers, isCltvSatisfied, isCsvSpendable } from './chunk-YNEDJTX2.js';
4
- export { ArkAddress, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, MultisigTapscript, TapTreeCoder, VtxoScript, assembleBtcdTaprootTree, decodeTapscript, getNetwork, getSequence, networks, sequenceToTimelock, timelockToSequence } from './chunk-BE5MUB7T.js';
1
+ export { ActivityRegistry, ArkNote, AssetManager, BIP322, Batch, ChainedTxType, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EsploraProvider, Estimator, HDDescriptorProvider, INTENT_TERMINAL_STATES, InMemoryContractRepository, InMemoryIntentRepository, InMemoryVirtualTxRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBIntentRepository, IndexedDBVirtualTxRepository, IndexedDBWalletRepository, MESSAGE_BUS_INITIALIZING, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusInitializingError, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, UnilateralExit, Unroll, VtxoManager, Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, boardingResolver, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, createDefaultActivityRegistry, createExitChainResolver, decodeArkContract, deserializeExitPackage, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isBatchSignable, isCooperativelyMigratable, isDiscoverable, isExpired, isRecoverable, isRetryableProviderError, isSpendable, isSubdust, isTerminalIntentState, isValidArkAddress, isVtxoExpiringSoon, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, serializeExitPackage, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-P6VBP3CT.js';
2
+ export { ArkError, ArkErrorName, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ChainTxType, ConditionWitness, CosignerPublicKey, DigestMismatchError, FetchError, IndexerTxType, Intent, ProviderUnavailableError, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports as asset, buildVersion, getArkPsbtFields, isArkError, maybeArkError, sdkVersion, setArkPsbtField } from './chunk-CWJ7ZCP7.js';
3
+ export { BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, contractHandlers, isCltvSatisfied, isCsvSpendable } from './chunk-QKC2T54O.js';
4
+ export { ArkAddress, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, MultisigTapscript, TapTreeCoder, VtxoScript, assembleBtcdTaprootTree, decodeTapscript, getNetwork, getSequence, networks, sequenceToTimelock, timelockToSequence } from './chunk-FWG4TSPN.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 chunkXIVCG6EP_cjs = require('../../chunk-XIVCG6EP.cjs');
4
- require('../../chunk-UBYY2TPK.cjs');
5
- require('../../chunk-32YKLQPS.cjs');
6
- require('../../chunk-HXDZ2QTW.cjs');
3
+ var chunkD46YDM36_cjs = require('../../chunk-D46YDM36.cjs');
4
+ require('../../chunk-7IYIFMF4.cjs');
5
+ require('../../chunk-4KXOCVXP.cjs');
6
+ require('../../chunk-MQB5H4X5.cjs');
7
7
  require('../../chunk-5BLDMQED.cjs');
8
8
 
9
9
  // src/repositories/realm/walletRepository.ts
@@ -11,6 +11,7 @@ var RealmWalletRepository = class {
11
11
  constructor(realm) {
12
12
  this.realm = realm;
13
13
  }
14
+ realm;
14
15
  version = 1;
15
16
  // ── Lifecycle ──────────────────────────────────────────────────────
16
17
  async ensureInit() {
@@ -37,7 +38,7 @@ var RealmWalletRepository = class {
37
38
  await this.ensureInit();
38
39
  this.realm.write(() => {
39
40
  for (const vtxo of vtxos) {
40
- const s = chunkXIVCG6EP_cjs.serializeVtxo(vtxo);
41
+ const s = chunkD46YDM36_cjs.serializeVtxo(vtxo);
41
42
  this.realm.create(
42
43
  "ArkVtxo",
43
44
  {
@@ -85,7 +86,7 @@ var RealmWalletRepository = class {
85
86
  throw new Error("RealmWalletRepository requires an address");
86
87
  }
87
88
  for (const vtxo of vtxos) {
88
- if (!chunkXIVCG6EP_cjs.isVtxoForScript(vtxo, key.script)) {
89
+ if (!chunkD46YDM36_cjs.isVtxoForScript(vtxo, key.script)) {
89
90
  throw new Error(
90
91
  `VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
91
92
  );
@@ -110,7 +111,7 @@ var RealmWalletRepository = class {
110
111
  await this.ensureInit();
111
112
  this.realm.write(() => {
112
113
  for (const utxo of utxos) {
113
- const s = chunkXIVCG6EP_cjs.serializeUtxo(utxo);
114
+ const s = chunkD46YDM36_cjs.serializeUtxo(utxo);
114
115
  this.realm.create(
115
116
  "ArkUtxo",
116
117
  {
@@ -163,7 +164,7 @@ var RealmWalletRepository = class {
163
164
  amount: tx.amount,
164
165
  settled: tx.settled,
165
166
  createdAt: tx.createdAt,
166
- assetsJson: tx.assets ? JSON.stringify(chunkXIVCG6EP_cjs.serializeAssets(tx.assets)) : null
167
+ assetsJson: tx.assets ? JSON.stringify(chunkD46YDM36_cjs.serializeAssets(tx.assets)) : null
167
168
  },
168
169
  "modified"
169
170
  );
@@ -233,9 +234,9 @@ function vtxoObjectToDomain(obj) {
233
234
  // Post-migration every row has `script`, but the backfill is
234
235
  // idempotent: derive from `address` if the legacy column is still
235
236
  // null (e.g. the migration hasn't run yet on this handle).
236
- script: obj.script ?? chunkXIVCG6EP_cjs.scriptFromArkAddress(obj.address)
237
+ script: obj.script ?? chunkD46YDM36_cjs.scriptFromArkAddress(obj.address)
237
238
  };
238
- return chunkXIVCG6EP_cjs.deserializeVtxo(serialized);
239
+ return chunkD46YDM36_cjs.deserializeVtxo(serialized);
239
240
  }
240
241
  function utxoObjectToDomain(obj) {
241
242
  const serialized = {
@@ -254,7 +255,7 @@ function utxoObjectToDomain(obj) {
254
255
  status: JSON.parse(obj.statusJson),
255
256
  extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
256
257
  };
257
- return chunkXIVCG6EP_cjs.deserializeUtxo(serialized);
258
+ return chunkD46YDM36_cjs.deserializeUtxo(serialized);
258
259
  }
259
260
  function txObjectToDomain(obj) {
260
261
  const tx = {
@@ -269,7 +270,7 @@ function txObjectToDomain(obj) {
269
270
  createdAt: obj.createdAt
270
271
  };
271
272
  if (obj.assetsJson) {
272
- tx.assets = chunkXIVCG6EP_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
273
+ tx.assets = chunkD46YDM36_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
273
274
  }
274
275
  return tx;
275
276
  }
@@ -279,6 +280,7 @@ var RealmContractRepository = class {
279
280
  constructor(realm) {
280
281
  this.realm = realm;
281
282
  }
283
+ realm;
282
284
  version = 1;
283
285
  // ── Lifecycle ──────────────────────────────────────────────────────
284
286
  async ensureInit() {
@@ -416,6 +418,7 @@ var RealmIntentRepository = class {
416
418
  constructor(realm) {
417
419
  this.realm = realm;
418
420
  }
421
+ realm;
419
422
  version = 1;
420
423
  async clear() {
421
424
  this.realm.write(() => {
@@ -428,7 +431,7 @@ var RealmIntentRepository = class {
428
431
  const clashes = [
429
432
  ...this.realm.objects("ArkIntent").filtered("intentId == $0", intent.intentId)
430
433
  ].map(toIntent);
431
- chunkXIVCG6EP_cjs.assertIntentIdUnique(intent, clashes);
434
+ chunkD46YDM36_cjs.assertIntentIdUnique(intent, clashes);
432
435
  }
433
436
  this.realm.create(
434
437
  "ArkIntent",
@@ -457,14 +460,14 @@ var RealmIntentRepository = class {
457
460
  }
458
461
  async getIntents(filter) {
459
462
  const all = [...this.realm.objects("ArkIntent")].map(toIntent).sort((a, b) => a.createdAt - b.createdAt || a.intentTxId.localeCompare(b.intentTxId));
460
- const out = filter ? all.filter((i) => chunkXIVCG6EP_cjs.intentMatchesFilter(i, filter)) : all;
461
- const { skip, end } = chunkXIVCG6EP_cjs.intentPageBounds(filter, out.length);
463
+ const out = filter ? all.filter((i) => chunkD46YDM36_cjs.intentMatchesFilter(i, filter)) : all;
464
+ const { skip, end } = chunkD46YDM36_cjs.intentPageBounds(filter, out.length);
462
465
  return out.slice(skip, end);
463
466
  }
464
467
  async getLockedVtxoOutpoints() {
465
468
  const out = [];
466
469
  for (const o of [...this.realm.objects("ArkIntent")].map(toIntent))
467
- if (!chunkXIVCG6EP_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
470
+ if (!chunkD46YDM36_cjs.isTerminalIntentState(o.state)) out.push(...o.intentVtxos);
468
471
  return out;
469
472
  }
470
473
  async [Symbol.asyncDispose]() {
@@ -486,6 +489,7 @@ var RealmVirtualTxRepository = class {
486
489
  constructor(realm) {
487
490
  this.realm = realm;
488
491
  }
492
+ realm;
489
493
  version = 1;
490
494
  async clear() {
491
495
  this.realm.write(() => {
@@ -505,7 +509,7 @@ var RealmVirtualTxRepository = class {
505
509
  txid: t.txid,
506
510
  psbt: t.psbt ?? prev?.psbt ?? null,
507
511
  expiresAt: t.expiresAt ?? prev?.expiresAt ?? null,
508
- type: chunkXIVCG6EP_cjs.mergeChainedTxType(t.type, prev?.type)
512
+ type: chunkD46YDM36_cjs.mergeChainedTxType(t.type, prev?.type)
509
513
  },
510
514
  "modified"
511
515
  );
@@ -738,7 +742,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
738
742
  for (let i = 0; i < newVtxos.length; i++) {
739
743
  const newVtxo = newVtxos[i];
740
744
  if (!newVtxo.script) {
741
- newVtxo.script = chunkXIVCG6EP_cjs.scriptFromArkAddress(newVtxo.address);
745
+ newVtxo.script = chunkD46YDM36_cjs.scriptFromArkAddress(newVtxo.address);
742
746
  }
743
747
  }
744
748
  const oldHasVirtualTx = Array.isArray(oldRealm?.schema) && oldRealm.schema.some((s) => s.name === "ArkVirtualTx");
@@ -755,7 +759,7 @@ function runArkRealmMigrations(oldRealm, newRealm) {
755
759
 
756
760
  Object.defineProperty(exports, "ChainedTxType", {
757
761
  enumerable: true,
758
- get: function () { return chunkXIVCG6EP_cjs.ChainedTxType; }
762
+ get: function () { return chunkD46YDM36_cjs.ChainedTxType; }
759
763
  });
760
764
  exports.ARK_REALM_SCHEMA_VERSION = ARK_REALM_SCHEMA_VERSION;
761
765
  exports.ArkExperimentalRealmSchemas = ArkExperimentalRealmSchemas;