@bsv/wallet-toolbox-client 2.1.24 → 3.0.0-alpha.0
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/out/src/CWIStyleWalletManager.d.ts +33 -7
- package/out/src/CWIStyleWalletManager.d.ts.map +1 -1
- package/out/src/CWIStyleWalletManager.js +281 -313
- package/out/src/CWIStyleWalletManager.js.map +1 -1
- package/out/src/SetupClient.d.ts +6 -6
- package/out/src/SetupClient.d.ts.map +1 -1
- package/out/src/SetupClient.js +5 -5
- package/out/src/SetupClient.js.map +1 -1
- package/out/src/SetupWallet.d.ts.map +1 -1
- package/out/src/SimpleWalletManager.d.ts +12 -2
- package/out/src/SimpleWalletManager.d.ts.map +1 -1
- package/out/src/SimpleWalletManager.js +46 -30
- package/out/src/SimpleWalletManager.js.map +1 -1
- package/out/src/Wallet.d.ts +1 -1
- package/out/src/Wallet.d.ts.map +1 -1
- package/out/src/Wallet.js +102 -100
- package/out/src/Wallet.js.map +1 -1
- package/out/src/WalletAuthenticationManager.d.ts +1 -1
- package/out/src/WalletAuthenticationManager.d.ts.map +1 -1
- package/out/src/WalletAuthenticationManager.js +3 -3
- package/out/src/WalletAuthenticationManager.js.map +1 -1
- package/out/src/WalletLogger.d.ts.map +1 -1
- package/out/src/WalletLogger.js +16 -8
- package/out/src/WalletLogger.js.map +1 -1
- package/out/src/WalletPermissionsManager.d.ts +89 -18
- package/out/src/WalletPermissionsManager.d.ts.map +1 -1
- package/out/src/WalletPermissionsManager.js +656 -870
- package/out/src/WalletPermissionsManager.js.map +1 -1
- package/out/src/WalletSettingsManager.d.ts +2 -2
- package/out/src/WalletSettingsManager.d.ts.map +1 -1
- package/out/src/WalletSettingsManager.js.map +1 -1
- package/out/src/fundWalletP2PKH.d.ts +2 -2
- package/out/src/fundWalletP2PKH.d.ts.map +1 -1
- package/out/src/fundWalletP2PKH.js +11 -10
- package/out/src/fundWalletP2PKH.js.map +1 -1
- package/out/src/mockchain/MockChainMigrations.d.ts +3 -3
- package/out/src/mockchain/MockChainMigrations.d.ts.map +1 -1
- package/out/src/mockchain/MockChainMigrations.js.map +1 -1
- package/out/src/mockchain/MockChainStorage.d.ts.map +1 -1
- package/out/src/mockchain/MockChainStorage.js +5 -5
- package/out/src/mockchain/MockChainStorage.js.map +1 -1
- package/out/src/mockchain/MockChainTracker.d.ts.map +1 -1
- package/out/src/mockchain/MockChainTracker.js +10 -10
- package/out/src/mockchain/MockChainTracker.js.map +1 -1
- package/out/src/mockchain/MockMiner.d.ts.map +1 -1
- package/out/src/mockchain/MockMiner.js +3 -3
- package/out/src/mockchain/MockMiner.js.map +1 -1
- package/out/src/mockchain/MockServices.d.ts +9 -0
- package/out/src/mockchain/MockServices.d.ts.map +1 -1
- package/out/src/mockchain/MockServices.js +195 -238
- package/out/src/mockchain/MockServices.js.map +1 -1
- package/out/src/mockchain/merkleTree.d.ts.map +1 -1
- package/out/src/mockchain/merkleTree.js +21 -12
- package/out/src/mockchain/merkleTree.js.map +1 -1
- package/out/src/monitor/LeasedMonitorTask.d.ts +43 -0
- package/out/src/monitor/LeasedMonitorTask.d.ts.map +1 -0
- package/out/src/monitor/LeasedMonitorTask.js +89 -0
- package/out/src/monitor/LeasedMonitorTask.js.map +1 -0
- package/out/src/monitor/Monitor.d.ts +24 -0
- package/out/src/monitor/Monitor.d.ts.map +1 -1
- package/out/src/monitor/Monitor.js +63 -75
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/V7LeasedTask.d.ts +43 -0
- package/out/src/monitor/V7LeasedTask.d.ts.map +1 -0
- package/out/src/monitor/V7LeasedTask.js +89 -0
- package/out/src/monitor/V7LeasedTask.js.map +1 -0
- package/out/src/monitor/tasks/TaskArcSSE.d.ts +2 -2
- package/out/src/monitor/tasks/TaskArcSSE.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskArcSSE.js +10 -23
- package/out/src/monitor/tasks/TaskArcSSE.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +4 -2
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.js +83 -16
- package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.d.ts +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.js +1 -2
- package/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -1
- package/out/src/monitor/tasks/TaskClock.d.ts +1 -1
- package/out/src/monitor/tasks/TaskClock.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskClock.js +0 -1
- package/out/src/monitor/tasks/TaskClock.js.map +1 -1
- package/out/src/monitor/tasks/TaskFailAbandoned.d.ts +1 -1
- package/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -1
- package/out/src/monitor/tasks/TaskMineBlock.d.ts +1 -1
- package/out/src/monitor/tasks/TaskMineBlock.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskMineBlock.js.map +1 -1
- package/out/src/monitor/tasks/TaskMonitorCallHistory.d.ts +1 -1
- package/out/src/monitor/tasks/TaskMonitorCallHistory.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskMonitorCallHistory.js +1 -1
- package/out/src/monitor/tasks/TaskMonitorCallHistory.js.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.d.ts +2 -2
- package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.js +7 -5
- package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -1
- package/out/src/monitor/tasks/TaskPurge.d.ts +1 -1
- package/out/src/monitor/tasks/TaskPurge.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskPurge.js.map +1 -1
- package/out/src/monitor/tasks/TaskReorg.d.ts +1 -1
- package/out/src/monitor/tasks/TaskReorg.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReorg.js +2 -2
- package/out/src/monitor/tasks/TaskReorg.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts +1 -1
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.js +10 -10
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts +1 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.js +2 -2
- package/out/src/monitor/tasks/TaskReviewProvenTxs.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewStatus.d.ts +1 -1
- package/out/src/monitor/tasks/TaskReviewStatus.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewStatus.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.d.ts +1 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.js.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.js +4 -5
- package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
- package/out/src/monitor/tasks/TaskUnFail.d.ts +1 -1
- package/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskUnFail.js +13 -15
- package/out/src/monitor/tasks/TaskUnFail.js.map +1 -1
- package/out/src/monitor/tasks/WalletMonitorTask.d.ts.map +1 -1
- package/out/src/monitor/tasks/WalletMonitorTask.js +3 -1
- package/out/src/monitor/tasks/WalletMonitorTask.js.map +1 -1
- package/out/src/sdk/CertOpsWallet.d.ts +3 -3
- package/out/src/sdk/CertOpsWallet.d.ts.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.d.ts +3 -3
- package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.js +26 -21
- package/out/src/sdk/PrivilegedKeyManager.js.map +1 -1
- package/out/src/sdk/WERR_errors.d.ts.map +1 -1
- package/out/src/sdk/WERR_errors.js +5 -5
- package/out/src/sdk/WERR_errors.js.map +1 -1
- package/out/src/sdk/WalletError.d.ts +1 -1
- package/out/src/sdk/WalletError.d.ts.map +1 -1
- package/out/src/sdk/WalletError.js +10 -3
- package/out/src/sdk/WalletError.js.map +1 -1
- package/out/src/sdk/WalletErrorFromJson.d.ts.map +1 -1
- package/out/src/sdk/WalletErrorFromJson.js +1 -3
- package/out/src/sdk/WalletErrorFromJson.js.map +1 -1
- package/out/src/sdk/WalletServices.interfaces.d.ts +19 -19
- package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +59 -59
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/sdk/types.d.ts +36 -4
- package/out/src/sdk/types.d.ts.map +1 -1
- package/out/src/sdk/types.js +53 -4
- package/out/src/sdk/types.js.map +1 -1
- package/out/src/services/ServiceCollection.d.ts +6 -6
- package/out/src/services/ServiceCollection.d.ts.map +1 -1
- package/out/src/services/ServiceCollection.js +3 -4
- package/out/src/services/ServiceCollection.js.map +1 -1
- package/out/src/services/Services.d.ts +5 -0
- package/out/src/services/Services.d.ts.map +1 -1
- package/out/src/services/Services.js +174 -182
- package/out/src/services/Services.js.map +1 -1
- package/out/src/services/chaintracker/BHServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/BHServiceClient.js +7 -7
- package/out/src/services/chaintracker/BHServiceClient.js.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.js +5 -5
- package/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts +5 -3
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/BulkStorageApi.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts +20 -10
- package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js +228 -221
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +9 -10
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.d.ts +1 -2
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.js +3 -3
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js +3 -3
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js +2 -2
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts +2 -2
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js +6 -39
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts +3 -3
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js +8 -6
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js +9 -16
- package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js +34 -22
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js +31 -30
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts +2 -2
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js +11 -10
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts +6 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js +247 -227
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.js +8 -7
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js +35 -25
- package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts +5 -5
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js +13 -11
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts +0 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/HeightRange.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/HeightRange.js +21 -13
- package/out/src/services/chaintracker/chaintracks/util/HeightRange.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts +2 -2
- package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts +1 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js +28 -24
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/dirtyHashes.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/dirtyHashes.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.js +9 -10
- package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.js.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.js +3 -3
- package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -1
- package/out/src/services/providers/ARC.d.ts.map +1 -1
- package/out/src/services/providers/ARC.js +7 -14
- package/out/src/services/providers/ARC.js.map +1 -1
- package/out/src/services/providers/ArcSSEClient.d.ts.map +1 -1
- package/out/src/services/providers/ArcSSEClient.js +1 -1
- package/out/src/services/providers/ArcSSEClient.js.map +1 -1
- package/out/src/services/providers/Bitails.d.ts.map +1 -1
- package/out/src/services/providers/Bitails.js +17 -17
- package/out/src/services/providers/Bitails.js.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.js.map +1 -1
- package/out/src/services/providers/WhatsOnChain.d.ts +2 -0
- package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/WhatsOnChain.js +109 -233
- package/out/src/services/providers/WhatsOnChain.js.map +1 -1
- package/out/src/services/providers/exchangeRates.d.ts.map +1 -1
- package/out/src/services/providers/exchangeRates.js +3 -3
- package/out/src/services/providers/exchangeRates.js.map +1 -1
- package/out/src/services/providers/getBeefForTxid.d.ts +1 -1
- package/out/src/services/providers/getBeefForTxid.d.ts.map +1 -1
- package/out/src/services/providers/getBeefForTxid.js.map +1 -1
- package/out/src/services/providers/whatsOnChainHelpers.d.ts +68 -0
- package/out/src/services/providers/whatsOnChainHelpers.d.ts.map +1 -0
- package/out/src/services/providers/whatsOnChainHelpers.js +147 -0
- package/out/src/services/providers/whatsOnChainHelpers.js.map +1 -0
- package/out/src/signer/WalletSigner.d.ts.map +1 -1
- package/out/src/signer/WalletSigner.js.map +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.js +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
- package/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -1
- package/out/src/signer/methods/buildSignableTransaction.js +21 -13
- package/out/src/signer/methods/buildSignableTransaction.js.map +1 -1
- package/out/src/signer/methods/completeSignedTransaction.d.ts.map +1 -1
- package/out/src/signer/methods/completeSignedTransaction.js +20 -21
- package/out/src/signer/methods/completeSignedTransaction.js.map +1 -1
- package/out/src/signer/methods/createAction.d.ts.map +1 -1
- package/out/src/signer/methods/createAction.js +8 -7
- package/out/src/signer/methods/createAction.js.map +1 -1
- package/out/src/signer/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/signer/methods/internalizeAction.js +8 -6
- package/out/src/signer/methods/internalizeAction.js.map +1 -1
- package/out/src/signer/methods/proveCertificate.js +1 -1
- package/out/src/signer/methods/signAction.d.ts.map +1 -1
- package/out/src/signer/methods/signAction.js +8 -10
- package/out/src/signer/methods/signAction.js.map +1 -1
- package/out/src/storage/StorageIdb.d.ts +16 -1
- package/out/src/storage/StorageIdb.d.ts.map +1 -1
- package/out/src/storage/StorageIdb.js +544 -1224
- package/out/src/storage/StorageIdb.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts +124 -1
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +316 -186
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/StorageReader.d.ts.map +1 -1
- package/out/src/storage/StorageReader.js +8 -7
- package/out/src/storage/StorageReader.js.map +1 -1
- package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/out/src/storage/StorageReaderWriter.js +32 -32
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
- package/out/src/storage/StorageSyncReader.js +3 -3
- package/out/src/storage/StorageSyncReader.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts +3 -0
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +83 -73
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/idbHelpers.d.ts +47 -0
- package/out/src/storage/idbHelpers.d.ts.map +1 -0
- package/out/src/storage/idbHelpers.js +417 -0
- package/out/src/storage/idbHelpers.js.map +1 -0
- package/out/src/storage/methods/ListActionsSpecOp.d.ts +6 -1
- package/out/src/storage/methods/ListActionsSpecOp.d.ts.map +1 -1
- package/out/src/storage/methods/ListActionsSpecOp.js +28 -2
- package/out/src/storage/methods/ListActionsSpecOp.js.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.js +8 -11
- package/out/src/storage/methods/ListOutputsSpecOp.js.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +83 -0
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js +338 -63
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
- package/out/src/storage/methods/createAction.d.ts.map +1 -1
- package/out/src/storage/methods/createAction.js +251 -274
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/generateChange.d.ts.map +1 -1
- package/out/src/storage/methods/generateChange.js +99 -80
- package/out/src/storage/methods/generateChange.js.map +1 -1
- package/out/src/storage/methods/getBeefForTransaction.js +15 -13
- package/out/src/storage/methods/getBeefForTransaction.js.map +1 -1
- package/out/src/storage/methods/getSyncChunk.d.ts.map +1 -1
- package/out/src/storage/methods/getSyncChunk.js +4 -3
- package/out/src/storage/methods/getSyncChunk.js.map +1 -1
- package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/storage/methods/internalizeAction.js +213 -56
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/methods/listActionsIdb.d.ts.map +1 -1
- package/out/src/storage/methods/listActionsIdb.js +85 -110
- package/out/src/storage/methods/listActionsIdb.js.map +1 -1
- package/out/src/storage/methods/listCertificates.d.ts +1 -1
- package/out/src/storage/methods/listCertificates.d.ts.map +1 -1
- package/out/src/storage/methods/listCertificates.js +7 -7
- package/out/src/storage/methods/listCertificates.js.map +1 -1
- package/out/src/storage/methods/listOutputsIdb.d.ts.map +1 -1
- package/out/src/storage/methods/listOutputsIdb.js +24 -27
- package/out/src/storage/methods/listOutputsIdb.js.map +1 -1
- package/out/src/storage/methods/offsetKey.d.ts +1 -1
- package/out/src/storage/methods/offsetKey.d.ts.map +1 -1
- package/out/src/storage/methods/offsetKey.js +3 -5
- package/out/src/storage/methods/offsetKey.js.map +1 -1
- package/out/src/storage/methods/processAction.d.ts +0 -11
- package/out/src/storage/methods/processAction.d.ts.map +1 -1
- package/out/src/storage/methods/processAction.js +168 -93
- package/out/src/storage/methods/processAction.js.map +1 -1
- package/out/src/storage/methods/purgeDataIdb.d.ts.map +1 -1
- package/out/src/storage/methods/purgeDataIdb.js +1 -1
- package/out/src/storage/methods/purgeDataIdb.js.map +1 -1
- package/out/src/storage/methods/reviewStatusIdb.d.ts +1 -1
- package/out/src/storage/methods/reviewStatusIdb.d.ts.map +1 -1
- package/out/src/storage/methods/reviewStatusIdb.js.map +1 -1
- package/out/src/storage/methods/utils.d.ts.map +1 -1
- package/out/src/storage/methods/utils.js +7 -1
- package/out/src/storage/methods/utils.js.map +1 -1
- package/out/src/storage/remoting/StorageClient.d.ts +4 -270
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js +16 -423
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/storage/remoting/StorageClientBase.d.ts +289 -0
- package/out/src/storage/remoting/StorageClientBase.d.ts.map +1 -0
- package/out/src/storage/remoting/StorageClientBase.js +375 -0
- package/out/src/storage/remoting/StorageClientBase.js.map +1 -0
- package/out/src/storage/remoting/entityValidationHelpers.d.ts +29 -0
- package/out/src/storage/remoting/entityValidationHelpers.d.ts.map +1 -0
- package/out/src/storage/remoting/entityValidationHelpers.js +91 -0
- package/out/src/storage/remoting/entityValidationHelpers.js.map +1 -0
- package/out/src/storage/schema/StorageIdbSchema.d.ts +43 -2
- package/out/src/storage/schema/StorageIdbSchema.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityBase.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityBase.js.map +1 -1
- package/out/src/storage/schema/entities/EntityCertificate.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityCertificate.js +5 -4
- package/out/src/storage/schema/entities/EntityCertificate.js.map +1 -1
- package/out/src/storage/schema/entities/EntityCertificateField.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityCertificateField.js +5 -7
- package/out/src/storage/schema/entities/EntityCertificateField.js.map +1 -1
- package/out/src/storage/schema/entities/EntityCommission.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityCommission.js +6 -8
- package/out/src/storage/schema/entities/EntityCommission.js.map +1 -1
- package/out/src/storage/schema/entities/EntityOutput.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutput.js +21 -24
- package/out/src/storage/schema/entities/EntityOutput.js.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputBasket.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputBasket.js +6 -6
- package/out/src/storage/schema/entities/EntityOutputBasket.js.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputTag.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputTag.js +2 -2
- package/out/src/storage/schema/entities/EntityOutputTag.js.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputTagMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputTagMap.js +4 -6
- package/out/src/storage/schema/entities/EntityOutputTagMap.js.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTx.d.ts +3 -3
- package/out/src/storage/schema/entities/EntityProvenTx.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTx.js +22 -23
- package/out/src/storage/schema/entities/EntityProvenTx.js.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTxReq.d.ts +9 -0
- package/out/src/storage/schema/entities/EntityProvenTxReq.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTxReq.js +116 -68
- package/out/src/storage/schema/entities/EntityProvenTxReq.js.map +1 -1
- package/out/src/storage/schema/entities/EntitySyncState.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntitySyncState.js +19 -18
- package/out/src/storage/schema/entities/EntitySyncState.js.map +1 -1
- package/out/src/storage/schema/entities/EntityTransaction.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityTransaction.js +25 -26
- package/out/src/storage/schema/entities/EntityTransaction.js.map +1 -1
- package/out/src/storage/schema/entities/EntityTxLabel.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityTxLabel.js +2 -2
- package/out/src/storage/schema/entities/EntityTxLabel.js.map +1 -1
- package/out/src/storage/schema/entities/EntityTxLabelMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityTxLabelMap.js +4 -6
- package/out/src/storage/schema/entities/EntityTxLabelMap.js.map +1 -1
- package/out/src/storage/schema/entities/EntityUser.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityUser.js +3 -3
- package/out/src/storage/schema/entities/EntityUser.js.map +1 -1
- package/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -1
- package/out/src/storage/schema/entities/MergeEntity.js +6 -6
- package/out/src/storage/schema/entities/MergeEntity.js.map +1 -1
- package/out/src/storage/schema/monitorLease.d.ts +57 -0
- package/out/src/storage/schema/monitorLease.d.ts.map +1 -0
- package/out/src/storage/schema/monitorLease.js +101 -0
- package/out/src/storage/schema/monitorLease.js.map +1 -0
- package/out/src/storage/schema/processingFsm.d.ts +27 -0
- package/out/src/storage/schema/processingFsm.d.ts.map +1 -0
- package/out/src/storage/schema/processingFsm.js +132 -0
- package/out/src/storage/schema/processingFsm.js.map +1 -0
- package/out/src/storage/schema/tables/TableAction.d.ts +38 -0
- package/out/src/storage/schema/tables/TableAction.d.ts.map +1 -0
- package/out/src/storage/schema/tables/TableAction.js +3 -0
- package/out/src/storage/schema/tables/TableAction.js.map +1 -0
- package/out/src/storage/schema/tables/TableCertificate.d.ts +2 -1
- package/out/src/storage/schema/tables/TableCertificate.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableCertificateField.d.ts +1 -1
- package/out/src/storage/schema/tables/TableCertificateField.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableChainTip.d.ts +17 -0
- package/out/src/storage/schema/tables/TableChainTip.d.ts.map +1 -0
- package/out/src/storage/schema/tables/TableChainTip.js +3 -0
- package/out/src/storage/schema/tables/TableChainTip.js.map +1 -0
- package/out/src/storage/schema/tables/TableCommission.d.ts +1 -1
- package/out/src/storage/schema/tables/TableCommission.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableMonitorEvent.d.ts +1 -1
- package/out/src/storage/schema/tables/TableMonitorEvent.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableMonitorLease.d.ts +23 -0
- package/out/src/storage/schema/tables/TableMonitorLease.d.ts.map +1 -0
- package/out/src/storage/schema/tables/TableMonitorLease.js +3 -0
- package/out/src/storage/schema/tables/TableMonitorLease.js.map +1 -0
- package/out/src/storage/schema/tables/TableOutput.d.ts +10 -2
- package/out/src/storage/schema/tables/TableOutput.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableOutput.js +1 -1
- package/out/src/storage/schema/tables/TableOutput.js.map +1 -1
- package/out/src/storage/schema/tables/TableOutputBasket.d.ts +1 -1
- package/out/src/storage/schema/tables/TableOutputBasket.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableOutputTag.d.ts +1 -1
- package/out/src/storage/schema/tables/TableOutputTag.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableOutputTagMap.d.ts +1 -1
- package/out/src/storage/schema/tables/TableOutputTagMap.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableProvenTx.d.ts +1 -1
- package/out/src/storage/schema/tables/TableProvenTx.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableProvenTxReq.d.ts +24 -1
- package/out/src/storage/schema/tables/TableProvenTxReq.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableSettings.d.ts +1 -1
- package/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableSyncState.d.ts +1 -1
- package/out/src/storage/schema/tables/TableSyncState.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableTransaction.d.ts +1 -1
- package/out/src/storage/schema/tables/TableTransaction.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableTransactionNew.d.ts +50 -0
- package/out/src/storage/schema/tables/TableTransactionNew.d.ts.map +1 -0
- package/out/src/storage/schema/tables/TableTransactionNew.js +3 -0
- package/out/src/storage/schema/tables/TableTransactionNew.js.map +1 -0
- package/out/src/storage/schema/tables/TableTransactionV7.d.ts +50 -0
- package/out/src/storage/schema/tables/TableTransactionV7.d.ts.map +1 -0
- package/out/src/storage/schema/tables/TableTransactionV7.js +3 -0
- package/out/src/storage/schema/tables/TableTransactionV7.js.map +1 -0
- package/out/src/storage/schema/tables/TableTxAudit.d.ts +26 -0
- package/out/src/storage/schema/tables/TableTxAudit.d.ts.map +1 -0
- package/out/src/storage/schema/tables/TableTxAudit.js +3 -0
- package/out/src/storage/schema/tables/TableTxAudit.js.map +1 -0
- package/out/src/storage/schema/tables/TableTxLabel.d.ts +1 -1
- package/out/src/storage/schema/tables/TableTxLabel.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableTxLabelMap.d.ts +1 -1
- package/out/src/storage/schema/tables/TableTxLabelMap.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableUser.d.ts +1 -1
- package/out/src/storage/schema/tables/TableUser.d.ts.map +1 -1
- package/out/src/storage/schema/tables/index.d.ts +5 -0
- package/out/src/storage/schema/tables/index.d.ts.map +1 -1
- package/out/src/storage/schema/tables/index.js +5 -0
- package/out/src/storage/schema/tables/index.js.map +1 -1
- package/out/src/storage/schema/transactionCrud.d.ts +41 -0
- package/out/src/storage/schema/transactionCrud.d.ts.map +1 -0
- package/out/src/storage/schema/transactionCrud.js +205 -0
- package/out/src/storage/schema/transactionCrud.js.map +1 -0
- package/out/src/storage/schema/transactionService.d.ts +315 -0
- package/out/src/storage/schema/transactionService.d.ts.map +1 -0
- package/out/src/storage/schema/transactionService.js +783 -0
- package/out/src/storage/schema/transactionService.js.map +1 -0
- package/out/src/storage/schema/txAudit.d.ts +33 -0
- package/out/src/storage/schema/txAudit.d.ts.map +1 -0
- package/out/src/storage/schema/txAudit.js +64 -0
- package/out/src/storage/schema/txAudit.js.map +1 -0
- package/out/src/storage/schema/v7Crud.d.ts +41 -0
- package/out/src/storage/schema/v7Crud.d.ts.map +1 -0
- package/out/src/storage/schema/v7Crud.js +205 -0
- package/out/src/storage/schema/v7Crud.js.map +1 -0
- package/out/src/storage/schema/v7Fsm.d.ts +27 -0
- package/out/src/storage/schema/v7Fsm.d.ts.map +1 -0
- package/out/src/storage/schema/v7Fsm.js +124 -0
- package/out/src/storage/schema/v7Fsm.js.map +1 -0
- package/out/src/storage/schema/v7MonitorLease.d.ts +57 -0
- package/out/src/storage/schema/v7MonitorLease.d.ts.map +1 -0
- package/out/src/storage/schema/v7MonitorLease.js +101 -0
- package/out/src/storage/schema/v7MonitorLease.js.map +1 -0
- package/out/src/storage/schema/v7Service.d.ts +305 -0
- package/out/src/storage/schema/v7Service.d.ts.map +1 -0
- package/out/src/storage/schema/v7Service.js +757 -0
- package/out/src/storage/schema/v7Service.js.map +1 -0
- package/out/src/storage/schema/v7TxAudit.d.ts +33 -0
- package/out/src/storage/schema/v7TxAudit.d.ts.map +1 -0
- package/out/src/storage/schema/v7TxAudit.js +64 -0
- package/out/src/storage/schema/v7TxAudit.js.map +1 -0
- package/out/src/storage/storageProviderHelpers.d.ts +34 -0
- package/out/src/storage/storageProviderHelpers.d.ts.map +1 -0
- package/out/src/storage/storageProviderHelpers.js +100 -0
- package/out/src/storage/storageProviderHelpers.js.map +1 -0
- package/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.js +2 -1
- package/out/src/utility/ScriptTemplateBRC29.js.map +1 -1
- package/out/src/utility/aggregateResults.d.ts +1 -1
- package/out/src/utility/aggregateResults.d.ts.map +1 -1
- package/out/src/utility/aggregateResults.js +2 -2
- package/out/src/utility/aggregateResults.js.map +1 -1
- package/out/src/utility/brc114ActionTimeLabels.d.ts +2 -2
- package/out/src/utility/brc114ActionTimeLabels.d.ts.map +1 -1
- package/out/src/utility/brc114ActionTimeLabels.js +16 -9
- package/out/src/utility/brc114ActionTimeLabels.js.map +1 -1
- package/out/src/utility/identityUtils.js +1 -1
- package/out/src/utility/identityUtils.js.map +1 -1
- package/out/src/utility/parseTxScriptOffsets.d.ts +4 -4
- package/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -1
- package/out/src/utility/parseTxScriptOffsets.js.map +1 -1
- package/out/src/utility/stampLog.d.ts.map +1 -1
- package/out/src/utility/stampLog.js +7 -5
- package/out/src/utility/stampLog.js.map +1 -1
- package/out/src/utility/tscProofToMerklePath.d.ts.map +1 -1
- package/out/src/utility/tscProofToMerklePath.js +1 -1
- package/out/src/utility/tscProofToMerklePath.js.map +1 -1
- package/out/src/utility/utilityHelpers.d.ts +1 -2
- package/out/src/utility/utilityHelpers.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.js +10 -10
- package/out/src/utility/utilityHelpers.js.map +1 -1
- package/out/src/utility/utilityHelpers.noBuffer.d.ts +7 -3
- package/out/src/utility/utilityHelpers.noBuffer.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.noBuffer.js +3 -3
- package/out/src/utility/utilityHelpers.noBuffer.js.map +1 -1
- package/out/src/wab-client/WABClient.d.ts +1 -1
- package/out/src/wab-client/WABClient.d.ts.map +1 -1
- package/out/src/wab-client/WABClient.js +12 -12
- package/out/src/wab-client/WABClient.js.map +1 -1
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts.map +1 -1
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js +3 -3
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -1
- package/package.json +7 -6
|
@@ -35,19 +35,16 @@ class BulkFileDataManager {
|
|
|
35
35
|
this.bfds = [];
|
|
36
36
|
this.fileHashToIndex = {};
|
|
37
37
|
this.lock = new SingleWriterMultiReaderLock_1.SingleWriterMultiReaderLock();
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
44
|
-
this.maxRetained = options.maxRetained;
|
|
45
|
-
this.fromKnownSourceUrl = options.fromKnownSourceUrl;
|
|
46
|
-
this.fetch = options.fetch;
|
|
38
|
+
const resolvedOptions = typeof options === 'object' ? options : BulkFileDataManager.createDefaultOptions(options);
|
|
39
|
+
this.chain = resolvedOptions.chain;
|
|
40
|
+
this.maxPerFile = resolvedOptions.maxPerFile;
|
|
41
|
+
this.maxRetained = resolvedOptions.maxRetained;
|
|
42
|
+
this.fromKnownSourceUrl = resolvedOptions.fromKnownSourceUrl;
|
|
43
|
+
this.fetch = resolvedOptions.fetch;
|
|
47
44
|
this.deleteBulkFilesNoLock();
|
|
48
45
|
}
|
|
49
46
|
async deleteBulkFiles() {
|
|
50
|
-
return this.lock.withWriteLock(async () => this.deleteBulkFilesNoLock());
|
|
47
|
+
return await this.lock.withWriteLock(async () => this.deleteBulkFilesNoLock());
|
|
51
48
|
}
|
|
52
49
|
deleteBulkFilesNoLock() {
|
|
53
50
|
this.bfds = [];
|
|
@@ -69,13 +66,13 @@ class BulkFileDataManager {
|
|
|
69
66
|
* There should be no changes to bulk files by direct access to storage bulk file methods.
|
|
70
67
|
*/
|
|
71
68
|
async setStorage(storage, log) {
|
|
72
|
-
return this.lock.withWriteLock(async () => this.setStorageNoLock(storage, log));
|
|
69
|
+
return await this.lock.withWriteLock(async () => await this.setStorageNoLock(storage, log));
|
|
73
70
|
}
|
|
74
71
|
async setStorageNoLock(storage, log) {
|
|
75
72
|
this.storage = storage;
|
|
76
73
|
this.log = log;
|
|
77
74
|
// Get files currently in persistent storage.
|
|
78
|
-
|
|
75
|
+
const sfs = await this.storage.getBulkFiles();
|
|
79
76
|
// Sync bfds with storage. Two scenarios supported:
|
|
80
77
|
const bfdsRanges = this.heightRangesFromBulkFiles(this.bfds);
|
|
81
78
|
const sfsRanges = this.heightRangesFromBulkFiles(sfs);
|
|
@@ -91,7 +88,9 @@ class BulkFileDataManager {
|
|
|
91
88
|
else {
|
|
92
89
|
// Bfds win if they have greater CDN coverage
|
|
93
90
|
// Replace all sfs with bfds
|
|
94
|
-
|
|
91
|
+
const reversedFiles = [...sfs];
|
|
92
|
+
reversedFiles.reverse();
|
|
93
|
+
for (const s of reversedFiles)
|
|
95
94
|
await this.storage.deleteBulkFile(s.fileId);
|
|
96
95
|
for (const bfd of this.bfds) {
|
|
97
96
|
await this.ensureData(bfd);
|
|
@@ -117,26 +116,27 @@ class BulkFileDataManager {
|
|
|
117
116
|
return new BulkFileDataReader_1.BulkFileDataReader(this, range, maxBufferSize);
|
|
118
117
|
}
|
|
119
118
|
async updateFromUrl(cdnUrl) {
|
|
120
|
-
if (
|
|
119
|
+
if (this.fetch == null)
|
|
121
120
|
throw new sdk_1.WERR_INVALID_OPERATION('fetch is not defined in the BulkFileDataManager.');
|
|
122
121
|
const toUrl = (file) => this.fetch.pathJoin(cdnUrl, file);
|
|
123
122
|
const url = toUrl(`${this.chain}NetBlockHeaders.json`);
|
|
124
|
-
const availableBulkFiles =
|
|
125
|
-
if (!availableBulkFiles)
|
|
126
|
-
throw new sdk_1.WERR_INVALID_PARAMETER(
|
|
123
|
+
const availableBulkFiles = await this.fetch.fetchJson(url);
|
|
124
|
+
if (!availableBulkFiles) {
|
|
125
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('cdnUrl', `a valid BulkHeaderFilesInfo JSON resource available from ${url}`);
|
|
126
|
+
}
|
|
127
127
|
const selectedFiles = selectBulkHeaderFiles(availableBulkFiles.files, this.chain, this.maxPerFile || availableBulkFiles.headersPerFile);
|
|
128
128
|
for (const bf of selectedFiles) {
|
|
129
129
|
if (!bf.fileHash) {
|
|
130
|
-
throw new sdk_1.WERR_INVALID_PARAMETER(
|
|
130
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('fileHash', `valid for all files in json downloaded from ${url}`);
|
|
131
131
|
}
|
|
132
132
|
if (!bf.chain || bf.chain !== this.chain) {
|
|
133
|
-
throw new sdk_1.WERR_INVALID_PARAMETER(
|
|
133
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('chain', `"${this.chain}" for all files in json downloaded from ${url}`);
|
|
134
134
|
}
|
|
135
135
|
if (!bf.sourceUrl || bf.sourceUrl !== cdnUrl)
|
|
136
136
|
bf.sourceUrl = cdnUrl;
|
|
137
137
|
}
|
|
138
138
|
const rangeBefore = await this.getHeightRange();
|
|
139
|
-
|
|
139
|
+
await this.merge(selectedFiles);
|
|
140
140
|
const rangeAfter = await this.getHeightRange();
|
|
141
141
|
let log = 'BulkDataFileManager.updateFromUrl\n';
|
|
142
142
|
log += ` url: ${url}\n`;
|
|
@@ -145,17 +145,16 @@ class BulkFileDataManager {
|
|
|
145
145
|
this.log(log);
|
|
146
146
|
}
|
|
147
147
|
async merge(files) {
|
|
148
|
-
return this.lock.withWriteLock(async () => this.mergeNoLock(files));
|
|
148
|
+
return await this.lock.withWriteLock(async () => await this.mergeNoLock(files));
|
|
149
149
|
}
|
|
150
150
|
async mergeNoLock(files) {
|
|
151
151
|
const r = { inserted: [], updated: [], unchanged: [], dropped: [] };
|
|
152
152
|
for (const file of files) {
|
|
153
153
|
const hbf = this.getBfdForHeight(file.firstHeight);
|
|
154
|
-
if (hbf && file.fileId)
|
|
154
|
+
if ((hbf != null) && file.fileId)
|
|
155
155
|
hbf.fileId = file.fileId; // Always update fileId if provided
|
|
156
156
|
const lbf = this.getLastBfd();
|
|
157
|
-
if (hbf &&
|
|
158
|
-
hbf.fileHash === file.fileHash &&
|
|
157
|
+
if ((hbf === null || hbf === void 0 ? void 0 : hbf.fileHash) === file.fileHash &&
|
|
159
158
|
hbf.count === file.count &&
|
|
160
159
|
hbf.lastHash === file.lastHash &&
|
|
161
160
|
hbf.lastChainWork === file.lastChainWork) {
|
|
@@ -164,11 +163,11 @@ class BulkFileDataManager {
|
|
|
164
163
|
continue;
|
|
165
164
|
}
|
|
166
165
|
const vbf = await this.validateFileInfo(file);
|
|
167
|
-
if (hbf) {
|
|
166
|
+
if (hbf != null) {
|
|
168
167
|
// We have a matching file by firstHeight but count and fileHash differ
|
|
169
168
|
await this.update(vbf, hbf, r);
|
|
170
169
|
}
|
|
171
|
-
else if (isBdfIncremental(vbf) && lbf && isBdfIncremental(lbf)) {
|
|
170
|
+
else if (isBdfIncremental(vbf) && (lbf != null) && isBdfIncremental(lbf)) {
|
|
172
171
|
await this.mergeIncremental(lbf, vbf, r);
|
|
173
172
|
}
|
|
174
173
|
else {
|
|
@@ -194,13 +193,13 @@ class BulkFileDataManager {
|
|
|
194
193
|
lbf.mru = Date.now();
|
|
195
194
|
const lbfInfo = bfdToInfo(lbf, true);
|
|
196
195
|
r.updated.push(lbfInfo);
|
|
197
|
-
if (this.storage && lbf.fileId) {
|
|
196
|
+
if ((this.storage != null) && lbf.fileId) {
|
|
198
197
|
await this.storage.updateBulkFile(lbf.fileId, lbfInfo);
|
|
199
198
|
}
|
|
200
199
|
}
|
|
201
200
|
toLogString(what) {
|
|
202
201
|
let log = '';
|
|
203
|
-
if (
|
|
202
|
+
if (what == null) {
|
|
204
203
|
log += this.toLogString(this.bfds);
|
|
205
204
|
}
|
|
206
205
|
else if (what['updated']) {
|
|
@@ -230,45 +229,20 @@ class BulkFileDataManager {
|
|
|
230
229
|
async mergeIncrementalBlockHeaders(newBulkHeaders, incrementalChainWork) {
|
|
231
230
|
if (newBulkHeaders.length === 0)
|
|
232
231
|
return;
|
|
233
|
-
return this.lock.withWriteLock(async () => {
|
|
232
|
+
return await this.lock.withWriteLock(async () => {
|
|
234
233
|
const lbf = this.getLastFileNoLock();
|
|
235
|
-
const nextHeight = lbf ? lbf.firstHeight + lbf.count : 0;
|
|
236
|
-
|
|
237
|
-
// Don't modify the incoming array...
|
|
238
|
-
newBulkHeaders = [...newBulkHeaders];
|
|
239
|
-
// If we have more headers than we need, drop the incoming headers.
|
|
240
|
-
while (newBulkHeaders.length > 0 && newBulkHeaders[0].height < nextHeight) {
|
|
241
|
-
const h = newBulkHeaders.shift();
|
|
242
|
-
if (h && incrementalChainWork) {
|
|
243
|
-
incrementalChainWork = (0, blockHeaderUtilities_1.subWork)(incrementalChainWork, (0, blockHeaderUtilities_1.convertBitsToWork)(h.bits));
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
234
|
+
const nextHeight = lbf != null ? lbf.firstHeight + lbf.count : 0;
|
|
235
|
+
({ headers: newBulkHeaders, incrementalChainWork } = trimAlreadyStoredHeaders(newBulkHeaders, nextHeight, incrementalChainWork));
|
|
247
236
|
if (newBulkHeaders.length === 0)
|
|
248
237
|
return;
|
|
249
|
-
if (
|
|
238
|
+
if ((lbf == null) || nextHeight !== newBulkHeaders[0].height) {
|
|
250
239
|
throw new sdk_1.WERR_INVALID_PARAMETER('newBulkHeaders', 'an extension of existing bulk headers');
|
|
240
|
+
}
|
|
251
241
|
if (!lbf.lastHash)
|
|
252
242
|
throw new sdk_1.WERR_INTERNAL(`lastHash is not defined for the last bulk file ${lbf.fileName}`);
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
if (incrementalChainWork) {
|
|
257
|
-
lastChainWork = (0, blockHeaderUtilities_1.addWork)(incrementalChainWork, lastChainWork);
|
|
258
|
-
}
|
|
259
|
-
else {
|
|
260
|
-
// If lastChainWork is not provided, calculate it from the last file with basic validation.
|
|
261
|
-
let lastHeight = lbf.firstHeight + lbf.count - 1;
|
|
262
|
-
let lastHash = lbf.lastHash;
|
|
263
|
-
for (const h of newBulkHeaders) {
|
|
264
|
-
if (h.height !== lastHeight + 1 || h.previousHash !== lastHash) {
|
|
265
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('headers', `an extension of existing bulk headers, header with height ${h.height} is non-sequential`);
|
|
266
|
-
}
|
|
267
|
-
lastChainWork = (0, blockHeaderUtilities_1.addWork)(lastChainWork, (0, blockHeaderUtilities_1.convertBitsToWork)(h.bits));
|
|
268
|
-
lastHeight = h.height;
|
|
269
|
-
lastHash = h.hash;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
243
|
+
const lastChainWork = incrementalChainWork
|
|
244
|
+
? (0, blockHeaderUtilities_1.addWork)(incrementalChainWork, lbf.lastChainWork)
|
|
245
|
+
: computeChainWorkFromHeaders(newBulkHeaders, lbf);
|
|
272
246
|
const data = (0, blockHeaderUtilities_1.serializeBaseBlockHeaders)(newBulkHeaders);
|
|
273
247
|
const fileHash = (0, utilityHelpers_noBuffer_1.asString)(sdk_2.Hash.sha256((0, utilityHelpers_noBuffer_1.asArray)(data)), 'base64');
|
|
274
248
|
const bf = {
|
|
@@ -276,12 +250,12 @@ class BulkFileDataManager {
|
|
|
276
250
|
chain: this.chain,
|
|
277
251
|
sourceUrl: undefined,
|
|
278
252
|
fileName: 'incremental',
|
|
279
|
-
firstHeight:
|
|
253
|
+
firstHeight: newBulkHeaders[0].height,
|
|
280
254
|
count: newBulkHeaders.length,
|
|
281
255
|
prevChainWork: lbf.lastChainWork,
|
|
282
256
|
lastChainWork,
|
|
283
257
|
prevHash: lbf.lastHash,
|
|
284
|
-
lastHash:
|
|
258
|
+
lastHash: newBulkHeaders.at(-1).hash,
|
|
285
259
|
fileHash,
|
|
286
260
|
data
|
|
287
261
|
};
|
|
@@ -289,24 +263,25 @@ class BulkFileDataManager {
|
|
|
289
263
|
});
|
|
290
264
|
}
|
|
291
265
|
async getBulkFiles(keepData) {
|
|
292
|
-
return this.lock.withReadLock(async () => {
|
|
266
|
+
return await this.lock.withReadLock(async () => {
|
|
293
267
|
return this.bfds.map(bfd => bfdToInfo(bfd, keepData));
|
|
294
268
|
});
|
|
295
269
|
}
|
|
296
270
|
async getHeightRange() {
|
|
297
|
-
return this.lock.withReadLock(async () => {
|
|
271
|
+
return await this.lock.withReadLock(async () => {
|
|
298
272
|
if (this.bfds.length === 0)
|
|
299
273
|
return HeightRange_1.HeightRange.empty;
|
|
300
274
|
const first = this.bfds[0];
|
|
301
|
-
const last = this.bfds
|
|
275
|
+
const last = this.bfds.at(-1);
|
|
302
276
|
return new HeightRange_1.HeightRange(first.firstHeight, last.firstHeight + last.count - 1);
|
|
303
277
|
});
|
|
304
278
|
}
|
|
305
279
|
async getDataFromFile(file, offset, length) {
|
|
306
|
-
const bfd =
|
|
307
|
-
if (
|
|
280
|
+
const bfd = this.getBfdForHeight(file.firstHeight);
|
|
281
|
+
if ((bfd == null) || bfd.count < file.count) {
|
|
308
282
|
throw new sdk_1.WERR_INVALID_PARAMETER('file', `a match for ${file.firstHeight}, ${file.count} in the BulkFileDataManager.`);
|
|
309
|
-
|
|
283
|
+
}
|
|
284
|
+
return await this.lock.withReadLock(async () => await this.getDataFromFileNoLock(bfd, offset, length));
|
|
310
285
|
}
|
|
311
286
|
async getDataFromFileNoLock(bfd, offset, length) {
|
|
312
287
|
const fileLength = bfd.count * 80;
|
|
@@ -316,47 +291,49 @@ class BulkFileDataManager {
|
|
|
316
291
|
length = length || bfd.count * 80 - offset;
|
|
317
292
|
length = Math.min(length, fileLength - offset);
|
|
318
293
|
let data;
|
|
319
|
-
if (bfd.data) {
|
|
294
|
+
if (bfd.data != null) {
|
|
320
295
|
data = bfd.data.slice(offset, offset + length);
|
|
321
296
|
}
|
|
322
|
-
else if (bfd.fileId && this.storage) {
|
|
297
|
+
else if (bfd.fileId && (this.storage != null)) {
|
|
323
298
|
data = await this.storage.getBulkFileData(bfd.fileId, offset, length);
|
|
324
299
|
}
|
|
325
|
-
if (
|
|
300
|
+
if (data == null) {
|
|
326
301
|
await this.ensureData(bfd);
|
|
327
|
-
if (bfd.data)
|
|
302
|
+
if (bfd.data != null)
|
|
328
303
|
data = bfd.data.slice(offset, offset + length);
|
|
329
304
|
}
|
|
330
|
-
if (
|
|
305
|
+
if (data == null)
|
|
331
306
|
return undefined;
|
|
332
307
|
return data;
|
|
333
308
|
}
|
|
334
309
|
async findHeaderForHeightOrUndefined(height) {
|
|
335
|
-
return this.lock.withReadLock(async () => {
|
|
336
|
-
if (!Number.isInteger(height) || height < 0)
|
|
310
|
+
return await this.lock.withReadLock(async () => {
|
|
311
|
+
if (!Number.isInteger(height) || height < 0) {
|
|
337
312
|
throw new sdk_1.WERR_INVALID_PARAMETER('height', `a non-negative integer (${height}).`);
|
|
313
|
+
}
|
|
338
314
|
const file = this.bfds.find(f => f.firstHeight <= height && f.firstHeight + f.count > height);
|
|
339
|
-
if (
|
|
315
|
+
if (file == null)
|
|
340
316
|
return undefined;
|
|
341
317
|
const offset = (height - file.firstHeight) * 80;
|
|
342
318
|
const data = await this.getDataFromFileNoLock(file, offset, 80);
|
|
343
|
-
if (
|
|
319
|
+
if (data == null)
|
|
344
320
|
return undefined;
|
|
345
|
-
const header = (0, blockHeaderUtilities_1.deserializeBlockHeader)(data,
|
|
321
|
+
const header = (0, blockHeaderUtilities_1.deserializeBlockHeader)(data, height, 0);
|
|
346
322
|
return header;
|
|
347
323
|
});
|
|
348
324
|
}
|
|
349
325
|
async getFileForHeight(height) {
|
|
350
|
-
return this.lock.withReadLock(async () => {
|
|
326
|
+
return await this.lock.withReadLock(async () => {
|
|
351
327
|
const bfd = this.getBfdForHeight(height);
|
|
352
|
-
if (
|
|
328
|
+
if (bfd == null)
|
|
353
329
|
return undefined;
|
|
354
330
|
return bfdToInfo(bfd);
|
|
355
331
|
});
|
|
356
332
|
}
|
|
357
333
|
getBfdForHeight(height) {
|
|
358
|
-
if (!Number.isInteger(height) || height < 0)
|
|
334
|
+
if (!Number.isInteger(height) || height < 0) {
|
|
359
335
|
throw new sdk_1.WERR_INVALID_PARAMETER('height', `a non-negative integer (${height}).`);
|
|
336
|
+
}
|
|
360
337
|
const file = this.bfds.find(f => f.firstHeight <= height && f.firstHeight + f.count > height);
|
|
361
338
|
return file;
|
|
362
339
|
}
|
|
@@ -367,74 +344,85 @@ class BulkFileDataManager {
|
|
|
367
344
|
return bfd;
|
|
368
345
|
}
|
|
369
346
|
async getLastFile(fromEnd = 1) {
|
|
370
|
-
return this.lock.withReadLock(async () => this.getLastFileNoLock(fromEnd));
|
|
347
|
+
return await this.lock.withReadLock(async () => this.getLastFileNoLock(fromEnd));
|
|
371
348
|
}
|
|
372
349
|
getLastFileNoLock(fromEnd = 1) {
|
|
373
350
|
const bfd = this.getLastBfd(fromEnd);
|
|
374
|
-
if (
|
|
351
|
+
if (bfd == null)
|
|
375
352
|
return undefined;
|
|
376
353
|
return bfdToInfo(bfd);
|
|
377
354
|
}
|
|
378
355
|
async getDataByFileHash(fileHash) {
|
|
379
356
|
const index = this.fileHashToIndex[fileHash];
|
|
380
|
-
if (index === undefined)
|
|
357
|
+
if (index === undefined) {
|
|
381
358
|
throw new sdk_1.WERR_INVALID_PARAMETER('fileHash', `known to the BulkFileDataManager. ${fileHash} is unknown.`);
|
|
359
|
+
}
|
|
382
360
|
const bfd = this.bfds[index];
|
|
383
361
|
const data = await this.ensureData(bfd);
|
|
384
362
|
return data;
|
|
385
363
|
}
|
|
386
364
|
async getDataByFileId(fileId) {
|
|
387
365
|
const bfd = this.bfds.find(f => f.fileId === fileId);
|
|
388
|
-
if (bfd === undefined)
|
|
366
|
+
if (bfd === undefined) {
|
|
389
367
|
throw new sdk_1.WERR_INVALID_PARAMETER('fileId', `known to the BulkFileDataManager. ${fileId} is unknown.`);
|
|
368
|
+
}
|
|
390
369
|
const data = await this.ensureData(bfd);
|
|
391
370
|
return data;
|
|
392
371
|
}
|
|
393
372
|
async validateFileInfo(file) {
|
|
394
|
-
var _a;
|
|
395
373
|
if (file.chain !== this.chain)
|
|
396
374
|
throw new sdk_1.WERR_INVALID_PARAMETER('chain', `${this.chain}`);
|
|
397
|
-
if (file.count <= 0)
|
|
375
|
+
if (file.count <= 0) {
|
|
398
376
|
throw new sdk_1.WERR_INVALID_PARAMETER('bf.count', `expected count to be greater than 0, but got ${file.count}`);
|
|
399
|
-
|
|
377
|
+
}
|
|
378
|
+
if (file.count > this.maxPerFile && file.fileName !== 'incremental') {
|
|
400
379
|
throw new sdk_1.WERR_INVALID_PARAMETER('count', `less than or equal to maxPerFile ${this.maxPerFile}`);
|
|
380
|
+
}
|
|
401
381
|
if (!file.fileHash)
|
|
402
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('fileHash',
|
|
403
|
-
if (!file.sourceUrl && !file.fileId &&
|
|
404
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('data',
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
fileHash: file.fileHash,
|
|
408
|
-
mru: Date.now()
|
|
409
|
-
};
|
|
382
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('fileHash', 'defined');
|
|
383
|
+
if (!file.sourceUrl && !file.fileId && (file.data == null)) {
|
|
384
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('data', 'defined when sourceUrl and fileId are undefined');
|
|
385
|
+
}
|
|
386
|
+
const bfd = { ...file, fileHash: file.fileHash, mru: Date.now() };
|
|
410
387
|
if (!bfd.validated) {
|
|
411
|
-
await this.
|
|
412
|
-
if (!bfd.data || bfd.data.length !== bfd.count * 80)
|
|
413
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('file.data', `bulk file ${bfd.fileName} data length ${(_a = bfd.data) === null || _a === void 0 ? void 0 : _a.length} does not match expected count ${bfd.count}`);
|
|
414
|
-
bfd.fileHash = (0, utilityHelpers_noBuffer_1.asString)(sdk_2.Hash.sha256((0, utilityHelpers_noBuffer_1.asArray)(bfd.data)), 'base64');
|
|
415
|
-
if (file.fileHash && file.fileHash !== bfd.fileHash)
|
|
416
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('file.fileHash', `expected ${file.fileHash} but got ${bfd.fileHash}`);
|
|
417
|
-
if (!(0, validBulkHeaderFilesByFileHash_1.isKnownValidBulkHeaderFile)(bfd)) {
|
|
418
|
-
const pbf = bfd.firstHeight > 0 ? this.getBfdForHeight(bfd.firstHeight - 1) : undefined;
|
|
419
|
-
const prevHash = pbf ? pbf.lastHash : '00'.repeat(32);
|
|
420
|
-
const prevChainWork = pbf ? pbf.lastChainWork : '00'.repeat(32);
|
|
421
|
-
const { lastHeaderHash, lastChainWork } = (0, blockHeaderUtilities_1.validateBufferOfHeaders)(bfd.data, prevHash, 0, undefined, prevChainWork);
|
|
422
|
-
if (bfd.lastHash && bfd.lastHash !== lastHeaderHash)
|
|
423
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('file.lastHash', `expected ${bfd.lastHash} but got ${lastHeaderHash}`);
|
|
424
|
-
if (bfd.lastChainWork && bfd.lastChainWork !== lastChainWork)
|
|
425
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('file.lastChainWork', `expected ${bfd.lastChainWork} but got ${lastChainWork}`);
|
|
426
|
-
bfd.lastHash = lastHeaderHash;
|
|
427
|
-
bfd.lastChainWork = lastChainWork;
|
|
428
|
-
if (bfd.firstHeight === 0) {
|
|
429
|
-
(0, blockHeaderUtilities_1.validateGenesisHeader)(bfd.data, bfd.chain);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
388
|
+
await this.validateBfdData(bfd, file.fileHash);
|
|
432
389
|
bfd.validated = true;
|
|
433
390
|
}
|
|
434
391
|
return bfd;
|
|
435
392
|
}
|
|
393
|
+
async validateBfdData(bfd, expectedFileHash) {
|
|
394
|
+
var _a;
|
|
395
|
+
await this.ensureData(bfd);
|
|
396
|
+
if ((bfd.data == null) || bfd.data.length !== bfd.count * 80) {
|
|
397
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('file.data', `bulk file ${bfd.fileName} data length ${(_a = bfd.data) === null || _a === void 0 ? void 0 : _a.length} does not match expected count ${bfd.count}`);
|
|
398
|
+
}
|
|
399
|
+
bfd.fileHash = (0, utilityHelpers_noBuffer_1.asString)(sdk_2.Hash.sha256((0, utilityHelpers_noBuffer_1.asArray)(bfd.data)), 'base64');
|
|
400
|
+
if (expectedFileHash && expectedFileHash !== bfd.fileHash) {
|
|
401
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('file.fileHash', `expected ${expectedFileHash} but got ${bfd.fileHash}`);
|
|
402
|
+
}
|
|
403
|
+
if (!(0, validBulkHeaderFilesByFileHash_1.isKnownValidBulkHeaderFile)(bfd)) {
|
|
404
|
+
this.validateBfdHeaders(bfd);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
validateBfdHeaders(bfd) {
|
|
408
|
+
var _a, _b;
|
|
409
|
+
const pbf = bfd.firstHeight > 0 ? this.getBfdForHeight(bfd.firstHeight - 1) : undefined;
|
|
410
|
+
const prevHash = (_a = pbf === null || pbf === void 0 ? void 0 : pbf.lastHash) !== null && _a !== void 0 ? _a : '00'.repeat(32);
|
|
411
|
+
const prevChainWork = (_b = pbf === null || pbf === void 0 ? void 0 : pbf.lastChainWork) !== null && _b !== void 0 ? _b : '00'.repeat(32);
|
|
412
|
+
const { lastHeaderHash, lastChainWork } = (0, blockHeaderUtilities_1.validateBufferOfHeaders)(bfd.data, prevHash, 0, undefined, prevChainWork);
|
|
413
|
+
if (bfd.lastHash && bfd.lastHash !== lastHeaderHash) {
|
|
414
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('file.lastHash', `expected ${bfd.lastHash} but got ${lastHeaderHash}`);
|
|
415
|
+
}
|
|
416
|
+
if (bfd.lastChainWork && bfd.lastChainWork !== lastChainWork) {
|
|
417
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('file.lastChainWork', `expected ${bfd.lastChainWork} but got ${lastChainWork}`);
|
|
418
|
+
}
|
|
419
|
+
bfd.lastHash = lastHeaderHash;
|
|
420
|
+
bfd.lastChainWork = lastChainWork;
|
|
421
|
+
if (bfd.firstHeight === 0)
|
|
422
|
+
(0, blockHeaderUtilities_1.validateGenesisHeader)(bfd.data, bfd.chain);
|
|
423
|
+
}
|
|
436
424
|
async ReValidate() {
|
|
437
|
-
return this.lock.withReadLock(async () => this.ReValidateNoLock());
|
|
425
|
+
return await this.lock.withReadLock(async () => await this.ReValidateNoLock());
|
|
438
426
|
}
|
|
439
427
|
async ReValidateNoLock() {
|
|
440
428
|
for (const file of this.bfds) {
|
|
@@ -447,14 +435,17 @@ class BulkFileDataManager {
|
|
|
447
435
|
}
|
|
448
436
|
}
|
|
449
437
|
validateBfdForAdd(bfd) {
|
|
450
|
-
if (this.bfds.length === 0 && bfd.firstHeight !== 0)
|
|
451
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('firstHeight',
|
|
438
|
+
if (this.bfds.length === 0 && bfd.firstHeight !== 0) {
|
|
439
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('firstHeight', '0 for the first file');
|
|
440
|
+
}
|
|
452
441
|
if (this.bfds.length > 0) {
|
|
453
|
-
const last = this.bfds
|
|
454
|
-
if (bfd.firstHeight !== last.firstHeight + last.count)
|
|
455
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('firstHeight',
|
|
456
|
-
|
|
457
|
-
|
|
442
|
+
const last = this.bfds.at(-1);
|
|
443
|
+
if (bfd.firstHeight !== last.firstHeight + last.count) {
|
|
444
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('firstHeight', 'the last file\'s firstHeight + count');
|
|
445
|
+
}
|
|
446
|
+
if (bfd.prevHash !== last.lastHash || bfd.prevChainWork !== last.lastChainWork) {
|
|
447
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('prevHash/prevChainWork', 'the last file\'s lastHash/lastChainWork');
|
|
448
|
+
}
|
|
458
449
|
}
|
|
459
450
|
}
|
|
460
451
|
async add(bfd) {
|
|
@@ -464,7 +455,7 @@ class BulkFileDataManager {
|
|
|
464
455
|
this.fileHashToIndex[bfd.fileHash] = index;
|
|
465
456
|
this.ensureMaxRetained();
|
|
466
457
|
const info = bfdToInfo(bfd, true);
|
|
467
|
-
if (this.storage) {
|
|
458
|
+
if (this.storage != null) {
|
|
468
459
|
info.fileId = bfd.fileId = await this.storage.insertBulkFile(info);
|
|
469
460
|
}
|
|
470
461
|
return info;
|
|
@@ -502,120 +493,109 @@ class BulkFileDataManager {
|
|
|
502
493
|
* @param hbf corresponding existing BulkFileData to update.
|
|
503
494
|
*/
|
|
504
495
|
async update(update, hbf, r) {
|
|
505
|
-
if (
|
|
506
|
-
hbf.
|
|
507
|
-
hbf.
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
if (isBdfCdn(update) === isBdfCdn(hbf) && update.count <= hbf.count)
|
|
496
|
+
if ((hbf === null || hbf === void 0 ? void 0 : hbf.firstHeight) !== update.firstHeight ||
|
|
497
|
+
(hbf === null || hbf === void 0 ? void 0 : hbf.prevChainWork) !== update.prevChainWork ||
|
|
498
|
+
(hbf === null || hbf === void 0 ? void 0 : hbf.prevHash) !== update.prevHash) {
|
|
499
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('file', 'an existing file by height, prevChainWork and prevHash');
|
|
500
|
+
}
|
|
501
|
+
if (isBdfCdn(update) === isBdfCdn(hbf) && update.count <= hbf.count) {
|
|
511
502
|
throw new sdk_1.WERR_INVALID_PARAMETER('file.count', `greater than the current count ${hbf.count}`);
|
|
503
|
+
}
|
|
504
|
+
const { index, truncate, replaced, drop } = await this.resolveUpdatePlan(update, hbf);
|
|
505
|
+
this.replaceBfdAtIndex(index, update);
|
|
506
|
+
if (truncate != null)
|
|
507
|
+
await this.shiftWork(update, truncate, replaced);
|
|
508
|
+
if (drop != null)
|
|
509
|
+
this.dropLastBulkFile(drop);
|
|
510
|
+
await this.persistUpdate(update, truncate, replaced, drop);
|
|
511
|
+
this.recordUpdateResults(r, update, truncate, replaced, drop);
|
|
512
|
+
this.ensureMaxRetained();
|
|
513
|
+
}
|
|
514
|
+
async resolveUpdatePlan(update, hbf) {
|
|
512
515
|
const lbf = this.getLastBfd();
|
|
513
516
|
let index = this.bfds.length - 1;
|
|
514
|
-
let truncate
|
|
515
|
-
let replaced
|
|
516
|
-
let drop
|
|
517
|
+
let truncate;
|
|
518
|
+
let replaced;
|
|
519
|
+
let drop;
|
|
517
520
|
if (hbf.firstHeight === lbf.firstHeight) {
|
|
518
|
-
//
|
|
521
|
+
// Update targets the last file — three cases:
|
|
519
522
|
if (isBdfIncremental(update)) {
|
|
520
|
-
// 1. Incremental
|
|
523
|
+
// 1. Incremental → incremental extension.
|
|
521
524
|
if (!isBdfIncremental(lbf))
|
|
522
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('file',
|
|
525
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('file', 'an incremental file to update an existing incremental file');
|
|
523
526
|
}
|
|
524
|
-
else {
|
|
525
|
-
//
|
|
526
|
-
if (
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
// Retain extra incremental headers if any.
|
|
534
|
-
if (update.count < lbf.count) {
|
|
535
|
-
// The new CDN partially replaces the last incremental file, prepare to shift work and re-add it.
|
|
536
|
-
await this.ensureData(lbf);
|
|
537
|
-
truncate = lbf;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
527
|
+
else if (isBdfCdn(lbf)) {
|
|
528
|
+
// 2. CDN → CDN replacement (must grow).
|
|
529
|
+
if (update.count <= lbf.count)
|
|
530
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('update.count', `CDN update must have more headers. ${update.count} <= ${lbf.count}`);
|
|
531
|
+
}
|
|
532
|
+
else if (update.count < lbf.count) {
|
|
533
|
+
// 3. New CDN partially replaces incremental tail — retain excess incremental headers.
|
|
534
|
+
await this.ensureData(lbf);
|
|
535
|
+
truncate = lbf;
|
|
540
536
|
}
|
|
541
537
|
}
|
|
542
538
|
else {
|
|
543
|
-
//
|
|
544
|
-
// - it must be a CDN file update with more headers than the current CDN file.
|
|
545
|
-
// - the last file must be an incremental file which is updated or deleted. The updated (or deleted) last file is returned.
|
|
539
|
+
// Update targets the second-to-last file — must be CDN replacing CDN, last must be incremental.
|
|
546
540
|
const lbf2 = this.getLastBfd(2);
|
|
547
|
-
if (
|
|
548
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('file',
|
|
541
|
+
if ((lbf2 == null) || hbf.firstHeight !== lbf2.firstHeight)
|
|
542
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('file', 'an update to last or second to last file');
|
|
549
543
|
if (!isBdfCdn(update) || !isBdfCdn(lbf2) || update.count <= lbf2.count)
|
|
550
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('file',
|
|
544
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('file', 'a CDN file update with more headers than the current CDN file');
|
|
551
545
|
if (!isBdfIncremental(lbf))
|
|
552
|
-
throw new sdk_1.WERR_INVALID_PARAMETER('file',
|
|
546
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('file', 'a CDN file update followed by an incremental file');
|
|
553
547
|
if (!update.fileId)
|
|
554
|
-
update.fileId = lbf2.fileId;
|
|
548
|
+
update.fileId = lbf2.fileId;
|
|
555
549
|
if (update.count >= lbf2.count + lbf.count) {
|
|
556
|
-
// The current last file is fully replaced by the CDN update.
|
|
557
550
|
drop = lbf;
|
|
558
551
|
}
|
|
559
552
|
else {
|
|
560
|
-
// If the update doesn't fully replace the last incremental file, make sure data is available to be truncated.
|
|
561
553
|
await this.ensureData(lbf);
|
|
562
554
|
truncate = lbf;
|
|
563
|
-
// The existing second to last file is fully replaced by the update.
|
|
564
555
|
replaced = lbf2;
|
|
565
556
|
}
|
|
566
|
-
index = index - 1;
|
|
567
|
-
}
|
|
568
|
-
// In all cases the bulk file at the current fileId if any is updated.
|
|
569
|
-
this.replaceBfdAtIndex(index, update);
|
|
570
|
-
if (truncate) {
|
|
571
|
-
// If there is a bulk file to be truncated, it becomes the new (reduced) last file.
|
|
572
|
-
await this.shiftWork(update, truncate, replaced);
|
|
573
|
-
}
|
|
574
|
-
if (drop) {
|
|
575
|
-
this.dropLastBulkFile(drop);
|
|
557
|
+
index = index - 1;
|
|
576
558
|
}
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
else {
|
|
589
|
-
truncateInfo.fileId = undefined; // Make sure truncate is a new file.
|
|
590
|
-
truncate.fileId = await this.storage.insertBulkFile(truncateInfo);
|
|
591
|
-
}
|
|
559
|
+
return { index, truncate, replaced, drop };
|
|
560
|
+
}
|
|
561
|
+
async persistUpdate(update, truncate, replaced, drop) {
|
|
562
|
+
if (this.storage == null)
|
|
563
|
+
return;
|
|
564
|
+
if (update.fileId)
|
|
565
|
+
await this.storage.updateBulkFile(update.fileId, bfdToInfo(update, true));
|
|
566
|
+
if ((truncate != null)) {
|
|
567
|
+
const truncateInfo = bfdToInfo(truncate, true);
|
|
568
|
+
if (replaced != null) {
|
|
569
|
+
await this.storage.updateBulkFile(truncate.fileId, truncateInfo);
|
|
592
570
|
}
|
|
593
|
-
|
|
594
|
-
|
|
571
|
+
else {
|
|
572
|
+
truncateInfo.fileId = undefined;
|
|
573
|
+
truncate.fileId = await this.storage.insertBulkFile(truncateInfo);
|
|
595
574
|
}
|
|
596
575
|
}
|
|
597
|
-
if (
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
r.
|
|
610
|
-
}
|
|
576
|
+
if (drop === null || drop === void 0 ? void 0 : drop.fileId)
|
|
577
|
+
await this.storage.deleteBulkFile(drop.fileId);
|
|
578
|
+
}
|
|
579
|
+
recordUpdateResults(r, update, truncate, replaced, drop) {
|
|
580
|
+
if (!r)
|
|
581
|
+
return;
|
|
582
|
+
r.updated.push(bfdToInfo(update, true));
|
|
583
|
+
if (truncate != null) {
|
|
584
|
+
const truncateInfo = bfdToInfo(truncate, true);
|
|
585
|
+
if (replaced != null)
|
|
586
|
+
r.updated.push(truncateInfo);
|
|
587
|
+
else
|
|
588
|
+
r.inserted.push(truncateInfo);
|
|
611
589
|
}
|
|
612
|
-
|
|
590
|
+
if (drop != null)
|
|
591
|
+
r.dropped.push(bfdToInfo(drop));
|
|
613
592
|
}
|
|
614
593
|
dropLastBulkFile(lbf) {
|
|
615
594
|
delete this.fileHashToIndex[lbf.fileHash];
|
|
616
595
|
const index = this.bfds.indexOf(lbf);
|
|
617
|
-
if (index !== this.bfds.length - 1)
|
|
618
|
-
throw new sdk_1.WERR_INTERNAL(
|
|
596
|
+
if (index !== this.bfds.length - 1) {
|
|
597
|
+
throw new sdk_1.WERR_INTERNAL('dropLastBulkFile requires lbf is the current last file.');
|
|
598
|
+
}
|
|
619
599
|
this.bfds.pop();
|
|
620
600
|
}
|
|
621
601
|
/**
|
|
@@ -633,15 +613,17 @@ class BulkFileDataManager {
|
|
|
633
613
|
// replaced will be valid if the update replaced it and it must become the new last file.
|
|
634
614
|
// truncateIndex will be updateIndex + 1 if the existing last file is being truncated and update is second to last.
|
|
635
615
|
const truncateIndex = this.fileHashToIndex[truncate.fileHash];
|
|
636
|
-
if (truncateIndex !== undefined && truncateIndex !== updateIndex + 1)
|
|
637
|
-
throw new sdk_1.WERR_INTERNAL(
|
|
638
|
-
|
|
639
|
-
|
|
616
|
+
if (truncateIndex !== undefined && truncateIndex !== updateIndex + 1) {
|
|
617
|
+
throw new sdk_1.WERR_INTERNAL('shiftWork requires update to have replaced truncate or truncate to follow update');
|
|
618
|
+
}
|
|
619
|
+
if (truncateIndex !== undefined && (replaced == null)) {
|
|
620
|
+
throw new sdk_1.WERR_INTERNAL('shiftWork requires valid replaced when update hasn\'t replaced truncate');
|
|
621
|
+
}
|
|
640
622
|
truncate.prevHash = update.lastHash;
|
|
641
623
|
truncate.prevChainWork = update.lastChainWork;
|
|
642
624
|
// truncate.lastChainWork, truncate.lastHash remain unchanged
|
|
643
625
|
let count = update.count;
|
|
644
|
-
if (replaced) {
|
|
626
|
+
if (replaced != null) {
|
|
645
627
|
count -= replaced.count;
|
|
646
628
|
}
|
|
647
629
|
else {
|
|
@@ -662,44 +644,46 @@ class BulkFileDataManager {
|
|
|
662
644
|
* @returns
|
|
663
645
|
*/
|
|
664
646
|
async ensureData(bfd) {
|
|
665
|
-
if (bfd.data)
|
|
647
|
+
if (bfd.data != null)
|
|
666
648
|
return bfd.data;
|
|
667
|
-
if (this.storage && bfd.fileId) {
|
|
649
|
+
if ((this.storage != null) && bfd.fileId) {
|
|
668
650
|
bfd.data = await this.storage.getBulkFileData(bfd.fileId);
|
|
669
|
-
if (
|
|
651
|
+
if (bfd.data == null)
|
|
670
652
|
throw new sdk_1.WERR_INVALID_PARAMETER('fileId', `valid, data not found for fileId ${bfd.fileId}`);
|
|
671
653
|
}
|
|
672
|
-
if (
|
|
673
|
-
// TODO - restore this change
|
|
654
|
+
if ((bfd.data == null) && (this.fetch != null) && bfd.sourceUrl) {
|
|
674
655
|
const url = this.fetch.pathJoin(bfd.sourceUrl, bfd.fileName);
|
|
675
|
-
//const url = this.fetch.pathJoin('http://localhost:8842/blockheaders', bfd.fileName)
|
|
676
656
|
try {
|
|
677
657
|
bfd.data = await this.fetch.download(url);
|
|
678
658
|
}
|
|
679
|
-
catch (
|
|
659
|
+
catch (firstAttemptErr) {
|
|
660
|
+
// First download attempt failed (e.g. transient network error); retry once.
|
|
661
|
+
console.debug(`BulkFileDataManager: first download attempt failed for ${url}, retrying`, firstAttemptErr);
|
|
680
662
|
bfd.data = await this.fetch.download(url);
|
|
681
663
|
}
|
|
682
664
|
if (!bfd.data)
|
|
683
665
|
throw new sdk_1.WERR_INVALID_PARAMETER('sourceUrl', `data not found for sourceUrl ${url}`);
|
|
684
666
|
}
|
|
685
|
-
if (
|
|
667
|
+
if (bfd.data == null)
|
|
686
668
|
throw new sdk_1.WERR_INVALID_PARAMETER('data', `defined. Unable to retrieve data for ${bfd.fileName}`);
|
|
687
669
|
bfd.mru = Date.now();
|
|
688
670
|
// Validate retrieved data.
|
|
689
671
|
const fileHash = (0, utilityHelpers_noBuffer_1.asString)(sdk_2.Hash.sha256((0, utilityHelpers_noBuffer_1.asArray)(bfd.data)), 'base64');
|
|
690
|
-
if (fileHash !== bfd.fileHash)
|
|
672
|
+
if (fileHash !== bfd.fileHash) {
|
|
691
673
|
throw new sdk_1.WERR_INVALID_PARAMETER('fileHash', `a match for retrieved data for ${bfd.fileName}`);
|
|
674
|
+
}
|
|
692
675
|
this.ensureMaxRetained();
|
|
693
676
|
return bfd.data;
|
|
694
677
|
}
|
|
695
678
|
ensureMaxRetained() {
|
|
696
679
|
if (this.maxRetained === undefined)
|
|
697
680
|
return;
|
|
698
|
-
|
|
681
|
+
const withData = this.bfds.filter(bfd => (bfd.data != null) && (bfd.fileId || bfd.sourceUrl));
|
|
699
682
|
let countToRelease = withData.length - this.maxRetained;
|
|
700
683
|
if (countToRelease <= 0)
|
|
701
684
|
return;
|
|
702
|
-
const sorted = withData
|
|
685
|
+
const sorted = [...withData];
|
|
686
|
+
sorted.sort((a, b) => a.mru - b.mru);
|
|
703
687
|
while (countToRelease-- > 0 && sorted.length > 0) {
|
|
704
688
|
const oldest = sorted.shift();
|
|
705
689
|
// Release the least recently used data
|
|
@@ -728,7 +712,7 @@ class BulkFileDataManager {
|
|
|
728
712
|
for (;;) {
|
|
729
713
|
i++;
|
|
730
714
|
const data = await reader.read();
|
|
731
|
-
if (
|
|
715
|
+
if ((data == null) || data.length === 0) {
|
|
732
716
|
break;
|
|
733
717
|
}
|
|
734
718
|
const last = (0, blockHeaderUtilities_1.validateBufferOfHeaders)(data, lastHeaderHash, 0, undefined, lastChainWork);
|
|
@@ -792,6 +776,42 @@ function bfdToInfo(bfd, keepData) {
|
|
|
792
776
|
data: keepData ? bfd.data : undefined
|
|
793
777
|
};
|
|
794
778
|
}
|
|
779
|
+
/**
|
|
780
|
+
* Drops any headers whose height is already covered by bulk storage,
|
|
781
|
+
* reducing `incrementalChainWork` accordingly (when provided).
|
|
782
|
+
*/
|
|
783
|
+
function trimAlreadyStoredHeaders(headers, nextHeight, incrementalChainWork) {
|
|
784
|
+
if (nextHeight <= 0 || headers.length === 0 || headers[0].height >= nextHeight) {
|
|
785
|
+
return { headers, incrementalChainWork };
|
|
786
|
+
}
|
|
787
|
+
// Avoid mutating the caller's array.
|
|
788
|
+
headers = [...headers];
|
|
789
|
+
while (headers.length > 0 && headers[0].height < nextHeight) {
|
|
790
|
+
const h = headers.shift();
|
|
791
|
+
if ((h != null) && incrementalChainWork) {
|
|
792
|
+
incrementalChainWork = (0, blockHeaderUtilities_1.subWork)(incrementalChainWork, (0, blockHeaderUtilities_1.convertBitsToWork)(h.bits));
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
return { headers, incrementalChainWork };
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Computes `lastChainWork` for a sequence of new bulk headers extending `lbf`,
|
|
799
|
+
* validating that the sequence is contiguous.
|
|
800
|
+
*/
|
|
801
|
+
function computeChainWorkFromHeaders(headers, lbf) {
|
|
802
|
+
let lastHeight = lbf.firstHeight + lbf.count - 1;
|
|
803
|
+
let lastHash = lbf.lastHash;
|
|
804
|
+
let lastChainWork = lbf.lastChainWork;
|
|
805
|
+
for (const h of headers) {
|
|
806
|
+
if (h.height !== lastHeight + 1 || h.previousHash !== lastHash) {
|
|
807
|
+
throw new sdk_1.WERR_INVALID_PARAMETER('headers', `an extension of existing bulk headers, header with height ${h.height} is non-sequential`);
|
|
808
|
+
}
|
|
809
|
+
lastChainWork = (0, blockHeaderUtilities_1.addWork)(lastChainWork, (0, blockHeaderUtilities_1.convertBitsToWork)(h.bits));
|
|
810
|
+
lastHeight = h.height;
|
|
811
|
+
lastHash = h.hash;
|
|
812
|
+
}
|
|
813
|
+
return lastChainWork;
|
|
814
|
+
}
|
|
795
815
|
// Re-export BulkFileDataReader for backward compatibility
|
|
796
816
|
var BulkFileDataReader_2 = require("./BulkFileDataReader");
|
|
797
817
|
Object.defineProperty(exports, "BulkFileDataReader", { enumerable: true, get: function () { return BulkFileDataReader_2.BulkFileDataReader; } });
|