@arkade-os/sdk 0.4.32 → 0.4.33
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.
- package/dist/adapters/expo.cjs +4 -4
- package/dist/adapters/expo.d.cts +2 -2
- package/dist/adapters/expo.d.ts +2 -2
- package/dist/adapters/expo.js +2 -2
- package/dist/adapters/indexedDB.cjs +4 -4
- package/dist/adapters/indexedDB.js +3 -3
- package/dist/{ark-ibLW4Hte.d.cts → ark-DEsDMYGv.d.cts} +17 -4
- package/dist/{ark-ibLW4Hte.d.ts → ark-DEsDMYGv.d.ts} +17 -4
- package/dist/{asyncStorageTaskQueue-BEOFPNc0.d.ts → asyncStorageTaskQueue-CMrTYlKG.d.ts} +1 -1
- package/dist/{asyncStorageTaskQueue-VGHXWR9F.d.cts → asyncStorageTaskQueue-D8T1VXEx.d.cts} +1 -1
- package/dist/{chunk-GIGILVVP.cjs → chunk-5CCRRL5S.cjs} +8 -8
- package/dist/{chunk-GIGILVVP.cjs.map → chunk-5CCRRL5S.cjs.map} +1 -1
- package/dist/{chunk-KQK4PP6L.cjs → chunk-7K3ROJF6.cjs} +276 -131
- package/dist/chunk-7K3ROJF6.cjs.map +1 -0
- package/dist/{chunk-YA4G7RFB.js → chunk-AOJUURHM.js} +30 -6
- package/dist/chunk-AOJUURHM.js.map +1 -0
- package/dist/{chunk-SHEBNWOQ.js → chunk-BU3BU6XK.js} +3 -3
- package/dist/{chunk-SHEBNWOQ.js.map → chunk-BU3BU6XK.js.map} +1 -1
- package/dist/{chunk-XROGFOPX.js → chunk-DSS2GQUG.js} +185 -40
- package/dist/chunk-DSS2GQUG.js.map +1 -0
- package/dist/{chunk-6NWNOLL3.js → chunk-E22HEKLN.js} +3 -3
- package/dist/chunk-E22HEKLN.js.map +1 -0
- package/dist/{chunk-IEO3XDKI.cjs → chunk-GYSK5R57.cjs} +32 -5
- package/dist/chunk-GYSK5R57.cjs.map +1 -0
- package/dist/{chunk-I2UIKZM5.cjs → chunk-HAVA4XB7.cjs} +7 -7
- package/dist/{chunk-I2UIKZM5.cjs.map → chunk-HAVA4XB7.cjs.map} +1 -1
- package/dist/{chunk-ABWRLTX5.js → chunk-L6ZETTX3.js} +3 -3
- package/dist/{chunk-ABWRLTX5.js.map → chunk-L6ZETTX3.js.map} +1 -1
- package/dist/{chunk-6FLL2Q36.cjs → chunk-SPDNHPM4.cjs} +3 -3
- package/dist/chunk-SPDNHPM4.cjs.map +1 -0
- package/dist/contracts/handlers/index.cjs +9 -5
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +1 -1
- package/dist/{delegate-BvNTw44a.d.cts → delegate-BJeBNP5a.d.cts} +10 -2
- package/dist/{delegate-BXaR1RNG.d.ts → delegate-EXN2mfkb.d.ts} +10 -2
- package/dist/{index-BusKawmy.d.ts → index-BG2ooYKO.d.ts} +57 -3
- package/dist/{index-C-5Tw7VA.d.cts → index-DHjEeHEp.d.cts} +57 -3
- package/dist/index.cjs +125 -113
- package/dist/index.d.cts +33 -9
- package/dist/index.d.ts +33 -9
- package/dist/index.js +3 -3
- package/dist/repositories/realm/index.cjs +12 -12
- package/dist/repositories/realm/index.d.cts +1 -1
- package/dist/repositories/realm/index.d.ts +1 -1
- package/dist/repositories/realm/index.js +3 -3
- package/dist/repositories/sqlite/index.cjs +12 -12
- package/dist/repositories/sqlite/index.d.cts +1 -1
- package/dist/repositories/sqlite/index.d.ts +1 -1
- package/dist/repositories/sqlite/index.js +3 -3
- package/dist/{taskRunner-B1igKGAo.d.ts → taskRunner-B7lBU45X.d.ts} +1 -1
- package/dist/{taskRunner-By92TQ1m.d.cts → taskRunner-pIGyarFG.d.cts} +1 -1
- package/dist/wallet/expo/background.cjs +13 -13
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +5 -5
- package/dist/wallet/expo/index.cjs +13 -13
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +4 -4
- package/dist/wallet/expo/index.d.ts +4 -4
- package/dist/wallet/expo/index.js +5 -5
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/{wallet-CyM4F7Bs.d.ts → wallet-C4L_X0i6.d.ts} +2 -2
- package/dist/{wallet-B_rxgQTu.d.cts → wallet-D4Dll5Gu.d.cts} +2 -2
- package/dist/worker/expo/index.cjs +8 -8
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-6FLL2Q36.cjs.map +0 -1
- package/dist/chunk-6NWNOLL3.js.map +0 -1
- package/dist/chunk-IEO3XDKI.cjs.map +0 -1
- package/dist/chunk-KQK4PP6L.cjs.map +0 -1
- package/dist/chunk-XROGFOPX.js.map +0 -1
- package/dist/chunk-YA4G7RFB.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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, K as IReadonlyWallet, Q as IReadonlyAssetManager, as as StorageConfig, e as IContractManager, i as IAssetManager, f as IDelegateManager, at as IVtxoManager, O as OnchainProvider, N as Network, U as NetworkName, Z as Coin, au as ExplorerTransaction, p as TapLeafScript, av as EncodedVtxoScript, $ as CSVMultisigTapscript, o as RelativeTimelock, V as VtxoScript, aw as Status, ax as Outpoint, ay as ChainTx, n as IndexerProvider, w as TxTree } from './ark-
|
|
2
|
-
export { Y as ArkAddress, X as ArkInfo,
|
|
3
|
-
export { D as DefaultContractHandler,
|
|
4
|
-
export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
5
|
-
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-
|
|
6
|
-
export { B as Batch, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-
|
|
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, K as IReadonlyWallet, Q as IReadonlyAssetManager, as as StorageConfig, e as IContractManager, i as IAssetManager, f as IDelegateManager, at as IVtxoManager, O as OnchainProvider, N as Network, U as NetworkName, Z as Coin, au as ExplorerTransaction, p as TapLeafScript, av as EncodedVtxoScript, $ as CSVMultisigTapscript, o as RelativeTimelock, V as VtxoScript, aw as Status, ax as Outpoint, ay as ChainTx, n as IndexerProvider, w as TxTree, az as PathContext } from './ark-DEsDMYGv.cjs';
|
|
2
|
+
export { Y as ArkAddress, X as ArkInfo, aA as ArkTapscript, aB as Asset, aC as AssetMetadata, aD as BaseWalletConfig, D as BatchFailedEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, aE as BatchInfo, aF as BatchSignableIdentity, B as BatchStartedEvent, aG as CLTVMultisigTapscript, aH as ChainTxType, aI as CommitmentTx, aJ as ConditionCSVMultisigTapscript, aK as ConditionMultisigTapscript, aL as ContractBalance, aM as ContractEventCallback, aN as ContractHandler, _ as ContractManager, aO as ContractManagerConfig, aP as ContractState, aQ as ContractVtxo, aR as ContractWatcher, aS as DelegateManagerImpl, aT as DelegateOptions, M as DelegateProvider, aU as DelegatorManagerImpl, aV as DelegatorProvider, aW as Discoverable, aX as DiscoveredContract, aY as DiscoveryDeps, aZ as ESPLORA_URL, a_ as EsploraProvider, a$ as ExtendedContractVtxo, b0 as HandlerError, b1 as IDelegatorManager, b2 as IndexerTxType, a4 as Intent, b3 as KnownMetadata, b4 as MultisigTapscript, b5 as Nonces, b6 as Output, b7 as PageResponse, b8 as PaginationOptions, b9 as PartialSig, ba as ProviderClass, P as ReadonlyWalletConfig, j as RestArkProvider, bb as RestDelegateProvider, bc as RestDelegatorProvider, k as RestIndexerProvider, bd as ScanContractsOptions, be as ScanResult, bf as ScheduledSession, bg as SettlementEventType, bh as SignRequest, a3 as SignedIntent, bi as SubscriptionEvent, bj as SubscriptionHeartbeat, l as SubscriptionResponse, bk as TapLeaves, bl as TapTreeCoder, bm as TapscriptType, bn as TreeNonces, x as TreeNoncesEvent, bo as TreePartialSigs, H as TreeSignatureEvent, v as TreeSigningStartedEvent, F as TreeTxEvent, bp as Tx, bq as TxHistoryRecord, br as TxKey, T as TxNotification, bs as TxTreeNode, bt as TxType, bu as VirtualStatus, bv as Vtxo, bw as VtxoChain, a1 as VtxoManager, bx as VtxoType, b as WalletConfig, by as WalletMode, bz as decodeTapscript, bA as getSequence, bB as isBatchSignable, bC as isDiscoverable, bD as isExpired, bE as isRecoverable, bF as isSpendable, bG as isSubdust, bH as isVtxoExpiringSoon, bI as networks } from './ark-DEsDMYGv.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-DHjEeHEp.cjs';
|
|
4
|
+
export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-BJeBNP5a.cjs';
|
|
5
|
+
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-D4Dll5Gu.cjs';
|
|
6
|
+
export { B as Batch, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-D4Dll5Gu.cjs';
|
|
7
7
|
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
8
8
|
import { Transaction as Transaction$1 } from '@scure/btc-signer';
|
|
9
9
|
import { ElectrumWS } from 'ws-electrumx-client';
|
|
@@ -2399,9 +2399,18 @@ declare function hasBoardingTxExpired(coin: ExtendedCoin, boardingTimelock: Rela
|
|
|
2399
2399
|
*/
|
|
2400
2400
|
declare function verifyTapscriptSignatures(tx: Transaction, inputIndex: number, requiredSigners: string[], excludePubkeys?: string[], allowedSighashTypes?: number[]): void;
|
|
2401
2401
|
/**
|
|
2402
|
-
* Merges the
|
|
2402
|
+
* Merges the tapscript signatures of `signedTx` onto `originalTx`, in place.
|
|
2403
|
+
*
|
|
2404
|
+
* Invariant: both transactions must have the same number of inputs and BOTH
|
|
2405
|
+
* must carry a `tapScriptSig` on every input — the result is the per-input
|
|
2406
|
+
* concatenation `originalTx.tapScriptSig ++ signedTx.tapScriptSig`. A missing
|
|
2407
|
+
* signature on either side is rejected with an input-indexed error rather than
|
|
2408
|
+
* silently corrupting the witness (the previous code appended `undefined` when
|
|
2409
|
+
* `signedTx` was unsigned). Callers that partially sign must merge only fully
|
|
2410
|
+
* co-signed inputs.
|
|
2411
|
+
*
|
|
2403
2412
|
* @param signedTx signed transaction
|
|
2404
|
-
* @param originalTx original transaction
|
|
2413
|
+
* @param originalTx original transaction (mutated and returned)
|
|
2405
2414
|
*/
|
|
2406
2415
|
declare function combineTapscriptSigs(signedTx: Transaction, originalTx: Transaction): Transaction;
|
|
2407
2416
|
/**
|
|
@@ -3360,6 +3369,21 @@ declare namespace index {
|
|
|
3360
3369
|
export { index_AssetGroup as AssetGroup, index_AssetId as AssetId, index_AssetInput as AssetInput, index_AssetInputType as AssetInputType, index_AssetInputs as AssetInputs, index_AssetOutput as AssetOutput, index_AssetOutputs as AssetOutputs, index_AssetRef as AssetRef, index_AssetRefType as AssetRefType, index_Metadata as Metadata, index_MetadataList as MetadataList, index_Packet as Packet };
|
|
3361
3370
|
}
|
|
3362
3371
|
|
|
3372
|
+
/**
|
|
3373
|
+
* Check if an absolute (CLTV) locktime is currently satisfied.
|
|
3374
|
+
*
|
|
3375
|
+
* Following the BIP65 convention:
|
|
3376
|
+
* - locktime < 500_000_000 → interpreted as a block height; compared against `context.blockHeight`
|
|
3377
|
+
* - locktime >= 500_000_000 → interpreted as a Unix timestamp (seconds); compared against `context.currentTime`
|
|
3378
|
+
*
|
|
3379
|
+
* Returns false if the relevant context field is missing.
|
|
3380
|
+
*/
|
|
3381
|
+
declare function isCltvSatisfied(context: PathContext, locktime: bigint): boolean;
|
|
3382
|
+
/**
|
|
3383
|
+
* Check if a CSV timelock is currently satisfied for the given context/virtual output.
|
|
3384
|
+
*/
|
|
3385
|
+
declare function isCsvSpendable(context: PathContext, sequence?: number): boolean;
|
|
3386
|
+
|
|
3363
3387
|
/**
|
|
3364
3388
|
* Convert RelativeTimelock to BIP68 sequence number.
|
|
3365
3389
|
*/
|
|
@@ -3467,4 +3491,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
3467
3491
|
burn(params: BurnParams): Promise<string>;
|
|
3468
3492
|
}
|
|
3469
3493
|
|
|
3470
|
-
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, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, 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, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, Unroll, type VSize, VirtualCoin, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, index as asset, buildForfeitTx, buildOffchainTx, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sequenceToTimelock, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
|
3494
|
+
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, 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, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, Unroll, type VSize, VirtualCoin, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, index as asset, buildForfeitTx, buildOffchainTx, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sequenceToTimelock, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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, K as IReadonlyWallet, Q as IReadonlyAssetManager, as as StorageConfig, e as IContractManager, i as IAssetManager, f as IDelegateManager, at as IVtxoManager, O as OnchainProvider, N as Network, U as NetworkName, Z as Coin, au as ExplorerTransaction, p as TapLeafScript, av as EncodedVtxoScript, $ as CSVMultisigTapscript, o as RelativeTimelock, V as VtxoScript, aw as Status, ax as Outpoint, ay as ChainTx, n as IndexerProvider, w as TxTree } from './ark-
|
|
2
|
-
export { Y as ArkAddress, X as ArkInfo,
|
|
3
|
-
export { D as DefaultContractHandler,
|
|
4
|
-
export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-
|
|
5
|
-
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-
|
|
6
|
-
export { B as Batch, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-
|
|
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, K as IReadonlyWallet, Q as IReadonlyAssetManager, as as StorageConfig, e as IContractManager, i as IAssetManager, f as IDelegateManager, at as IVtxoManager, O as OnchainProvider, N as Network, U as NetworkName, Z as Coin, au as ExplorerTransaction, p as TapLeafScript, av as EncodedVtxoScript, $ as CSVMultisigTapscript, o as RelativeTimelock, V as VtxoScript, aw as Status, ax as Outpoint, ay as ChainTx, n as IndexerProvider, w as TxTree, az as PathContext } from './ark-DEsDMYGv.js';
|
|
2
|
+
export { Y as ArkAddress, X as ArkInfo, aA as ArkTapscript, aB as Asset, aC as AssetMetadata, aD as BaseWalletConfig, D as BatchFailedEvent, y as BatchFinalizationEvent, z as BatchFinalizedEvent, aE as BatchInfo, aF as BatchSignableIdentity, B as BatchStartedEvent, aG as CLTVMultisigTapscript, aH as ChainTxType, aI as CommitmentTx, aJ as ConditionCSVMultisigTapscript, aK as ConditionMultisigTapscript, aL as ContractBalance, aM as ContractEventCallback, aN as ContractHandler, _ as ContractManager, aO as ContractManagerConfig, aP as ContractState, aQ as ContractVtxo, aR as ContractWatcher, aS as DelegateManagerImpl, aT as DelegateOptions, M as DelegateProvider, aU as DelegatorManagerImpl, aV as DelegatorProvider, aW as Discoverable, aX as DiscoveredContract, aY as DiscoveryDeps, aZ as ESPLORA_URL, a_ as EsploraProvider, a$ as ExtendedContractVtxo, b0 as HandlerError, b1 as IDelegatorManager, b2 as IndexerTxType, a4 as Intent, b3 as KnownMetadata, b4 as MultisigTapscript, b5 as Nonces, b6 as Output, b7 as PageResponse, b8 as PaginationOptions, b9 as PartialSig, ba as ProviderClass, P as ReadonlyWalletConfig, j as RestArkProvider, bb as RestDelegateProvider, bc as RestDelegatorProvider, k as RestIndexerProvider, bd as ScanContractsOptions, be as ScanResult, bf as ScheduledSession, bg as SettlementEventType, bh as SignRequest, a3 as SignedIntent, bi as SubscriptionEvent, bj as SubscriptionHeartbeat, l as SubscriptionResponse, bk as TapLeaves, bl as TapTreeCoder, bm as TapscriptType, bn as TreeNonces, x as TreeNoncesEvent, bo as TreePartialSigs, H as TreeSignatureEvent, v as TreeSigningStartedEvent, F as TreeTxEvent, bp as Tx, bq as TxHistoryRecord, br as TxKey, T as TxNotification, bs as TxTreeNode, bt as TxType, bu as VirtualStatus, bv as Vtxo, bw as VtxoChain, a1 as VtxoManager, bx as VtxoType, b as WalletConfig, by as WalletMode, bz as decodeTapscript, bA as getSequence, bB as isBatchSignable, bC as isDiscoverable, bD as isExpired, bE as isRecoverable, bF as isSpendable, bG as isSubdust, bH as isVtxoExpiringSoon, bI as networks } from './ark-DEsDMYGv.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-BG2ooYKO.js';
|
|
4
|
+
export { D as DefaultVtxo, a as DelegateVtxo } from './delegate-EXN2mfkb.js';
|
|
5
|
+
import { W as Wallet, R as ReadonlyWallet, a as ReceiveRotatorFactory, b as ReceiveRotatorBootOpts, c as ReceiveRotatorBoot } from './wallet-C4L_X0i6.js';
|
|
6
|
+
export { B as Batch, I as IncomingFunds, w as waitForIncomingFunds } from './wallet-C4L_X0i6.js';
|
|
7
7
|
import { P2TR } from '@scure/btc-signer/payment.js';
|
|
8
8
|
import { Transaction as Transaction$1 } from '@scure/btc-signer';
|
|
9
9
|
import { ElectrumWS } from 'ws-electrumx-client';
|
|
@@ -2399,9 +2399,18 @@ declare function hasBoardingTxExpired(coin: ExtendedCoin, boardingTimelock: Rela
|
|
|
2399
2399
|
*/
|
|
2400
2400
|
declare function verifyTapscriptSignatures(tx: Transaction, inputIndex: number, requiredSigners: string[], excludePubkeys?: string[], allowedSighashTypes?: number[]): void;
|
|
2401
2401
|
/**
|
|
2402
|
-
* Merges the
|
|
2402
|
+
* Merges the tapscript signatures of `signedTx` onto `originalTx`, in place.
|
|
2403
|
+
*
|
|
2404
|
+
* Invariant: both transactions must have the same number of inputs and BOTH
|
|
2405
|
+
* must carry a `tapScriptSig` on every input — the result is the per-input
|
|
2406
|
+
* concatenation `originalTx.tapScriptSig ++ signedTx.tapScriptSig`. A missing
|
|
2407
|
+
* signature on either side is rejected with an input-indexed error rather than
|
|
2408
|
+
* silently corrupting the witness (the previous code appended `undefined` when
|
|
2409
|
+
* `signedTx` was unsigned). Callers that partially sign must merge only fully
|
|
2410
|
+
* co-signed inputs.
|
|
2411
|
+
*
|
|
2403
2412
|
* @param signedTx signed transaction
|
|
2404
|
-
* @param originalTx original transaction
|
|
2413
|
+
* @param originalTx original transaction (mutated and returned)
|
|
2405
2414
|
*/
|
|
2406
2415
|
declare function combineTapscriptSigs(signedTx: Transaction, originalTx: Transaction): Transaction;
|
|
2407
2416
|
/**
|
|
@@ -3360,6 +3369,21 @@ declare namespace index {
|
|
|
3360
3369
|
export { index_AssetGroup as AssetGroup, index_AssetId as AssetId, index_AssetInput as AssetInput, index_AssetInputType as AssetInputType, index_AssetInputs as AssetInputs, index_AssetOutput as AssetOutput, index_AssetOutputs as AssetOutputs, index_AssetRef as AssetRef, index_AssetRefType as AssetRefType, index_Metadata as Metadata, index_MetadataList as MetadataList, index_Packet as Packet };
|
|
3361
3370
|
}
|
|
3362
3371
|
|
|
3372
|
+
/**
|
|
3373
|
+
* Check if an absolute (CLTV) locktime is currently satisfied.
|
|
3374
|
+
*
|
|
3375
|
+
* Following the BIP65 convention:
|
|
3376
|
+
* - locktime < 500_000_000 → interpreted as a block height; compared against `context.blockHeight`
|
|
3377
|
+
* - locktime >= 500_000_000 → interpreted as a Unix timestamp (seconds); compared against `context.currentTime`
|
|
3378
|
+
*
|
|
3379
|
+
* Returns false if the relevant context field is missing.
|
|
3380
|
+
*/
|
|
3381
|
+
declare function isCltvSatisfied(context: PathContext, locktime: bigint): boolean;
|
|
3382
|
+
/**
|
|
3383
|
+
* Check if a CSV timelock is currently satisfied for the given context/virtual output.
|
|
3384
|
+
*/
|
|
3385
|
+
declare function isCsvSpendable(context: PathContext, sequence?: number): boolean;
|
|
3386
|
+
|
|
3363
3387
|
/**
|
|
3364
3388
|
* Convert RelativeTimelock to BIP68 sequence number.
|
|
3365
3389
|
*/
|
|
@@ -3467,4 +3491,4 @@ declare class AssetManager extends ReadonlyAssetManager implements IAssetManager
|
|
|
3467
3491
|
burn(params: BurnParams): Promise<string>;
|
|
3468
3492
|
}
|
|
3469
3493
|
|
|
3470
|
-
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, type MigrationStatus, MissingSigningDescriptorError, MnemonicIdentity, type MnemonicOptions, Network, NetworkName, type NetworkOptions, OffchainInput, type OffchainTx, OnchainInput, OnchainProvider, OnchainWallet, Outpoint, P2A, type ParsedArkContract, 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, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, Unroll, type VSize, VirtualCoin, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, index as asset, buildForfeitTx, buildOffchainTx, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sequenceToTimelock, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
|
3494
|
+
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, 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, SingleKey, Status, StorageConfig, TapLeafScript, Transaction, TxTree, TxWeightEstimator, Unroll, type VSize, VirtualCoin, VtxoScript, VtxoTaprootTree, VtxoTreeExpiry, Wallet, WalletBalance, WalletMessageHandler, WalletNotInitializedError, WalletRepository, WalletRepositoryImpl, WsElectrumChainSource, index as asset, buildForfeitTx, buildOffchainTx, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getArkPsbtFields, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isCltvSatisfied, isCsvSpendable, isValidArkAddress, maybeArkError, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, sequenceToTimelock, setArkPsbtField, setupServiceWorker, timelockToSequence, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isBatchSignable, isDiscoverable, isExpired, isRecoverable, isSpendable, isSubdust, isValidArkAddress, isVtxoExpiringSoon, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, setupServiceWorker, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-
|
|
2
|
-
export { ArkError, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ChainTxType, ConditionWitness, CosignerPublicKey, IndexerTxType, Intent, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports as asset, getArkPsbtFields, maybeArkError, setArkPsbtField } from './chunk-
|
|
3
|
-
export { DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, contractHandlers } from './chunk-
|
|
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, closeDatabase, combineTapscriptSigs, contractFromArkContract, contractFromArkContractWithAddress, decodeArkContract, encodeArkContract, getMigrationStatus, getRandomId, hasBoardingTxExpired, isArkContract, isBatchSignable, isDiscoverable, isExpired, isRecoverable, isSpendable, isSubdust, isValidArkAddress, isVtxoExpiringSoon, migrateWalletRepository, openDatabase, requiresMigration, rollbackMigration, setupServiceWorker, validateConnectorsTxGraph, validateVtxoTxGraph, verifyTapscriptSignatures, waitForIncomingFunds } from './chunk-DSS2GQUG.js';
|
|
2
|
+
export { ArkError, ArkPsbtFieldKey, ArkPsbtFieldKeyType, ChainTxType, ConditionWitness, CosignerPublicKey, IndexerTxType, Intent, RestArkProvider, RestIndexerProvider, SettlementEventType, Transaction, VtxoTaprootTree, VtxoTreeExpiry, asset_exports as asset, getArkPsbtFields, maybeArkError, setArkPsbtField } from './chunk-E22HEKLN.js';
|
|
3
|
+
export { BoardingContractHandler, DefaultContractHandler, DefaultVtxo, DelegateContractHandler, DelegateVtxo, VHTLC, VHTLCContractHandler, contractHandlers, isCltvSatisfied, isCsvSpendable } from './chunk-AOJUURHM.js';
|
|
4
4
|
export { ArkAddress, CLTVMultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, MultisigTapscript, TapTreeCoder, VtxoScript, decodeTapscript, getSequence, networks, sequenceToTimelock, timelockToSequence } from './chunk-TU3LVAPX.js';
|
|
5
5
|
import './chunk-NSBPE2FW.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
3
|
+
var chunk7K3ROJF6_cjs = require('../../chunk-7K3ROJF6.cjs');
|
|
4
|
+
require('../../chunk-SPDNHPM4.cjs');
|
|
5
|
+
require('../../chunk-GYSK5R57.cjs');
|
|
6
6
|
require('../../chunk-WMIPYZSB.cjs');
|
|
7
7
|
require('../../chunk-5BLDMQED.cjs');
|
|
8
8
|
|
|
@@ -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 =
|
|
40
|
+
const s = chunk7K3ROJF6_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 (!
|
|
88
|
+
if (!chunk7K3ROJF6_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 =
|
|
113
|
+
const s = chunk7K3ROJF6_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(
|
|
166
|
+
assetsJson: tx.assets ? JSON.stringify(chunk7K3ROJF6_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 ??
|
|
236
|
+
script: obj.script ?? chunk7K3ROJF6_cjs.scriptFromArkAddress(obj.address)
|
|
237
237
|
};
|
|
238
|
-
return
|
|
238
|
+
return chunk7K3ROJF6_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
|
|
257
|
+
return chunk7K3ROJF6_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 =
|
|
272
|
+
tx.assets = chunk7K3ROJF6_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 =
|
|
502
|
+
newVtxo.script = chunk7K3ROJF6_cjs.scriptFromArkAddress(newVtxo.address);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-DEsDMYGv.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, s as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, t as WalletState, C as ContractRepository, u as ContractFilter, r as Contract } from '../../ark-
|
|
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-DEsDMYGv.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,6 +1,6 @@
|
|
|
1
|
-
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
import { serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, scriptFromArkAddress, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-DSS2GQUG.js';
|
|
2
|
+
import '../../chunk-E22HEKLN.js';
|
|
3
|
+
import '../../chunk-AOJUURHM.js';
|
|
4
4
|
import '../../chunk-TU3LVAPX.js';
|
|
5
5
|
import '../../chunk-NSBPE2FW.js';
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
3
|
+
var chunk7K3ROJF6_cjs = require('../../chunk-7K3ROJF6.cjs');
|
|
4
|
+
require('../../chunk-SPDNHPM4.cjs');
|
|
5
|
+
require('../../chunk-GYSK5R57.cjs');
|
|
6
6
|
require('../../chunk-WMIPYZSB.cjs');
|
|
7
7
|
require('../../chunk-5BLDMQED.cjs');
|
|
8
8
|
|
|
@@ -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
|
-
[
|
|
129
|
+
[chunk7K3ROJF6_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 =
|
|
207
|
+
const s = chunk7K3ROJF6_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 (!
|
|
262
|
+
if (!chunk7K3ROJF6_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 =
|
|
286
|
+
const s = chunk7K3ROJF6_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(
|
|
342
|
+
tx.assets ? JSON.stringify(chunk7K3ROJF6_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 ??
|
|
416
|
+
script: row.script ?? chunk7K3ROJF6_cjs.scriptFromArkAddress(row.address)
|
|
417
417
|
};
|
|
418
|
-
return
|
|
418
|
+
return chunk7K3ROJF6_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
|
|
437
|
+
return chunk7K3ROJF6_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 =
|
|
452
|
+
tx.assets = chunk7K3ROJF6_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, s as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, t as WalletState, C as ContractRepository, u as ContractFilter, r as Contract } from '../../ark-
|
|
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-DEsDMYGv.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, s as VtxoRepositoryKey, d as ExtendedCoin, A as ArkTransaction, t as WalletState, C as ContractRepository, u as ContractFilter, r as Contract } from '../../ark-
|
|
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-DEsDMYGv.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,6 +1,6 @@
|
|
|
1
|
-
import { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
import { scriptFromArkAddress, serializeVtxo, isVtxoForScript, serializeUtxo, serializeAssets, deserializeVtxo, deserializeUtxo, deserializeAssets } from '../../chunk-DSS2GQUG.js';
|
|
2
|
+
import '../../chunk-E22HEKLN.js';
|
|
3
|
+
import '../../chunk-AOJUURHM.js';
|
|
4
4
|
import '../../chunk-TU3LVAPX.js';
|
|
5
5
|
import '../../chunk-NSBPE2FW.js';
|
|
6
6
|
|
|
@@ -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-
|
|
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-DEsDMYGv.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A task item represents a unit of work in the inbox.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WalletRepository, C as ContractRepository, n as IndexerProvider, m as ArkProvider, q as VirtualCoin, r as Contract, E as ExtendedVirtualCoin } from './ark-
|
|
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-DEsDMYGv.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A task item represents a unit of work in the inbox.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
3
|
+
var chunkHAVA4XB7_cjs = require('../../chunk-HAVA4XB7.cjs');
|
|
4
|
+
var chunk5CCRRL5S_cjs = require('../../chunk-5CCRRL5S.cjs');
|
|
5
|
+
var chunk7K3ROJF6_cjs = require('../../chunk-7K3ROJF6.cjs');
|
|
6
|
+
require('../../chunk-SPDNHPM4.cjs');
|
|
7
|
+
require('../../chunk-GYSK5R57.cjs');
|
|
8
8
|
require('../../chunk-WMIPYZSB.cjs');
|
|
9
9
|
require('../../chunk-5BLDMQED.cjs');
|
|
10
10
|
var TaskManager = require('expo-task-manager');
|
|
@@ -36,7 +36,7 @@ function defineExpoBackgroundTask(taskName, options) {
|
|
|
36
36
|
taskQueue,
|
|
37
37
|
walletRepository,
|
|
38
38
|
contractRepository,
|
|
39
|
-
processors = [
|
|
39
|
+
processors = [chunkHAVA4XB7_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
|
|
48
|
-
const arkProvider = new
|
|
49
|
-
const deps =
|
|
47
|
+
const indexerProvider = new chunk5CCRRL5S_cjs.ExpoIndexerProvider(config.arkServerUrl);
|
|
48
|
+
const arkProvider = new chunk5CCRRL5S_cjs.ExpoArkProvider(config.arkServerUrl);
|
|
49
|
+
const deps = chunkHAVA4XB7_cjs.createTaskDependencies({
|
|
50
50
|
walletRepository,
|
|
51
51
|
contractRepository,
|
|
52
52
|
indexerProvider,
|
|
53
53
|
arkProvider
|
|
54
54
|
});
|
|
55
|
-
await
|
|
55
|
+
await chunkHAVA4XB7_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(
|
|
60
|
+
const existing = await taskQueue.getTasks(chunkHAVA4XB7_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
61
61
|
if (existing.length === 0) {
|
|
62
62
|
const task = {
|
|
63
|
-
id:
|
|
64
|
-
type:
|
|
63
|
+
id: chunk7K3ROJF6_cjs.getRandomId(),
|
|
64
|
+
type: chunkHAVA4XB7_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-
|
|
2
|
-
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository } from '../../ark-DEsDMYGv.cjs';
|
|
2
|
+
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-D8T1VXEx.cjs';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-pIGyarFG.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-
|
|
2
|
-
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-
|
|
3
|
-
import { T as TaskProcessor } from '../../taskRunner-
|
|
1
|
+
import { W as WalletRepository, C as ContractRepository } from '../../ark-DEsDMYGv.js';
|
|
2
|
+
import { A as AsyncStorageTaskQueue } from '../../asyncStorageTaskQueue-CMrTYlKG.js';
|
|
3
|
+
import { T as TaskProcessor } from '../../taskRunner-B7lBU45X.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';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-
|
|
2
|
-
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-
|
|
3
|
-
import { getRandomId } from '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
import { contractPollProcessor, createTaskDependencies, runTasks, CONTRACT_POLL_TASK_TYPE } from '../../chunk-BU3BU6XK.js';
|
|
2
|
+
import { ExpoIndexerProvider, ExpoArkProvider } from '../../chunk-L6ZETTX3.js';
|
|
3
|
+
import { getRandomId } from '../../chunk-DSS2GQUG.js';
|
|
4
|
+
import '../../chunk-E22HEKLN.js';
|
|
5
|
+
import '../../chunk-AOJUURHM.js';
|
|
6
6
|
import '../../chunk-TU3LVAPX.js';
|
|
7
7
|
import '../../chunk-NSBPE2FW.js';
|
|
8
8
|
import * as TaskManager from 'expo-task-manager';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
3
|
+
var chunkHAVA4XB7_cjs = require('../../chunk-HAVA4XB7.cjs');
|
|
4
|
+
var chunk7K3ROJF6_cjs = require('../../chunk-7K3ROJF6.cjs');
|
|
5
|
+
var chunkSPDNHPM4_cjs = require('../../chunk-SPDNHPM4.cjs');
|
|
6
|
+
require('../../chunk-GYSK5R57.cjs');
|
|
7
7
|
require('../../chunk-WMIPYZSB.cjs');
|
|
8
8
|
require('../../chunk-5BLDMQED.cjs');
|
|
9
9
|
var base = require('@scure/base');
|
|
@@ -52,20 +52,20 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
52
52
|
*/
|
|
53
53
|
static async setup(config) {
|
|
54
54
|
warnOnRemovedBackgroundFields(config.background);
|
|
55
|
-
const wallet = await
|
|
56
|
-
const processors = config.background.processors ?? [
|
|
55
|
+
const wallet = await chunk7K3ROJF6_cjs.Wallet.create(config);
|
|
56
|
+
const processors = config.background.processors ?? [chunkHAVA4XB7_cjs.contractPollProcessor];
|
|
57
57
|
const deps = {
|
|
58
58
|
walletRepository: wallet.walletRepository,
|
|
59
59
|
contractRepository: wallet.contractRepository,
|
|
60
60
|
indexerProvider: wallet.indexerProvider,
|
|
61
61
|
arkProvider: wallet.arkProvider,
|
|
62
|
-
extendVtxo: (vtxo, contract) =>
|
|
62
|
+
extendVtxo: (vtxo, contract) => chunk7K3ROJF6_cjs.extendVirtualCoinForContract(vtxo, contract)
|
|
63
63
|
};
|
|
64
64
|
const { taskQueue } = config.background;
|
|
65
65
|
if ("persistConfig" in taskQueue) {
|
|
66
|
-
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof
|
|
66
|
+
const arkServerUrl = config.arkServerUrl || (wallet.arkProvider instanceof chunkSPDNHPM4_cjs.RestArkProvider ? wallet.arkProvider.serverUrl : void 0);
|
|
67
67
|
if (arkServerUrl) {
|
|
68
|
-
const timelock = wallet.offchainTapscript.options.csvTimelock
|
|
68
|
+
const timelock = wallet.offchainTapscript.options.csvTimelock;
|
|
69
69
|
const bgConfig = {
|
|
70
70
|
arkServerUrl,
|
|
71
71
|
pubkeyHex: base.hex.encode(wallet.offchainTapscript.options.pubKey),
|
|
@@ -93,7 +93,7 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
93
93
|
}, intervalMs);
|
|
94
94
|
}
|
|
95
95
|
async runForegroundPoll() {
|
|
96
|
-
await
|
|
96
|
+
await chunkHAVA4XB7_cjs.runTasks(this.taskQueue, this.processors, this.deps);
|
|
97
97
|
const results = await this.taskQueue.getResults();
|
|
98
98
|
if (results.length > 0) {
|
|
99
99
|
await this.taskQueue.acknowledgeResults(results.map((r) => r.id));
|
|
@@ -101,11 +101,11 @@ var ExpoWallet = class _ExpoWallet {
|
|
|
101
101
|
await this.seedContractPollTask();
|
|
102
102
|
}
|
|
103
103
|
async seedContractPollTask() {
|
|
104
|
-
const existing = await this.taskQueue.getTasks(
|
|
104
|
+
const existing = await this.taskQueue.getTasks(chunkHAVA4XB7_cjs.CONTRACT_POLL_TASK_TYPE);
|
|
105
105
|
if (existing.length > 0) return;
|
|
106
106
|
const task = {
|
|
107
|
-
id:
|
|
108
|
-
type:
|
|
107
|
+
id: chunk7K3ROJF6_cjs.getRandomId(),
|
|
108
|
+
type: chunkHAVA4XB7_cjs.CONTRACT_POLL_TASK_TYPE,
|
|
109
109
|
data: {},
|
|
110
110
|
createdAt: Date.now()
|
|
111
111
|
};
|