@arkade-os/sdk 0.4.39 → 0.4.40

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 (65) hide show
  1. package/dist/adapters/expo.cjs +4 -4
  2. package/dist/adapters/expo.d.cts +2 -2
  3. package/dist/adapters/expo.d.ts +2 -2
  4. package/dist/adapters/expo.js +2 -2
  5. package/dist/adapters/indexedDB.cjs +3 -3
  6. package/dist/adapters/indexedDB.js +2 -2
  7. package/dist/{ark-BzUNnkoc.d.cts → ark-BaZ6da8C.d.cts} +17 -4
  8. package/dist/{ark-BzUNnkoc.d.ts → ark-BaZ6da8C.d.ts} +17 -4
  9. package/dist/{asyncStorageTaskQueue-CIYeI6GM.d.ts → asyncStorageTaskQueue-CvV50MjV.d.ts} +2 -2
  10. package/dist/{asyncStorageTaskQueue-C0kQoY1x.d.cts → asyncStorageTaskQueue-trKcQM7q.d.cts} +2 -2
  11. package/dist/{chunk-UIFBMKI7.js → chunk-5TSUGRHP.js} +3 -3
  12. package/dist/{chunk-UIFBMKI7.js.map → chunk-5TSUGRHP.js.map} +1 -1
  13. package/dist/{chunk-LJLEFPWD.cjs → chunk-6EZY43WE.cjs} +14 -5
  14. package/dist/chunk-6EZY43WE.cjs.map +1 -0
  15. package/dist/{chunk-D744IES4.js → chunk-GF6NPAOJ.js} +14 -5
  16. package/dist/chunk-GF6NPAOJ.js.map +1 -0
  17. package/dist/{chunk-N56IDZON.cjs → chunk-GWISMFO5.cjs} +11 -11
  18. package/dist/{chunk-N56IDZON.cjs.map → chunk-GWISMFO5.cjs.map} +1 -1
  19. package/dist/{chunk-SYEGCMNV.js → chunk-I2O4Q2EL.js} +175 -78
  20. package/dist/chunk-I2O4Q2EL.js.map +1 -0
  21. package/dist/{chunk-P5FKMIGY.cjs → chunk-I4Z6KKUH.cjs} +251 -152
  22. package/dist/chunk-I4Z6KKUH.cjs.map +1 -0
  23. package/dist/{chunk-VGXTJ7HR.js → chunk-SWJBV4UB.js} +3 -3
  24. package/dist/{chunk-VGXTJ7HR.js.map → chunk-SWJBV4UB.js.map} +1 -1
  25. package/dist/{chunk-A5RLZCPO.cjs → chunk-TSG74BHI.cjs} +7 -7
  26. package/dist/{chunk-A5RLZCPO.cjs.map → chunk-TSG74BHI.cjs.map} +1 -1
  27. package/dist/contracts/handlers/index.d.cts +3 -3
  28. package/dist/contracts/handlers/index.d.ts +3 -3
  29. package/dist/{delegate-DHAgMIS9.d.cts → delegate-Bt5H1gbW.d.cts} +1 -1
  30. package/dist/{delegate-BjPbX-MR.d.ts → delegate-ClaZWxlA.d.ts} +1 -1
  31. package/dist/{index-BOQKDCmS.d.ts → index-ByYBDr1g.d.ts} +2 -2
  32. package/dist/{index-YkMAtSfw.d.cts → index-D6kIRfBy.d.cts} +2 -2
  33. package/dist/index.cjs +121 -113
  34. package/dist/index.d.cts +49 -10
  35. package/dist/index.d.ts +49 -10
  36. package/dist/index.js +2 -2
  37. package/dist/repositories/realm/index.cjs +11 -11
  38. package/dist/repositories/realm/index.d.cts +1 -1
  39. package/dist/repositories/realm/index.d.ts +1 -1
  40. package/dist/repositories/realm/index.js +2 -2
  41. package/dist/repositories/sqlite/index.cjs +11 -11
  42. package/dist/repositories/sqlite/index.d.cts +1 -1
  43. package/dist/repositories/sqlite/index.d.ts +1 -1
  44. package/dist/repositories/sqlite/index.js +2 -2
  45. package/dist/{taskRunner-Dfmt7ZPN.d.ts → taskRunner-Bwss4MUW.d.ts} +2 -2
  46. package/dist/{taskRunner-CVEgBO6d.d.cts → taskRunner-D7SuOTOa.d.cts} +2 -2
  47. package/dist/wallet/expo/background.cjs +12 -12
  48. package/dist/wallet/expo/background.d.cts +3 -3
  49. package/dist/wallet/expo/background.d.ts +3 -3
  50. package/dist/wallet/expo/background.js +4 -4
  51. package/dist/wallet/expo/index.cjs +11 -11
  52. package/dist/wallet/expo/index.d.cts +4 -4
  53. package/dist/wallet/expo/index.d.ts +4 -4
  54. package/dist/wallet/expo/index.js +3 -3
  55. package/dist/{wallet-_PTv-lMe.d.cts → wallet-V5C4Nlhz.d.cts} +2 -2
  56. package/dist/{wallet-C4Pide44.d.ts → wallet-l-2dKXVh.d.ts} +2 -2
  57. package/dist/worker/expo/index.cjs +7 -7
  58. package/dist/worker/expo/index.d.cts +4 -4
  59. package/dist/worker/expo/index.d.ts +4 -4
  60. package/dist/worker/expo/index.js +3 -3
  61. package/package.json +1 -1
  62. package/dist/chunk-D744IES4.js.map +0 -1
  63. package/dist/chunk-LJLEFPWD.cjs.map +0 -1
  64. package/dist/chunk-P5FKMIGY.cjs.map +0 -1
  65. package/dist/chunk-SYEGCMNV.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { H as ReadonlyIdentity, a as Identity, a5 as DescriptorSigningRequest, a6 as Transaction, $ as SignerSession, W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, r as Contract, C as ContractRepository, a4 as ContractFilter, a7 as IntentFeeConfig, a8 as OffchainInput, a9 as FeeAmount, aa as OnchainInput, ab as FeeOutput, m as ArkProvider, Z as SettlementConfig, ac as ContractWatcherConfig, I as IWallet, ad as FeeInfo, h as SettlementEvent, D as DescriptorProvider, g as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, ae as CreateContractParams, af as GetContractsFilter, q as VirtualCoin, ag as GetSpendablePathsOptions, ah as GetAllSpendingPathsOptions, R as Recipient, ai as IssuanceParams, aj as ReissuanceParams, ak as BurnParams, al as RenewVtxosOptions, c as WalletBalance, am as ContractWithVtxos, an as PathSelection, ao as ContractEvent, ap as AssetDetails, aq as IssuanceResult, ar as DelegateInfo, as as MigrationGlobalSkipReason, at as MigrationLegSkipReason, au as SignerStatus, F as IReadonlyWallet, L as IReadonlyAssetManager, av as StorageConfig, e as IContractManager, i as IAssetManager, f as IDelegateManager, aw as IVtxoManager, O as OnchainProvider, N as Network, M as NetworkName, U as Coin, ax as ExplorerTransaction, p as TapLeafScript, ay as EncodedVtxoScript, Y as CSVMultisigTapscript, o as RelativeTimelock, V as VtxoScript, az as Status, aA as Outpoint, aB as ChainTx, n as IndexerProvider, t as TxTree, aC as PathContext } from './ark-BzUNnkoc.cjs';
2
- export { Q as ArkAddress, P as ArkInfo, aD as ArkTapscript, aE as Asset, aF as AssetMetadata, aG as BaseWalletConfig, x as BatchFailedEvent, v as BatchFinalizationEvent, w as BatchFinalizedEvent, aH as BatchInfo, aI as BatchSignableIdentity, B as BatchStartedEvent, aJ as CLTVMultisigTapscript, aK as ChainTxType, aL as CommitmentTx, aM as ConditionCSVMultisigTapscript, aN as ConditionMultisigTapscript, aO as ContractBalance, aP as ContractEventCallback, aQ as ContractHandler, X as ContractManager, aR as ContractManagerConfig, aS as ContractState, aT as ContractVtxo, aU as ContractWatcher, aV as DelegateManagerImpl, aW as DelegateOptions, J as DelegateProvider, aX as DelegatorManagerImpl, aY as DelegatorProvider, aZ as DeprecatedSignerMigrationReport, a_ as DeprecatedSignerReport, a$ as DigestMismatchError, b0 as Discoverable, b1 as DiscoveredContract, b2 as DiscoveryDeps, b3 as ESPLORA_URL, b4 as EsploraProvider, b5 as ExtendedContractVtxo, b6 as HandlerError, b7 as IDelegatorManager, b8 as IndexerTxType, a1 as Intent, b9 as KnownMetadata, ba as MigrateDeprecatedSignerOptions, bb as MigrationLegReport, bc as MigrationVtxoRef, bd as MultisigTapscript, be as Nonces, bf as Output, bg as PageResponse, bh as PaginationOptions, bi as PartialSig, bj as ProviderClass, K as ReadonlyWalletConfig, j as RestArkProvider, bk as RestDelegateProvider, bl as RestDelegatorProvider, k as RestIndexerProvider, bm as ScanContractsOptions, bn as ScanResult, bo as ScheduledSession, bp as SettlementEventType, bq as SignRequest, a0 as SignedIntent, br as SignerClassification, bs as SignerSet, bt as SubscriptionEvent, bu as SubscriptionHeartbeat, l as SubscriptionResponse, bv as TapLeaves, bw as TapTreeCoder, bx as TapscriptType, by as TreeNonces, u as TreeNoncesEvent, bz as TreePartialSigs, z as TreeSignatureEvent, s as TreeSigningStartedEvent, y as TreeTxEvent, bA as Tx, bB as TxHistoryRecord, bC as TxKey, T as TxNotification, bD as TxTreeNode, bE as TxType, bF as VirtualStatus, bG as Vtxo, bH as VtxoChain, _ as VtxoManager, bI as VtxoType, b as WalletConfig, bJ as WalletMode, bK as classifyAgainstSignerSet, bL as classifyContractSigner, bM as decodeTapscript, bN as getSequence, bO as isBatchSignable, bP as isCooperativelyMigratable, bQ as isDiscoverable, bR as isExpired, bS as isRecoverable, bT as isSpendable, bU as isSubdust, bV as isVtxoExpiringSoon, bW as networks, bX as signerSetFromInfo, bY as toXOnlySignerHex } from './ark-BzUNnkoc.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-YkMAtSfw.cjs';
4
- export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-DHAgMIS9.cjs';
5
- import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-_PTv-lMe.cjs';
6
- export { B as Batch, d as BoardingUtxoGroup, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-_PTv-lMe.cjs';
1
+ import { L as ReadonlyIdentity, a as Identity, a5 as DescriptorSigningRequest, a6 as Transaction, a2 as SignerSession, W as WalletRepository, E as ExtendedVirtualCoin, s as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, t as WalletState, r as Contract, C as ContractRepository, u as ContractFilter, a7 as IntentFeeConfig, a8 as OffchainInput, a9 as FeeAmount, aa as OnchainInput, ab as FeeOutput, m as ArkProvider, a0 as SettlementConfig, ac as ContractWatcherConfig, I as IWallet, ad as FeeInfo, h as SettlementEvent, J as DescriptorProvider, g as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, ae as CreateContractParams, af as GetContractsFilter, q as VirtualCoin, ag as GetSpendablePathsOptions, ah as GetAllSpendingPathsOptions, R as Recipient, ai as IssuanceParams, aj as ReissuanceParams, ak as BurnParams, al as RenewVtxosOptions, c as WalletBalance, am as ContractWithVtxos, an as PathSelection, ao as ContractEvent, ap as AssetDetails, aq as IssuanceResult, ar as DelegateInfo, as as MigrationGlobalSkipReason, at as MigrationLegSkipReason, au as SignerStatus, K as IReadonlyWallet, Q as IReadonlyAssetManager, av as StorageConfig, e as IContractManager, i as IAssetManager, f as IDelegateManager, aw as IVtxoManager, O as OnchainProvider, N as Network, U as NetworkName, Z as Coin, ax as ExplorerTransaction, p as TapLeafScript, ay as EncodedVtxoScript, $ as CSVMultisigTapscript, o as RelativeTimelock, V as VtxoScript, az as Status, aA as Outpoint, aB as ChainTx, n as IndexerProvider, w as TxTree, aC as PathContext } from './ark-BaZ6da8C.cjs';
2
+ export { Y as ArkAddress, X as ArkInfo, aD as ArkTapscript, aE as Asset, aF as AssetMetadata, aG as BaseWalletConfig, D as BatchFailedEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, aH as BatchInfo, aI as BatchSignableIdentity, B as BatchStartedEvent, aJ as CLTVMultisigTapscript, aK as ChainTxType, aL as CommitmentTx, aM as ConditionCSVMultisigTapscript, aN as ConditionMultisigTapscript, aO as ContractBalance, aP as ContractEventCallback, aQ as ContractHandler, _ as ContractManager, aR as ContractManagerConfig, aS as ContractState, aT as ContractVtxo, aU as ContractWatcher, aV as DelegateManagerImpl, aW as DelegateOptions, M as DelegateProvider, aX as DelegatorManagerImpl, aY as DelegatorProvider, aZ as DeprecatedSignerMigrationReport, a_ as DeprecatedSignerReport, a$ as DigestMismatchError, b0 as Discoverable, b1 as DiscoveredContract, b2 as DiscoveryDeps, b3 as ESPLORA_URL, b4 as EsploraProvider, b5 as ExtendedContractVtxo, b6 as HandlerError, b7 as IDelegatorManager, b8 as IndexerTxType, a4 as Intent, b9 as KnownMetadata, ba as MigrateDeprecatedSignerOptions, bb as MigrationLegReport, bc as MigrationVtxoRef, bd as MultisigTapscript, be as Nonces, bf as Output, bg as PageResponse, bh as PaginationOptions, bi as PartialSig, bj as ProviderClass, P as ReadonlyWalletConfig, j as RestArkProvider, bk as RestDelegateProvider, bl as RestDelegatorProvider, k as RestIndexerProvider, bm as ScanContractsOptions, bn as ScanResult, bo as ScheduledSession, bp as SettlementEventType, bq as SignRequest, a3 as SignedIntent, br as SignerClassification, bs as SignerSet, bt as SubscriptionEvent, bu as SubscriptionHeartbeat, l as SubscriptionResponse, bv as TapLeaves, bw as TapTreeCoder, bx as TapscriptType, by as TreeNonces, x as TreeNoncesEvent, bz as TreePartialSigs, H as TreeSignatureEvent, v as TreeSigningStartedEvent, F as TreeTxEvent, bA as Tx, bB as TxHistoryRecord, bC as TxKey, T as TxNotification, bD as TxTreeNode, bE as TxType, bF as VirtualStatus, bG as Vtxo, bH as VtxoChain, a1 as VtxoManager, bI as VtxoType, b as WalletConfig, bJ as WalletMode, bK as classifyAgainstSignerSet, bL as classifyContractSigner, bM as decodeTapscript, bN as getSequence, bO as isBatchSignable, bP as isCooperativelyMigratable, bQ as isDiscoverable, bR as isExpired, bS as isRecoverable, bT as isSpendable, bU as isSubdust, bV as isVtxoExpiringSoon, bW as networks, bX as signerSetFromInfo, bY as toXOnlySignerHex } from './ark-BaZ6da8C.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-D6kIRfBy.cjs';
4
+ export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-Bt5H1gbW.cjs';
5
+ import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-V5C4Nlhz.cjs';
6
+ export { B as Batch, d as BoardingUtxoGroup, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-V5C4Nlhz.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';
@@ -713,7 +713,7 @@ declare class Estimator {
713
713
  * @param onchainOutputs - Array of onchain outputs to evaluate
714
714
  * @returns The total fee amount
715
715
  */
716
- eval(offchainInputs: OffchainInput[], onchainInputs: OnchainInput[], offchainOutputs: FeeOutput[], onchainOutputs: FeeOutput[]): FeeAmount;
716
+ evaluate(offchainInputs: OffchainInput[], onchainInputs: OnchainInput[], offchainOutputs: FeeOutput[], onchainOutputs: FeeOutput[]): FeeAmount;
717
717
  }
718
718
 
719
719
  /**
@@ -850,6 +850,16 @@ declare class MessageBus {
850
850
  private tickInProgress;
851
851
  private debug;
852
852
  private initialized;
853
+ /**
854
+ * FIFO chain that serializes `INITIALIZE_MESSAGE_BUS` handling. Each init
855
+ * runs to completion in enqueue order.
856
+ */
857
+ private initChain;
858
+ /**
859
+ * Number of inits accepted but not yet settled (queued or running). The
860
+ * bus refuses ordinary wallet messages while this is > 0.
861
+ */
862
+ private pendingInitCount;
853
863
  private readonly buildServicesFn;
854
864
  private readonly boundOnMessage;
855
865
  /** Create the service-worker message bus with repositories and handler configuration. */
@@ -860,7 +870,17 @@ declare class MessageBus {
860
870
  stop(): Promise<void>;
861
871
  private scheduleNextTick;
862
872
  private runTick;
873
+ /**
874
+ * Serialize init requests on {@link initChain}.
875
+ * Returns this init's own result.
876
+ */
863
877
  private waitForInit;
878
+ /**
879
+ * The bus serves ordinary wallet messages only when it is initialized AND
880
+ * no init is in flight.
881
+ */
882
+ private acceptsWalletMessages;
883
+ private doInit;
864
884
  private buildServices;
865
885
  private onMessage;
866
886
  private processMessage;
@@ -1966,8 +1986,10 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
1966
1986
  private sendMessageStreaming;
1967
1987
  protected sendMessage(request: WalletUpdaterRequest): Promise<WalletUpdaterResponse>;
1968
1988
  private pingServiceWorker;
1969
- private sendMessageWithRetry;
1970
- protected sendMessageWithEvents(request: WalletUpdaterRequest, onEvent: (response: WalletUpdaterResponse) => void, isComplete: (response: WalletUpdaterResponse) => boolean): Promise<WalletUpdaterResponse>;
1989
+ protected sendMessageWithRetry(request: WalletUpdaterRequest, withEvents?: {
1990
+ onEvent: (response: WalletUpdaterResponse) => void;
1991
+ isComplete: (response: WalletUpdaterResponse) => boolean;
1992
+ }): Promise<WalletUpdaterResponse>;
1971
1993
  /**
1972
1994
  * Produce a serialized envelope for the wallet's identity. The base
1973
1995
  * class always emits a readonly envelope; `ServiceWorkerWallet`
@@ -1984,6 +2006,14 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
1984
2006
  /** Minimal INIT_WALLET payload used on reinitialize when the cache is gone. */
1985
2007
  protected buildInitWalletPayload(): RequestInitWallet["payload"];
1986
2008
  private reinitialize;
2009
+ /**
2010
+ * Verify the worker is bound to this wallet's identity before the SDK hands
2011
+ * back (or recovers) a usable wallet object.
2012
+ *
2013
+ * Compares the stable baseline identity key (`identity.xOnlyPublicKey()`) to the one reported
2014
+ * by the worker via GET_STATUS.
2015
+ */
2016
+ protected assertWorkerIdentityMatches(): Promise<void>;
1987
2017
  /** Clear cached wallet state from both the page and service worker storage. */
1988
2018
  clear(): Promise<void>;
1989
2019
  getAddress(): Promise<string>;
@@ -3535,7 +3565,16 @@ declare function openDatabase(dbName: string, dbVersion: number, initDatabase: (
3535
3565
  declare function closeDatabase(dbName: string): Promise<boolean>;
3536
3566
 
3537
3567
  declare const MESSAGE_BUS_NOT_INITIALIZED = "MessageBus not initialized";
3568
+ /**
3569
+ * Message for the "an init is in flight" variant.
3570
+ * It is a superset of MESSAGE_BUS_NOT_INITIALIZED so the existing consumers
3571
+ * keeps classifying it as "not initialized".
3572
+ */
3573
+ declare const MESSAGE_BUS_INITIALIZING = "MessageBus not initialized: initializing";
3538
3574
  declare class MessageBusNotInitializedError extends Error {
3575
+ constructor(message?: string);
3576
+ }
3577
+ declare class MessageBusInitializingError extends MessageBusNotInitializedError {
3539
3578
  constructor();
3540
3579
  }
3541
3580
  declare class ServiceWorkerTimeoutError extends Error {
@@ -3609,4 +3648,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
3609
3648
  burn(params: BurnParams): Promise<string>;
3610
3649
  }
3611
3650
 
3612
- export { type AnchorBumper, ArkError, 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, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, FeeAmount, FeeInfo, FeeOutput, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBWalletRepository, IndexerProvider, IntentFeeConfig, IssuanceParams, IssuanceResult, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, 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, Unroll, type VSize, VirtualCoin, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, assembleBtcdTaprootTree, index as asset, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sdkVersion, sequenceToTimelock, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
3651
+ export { type AnchorBumper, ArkError, 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, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, FeeAmount, FeeInfo, FeeOutput, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBWalletRepository, IndexerProvider, IntentFeeConfig, 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, Unroll, type VSize, VirtualCoin, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, assembleBtcdTaprootTree, index as asset, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sdkVersion, sequenceToTimelock, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { H as ReadonlyIdentity, a as Identity, a5 as DescriptorSigningRequest, a6 as Transaction, $ as SignerSession, W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, r as Contract, C as ContractRepository, a4 as ContractFilter, a7 as IntentFeeConfig, a8 as OffchainInput, a9 as FeeAmount, aa as OnchainInput, ab as FeeOutput, m as ArkProvider, Z as SettlementConfig, ac as ContractWatcherConfig, I as IWallet, ad as FeeInfo, h as SettlementEvent, D as DescriptorProvider, g as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, ae as CreateContractParams, af as GetContractsFilter, q as VirtualCoin, ag as GetSpendablePathsOptions, ah as GetAllSpendingPathsOptions, R as Recipient, ai as IssuanceParams, aj as ReissuanceParams, ak as BurnParams, al as RenewVtxosOptions, c as WalletBalance, am as ContractWithVtxos, an as PathSelection, ao as ContractEvent, ap as AssetDetails, aq as IssuanceResult, ar as DelegateInfo, as as MigrationGlobalSkipReason, at as MigrationLegSkipReason, au as SignerStatus, F as IReadonlyWallet, L as IReadonlyAssetManager, av as StorageConfig, e as IContractManager, i as IAssetManager, f as IDelegateManager, aw as IVtxoManager, O as OnchainProvider, N as Network, M as NetworkName, U as Coin, ax as ExplorerTransaction, p as TapLeafScript, ay as EncodedVtxoScript, Y as CSVMultisigTapscript, o as RelativeTimelock, V as VtxoScript, az as Status, aA as Outpoint, aB as ChainTx, n as IndexerProvider, t as TxTree, aC as PathContext } from './ark-BzUNnkoc.js';
2
- export { Q as ArkAddress, P as ArkInfo, aD as ArkTapscript, aE as Asset, aF as AssetMetadata, aG as BaseWalletConfig, x as BatchFailedEvent, v as BatchFinalizationEvent, w as BatchFinalizedEvent, aH as BatchInfo, aI as BatchSignableIdentity, B as BatchStartedEvent, aJ as CLTVMultisigTapscript, aK as ChainTxType, aL as CommitmentTx, aM as ConditionCSVMultisigTapscript, aN as ConditionMultisigTapscript, aO as ContractBalance, aP as ContractEventCallback, aQ as ContractHandler, X as ContractManager, aR as ContractManagerConfig, aS as ContractState, aT as ContractVtxo, aU as ContractWatcher, aV as DelegateManagerImpl, aW as DelegateOptions, J as DelegateProvider, aX as DelegatorManagerImpl, aY as DelegatorProvider, aZ as DeprecatedSignerMigrationReport, a_ as DeprecatedSignerReport, a$ as DigestMismatchError, b0 as Discoverable, b1 as DiscoveredContract, b2 as DiscoveryDeps, b3 as ESPLORA_URL, b4 as EsploraProvider, b5 as ExtendedContractVtxo, b6 as HandlerError, b7 as IDelegatorManager, b8 as IndexerTxType, a1 as Intent, b9 as KnownMetadata, ba as MigrateDeprecatedSignerOptions, bb as MigrationLegReport, bc as MigrationVtxoRef, bd as MultisigTapscript, be as Nonces, bf as Output, bg as PageResponse, bh as PaginationOptions, bi as PartialSig, bj as ProviderClass, K as ReadonlyWalletConfig, j as RestArkProvider, bk as RestDelegateProvider, bl as RestDelegatorProvider, k as RestIndexerProvider, bm as ScanContractsOptions, bn as ScanResult, bo as ScheduledSession, bp as SettlementEventType, bq as SignRequest, a0 as SignedIntent, br as SignerClassification, bs as SignerSet, bt as SubscriptionEvent, bu as SubscriptionHeartbeat, l as SubscriptionResponse, bv as TapLeaves, bw as TapTreeCoder, bx as TapscriptType, by as TreeNonces, u as TreeNoncesEvent, bz as TreePartialSigs, z as TreeSignatureEvent, s as TreeSigningStartedEvent, y as TreeTxEvent, bA as Tx, bB as TxHistoryRecord, bC as TxKey, T as TxNotification, bD as TxTreeNode, bE as TxType, bF as VirtualStatus, bG as Vtxo, bH as VtxoChain, _ as VtxoManager, bI as VtxoType, b as WalletConfig, bJ as WalletMode, bK as classifyAgainstSignerSet, bL as classifyContractSigner, bM as decodeTapscript, bN as getSequence, bO as isBatchSignable, bP as isCooperativelyMigratable, bQ as isDiscoverable, bR as isExpired, bS as isRecoverable, bT as isSpendable, bU as isSubdust, bV as isVtxoExpiringSoon, bW as networks, bX as signerSetFromInfo, bY as toXOnlySignerHex } from './ark-BzUNnkoc.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-BOQKDCmS.js';
4
- export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BjPbX-MR.js';
5
- import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-C4Pide44.js';
6
- export { B as Batch, d as BoardingUtxoGroup, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-C4Pide44.js';
1
+ import { L as ReadonlyIdentity, a as Identity, a5 as DescriptorSigningRequest, a6 as Transaction, a2 as SignerSession, W as WalletRepository, E as ExtendedVirtualCoin, s as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, t as WalletState, r as Contract, C as ContractRepository, u as ContractFilter, a7 as IntentFeeConfig, a8 as OffchainInput, a9 as FeeAmount, aa as OnchainInput, ab as FeeOutput, m as ArkProvider, a0 as SettlementConfig, ac as ContractWatcherConfig, I as IWallet, ad as FeeInfo, h as SettlementEvent, J as DescriptorProvider, g as SettleParams, S as SendBitcoinParams, G as GetVtxosFilter, ae as CreateContractParams, af as GetContractsFilter, q as VirtualCoin, ag as GetSpendablePathsOptions, ah as GetAllSpendingPathsOptions, R as Recipient, ai as IssuanceParams, aj as ReissuanceParams, ak as BurnParams, al as RenewVtxosOptions, c as WalletBalance, am as ContractWithVtxos, an as PathSelection, ao as ContractEvent, ap as AssetDetails, aq as IssuanceResult, ar as DelegateInfo, as as MigrationGlobalSkipReason, at as MigrationLegSkipReason, au as SignerStatus, K as IReadonlyWallet, Q as IReadonlyAssetManager, av as StorageConfig, e as IContractManager, i as IAssetManager, f as IDelegateManager, aw as IVtxoManager, O as OnchainProvider, N as Network, U as NetworkName, Z as Coin, ax as ExplorerTransaction, p as TapLeafScript, ay as EncodedVtxoScript, $ as CSVMultisigTapscript, o as RelativeTimelock, V as VtxoScript, az as Status, aA as Outpoint, aB as ChainTx, n as IndexerProvider, w as TxTree, aC as PathContext } from './ark-BaZ6da8C.js';
2
+ export { Y as ArkAddress, X as ArkInfo, aD as ArkTapscript, aE as Asset, aF as AssetMetadata, aG as BaseWalletConfig, D as BatchFailedEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, aH as BatchInfo, aI as BatchSignableIdentity, B as BatchStartedEvent, aJ as CLTVMultisigTapscript, aK as ChainTxType, aL as CommitmentTx, aM as ConditionCSVMultisigTapscript, aN as ConditionMultisigTapscript, aO as ContractBalance, aP as ContractEventCallback, aQ as ContractHandler, _ as ContractManager, aR as ContractManagerConfig, aS as ContractState, aT as ContractVtxo, aU as ContractWatcher, aV as DelegateManagerImpl, aW as DelegateOptions, M as DelegateProvider, aX as DelegatorManagerImpl, aY as DelegatorProvider, aZ as DeprecatedSignerMigrationReport, a_ as DeprecatedSignerReport, a$ as DigestMismatchError, b0 as Discoverable, b1 as DiscoveredContract, b2 as DiscoveryDeps, b3 as ESPLORA_URL, b4 as EsploraProvider, b5 as ExtendedContractVtxo, b6 as HandlerError, b7 as IDelegatorManager, b8 as IndexerTxType, a4 as Intent, b9 as KnownMetadata, ba as MigrateDeprecatedSignerOptions, bb as MigrationLegReport, bc as MigrationVtxoRef, bd as MultisigTapscript, be as Nonces, bf as Output, bg as PageResponse, bh as PaginationOptions, bi as PartialSig, bj as ProviderClass, P as ReadonlyWalletConfig, j as RestArkProvider, bk as RestDelegateProvider, bl as RestDelegatorProvider, k as RestIndexerProvider, bm as ScanContractsOptions, bn as ScanResult, bo as ScheduledSession, bp as SettlementEventType, bq as SignRequest, a3 as SignedIntent, br as SignerClassification, bs as SignerSet, bt as SubscriptionEvent, bu as SubscriptionHeartbeat, l as SubscriptionResponse, bv as TapLeaves, bw as TapTreeCoder, bx as TapscriptType, by as TreeNonces, x as TreeNoncesEvent, bz as TreePartialSigs, H as TreeSignatureEvent, v as TreeSigningStartedEvent, F as TreeTxEvent, bA as Tx, bB as TxHistoryRecord, bC as TxKey, T as TxNotification, bD as TxTreeNode, bE as TxType, bF as VirtualStatus, bG as Vtxo, bH as VtxoChain, a1 as VtxoManager, bI as VtxoType, b as WalletConfig, bJ as WalletMode, bK as classifyAgainstSignerSet, bL as classifyContractSigner, bM as decodeTapscript, bN as getSequence, bO as isBatchSignable, bP as isCooperativelyMigratable, bQ as isDiscoverable, bR as isExpired, bS as isRecoverable, bT as isSpendable, bU as isSubdust, bV as isVtxoExpiringSoon, bW as networks, bX as signerSetFromInfo, bY as toXOnlySignerHex } from './ark-BaZ6da8C.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-ByYBDr1g.js';
4
+ export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-ClaZWxlA.js';
5
+ import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-l-2dKXVh.js';
6
+ export { B as Batch, d as BoardingUtxoGroup, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-l-2dKXVh.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';
@@ -713,7 +713,7 @@ declare class Estimator {
713
713
  * @param onchainOutputs - Array of onchain outputs to evaluate
714
714
  * @returns The total fee amount
715
715
  */
716
- eval(offchainInputs: OffchainInput[], onchainInputs: OnchainInput[], offchainOutputs: FeeOutput[], onchainOutputs: FeeOutput[]): FeeAmount;
716
+ evaluate(offchainInputs: OffchainInput[], onchainInputs: OnchainInput[], offchainOutputs: FeeOutput[], onchainOutputs: FeeOutput[]): FeeAmount;
717
717
  }
718
718
 
719
719
  /**
@@ -850,6 +850,16 @@ declare class MessageBus {
850
850
  private tickInProgress;
851
851
  private debug;
852
852
  private initialized;
853
+ /**
854
+ * FIFO chain that serializes `INITIALIZE_MESSAGE_BUS` handling. Each init
855
+ * runs to completion in enqueue order.
856
+ */
857
+ private initChain;
858
+ /**
859
+ * Number of inits accepted but not yet settled (queued or running). The
860
+ * bus refuses ordinary wallet messages while this is > 0.
861
+ */
862
+ private pendingInitCount;
853
863
  private readonly buildServicesFn;
854
864
  private readonly boundOnMessage;
855
865
  /** Create the service-worker message bus with repositories and handler configuration. */
@@ -860,7 +870,17 @@ declare class MessageBus {
860
870
  stop(): Promise<void>;
861
871
  private scheduleNextTick;
862
872
  private runTick;
873
+ /**
874
+ * Serialize init requests on {@link initChain}.
875
+ * Returns this init's own result.
876
+ */
863
877
  private waitForInit;
878
+ /**
879
+ * The bus serves ordinary wallet messages only when it is initialized AND
880
+ * no init is in flight.
881
+ */
882
+ private acceptsWalletMessages;
883
+ private doInit;
864
884
  private buildServices;
865
885
  private onMessage;
866
886
  private processMessage;
@@ -1966,8 +1986,10 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
1966
1986
  private sendMessageStreaming;
1967
1987
  protected sendMessage(request: WalletUpdaterRequest): Promise<WalletUpdaterResponse>;
1968
1988
  private pingServiceWorker;
1969
- private sendMessageWithRetry;
1970
- protected sendMessageWithEvents(request: WalletUpdaterRequest, onEvent: (response: WalletUpdaterResponse) => void, isComplete: (response: WalletUpdaterResponse) => boolean): Promise<WalletUpdaterResponse>;
1989
+ protected sendMessageWithRetry(request: WalletUpdaterRequest, withEvents?: {
1990
+ onEvent: (response: WalletUpdaterResponse) => void;
1991
+ isComplete: (response: WalletUpdaterResponse) => boolean;
1992
+ }): Promise<WalletUpdaterResponse>;
1971
1993
  /**
1972
1994
  * Produce a serialized envelope for the wallet's identity. The base
1973
1995
  * class always emits a readonly envelope; `ServiceWorkerWallet`
@@ -1984,6 +2006,14 @@ declare class ServiceWorkerReadonlyWallet implements IReadonlyWallet {
1984
2006
  /** Minimal INIT_WALLET payload used on reinitialize when the cache is gone. */
1985
2007
  protected buildInitWalletPayload(): RequestInitWallet["payload"];
1986
2008
  private reinitialize;
2009
+ /**
2010
+ * Verify the worker is bound to this wallet's identity before the SDK hands
2011
+ * back (or recovers) a usable wallet object.
2012
+ *
2013
+ * Compares the stable baseline identity key (`identity.xOnlyPublicKey()`) to the one reported
2014
+ * by the worker via GET_STATUS.
2015
+ */
2016
+ protected assertWorkerIdentityMatches(): Promise<void>;
1987
2017
  /** Clear cached wallet state from both the page and service worker storage. */
1988
2018
  clear(): Promise<void>;
1989
2019
  getAddress(): Promise<string>;
@@ -3535,7 +3565,16 @@ declare function openDatabase(dbName: string, dbVersion: number, initDatabase: (
3535
3565
  declare function closeDatabase(dbName: string): Promise<boolean>;
3536
3566
 
3537
3567
  declare const MESSAGE_BUS_NOT_INITIALIZED = "MessageBus not initialized";
3568
+ /**
3569
+ * Message for the "an init is in flight" variant.
3570
+ * It is a superset of MESSAGE_BUS_NOT_INITIALIZED so the existing consumers
3571
+ * keeps classifying it as "not initialized".
3572
+ */
3573
+ declare const MESSAGE_BUS_INITIALIZING = "MessageBus not initialized: initializing";
3538
3574
  declare class MessageBusNotInitializedError extends Error {
3575
+ constructor(message?: string);
3576
+ }
3577
+ declare class MessageBusInitializingError extends MessageBusNotInitializedError {
3539
3578
  constructor();
3540
3579
  }
3541
3580
  declare class ServiceWorkerTimeoutError extends Error {
@@ -3609,4 +3648,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
3609
3648
  burn(params: BurnParams): Promise<string>;
3610
3649
  }
3611
3650
 
3612
- export { type AnchorBumper, ArkError, 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, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, FeeAmount, FeeInfo, FeeOutput, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBWalletRepository, IndexerProvider, IntentFeeConfig, IssuanceParams, IssuanceResult, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, 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, Unroll, type VSize, VirtualCoin, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, assembleBtcdTaprootTree, index as asset, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sdkVersion, sequenceToTimelock, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
3651
+ export { type AnchorBumper, ArkError, 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, ExplorerTransaction, ExtendedCoin, ExtendedVirtualCoin, FeeAmount, FeeInfo, FeeOutput, GetVtxosFilter, HDDescriptorProvider, IAssetManager, IContractManager, IDelegateManager, IReadonlyAssetManager, IReadonlyWallet, IVtxoManager, IWallet, Identity, InMemoryContractRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBWalletRepository, IndexerProvider, IntentFeeConfig, 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, Unroll, type VSize, VirtualCoin, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, assembleBtcdTaprootTree, index as asset, buildForfeitTx, buildOffchainTx, buildVersion, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sdkVersion, sequenceToTimelock, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { ArkNote, AssetManager, BIP322, Batch, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EsploraProvider, Estimator, HDDescriptorProvider, InMemoryContractRepository, InMemoryWalletRepository, IndexedDBContractRepository, IndexedDBWalletRepository, MESSAGE_BUS_NOT_INITIALIZED, MIGRATION_KEY, MessageBus, MessageBusNotInitializedError, MissingSigningDescriptorError, MnemonicIdentity, OnchainWallet, P2A, Ramps, ReadonlyAssetManager, ReadonlyDescriptorIdentity, ReadonlySingleKey, ReadonlyWallet, ReadonlyWalletError, RestDelegateProvider, RestDelegatorProvider, SeedIdentity, ServiceWorkerReadonlyWallet, ServiceWorkerTimeoutError, ServiceWorkerWallet, SingleKey, TxTree, TxType, TxWeightEstimator, Unroll, VtxoManager, Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isBatchSignable, isCooperativelyMigratable, isDiscoverable, isExpired, isRecoverable, isSpendable, isSubdust, isValidArkAddress, isVtxoExpiringSoon, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-SYEGCMNV.js';
2
- export { ArkError, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ChainTxType, ConditionWitness, CosignerPublicKey, DigestMismatchError, IndexerTxType, Intent, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports as asset, buildVersion, getArkPsbtFields, maybeArkError, sdkVersion, setArkPsbtField } from './chunk-D744IES4.js';
1
+ export { ArkNote, AssetManager, BIP322, Batch, ContractManager, ContractRepositoryImpl, ContractWatcher, DEFAULT_MESSAGE_TIMEOUTS, DelegateManagerImpl, DelegateNotConfiguredError, DelegatorManagerImpl, DelegatorNotConfiguredError, DescriptorSigningProviderMissingError, DustChangeError, ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ESPLORA_URL, ElectrumOnchainProvider, EsploraProvider, Estimator, HDDescriptorProvider, InMemoryContractRepository, InMemoryWalletRepository, IndexedDBContractRepository, 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, Unroll, VtxoManager, Wallet, WalletMessageHandler, WalletNotInitializedError, WalletRepositoryImpl, WsElectrumChainSource, buildForfeitTx, buildOffchainTx, classifyAgainstSignerSet, classifyContractSigner, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isBatchSignable, isCooperativelyMigratable, isDiscoverable, isExpired, isRecoverable, isSpendable, isSubdust, isValidArkAddress, isVtxoExpiringSoon, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, setupServiceWorker, signerSetFromInfo, toXOnlySignerHex, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-I2O4Q2EL.js';
2
+ export { ArkError, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ChainTxType, ConditionWitness, CosignerPublicKey, DigestMismatchError, IndexerTxType, Intent, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports as asset, buildVersion, getArkPsbtFields, maybeArkError, sdkVersion, setArkPsbtField } from './chunk-GF6NPAOJ.js';
3
3
  export { BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, contractHandlers, isCltvSatisfied, isCsvSpendable } from './chunk-CUSABEUQ.js';
4
4
  export { ArkAddress, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, MultisigTapscript, TapTreeCoder, VtxoScript, assembleBtcdTaprootTree, decodeTapscript, getSequence, networks, sequenceToTimelock, timelockToSequence } from './chunk-OUVTG72A.js';
5
5
  import './chunk-NSBPE2FW.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkP5FKMIGY_cjs = require('../../chunk-P5FKMIGY.cjs');
4
- require('../../chunk-LJLEFPWD.cjs');
3
+ var chunkI4Z6KKUH_cjs = require('../../chunk-I4Z6KKUH.cjs');
4
+ require('../../chunk-6EZY43WE.cjs');
5
5
  require('../../chunk-GUTKJMSF.cjs');
6
6
  require('../../chunk-CMPJR3HS.cjs');
7
7
  require('../../chunk-5BLDMQED.cjs');
@@ -37,7 +37,7 @@ var RealmWalletRepository = class {
37
37
  await this.ensureInit();
38
38
  this.realm.write(() => {
39
39
  for (const vtxo of vtxos) {
40
- const s = chunkP5FKMIGY_cjs.serializeVtxo(vtxo);
40
+ const s = chunkI4Z6KKUH_cjs.serializeVtxo(vtxo);
41
41
  this.realm.create(
42
42
  "ArkVtxo",
43
43
  {
@@ -85,7 +85,7 @@ var RealmWalletRepository = class {
85
85
  throw new Error("RealmWalletRepository requires an address");
86
86
  }
87
87
  for (const vtxo of vtxos) {
88
- if (!chunkP5FKMIGY_cjs.isVtxoForScript(vtxo, key.script)) {
88
+ if (!chunkI4Z6KKUH_cjs.isVtxoForScript(vtxo, key.script)) {
89
89
  throw new Error(
90
90
  `VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
91
91
  );
@@ -110,7 +110,7 @@ var RealmWalletRepository = class {
110
110
  await this.ensureInit();
111
111
  this.realm.write(() => {
112
112
  for (const utxo of utxos) {
113
- const s = chunkP5FKMIGY_cjs.serializeUtxo(utxo);
113
+ const s = chunkI4Z6KKUH_cjs.serializeUtxo(utxo);
114
114
  this.realm.create(
115
115
  "ArkUtxo",
116
116
  {
@@ -163,7 +163,7 @@ var RealmWalletRepository = class {
163
163
  amount: tx.amount,
164
164
  settled: tx.settled,
165
165
  createdAt: tx.createdAt,
166
- assetsJson: tx.assets ? JSON.stringify(chunkP5FKMIGY_cjs.serializeAssets(tx.assets)) : null
166
+ assetsJson: tx.assets ? JSON.stringify(chunkI4Z6KKUH_cjs.serializeAssets(tx.assets)) : null
167
167
  },
168
168
  "modified"
169
169
  );
@@ -233,9 +233,9 @@ function vtxoObjectToDomain(obj) {
233
233
  // Post-migration every row has `script`, but the backfill is
234
234
  // idempotent: derive from `address` if the legacy column is still
235
235
  // null (e.g. the migration hasn't run yet on this handle).
236
- script: obj.script ?? chunkP5FKMIGY_cjs.scriptFromArkAddress(obj.address)
236
+ script: obj.script ?? chunkI4Z6KKUH_cjs.scriptFromArkAddress(obj.address)
237
237
  };
238
- return chunkP5FKMIGY_cjs.deserializeVtxo(serialized);
238
+ return chunkI4Z6KKUH_cjs.deserializeVtxo(serialized);
239
239
  }
240
240
  function utxoObjectToDomain(obj) {
241
241
  const serialized = {
@@ -254,7 +254,7 @@ function utxoObjectToDomain(obj) {
254
254
  status: JSON.parse(obj.statusJson),
255
255
  extraWitness: obj.extraWitnessJson ? JSON.parse(obj.extraWitnessJson) : void 0
256
256
  };
257
- return chunkP5FKMIGY_cjs.deserializeUtxo(serialized);
257
+ return chunkI4Z6KKUH_cjs.deserializeUtxo(serialized);
258
258
  }
259
259
  function txObjectToDomain(obj) {
260
260
  const tx = {
@@ -269,7 +269,7 @@ function txObjectToDomain(obj) {
269
269
  createdAt: obj.createdAt
270
270
  };
271
271
  if (obj.assetsJson) {
272
- tx.assets = chunkP5FKMIGY_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
272
+ tx.assets = chunkI4Z6KKUH_cjs.deserializeAssets(JSON.parse(obj.assetsJson));
273
273
  }
274
274
  return tx;
275
275
  }
@@ -499,7 +499,7 @@ function runArkRealmMigrations(_oldRealm, newRealm) {
499
499
  for (let i = 0; i < newVtxos.length; i++) {
500
500
  const newVtxo = newVtxos[i];
501
501
  if (!newVtxo.script) {
502
- newVtxo.script = chunkP5FKMIGY_cjs.scriptFromArkAddress(newVtxo.address);
502
+ newVtxo.script = chunkI4Z6KKUH_cjs.scriptFromArkAddress(newVtxo.address);
503
503
  }
504
504
  }
505
505
  }
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, C as ContractRepository, a4 as ContractFilter, r as Contract } from '../../ark-BzUNnkoc.cjs';
1
+ import { W as WalletRepository, E as ExtendedVirtualCoin, s as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, t as WalletState, C as ContractRepository, u as ContractFilter, r as Contract } from '../../ark-BaZ6da8C.cjs';
2
2
  import '@scure/btc-signer/transaction.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/psbt.js';
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, C as ContractRepository, a4 as ContractFilter, r as Contract } from '../../ark-BzUNnkoc.js';
1
+ import { W as WalletRepository, E as ExtendedVirtualCoin, s as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, t as WalletState, C as ContractRepository, u as ContractFilter, r as Contract } from '../../ark-BaZ6da8C.js';
2
2
  import '@scure/btc-signer/transaction.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/psbt.js';
@@ -1,5 +1,5 @@
1
- import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-SYEGCMNV.js';
2
- import '../../chunk-D744IES4.js';
1
+ import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-I2O4Q2EL.js';
2
+ import '../../chunk-GF6NPAOJ.js';
3
3
  import '../../chunk-CUSABEUQ.js';
4
4
  import '../../chunk-OUVTG72A.js';
5
5
  import '../../chunk-NSBPE2FW.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkP5FKMIGY_cjs = require('../../chunk-P5FKMIGY.cjs');
4
- require('../../chunk-LJLEFPWD.cjs');
3
+ var chunkI4Z6KKUH_cjs = require('../../chunk-I4Z6KKUH.cjs');
4
+ require('../../chunk-6EZY43WE.cjs');
5
5
  require('../../chunk-GUTKJMSF.cjs');
6
6
  require('../../chunk-CMPJR3HS.cjs');
7
7
  require('../../chunk-5BLDMQED.cjs');
@@ -126,7 +126,7 @@ var SQLiteWalletRepository = class {
126
126
  for (const row of nullRows) {
127
127
  await this.db.run(
128
128
  `UPDATE ${this.tables.vtxos} SET script = ? WHERE txid = ? AND vout = ?`,
129
- [chunkP5FKMIGY_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
129
+ [chunkI4Z6KKUH_cjs.scriptFromArkAddress(row.address), row.txid, row.vout]
130
130
  );
131
131
  }
132
132
  const tempName = `${this.tables.vtxos}__migrate_tmp`;
@@ -204,7 +204,7 @@ var SQLiteWalletRepository = class {
204
204
  async saveVtxos(address, vtxos) {
205
205
  await this.ensureInit();
206
206
  for (const vtxo of vtxos) {
207
- const s = chunkP5FKMIGY_cjs.serializeVtxo(vtxo);
207
+ const s = chunkI4Z6KKUH_cjs.serializeVtxo(vtxo);
208
208
  await this.db.run(
209
209
  `INSERT OR REPLACE INTO ${this.tables.vtxos}
210
210
  (txid, vout, value, address,
@@ -259,7 +259,7 @@ var SQLiteWalletRepository = class {
259
259
  throw new Error("SQLiteWalletRepository requires an address");
260
260
  }
261
261
  for (const vtxo of vtxos) {
262
- if (!chunkP5FKMIGY_cjs.isVtxoForScript(vtxo, key.script)) {
262
+ if (!chunkI4Z6KKUH_cjs.isVtxoForScript(vtxo, key.script)) {
263
263
  throw new Error(
264
264
  `VTXO ${vtxo.txid}:${vtxo.vout} script mismatch: expected ${key.script}, got ${vtxo.script}`
265
265
  );
@@ -283,7 +283,7 @@ var SQLiteWalletRepository = class {
283
283
  async saveUtxos(address, utxos) {
284
284
  await this.ensureInit();
285
285
  for (const utxo of utxos) {
286
- const s = chunkP5FKMIGY_cjs.serializeUtxo(utxo);
286
+ const s = chunkI4Z6KKUH_cjs.serializeUtxo(utxo);
287
287
  await this.db.run(
288
288
  `INSERT OR REPLACE INTO ${this.tables.utxos}
289
289
  (txid, vout, value, address,
@@ -339,7 +339,7 @@ var SQLiteWalletRepository = class {
339
339
  tx.amount,
340
340
  tx.settled ? 1 : 0,
341
341
  tx.createdAt,
342
- tx.assets ? JSON.stringify(chunkP5FKMIGY_cjs.serializeAssets(tx.assets)) : null
342
+ tx.assets ? JSON.stringify(chunkI4Z6KKUH_cjs.serializeAssets(tx.assets)) : null
343
343
  ]
344
344
  );
345
345
  }
@@ -413,9 +413,9 @@ function vtxoRowToDomain(row) {
413
413
  // Post-migration every row has `script`, but the backfill is
414
414
  // idempotent: derive from `address` if the legacy column is still
415
415
  // null (e.g. the migration hasn't run yet on this handle).
416
- script: row.script ?? chunkP5FKMIGY_cjs.scriptFromArkAddress(row.address)
416
+ script: row.script ?? chunkI4Z6KKUH_cjs.scriptFromArkAddress(row.address)
417
417
  };
418
- return chunkP5FKMIGY_cjs.deserializeVtxo(serialized);
418
+ return chunkI4Z6KKUH_cjs.deserializeVtxo(serialized);
419
419
  }
420
420
  function utxoRowToDomain(row) {
421
421
  const serialized = {
@@ -434,7 +434,7 @@ function utxoRowToDomain(row) {
434
434
  status: JSON.parse(row.status_json),
435
435
  extraWitness: row.extra_witness_json ? JSON.parse(row.extra_witness_json) : void 0
436
436
  };
437
- return chunkP5FKMIGY_cjs.deserializeUtxo(serialized);
437
+ return chunkI4Z6KKUH_cjs.deserializeUtxo(serialized);
438
438
  }
439
439
  function txRowToDomain(row) {
440
440
  const tx = {
@@ -449,7 +449,7 @@ function txRowToDomain(row) {
449
449
  createdAt: row.created_at
450
450
  };
451
451
  if (row.assets_json) {
452
- tx.assets = chunkP5FKMIGY_cjs.deserializeAssets(JSON.parse(row.assets_json));
452
+ tx.assets = chunkI4Z6KKUH_cjs.deserializeAssets(JSON.parse(row.assets_json));
453
453
  }
454
454
  return tx;
455
455
  }
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, C as ContractRepository, a4 as ContractFilter, r as Contract } from '../../ark-BzUNnkoc.cjs';
1
+ import { W as WalletRepository, E as ExtendedVirtualCoin, s as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, t as WalletState, C as ContractRepository, u as ContractFilter, r as Contract } from '../../ark-BaZ6da8C.cjs';
2
2
  import '@scure/btc-signer/transaction.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/psbt.js';
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, E as ExtendedVirtualCoin, a2 as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, a3 as WalletState, C as ContractRepository, a4 as ContractFilter, r as Contract } from '../../ark-BzUNnkoc.js';
1
+ import { W as WalletRepository, E as ExtendedVirtualCoin, s as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, t as WalletState, C as ContractRepository, u as ContractFilter, r as Contract } from '../../ark-BaZ6da8C.js';
2
2
  import '@scure/btc-signer/transaction.js';
3
3
  import '@scure/btc-signer/utils.js';
4
4
  import '@scure/btc-signer/psbt.js';
@@ -1,5 +1,5 @@
1
- import { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-SYEGCMNV.js';
2
- import '../../chunk-D744IES4.js';
1
+ import { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-I2O4Q2EL.js';
2
+ import '../../chunk-GF6NPAOJ.js';
3
3
  import '../../chunk-CUSABEUQ.js';
4
4
  import '../../chunk-OUVTG72A.js';
5
5
  import '../../chunk-NSBPE2FW.js';
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, C as ContractRepository, n as IndexerProvider, m as ArkProvider, q as VirtualCoin, r as Contract, E as ExtendedVirtualCoin } from './ark-BzUNnkoc.js';
1
+ import { W as WalletRepository, C as ContractRepository, n as IndexerProvider, m as ArkProvider, q as VirtualCoin, r as Contract, E as ExtendedVirtualCoin } from './ark-BaZ6da8C.js';
2
2
 
3
3
  /**
4
4
  * A task item represents a unit of work in the inbox.
@@ -111,4 +111,4 @@ interface CreateTaskDependenciesOptions {
111
111
  */
112
112
  declare function createTaskDependencies(options: CreateTaskDependenciesOptions): TaskDependencies;
113
113
 
114
- export { type CreateTaskDependenciesOptions as C, InMemoryTaskQueue as I, type TaskProcessor as T, type TaskQueue as a, type TaskDependencies as b, type TaskItem as c, type TaskResult as d, createTaskDependencies as e, runTasks as r };
114
+ export { type CreateTaskDependenciesOptions as C, InMemoryTaskQueue as I, type TaskProcessor as T, type TaskDependencies as a, type TaskItem as b, type TaskQueue as c, type TaskResult as d, createTaskDependencies as e, runTasks as r };
@@ -1,4 +1,4 @@
1
- import { W as WalletRepository, C as ContractRepository, n as IndexerProvider, m as ArkProvider, q as VirtualCoin, r as Contract, E as ExtendedVirtualCoin } from './ark-BzUNnkoc.cjs';
1
+ import { W as WalletRepository, C as ContractRepository, n as IndexerProvider, m as ArkProvider, q as VirtualCoin, r as Contract, E as ExtendedVirtualCoin } from './ark-BaZ6da8C.cjs';
2
2
 
3
3
  /**
4
4
  * A task item represents a unit of work in the inbox.
@@ -111,4 +111,4 @@ interface CreateTaskDependenciesOptions {
111
111
  */
112
112
  declare function createTaskDependencies(options: CreateTaskDependenciesOptions): TaskDependencies;
113
113
 
114
- export { type CreateTaskDependenciesOptions as C, InMemoryTaskQueue as I, type TaskProcessor as T, type TaskQueue as a, type TaskDependencies as b, type TaskItem as c, type TaskResult as d, createTaskDependencies as e, runTasks as r };
114
+ export { type CreateTaskDependenciesOptions as C, InMemoryTaskQueue as I, type TaskProcessor as T, type TaskDependencies as a, type TaskItem as b, type TaskQueue as c, type TaskResult as d, createTaskDependencies as e, runTasks as r };
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkA5RLZCPO_cjs = require('../../chunk-A5RLZCPO.cjs');
4
- var chunkN56IDZON_cjs = require('../../chunk-N56IDZON.cjs');
5
- var chunkP5FKMIGY_cjs = require('../../chunk-P5FKMIGY.cjs');
6
- require('../../chunk-LJLEFPWD.cjs');
3
+ var chunkTSG74BHI_cjs = require('../../chunk-TSG74BHI.cjs');
4
+ var chunkGWISMFO5_cjs = require('../../chunk-GWISMFO5.cjs');
5
+ var chunkI4Z6KKUH_cjs = require('../../chunk-I4Z6KKUH.cjs');
6
+ require('../../chunk-6EZY43WE.cjs');
7
7
  require('../../chunk-GUTKJMSF.cjs');
8
8
  require('../../chunk-CMPJR3HS.cjs');
9
9
  require('../../chunk-5BLDMQED.cjs');
@@ -36,7 +36,7 @@ function defineExpoBackgroundTask(taskName, options) {
36
36
  taskQueue,
37
37
  walletRepository,
38
38
  contractRepository,
39
- processors = [chunkA5RLZCPO_cjs.contractPollProcessor]
39
+ processors = [chunkTSG74BHI_cjs.contractPollProcessor]
40
40
  } = options;
41
41
  TaskManager__namespace.defineTask(taskName, async () => {
42
42
  try {
@@ -44,24 +44,24 @@ function defineExpoBackgroundTask(taskName, options) {
44
44
  if (!config) {
45
45
  return BackgroundTask__namespace.BackgroundTaskResult.Success;
46
46
  }
47
- const indexerProvider = new chunkN56IDZON_cjs.ExpoIndexerProvider(config.arkServerUrl);
48
- const arkProvider = new chunkN56IDZON_cjs.ExpoArkProvider(config.arkServerUrl);
49
- const deps = chunkA5RLZCPO_cjs.createTaskDependencies({
47
+ const indexerProvider = new chunkGWISMFO5_cjs.ExpoIndexerProvider(config.arkServerUrl);
48
+ const arkProvider = new chunkGWISMFO5_cjs.ExpoArkProvider(config.arkServerUrl);
49
+ const deps = chunkTSG74BHI_cjs.createTaskDependencies({
50
50
  walletRepository,
51
51
  contractRepository,
52
52
  indexerProvider,
53
53
  arkProvider
54
54
  });
55
- await chunkA5RLZCPO_cjs.runTasks(taskQueue, processors, deps);
55
+ await chunkTSG74BHI_cjs.runTasks(taskQueue, processors, deps);
56
56
  const results = await taskQueue.getResults();
57
57
  if (results.length > 0) {
58
58
  await taskQueue.acknowledgeResults(results.map((r) => r.id));
59
59
  }
60
- const existing = await taskQueue.getTasks(chunkA5RLZCPO_cjs.CONTRACT_POLL_TASK_TYPE);
60
+ const existing = await taskQueue.getTasks(chunkTSG74BHI_cjs.CONTRACT_POLL_TASK_TYPE);
61
61
  if (existing.length === 0) {
62
62
  const task = {
63
- id: chunkP5FKMIGY_cjs.getRandomId(),
64
- type: chunkA5RLZCPO_cjs.CONTRACT_POLL_TASK_TYPE,
63
+ id: chunkI4Z6KKUH_cjs.getRandomId(),
64
+ type: chunkTSG74BHI_cjs.CONTRACT_POLL_TASK_TYPE,
65
65
  data: {},
66
66
  createdAt: Date.now()
67
67
  };
@@ -1,6 +1,6 @@
1
- import { W as WalletRepository, C as ContractRepository } from '../../ark-BzUNnkoc.cjs';
2
- import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-C0kQoY1x.cjs';
3
- import { T as TaskProcessor } from '../../taskRunner-CVEgBO6d.cjs';
1
+ import { W as WalletRepository, C as ContractRepository } from '../../ark-BaZ6da8C.cjs';
2
+ import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-trKcQM7q.cjs';
3
+ import { T as TaskProcessor } from '../../taskRunner-D7SuOTOa.cjs';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer/utils.js';
6
6
  import '@scure/btc-signer/psbt.js';
@@ -1,6 +1,6 @@
1
- import { W as WalletRepository, C as ContractRepository } from '../../ark-BzUNnkoc.js';
2
- import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-CIYeI6GM.js';
3
- import { T as TaskProcessor } from '../../taskRunner-Dfmt7ZPN.js';
1
+ import { W as WalletRepository, C as ContractRepository } from '../../ark-BaZ6da8C.js';
2
+ import { a as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-CvV50MjV.js';
3
+ import { T as TaskProcessor } from '../../taskRunner-Bwss4MUW.js';
4
4
  import '@scure/btc-signer/transaction.js';
5
5
  import '@scure/btc-signer/utils.js';
6
6
  import '@scure/btc-signer/psbt.js';