@bsv/wallet-toolbox 2.12.0 → 2.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +350 -1
- package/README.md +556 -6
- package/docs/README.md +8 -1
- package/docs/client.md +13057 -4632
- package/docs/identity-verification.md +196 -0
- package/docs/monitor.md +505 -190
- package/docs/services.md +4013 -1153
- package/docs/setup.md +98 -58
- package/docs/storage.md +5780 -1609
- package/docs/sync-transfer.md +144 -0
- package/docs/wallet.md +10155 -10871
- package/out/src/CWIStyleWalletManager.d.ts +6 -8
- package/out/src/CWIStyleWalletManager.d.ts.map +1 -1
- package/out/src/CWIStyleWalletManager.js +170 -125
- package/out/src/CWIStyleWalletManager.js.map +1 -1
- package/out/src/Setup.d.ts +2 -0
- package/out/src/Setup.d.ts.map +1 -1
- package/out/src/Setup.js +3 -2
- package/out/src/Setup.js.map +1 -1
- package/out/src/ShamirWalletManager.d.ts.map +1 -1
- package/out/src/ShamirWalletManager.js +34 -19
- package/out/src/ShamirWalletManager.js.map +1 -1
- package/out/src/SimpleWalletManager.d.ts.map +1 -1
- package/out/src/SimpleWalletManager.js +7 -6
- package/out/src/SimpleWalletManager.js.map +1 -1
- package/out/src/Wallet.d.ts +50 -11
- package/out/src/Wallet.d.ts.map +1 -1
- package/out/src/Wallet.js +183 -107
- package/out/src/Wallet.js.map +1 -1
- package/out/src/WalletAuthenticationManager.d.ts.map +1 -1
- package/out/src/WalletAuthenticationManager.js +282 -26
- package/out/src/WalletAuthenticationManager.js.map +1 -1
- package/out/src/WalletLogger.js +1 -1
- package/out/src/WalletLogger.js.map +1 -1
- package/out/src/WalletPermissionsManager.d.ts +30 -17
- package/out/src/WalletPermissionsManager.d.ts.map +1 -1
- package/out/src/WalletPermissionsManager.js +540 -312
- package/out/src/WalletPermissionsManager.js.map +1 -1
- package/out/src/WalletSettingsManager.d.ts +3 -2
- package/out/src/WalletSettingsManager.d.ts.map +1 -1
- package/out/src/WalletSettingsManager.js +141 -6
- package/out/src/WalletSettingsManager.js.map +1 -1
- package/out/src/entropy/EntropyCollector.d.ts.map +1 -1
- package/out/src/entropy/EntropyCollector.js +3 -2
- package/out/src/entropy/EntropyCollector.js.map +1 -1
- package/out/src/fundWalletP2PKH.d.ts.map +1 -1
- package/out/src/fundWalletP2PKH.js +143 -44
- package/out/src/fundWalletP2PKH.js.map +1 -1
- package/out/src/mockchain/MockChainTracker.d.ts.map +1 -1
- package/out/src/mockchain/MockChainTracker.js +5 -5
- package/out/src/mockchain/MockChainTracker.js.map +1 -1
- package/out/src/mockchain/MockServices.d.ts.map +1 -1
- package/out/src/mockchain/MockServices.js +32 -8
- package/out/src/mockchain/MockServices.js.map +1 -1
- package/out/src/monitor/Monitor.d.ts +17 -0
- package/out/src/monitor/Monitor.d.ts.map +1 -1
- package/out/src/monitor/Monitor.js +206 -42
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
- package/out/src/monitor/MonitorDaemon.js +64 -16
- package/out/src/monitor/MonitorDaemon.js.map +1 -1
- package/out/src/monitor/monitorValidation.d.ts +12 -0
- package/out/src/monitor/monitorValidation.d.ts.map +1 -0
- package/out/src/monitor/monitorValidation.js +133 -0
- package/out/src/monitor/monitorValidation.js.map +1 -0
- package/out/src/monitor/tasks/TaskArcSSE.d.ts +2 -0
- package/out/src/monitor/tasks/TaskArcSSE.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskArcSSE.js +28 -12
- package/out/src/monitor/tasks/TaskArcSSE.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +5 -0
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.js +29 -24
- package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.js +11 -3
- package/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -1
- package/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskFailAbandoned.js +9 -4
- package/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.js +3 -1
- package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -1
- package/out/src/monitor/tasks/TaskReconcilePendingTransactions.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReconcilePendingTransactions.js +9 -3
- package/out/src/monitor/tasks/TaskReconcilePendingTransactions.js.map +1 -1
- package/out/src/monitor/tasks/TaskReorg.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReorg.js +4 -4
- package/out/src/monitor/tasks/TaskReorg.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.js +17 -7
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts +18 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.js +99 -21
- package/out/src/monitor/tasks/TaskReviewProvenTxs.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.d.ts +4 -4
- package/out/src/monitor/tasks/TaskReviewUtxos.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.js +41 -13
- package/out/src/monitor/tasks/TaskReviewUtxos.js.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.js +52 -11
- package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
- package/out/src/monitor/tasks/TaskUnFail.d.ts +1 -0
- package/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskUnFail.js +26 -8
- package/out/src/monitor/tasks/TaskUnFail.js.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.js +3 -2
- package/out/src/sdk/PrivilegedKeyManager.js.map +1 -1
- package/out/src/sdk/WalletErrorFromJson.d.ts.map +1 -1
- package/out/src/sdk/WalletErrorFromJson.js +112 -2
- package/out/src/sdk/WalletErrorFromJson.js.map +1 -1
- package/out/src/sdk/WalletServices.interfaces.d.ts +23 -1
- package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +49 -3
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/services/ServiceCollection.js +2 -2
- 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 +276 -110
- package/out/src/services/Services.js.map +1 -1
- package/out/src/services/chaintracker/BHServiceClient.d.ts +21 -4
- package/out/src/services/chaintracker/BHServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/BHServiceClient.js +267 -66
- package/out/src/services/chaintracker/BHServiceClient.js.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts +25 -3
- package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.js +188 -53
- package/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -1
- package/out/src/services/chaintracker/LocalChainTracker.d.ts +26 -0
- package/out/src/services/chaintracker/LocalChainTracker.d.ts.map +1 -1
- package/out/src/services/chaintracker/LocalChainTracker.js +180 -10
- package/out/src/services/chaintracker/LocalChainTracker.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.js +59 -7
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/ChaintracksApi.d.ts +6 -0
- package/out/src/services/chaintracker/chaintracks/Api/ChaintracksApi.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/ChaintracksClientApi.d.ts +7 -0
- package/out/src/services/chaintracker/chaintracks/Api/ChaintracksClientApi.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/ChaintracksFetchApi.d.ts +2 -0
- package/out/src/services/chaintracker/chaintracks/Api/ChaintracksFetchApi.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/ChaintracksStorageApi.d.ts +9 -0
- package/out/src/services/chaintracker/chaintracks/Api/ChaintracksStorageApi.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts +19 -0
- package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js +237 -61
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksService.d.ts +16 -0
- package/out/src/services/chaintracker/chaintracks/ChaintracksService.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksService.js +150 -26
- package/out/src/services/chaintracker/chaintracks/ChaintracksService.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts +30 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +346 -30
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.d.ts +32 -1
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.js +375 -43
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.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 +28 -3
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.js +33 -9
- 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/BulkIngestorChaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorChaintracks.js +4 -2
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorChaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.d.ts +2 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js +17 -4
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.d.ts +2 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.js +40 -20
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.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 +14 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.d.ts +6 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.js +56 -9
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.js +6 -3
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts +4 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js +27 -9
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.d.ts +8 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.js +49 -5
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js +90 -21
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts +3 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js +185 -38
- 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 +59 -6
- package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.d.ts +2 -0
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.js +89 -39
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts +10 -0
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js +225 -24
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.d.ts +2 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js +265 -96
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts +3 -0
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js +225 -86
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts +3 -0
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js +121 -35
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.js +2 -2
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.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/createDefaultKnexChaintracksOptions.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.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 +1 -7
- package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.js +1 -7
- package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.js +1 -7
- package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataCacheFs.d.ts +18 -0
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataCacheFs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataCacheFs.js +204 -14
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataCacheFs.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 +486 -82
- 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 +17 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataValidator.worker.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataValidator.worker.js +12 -2
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataValidator.worker.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 +99 -30
- package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts +1 -0
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js +23 -15
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts +7 -0
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js +90 -24
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.d.ts +2 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.js +57 -11
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/DurableFileBulkFileDownloadBudget.d.ts +9 -0
- package/out/src/services/chaintracker/chaintracks/util/DurableFileBulkFileDownloadBudget.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/DurableFileBulkFileDownloadBudget.js +100 -14
- package/out/src/services/chaintracker/chaintracks/util/DurableFileBulkFileDownloadBudget.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.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.d.ts +2 -0
- package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.js +104 -8
- package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/NodeBulkFileDataValidator.d.ts +1 -0
- package/out/src/services/chaintracker/chaintracks/util/NodeBulkFileDataValidator.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/NodeBulkFileDataValidator.js +79 -15
- package/out/src/services/chaintracker/chaintracks/util/NodeBulkFileDataValidator.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts +3 -0
- package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.js +15 -0
- package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts +6 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js +311 -93
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/safeDiagnostic.d.ts +4 -0
- package/out/src/services/chaintracker/chaintracks/util/safeDiagnostic.d.ts.map +1 -0
- package/out/src/services/chaintracker/chaintracks/util/safeDiagnostic.js +33 -0
- package/out/src/services/chaintracker/chaintracks/util/safeDiagnostic.js.map +1 -0
- package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.js.map +1 -1
- package/out/src/services/classifyOutputUtxo.d.ts.map +1 -1
- package/out/src/services/classifyOutputUtxo.js +19 -10
- package/out/src/services/classifyOutputUtxo.js.map +1 -1
- package/out/src/services/fiatRateValidation.d.ts +12 -0
- package/out/src/services/fiatRateValidation.d.ts.map +1 -0
- package/out/src/services/fiatRateValidation.js +138 -0
- package/out/src/services/fiatRateValidation.js.map +1 -0
- package/out/src/services/getCanonicalMerklePath.d.ts +15 -0
- package/out/src/services/getCanonicalMerklePath.d.ts.map +1 -0
- package/out/src/services/getCanonicalMerklePath.js +90 -0
- package/out/src/services/getCanonicalMerklePath.js.map +1 -0
- package/out/src/services/providers/ARC.d.ts +3 -16
- package/out/src/services/providers/ARC.d.ts.map +1 -1
- package/out/src/services/providers/ARC.js +36 -37
- package/out/src/services/providers/ARC.js.map +1 -1
- package/out/src/services/providers/ArcSSEClient.d.ts +25 -19
- package/out/src/services/providers/ArcSSEClient.d.ts.map +1 -1
- package/out/src/services/providers/ArcSSEClient.js +352 -85
- package/out/src/services/providers/ArcSSEClient.js.map +1 -1
- package/out/src/services/providers/Arcade.d.ts +1 -0
- package/out/src/services/providers/Arcade.d.ts.map +1 -1
- package/out/src/services/providers/Arcade.js +56 -41
- package/out/src/services/providers/Arcade.js.map +1 -1
- package/out/src/services/providers/Bitails.d.ts +3 -0
- package/out/src/services/providers/Bitails.d.ts.map +1 -1
- package/out/src/services/providers/Bitails.js +79 -12
- package/out/src/services/providers/Bitails.js.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.d.ts +8 -2
- package/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.js +83 -10
- package/out/src/services/providers/SdkWhatsOnChain.js.map +1 -1
- package/out/src/services/providers/WhatsOnChain.d.ts +3 -0
- package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/WhatsOnChain.js +221 -69
- package/out/src/services/providers/WhatsOnChain.js.map +1 -1
- package/out/src/services/providers/arcProviderConfig.d.ts +27 -0
- package/out/src/services/providers/arcProviderConfig.d.ts.map +1 -0
- package/out/src/services/providers/arcProviderConfig.js +83 -0
- package/out/src/services/providers/arcProviderConfig.js.map +1 -0
- package/out/src/services/providers/arcTxDataValidation.d.ts +4 -0
- package/out/src/services/providers/arcTxDataValidation.d.ts.map +1 -0
- package/out/src/services/providers/arcTxDataValidation.js +92 -0
- package/out/src/services/providers/arcTxDataValidation.js.map +1 -0
- package/out/src/services/providers/exchangeRates.d.ts +3 -3
- package/out/src/services/providers/exchangeRates.d.ts.map +1 -1
- package/out/src/services/providers/exchangeRates.js +153 -226
- package/out/src/services/providers/exchangeRates.js.map +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 +2 -2
- package/out/src/services/providers/whatsOnChainHelpers.d.ts.map +1 -1
- package/out/src/services/providers/whatsOnChainHelpers.js +11 -8
- package/out/src/services/providers/whatsOnChainHelpers.js.map +1 -1
- package/out/src/services/validateMerklePathResult.d.ts +30 -0
- package/out/src/services/validateMerklePathResult.d.ts.map +1 -0
- package/out/src/services/validateMerklePathResult.js +272 -0
- package/out/src/services/validateMerklePathResult.js.map +1 -0
- package/out/src/services/validatePostBeefResult.d.ts +17 -0
- package/out/src/services/validatePostBeefResult.d.ts.map +1 -0
- package/out/src/services/validatePostBeefResult.js +334 -0
- package/out/src/services/validatePostBeefResult.js.map +1 -0
- package/out/src/services/validateRawTxResult.d.ts +6 -0
- package/out/src/services/validateRawTxResult.d.ts.map +1 -0
- package/out/src/services/validateRawTxResult.js +77 -0
- package/out/src/services/validateRawTxResult.js.map +1 -0
- package/out/src/services/validateScriptHashHistoryResult.d.ts +5 -0
- package/out/src/services/validateScriptHashHistoryResult.d.ts.map +1 -0
- package/out/src/services/validateScriptHashHistoryResult.js +99 -0
- package/out/src/services/validateScriptHashHistoryResult.js.map +1 -0
- package/out/src/services/validateStatusForTxidsResult.d.ts +8 -0
- package/out/src/services/validateStatusForTxidsResult.d.ts.map +1 -0
- package/out/src/services/validateStatusForTxidsResult.js +181 -0
- package/out/src/services/validateStatusForTxidsResult.js.map +1 -0
- package/out/src/services/validateUtxoStatusResult.d.ts +6 -0
- package/out/src/services/validateUtxoStatusResult.d.ts.map +1 -0
- package/out/src/services/validateUtxoStatusResult.js +126 -0
- package/out/src/services/validateUtxoStatusResult.js.map +1 -0
- package/out/src/signer/actionBatch/ActionBatchPlanner.d.ts +3 -2
- package/out/src/signer/actionBatch/ActionBatchPlanner.d.ts.map +1 -1
- package/out/src/signer/actionBatch/ActionBatchPlanner.js +4 -3
- package/out/src/signer/actionBatch/ActionBatchPlanner.js.map +1 -1
- package/out/src/signer/actionBatch/ActionBatchWorkspace.d.ts +6 -5
- package/out/src/signer/actionBatch/ActionBatchWorkspace.d.ts.map +1 -1
- package/out/src/signer/actionBatch/ActionBatchWorkspace.js +70 -76
- package/out/src/signer/actionBatch/ActionBatchWorkspace.js.map +1 -1
- package/out/src/signer/actionBatch/actionBatchBootstrap.d.ts +2 -2
- package/out/src/signer/actionBatch/actionBatchBootstrap.d.ts.map +1 -1
- package/out/src/signer/actionBatch/actionBatchBootstrap.js +3 -3
- package/out/src/signer/actionBatch/actionBatchBootstrap.js.map +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.d.ts +3 -2
- package/out/src/signer/methods/acquireDirectCertificate.d.ts.map +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
- package/out/src/signer/methods/buildSignableTransaction.d.ts +6 -5
- package/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -1
- package/out/src/signer/methods/buildSignableTransaction.js +6 -11
- package/out/src/signer/methods/buildSignableTransaction.js.map +1 -1
- package/out/src/signer/methods/createAction.d.ts +4 -3
- package/out/src/signer/methods/createAction.d.ts.map +1 -1
- package/out/src/signer/methods/createAction.js +4 -2
- package/out/src/signer/methods/createAction.js.map +1 -1
- package/out/src/signer/methods/createNoSendExpiryAction.d.ts +3 -3
- package/out/src/signer/methods/createNoSendExpiryAction.d.ts.map +1 -1
- package/out/src/signer/methods/createNoSendExpiryAction.js +9 -4
- package/out/src/signer/methods/createNoSendExpiryAction.js.map +1 -1
- package/out/src/signer/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/signer/methods/internalizeAction.js +2 -2
- package/out/src/signer/methods/internalizeAction.js.map +1 -1
- package/out/src/signer/methods/proveCertificate.d.ts +3 -2
- package/out/src/signer/methods/proveCertificate.d.ts.map +1 -1
- package/out/src/signer/methods/proveCertificate.js.map +1 -1
- package/out/src/signer/methods/signAction.d.ts.map +1 -1
- package/out/src/signer/methods/signAction.js +3 -2
- package/out/src/signer/methods/signAction.js.map +1 -1
- package/out/src/signer/methods/verifyUnlockScripts.d.ts.map +1 -1
- package/out/src/signer/methods/verifyUnlockScripts.js +12 -17
- package/out/src/signer/methods/verifyUnlockScripts.js.map +1 -1
- package/out/src/storage/StorageIdb.d.ts +6 -3
- package/out/src/storage/StorageIdb.d.ts.map +1 -1
- package/out/src/storage/StorageIdb.js +70 -42
- package/out/src/storage/StorageIdb.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +8 -4
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +185 -92
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts +19 -9
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +237 -138
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/StorageReader.d.ts +7 -1
- package/out/src/storage/StorageReader.d.ts.map +1 -1
- package/out/src/storage/StorageReader.js +17 -42
- package/out/src/storage/StorageReader.js.map +1 -1
- package/out/src/storage/StorageReaderWriter.d.ts +2 -0
- package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/out/src/storage/StorageReaderWriter.js +63 -38
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/out/src/storage/StorageSyncReader.d.ts +1 -1
- package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
- package/out/src/storage/StorageSyncReader.js +3 -36
- package/out/src/storage/StorageSyncReader.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts +9 -7
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +71 -65
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/adminServer/adminServer.d.ts +1 -1
- package/out/src/storage/adminServer/adminServer.d.ts.map +1 -1
- package/out/src/storage/adminServer/adminServer.js +16 -44
- package/out/src/storage/adminServer/adminServer.js.map +1 -1
- package/out/src/storage/methods/ListActionsSpecOp.d.ts +2 -2
- package/out/src/storage/methods/ListActionsSpecOp.d.ts.map +1 -1
- package/out/src/storage/methods/ListActionsSpecOp.js.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.d.ts +7 -4
- package/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.js +1 -0
- package/out/src/storage/methods/ListOutputsSpecOp.js.map +1 -1
- package/out/src/storage/methods/actionBatch.d.ts.map +1 -1
- package/out/src/storage/methods/actionBatch.js +3 -2
- package/out/src/storage/methods/actionBatch.js.map +1 -1
- package/out/src/storage/methods/actionBatchBlobs.d.ts +2 -0
- package/out/src/storage/methods/actionBatchBlobs.d.ts.map +1 -1
- package/out/src/storage/methods/actionBatchBlobs.js +40 -22
- package/out/src/storage/methods/actionBatchBlobs.js.map +1 -1
- package/out/src/storage/methods/actionBatchValidation.d.ts.map +1 -1
- package/out/src/storage/methods/actionBatchValidation.js +22 -30
- package/out/src/storage/methods/actionBatchValidation.js.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +7 -2
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js +57 -44
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
- package/out/src/storage/methods/createAction.d.ts +7 -6
- package/out/src/storage/methods/createAction.d.ts.map +1 -1
- package/out/src/storage/methods/createAction.js +7 -5
- 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 +12 -11
- package/out/src/storage/methods/generateChange.js.map +1 -1
- package/out/src/storage/methods/getBeefForTransaction.js +5 -7
- 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 +42 -11
- package/out/src/storage/methods/getSyncChunk.js.map +1 -1
- package/out/src/storage/methods/internalizeAction.d.ts +3 -3
- package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/storage/methods/internalizeAction.js +134 -129
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/methods/listActionsIdb.d.ts +3 -2
- package/out/src/storage/methods/listActionsIdb.d.ts.map +1 -1
- package/out/src/storage/methods/listActionsIdb.js +2 -2
- package/out/src/storage/methods/listActionsIdb.js.map +1 -1
- package/out/src/storage/methods/listActionsKnex.d.ts +3 -2
- package/out/src/storage/methods/listActionsKnex.d.ts.map +1 -1
- package/out/src/storage/methods/listActionsKnex.js +10 -9
- package/out/src/storage/methods/listActionsKnex.js.map +1 -1
- package/out/src/storage/methods/listCertificates.d.ts +3 -2
- package/out/src/storage/methods/listCertificates.d.ts.map +1 -1
- package/out/src/storage/methods/listCertificates.js.map +1 -1
- package/out/src/storage/methods/listOutputsIdb.d.ts +3 -2
- package/out/src/storage/methods/listOutputsIdb.d.ts.map +1 -1
- package/out/src/storage/methods/listOutputsIdb.js +11 -11
- package/out/src/storage/methods/listOutputsIdb.js.map +1 -1
- package/out/src/storage/methods/listOutputsKnex.d.ts +3 -2
- package/out/src/storage/methods/listOutputsKnex.d.ts.map +1 -1
- package/out/src/storage/methods/listOutputsKnex.js +15 -23
- package/out/src/storage/methods/listOutputsKnex.js.map +1 -1
- package/out/src/storage/methods/noSendExpiry.d.ts +3 -3
- package/out/src/storage/methods/noSendExpiry.d.ts.map +1 -1
- package/out/src/storage/methods/noSendExpiry.js +10 -8
- package/out/src/storage/methods/noSendExpiry.js.map +1 -1
- package/out/src/storage/methods/preparedBeef.d.ts.map +1 -1
- package/out/src/storage/methods/preparedBeef.js +13 -14
- package/out/src/storage/methods/preparedBeef.js.map +1 -1
- package/out/src/storage/methods/processAction.d.ts.map +1 -1
- package/out/src/storage/methods/processAction.js +37 -6
- package/out/src/storage/methods/processAction.js.map +1 -1
- package/out/src/storage/methods/reconcileFailedTransactionInputs.d.ts +1 -1
- package/out/src/storage/methods/reconcileFailedTransactionInputs.d.ts.map +1 -1
- package/out/src/storage/methods/reconcileFailedTransactionInputs.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/reviewUtxoOutputs.d.ts +1 -0
- package/out/src/storage/methods/reviewUtxoOutputs.d.ts.map +1 -1
- package/out/src/storage/methods/reviewUtxoOutputs.js +51 -4
- package/out/src/storage/methods/reviewUtxoOutputs.js.map +1 -1
- package/out/src/storage/methods/validateSyncProof.d.ts +10 -2
- package/out/src/storage/methods/validateSyncProof.d.ts.map +1 -1
- package/out/src/storage/methods/validateSyncProof.js +27 -4
- package/out/src/storage/methods/validateSyncProof.js.map +1 -1
- package/out/src/storage/portable/index.d.ts.map +1 -1
- package/out/src/storage/portable/index.js +21 -13
- package/out/src/storage/portable/index.js.map +1 -1
- package/out/src/storage/remoting/BinaryJson.d.ts +11 -0
- package/out/src/storage/remoting/BinaryJson.d.ts.map +1 -1
- package/out/src/storage/remoting/BinaryJson.js +94 -8
- package/out/src/storage/remoting/BinaryJson.js.map +1 -1
- package/out/src/storage/remoting/KnexSessionManager.d.ts +26 -2
- package/out/src/storage/remoting/KnexSessionManager.d.ts.map +1 -1
- package/out/src/storage/remoting/KnexSessionManager.js +222 -30
- package/out/src/storage/remoting/KnexSessionManager.js.map +1 -1
- package/out/src/storage/remoting/KnexSyncTransferStore.d.ts +26 -0
- package/out/src/storage/remoting/KnexSyncTransferStore.d.ts.map +1 -0
- package/out/src/storage/remoting/KnexSyncTransferStore.js +222 -0
- package/out/src/storage/remoting/KnexSyncTransferStore.js.map +1 -0
- package/out/src/storage/remoting/StorageClient.d.ts +6 -1
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js +65 -8
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/storage/remoting/StorageClientBase.d.ts +53 -10
- package/out/src/storage/remoting/StorageClientBase.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClientBase.js +304 -9
- package/out/src/storage/remoting/StorageClientBase.js.map +1 -1
- package/out/src/storage/remoting/StorageMobile.d.ts +5 -0
- package/out/src/storage/remoting/StorageMobile.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageMobile.js +13 -11
- package/out/src/storage/remoting/StorageMobile.js.map +1 -1
- package/out/src/storage/remoting/StorageServer.d.ts +10 -1
- package/out/src/storage/remoting/StorageServer.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageServer.js +206 -21
- package/out/src/storage/remoting/StorageServer.js.map +1 -1
- package/out/src/storage/remoting/SyncTransfer.d.ts +29 -0
- package/out/src/storage/remoting/SyncTransfer.d.ts.map +1 -0
- package/out/src/storage/remoting/SyncTransfer.js +153 -0
- package/out/src/storage/remoting/SyncTransfer.js.map +1 -0
- package/out/src/storage/remoting/entityValidationHelpers.d.ts.map +1 -1
- package/out/src/storage/remoting/entityValidationHelpers.js +35 -0
- package/out/src/storage/remoting/entityValidationHelpers.js.map +1 -1
- package/out/src/storage/remoting/syncChunkBinary.d.ts +4 -0
- package/out/src/storage/remoting/syncChunkBinary.d.ts.map +1 -0
- package/out/src/storage/remoting/syncChunkBinary.js +38 -0
- package/out/src/storage/remoting/syncChunkBinary.js.map +1 -0
- package/out/src/storage/remoting/validateRpcSyncProofs.d.ts +5 -0
- package/out/src/storage/remoting/validateRpcSyncProofs.d.ts.map +1 -0
- package/out/src/storage/remoting/validateRpcSyncProofs.js +82 -0
- package/out/src/storage/remoting/validateRpcSyncProofs.js.map +1 -0
- package/out/src/storage/schema/KnexMigrations.d.ts +3 -0
- package/out/src/storage/schema/KnexMigrations.d.ts.map +1 -1
- package/out/src/storage/schema/KnexMigrations.js +89 -2
- package/out/src/storage/schema/KnexMigrations.js.map +1 -1
- package/out/src/storage/schema/StorageIdbSchema.d.ts +1 -0
- package/out/src/storage/schema/StorageIdbSchema.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutput.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutput.js +11 -4
- package/out/src/storage/schema/entities/EntityOutput.js.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTx.d.ts +2 -1
- package/out/src/storage/schema/entities/EntityProvenTx.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTx.js +95 -41
- package/out/src/storage/schema/entities/EntityProvenTx.js.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTxReq.js +1 -1
- package/out/src/storage/schema/entities/EntityProvenTxReq.js.map +1 -1
- package/out/src/storage/schema/entities/EntitySyncState.d.ts +3 -1
- package/out/src/storage/schema/entities/EntitySyncState.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntitySyncState.js +7 -1
- package/out/src/storage/schema/entities/EntitySyncState.js.map +1 -1
- package/out/src/storage/schema/tables/TableCertificate.d.ts +1 -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/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/TableOutput.d.ts +1 -1
- package/out/src/storage/schema/tables/TableOutput.d.ts.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 +1 -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/TableTransaction.js.map +1 -1
- 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/sync/StorageMySQLDojoReader.d.ts.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.js +8 -7
- package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
- package/out/src/storage/sync/SyncPageBudget.d.ts +8 -0
- package/out/src/storage/sync/SyncPageBudget.d.ts.map +1 -0
- package/out/src/storage/sync/SyncPageBudget.js +24 -0
- package/out/src/storage/sync/SyncPageBudget.js.map +1 -0
- package/out/src/storage/sync/syncCheckpoint.d.ts +4 -0
- package/out/src/storage/sync/syncCheckpoint.d.ts.map +1 -0
- package/out/src/storage/sync/syncCheckpoint.js +49 -0
- package/out/src/storage/sync/syncCheckpoint.js.map +1 -0
- package/out/src/utility/actionBatchDigest.d.ts.map +1 -1
- package/out/src/utility/actionBatchDigest.js +9 -7
- package/out/src/utility/actionBatchDigest.js.map +1 -1
- package/out/src/utility/actionBatchPack.d.ts.map +1 -1
- package/out/src/utility/actionBatchPack.js +7 -12
- package/out/src/utility/actionBatchPack.js.map +1 -1
- package/out/src/utility/brc153ReferenceLabels.d.ts.map +1 -1
- package/out/src/utility/brc153ReferenceLabels.js +4 -4
- package/out/src/utility/brc153ReferenceLabels.js.map +1 -1
- package/out/src/utility/brc177NoSendExpiry.d.ts +2 -2
- package/out/src/utility/brc177NoSendExpiry.d.ts.map +1 -1
- package/out/src/utility/canonicalizeAtomicBeef.js +2 -2
- package/out/src/utility/canonicalizeAtomicBeef.js.map +1 -1
- package/out/src/utility/exactActionSpend.d.ts +11 -0
- package/out/src/utility/exactActionSpend.d.ts.map +1 -0
- package/out/src/utility/exactActionSpend.js +11 -0
- package/out/src/utility/exactActionSpend.js.map +1 -0
- package/out/src/utility/identityUtils.d.ts +44 -4
- package/out/src/utility/identityUtils.d.ts.map +1 -1
- package/out/src/utility/identityUtils.js +376 -61
- package/out/src/utility/identityUtils.js.map +1 -1
- package/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -1
- package/out/src/utility/parseTxScriptOffsets.js +1 -19
- package/out/src/utility/parseTxScriptOffsets.js.map +1 -1
- package/out/src/utility/tscProofToMerklePath.d.ts.map +1 -1
- package/out/src/utility/tscProofToMerklePath.js +35 -4
- package/out/src/utility/tscProofToMerklePath.js.map +1 -1
- package/out/src/utility/utilityHelpers.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.js +8 -6
- package/out/src/utility/utilityHelpers.js.map +1 -1
- package/out/src/utility/utilityHelpers.noBuffer.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.noBuffer.js +6 -6
- package/out/src/utility/utilityHelpers.noBuffer.js.map +1 -1
- package/out/src/utility/verifyOverlayOutput.d.ts +12 -0
- package/out/src/utility/verifyOverlayOutput.d.ts.map +1 -0
- package/out/src/utility/verifyOverlayOutput.js +22 -0
- package/out/src/utility/verifyOverlayOutput.js.map +1 -0
- package/out/src/utility/walletResultGuards.d.ts +14 -0
- package/out/src/utility/walletResultGuards.d.ts.map +1 -0
- package/out/src/utility/walletResultGuards.js +28 -0
- package/out/src/utility/walletResultGuards.js.map +1 -0
- package/out/src/wab-client/WABClient.d.ts +3 -17
- package/out/src/wab-client/WABClient.d.ts.map +1 -1
- package/out/src/wab-client/WABClient.js +30 -14
- package/out/src/wab-client/WABClient.js.map +1 -1
- package/out/src/wab-client/WABResponseValidation.d.ts +48 -0
- package/out/src/wab-client/WABResponseValidation.d.ts.map +1 -0
- package/out/src/wab-client/WABResponseValidation.js +321 -0
- package/out/src/wab-client/WABResponseValidation.js.map +1 -0
- 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 -2
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -1
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -6,12 +6,109 @@
|
|
|
6
6
|
|
|
7
7
|
A [BRC-100](https://github.com/bitcoin-sv/BRCs/blob/master/wallet/0100.md) conforming wallet implementation for the BSV blockchain, built on the [BSV SDK](https://bsv-blockchain.github.io/ts-stack/packages/sdk/). Provides persistent storage, protocol-based key derivation, transaction monitoring, chain tracking, and signing — everything needed to build wallet-powered applications on BSV.
|
|
8
8
|
|
|
9
|
+
## Backup and sync: tested results
|
|
10
|
+
|
|
11
|
+
**Live E2E testing used a large wallet in the native desktop client**, covering
|
|
12
|
+
complete local copies, restart recovery, and repeat sync. Transfer size and oversized-record recovery were
|
|
13
|
+
measured separately with synthetic fixtures. The latest proof-recovery follow-up
|
|
14
|
+
has synthetic HTTP and read-only source-data validation; its live full-backup
|
|
15
|
+
retest is pending.
|
|
16
|
+
|
|
17
|
+
| Test | Verified result |
|
|
18
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| Full native desktop restores | **Two complete copies; identical entity counts.** Second run: **12m 50s vs 16m 30s (22.3% less time)**. |
|
|
20
|
+
| Retained local backup | Completed after cancellation, a connectivity pause, and restart recovery; all **12 entity-store counts preserved** on another restart. |
|
|
21
|
+
| Local reads and repeat sync | Transaction/output reads passed; sampled transaction bytes matched; repeat sync made **0 inserts, 0 updates**. |
|
|
22
|
+
| Transfer size | **62.7% smaller** encoded byte payload in a synthetic fixture. |
|
|
23
|
+
| Oversized single record | **7 MiB restored in real browser IndexedDB**, matching SHA-256; interrupted upload resumed, corrupt download rejected, repeat sync unchanged. |
|
|
24
|
+
| Automated integration | Authenticated HTTP backup/restore, interrupted pages, lost acknowledgements, binary byte round-trips, user isolation, and legacy compatibility covered. |
|
|
25
|
+
|
|
26
|
+
Timing compares successive candidates, not a controlled comparison against upstream
|
|
27
|
+
`main`. Byte verification was sampled, not database-wide. See
|
|
28
|
+
[test methods and limits](#sync-performance-and-recovery) for details.
|
|
29
|
+
|
|
30
|
+
### SQLite migration recovery
|
|
31
|
+
|
|
32
|
+
The unpublished 2.13.2 candidate runs SQLite migration DDL and the migration
|
|
33
|
+
journal update transactionally. Foreign-key enforcement is disabled before the
|
|
34
|
+
migration transaction for table rebuilds and restored after success or failure.
|
|
35
|
+
Failed migrations can be retried after reopening the database without partial
|
|
36
|
+
schema objects from that attempt. MySQL's existing transaction configuration
|
|
37
|
+
is unchanged.
|
|
38
|
+
|
|
39
|
+
This prevents future partial migrations. It does not automatically repair a
|
|
40
|
+
store already left with unjournaled schema objects by an older version. Preserve
|
|
41
|
+
the database and verified backups and reconcile the exact schema and migration
|
|
42
|
+
journal before recovery; do not delete journal rows or wallet data blindly.
|
|
43
|
+
|
|
9
44
|
## Overview
|
|
10
45
|
|
|
11
46
|
The Wallet Toolbox is the reference implementation of the BRC-100 wallet interface. It connects the BSV SDK's cryptographic primitives to real storage backends, network services, and signing flows so that application developers don't have to wire these layers together themselves.
|
|
12
47
|
|
|
13
48
|
BSV Desktop and BSV Browser are the BSV Association reference wallet applications built around this interface. Vendor distributions, including Babbage's Metanet Desktop / Metanet Explorer and Hudos Browser, can implement the same BRC-100 interface against their own product packaging and service defaults.
|
|
14
49
|
|
|
50
|
+
### Local contact trust
|
|
51
|
+
|
|
52
|
+
Applications may install a `ContactSource` on `WalletArgs` to resolve identities from the user's
|
|
53
|
+
local contacts before querying the certificate overlay. Installing that source is an explicit
|
|
54
|
+
personal trust-policy decision: a saved contact is locally authoritative in the same sense as a
|
|
55
|
+
self-signed certificate or locally installed trust anchor. Its default infinite trust means “the
|
|
56
|
+
user's independent validation overrides third-party trust thresholds,” not “an external certifier
|
|
57
|
+
proved this identity.”
|
|
58
|
+
|
|
59
|
+
The authority is scoped to the wallet user who saved the identity-key association and to that
|
|
60
|
+
wallet's local labels and metadata. Authentication or encryption of the contact store proves that
|
|
61
|
+
the wallet retained the user's decision; it does not independently prove the real-world identity,
|
|
62
|
+
and the infinite-trust value must not be exported as a universal claim for other users.
|
|
63
|
+
|
|
64
|
+
Contact results retain the discovery result shape for compatibility, but default to type `contact`
|
|
65
|
+
and carry empty serial, signature, and revocation-outpoint fields. Consumers must not present those
|
|
66
|
+
fields as third-party certification. Connect `ContactSource` only to local, authenticated storage
|
|
67
|
+
whose records the user has deliberately saved or validated; never populate it directly from
|
|
68
|
+
unauthenticated network data. Pass `forceRefresh: true` to identity discovery when the application
|
|
69
|
+
specifically needs to bypass local contact authority and query the overlay.
|
|
70
|
+
|
|
71
|
+
### Fiat exchange-rate trust boundary
|
|
72
|
+
|
|
73
|
+
Wallet Toolbox treats exchange-rate providers and custom service adapters as
|
|
74
|
+
untrusted financial inputs. Rates must use the supported currency codes, be
|
|
75
|
+
finite, positive, and bounded, use USD base with an exact USD rate of 1, and
|
|
76
|
+
carry a valid timestamp no more than five minutes in the future. Malformed or
|
|
77
|
+
missing requested rates are never merged into the wallet cache.
|
|
78
|
+
|
|
79
|
+
The default provider transport accepts only credential-free public HTTPS,
|
|
80
|
+
pins validated DNS answers in Node.js, rejects redirects and private/special
|
|
81
|
+
addresses, and enforces a 15-second deadline plus a 256 KiB response limit.
|
|
82
|
+
`fiatExchangeRatesFetch` is an explicitly trusted escape hatch for tests or
|
|
83
|
+
controlled local development; production applications should retain the
|
|
84
|
+
default transport.
|
|
85
|
+
|
|
86
|
+
### ARC and Arcade provider configuration
|
|
87
|
+
|
|
88
|
+
ARC-compatible broadcaster configuration is snapshotted when the provider is
|
|
89
|
+
constructed. API keys, callback tokens, deployment IDs, callback URLs, and
|
|
90
|
+
custom headers therefore keep the exact reviewed values even if the caller
|
|
91
|
+
later mutates its configuration object. Custom headers must be a plain
|
|
92
|
+
accessor-free own-data map with valid HTTP token names and bounded string
|
|
93
|
+
values; inherited fields and getters are rejected without being used.
|
|
94
|
+
|
|
95
|
+
The provider URL and an injected `httpClient` remain explicit application or
|
|
96
|
+
operator trust decisions. Do not derive them from transaction, peer, or other
|
|
97
|
+
untrusted input. Reconstruct the provider to rotate credentials or headers;
|
|
98
|
+
mutating the original configuration object does not change a live provider.
|
|
99
|
+
|
|
100
|
+
### Importing legacy P2PKH outputs
|
|
101
|
+
|
|
102
|
+
`Setup.fundWalletFromP2PKHOutpoints` and its client equivalent validate each
|
|
103
|
+
canonical outpoint, fetched transaction ID, P2PKH ownership script, atomic
|
|
104
|
+
signing target, and final wallet transaction before reporting success. Provider
|
|
105
|
+
downloads are deadline-bound, redirect-free, and size-bounded; recursive BEEF
|
|
106
|
+
construction also limits depth, graph size, aggregate source bytes, and the
|
|
107
|
+
number of requested outpoints. If an application already has authenticated
|
|
108
|
+
BEEF, pass it explicitly to avoid relying on public transaction-data services.
|
|
109
|
+
Do not accept a wallet result that omits the transaction bytes needed for this
|
|
110
|
+
binding.
|
|
111
|
+
|
|
15
112
|
### What's Inside
|
|
16
113
|
|
|
17
114
|
| Module | Description |
|
|
@@ -31,6 +128,19 @@ broadcast, so permission approval does not inherit network-broadcast latency.
|
|
|
31
128
|
The funding planner prefers settled change and uses queued permission ancestry
|
|
32
129
|
only as a last resort, keeping the application path fast without hiding funds.
|
|
33
130
|
|
|
131
|
+
Permission-token basket membership and tags are discovery hints, not authority.
|
|
132
|
+
Before using a stored token, the manager binds it to its exact BEEF outpoint and
|
|
133
|
+
one-satoshi output, verifies the canonical PushDrop field signature and locally
|
|
134
|
+
derived locking key, strictly decodes every signed grant field, and rechecks the
|
|
135
|
+
requested filters against that signed content. Unsigned, foreign-wallet,
|
|
136
|
+
substituted, malformed, or mislabeled rows grant no permission. Token issuance,
|
|
137
|
+
renewal, coalescing, and revocation also bind every requested input and output to
|
|
138
|
+
the final wallet transaction; a partial-action reference never authorizes a
|
|
139
|
+
different transaction. When the underlying Wallet Toolbox signer adds a storage
|
|
140
|
+
service charge, its exact wallet-funded amount is carried locally into the
|
|
141
|
+
spending check so the charge is visible and counted in authorization. This
|
|
142
|
+
metadata is deliberately not a BRC-100 wire extension.
|
|
143
|
+
|
|
34
144
|
Permission modules may transform calls with `onRequest` and `onResponse`, or
|
|
35
145
|
own a P-scheme's semantics with the optional `handleRequest(request, next)`
|
|
36
146
|
hook. A semantic handler can return the normal BRC-100 result directly; if it
|
|
@@ -46,6 +156,19 @@ serialized BEEF plus transaction bytes; queued ancestry is used only when it is
|
|
|
46
156
|
necessary or smaller. Pending change is never withheld, so queued
|
|
47
157
|
work cannot strand the balance behind a large reserved input.
|
|
48
158
|
|
|
159
|
+
`sendWith` transaction IDs form one atomic broadcast set: the wallet never
|
|
160
|
+
silently slices that set into separately submitted groups. A set is limited to
|
|
161
|
+
1,000 unique transactions, including a transaction created or signed by the
|
|
162
|
+
current call. Oversized or noncanonical requests are rejected before storage
|
|
163
|
+
commit. The background monitor bounds both discovery and re-expansion of older
|
|
164
|
+
queued batches; an oversized legacy batch is skipped as a whole and reported
|
|
165
|
+
for operator recovery rather than partially broadcast.
|
|
166
|
+
|
|
167
|
+
`Setup.makeEnv()` returns a development `.env` template containing newly
|
|
168
|
+
generated private keys but never prints it. Callers must deliberately write the
|
|
169
|
+
returned text to a protected local file and must not route it through ordinary
|
|
170
|
+
application, CI, or shared terminal logs.
|
|
171
|
+
|
|
49
172
|
### Packages
|
|
50
173
|
|
|
51
174
|
The toolbox publishes three npm packages from this repo:
|
|
@@ -54,10 +177,155 @@ The toolbox publishes three npm packages from this repo:
|
|
|
54
177
|
- **[`@bsv/wallet-toolbox-client`](https://www.npmjs.com/package/@bsv/wallet-toolbox-client)** — Browser build; excludes Node-only backends (Knex/SQLite/MySQL)
|
|
55
178
|
- **[`@bsv/wallet-toolbox-mobile`](https://www.npmjs.com/package/@bsv/wallet-toolbox-mobile)** — Mobile build; remote wallet storage plus portable local ChainTracks components and adapter contracts
|
|
56
179
|
|
|
180
|
+
### Sync performance and recovery
|
|
181
|
+
|
|
182
|
+
Sync pages start at 64 records and adapt after successful commits toward a
|
|
183
|
+
five-second page budget. Proof-bearing pages cap growth at 128 records; cheap
|
|
184
|
+
metadata pages can grow to 1,000, while provider byte/item ceilings still apply.
|
|
185
|
+
The server checks at most eight proofs concurrently and waits for all started
|
|
186
|
+
checks to settle on failure before rejecting the page. Every proof still passes
|
|
187
|
+
transaction, Merkle path, active-root and active-header validation before a merge.
|
|
188
|
+
An authenticated HTTP regression covers 250 synthetic proofs and confirms that
|
|
189
|
+
an invalid follow-up page cannot change the committed checkpoint. Stale proofs
|
|
190
|
+
can be reconciled through another provider, but only after the replacement passes
|
|
191
|
+
the same transaction, membership and active-chain checks. Transaction bytes,
|
|
192
|
+
wallet references and source cursor timestamps are preserved. Corrected destination
|
|
193
|
+
proofs receive a fresh local timestamp for incremental replication. Unverifiable replacements
|
|
194
|
+
stop the page with a recovery message; no record is silently skipped.
|
|
195
|
+
|
|
196
|
+
A read-only deployment-host sample of 250 proofs took 42.6 seconds with sequential
|
|
197
|
+
validation and 5.58 seconds with bounded concurrency, with the same 250 root and
|
|
198
|
+
250 header checks. This measures validation only, not full-copy throughput.
|
|
199
|
+
Timeouts remain possible during dependency outages; writes are never blindly
|
|
200
|
+
replayed, and resumed sync rereads durable destination progress.
|
|
201
|
+
|
|
202
|
+
The adaptive page controller and optional validated-proof lookup add a small
|
|
203
|
+
client bundle cost. The [artifact measurements and limits](./docs/sync-transfer.md#artifact-cost-requiring-review)
|
|
204
|
+
include the combined upstream security fixes. These are explicit feature costs;
|
|
205
|
+
the RPC validation coordinator remains excluded from browser/mobile bundles.
|
|
206
|
+
|
|
207
|
+
The transfer extension is an **unpublished 2.13.0 candidate**. Published 2.12.0
|
|
208
|
+
has no record-transfer methods. Check exact build provenance and authenticated
|
|
209
|
+
runtime capabilities, not a version label alone. An oversized record on a legacy
|
|
210
|
+
source cannot be rescued by upgrading only its destination; upgrade the source
|
|
211
|
+
before retrying. Records exceeding the negotiated 64 MiB frame limit fail safely
|
|
212
|
+
without being skipped or advancing their checkpoint.
|
|
213
|
+
|
|
214
|
+
Large individual records can use the negotiated
|
|
215
|
+
[bounded transfer protocol](./docs/sync-transfer.md), with durable staging,
|
|
216
|
+
integrity verification and checkpoint replay protection. Its authenticated
|
|
217
|
+
HTTP/SQLite/IndexedDB regression exercises a 7 MiB binary record, an interrupted
|
|
218
|
+
upload across client/server restart, a lost part acknowledgement, corrupted
|
|
219
|
+
download rejection and a verified restore followed by an unchanged resync.
|
|
220
|
+
The current frame limit is 64 MiB; legacy providers must be upgraded to use it.
|
|
221
|
+
It also passes with a one-second delay on every authenticated transport send;
|
|
222
|
+
that models added latency, not a measured bandwidth limit or a real mobile network.
|
|
223
|
+
These synthetic regressions are separate from the large-wallet timing evidence above.
|
|
224
|
+
|
|
57
225
|
Wallet storage replication applies each received page and its durable sync
|
|
58
226
|
checkpoint in one provider transaction. IndexedDB and Knex therefore avoid
|
|
59
227
|
per-record transaction startup, and a failed page rolls back without advancing
|
|
60
|
-
the checkpoint.
|
|
228
|
+
the checkpoint. Sources fill each bounded page with adaptive, size-aware reads,
|
|
229
|
+
and Knex storage adds user-scoped proof lookup indexes. Clients may set
|
|
230
|
+
`includeTotals` on a sync-chunk request to receive optional source record totals
|
|
231
|
+
for exact progress reporting. Older providers ignore the hint, and totals are
|
|
232
|
+
not counted unless requested. New clients also send the writer-local sync-state
|
|
233
|
+
identifier selected during provider registration. New providers use it to
|
|
234
|
+
disambiguate legacy duplicate checkpoints, while either side remains compatible
|
|
235
|
+
with older protocol peers. When a provider rejects a sync page because its
|
|
236
|
+
serialized RPC response exceeds the service ceiling, remote clients retry the
|
|
237
|
+
read-only request with a smaller chunk budget and remember the working limit
|
|
238
|
+
for the rest of the session.
|
|
239
|
+
|
|
240
|
+
Output synchronization requires a local mapping for every non-null source basket
|
|
241
|
+
ID. A missing mapping rejects the page so its transaction and checkpoint can roll
|
|
242
|
+
back; retry after transferring the missing basket. Newer source updates apply
|
|
243
|
+
basket changes, including explicit removal. Same-time or older updates preserve
|
|
244
|
+
local relinquishment. Previously unbasketed records require a verified newer
|
|
245
|
+
source update to repair; no heuristic rewrites existing wallet state.
|
|
246
|
+
|
|
247
|
+
`StorageKnex.getRawTxOfKnownValidTransaction()` can read a cold store while the
|
|
248
|
+
caller holds a transaction, including SQLite's single-connection pool. Settings
|
|
249
|
+
are read through that transaction without entering the shared cache or starting
|
|
250
|
+
prepared-BEEF background work; ordinary `makeAvailable()` remains the explicit
|
|
251
|
+
store-wide startup operation. An absent optional `inputBEEF` does not prevent
|
|
252
|
+
returning stored raw transaction bytes.
|
|
253
|
+
|
|
254
|
+
IndexedDB schema version 6 adds a non-unique transaction-ID/user index. Sync
|
|
255
|
+
identity lookups, commissions, and relation maps use selective indexes or exact
|
|
256
|
+
keys instead of scanning the growing wallet for each row. Proof batch checks
|
|
257
|
+
resolve requested transaction IDs through the existing index, preserving primary-key
|
|
258
|
+
ordering, pagination, and proof-validation rules. Existing bytes and
|
|
259
|
+
legacy duplicate transaction IDs are preserved. Databases upgrade automatically;
|
|
260
|
+
older clients that open schema version 5 cannot reopen an upgraded database, so
|
|
261
|
+
keep a compatible client when retaining a local backup.
|
|
262
|
+
|
|
263
|
+
Updated servers advertise `syncCheckpointVersion: 1` in runtime settings.
|
|
264
|
+
Compatible clients fetch a compact checkpoint once, then use the checkpoint
|
|
265
|
+
returned by each committed page. The complete ID mapping remains durable on
|
|
266
|
+
the writer and is no longer downloaded before every page. Older providers use
|
|
267
|
+
the existing full-state path; authentication, gateway, and malformed checkpoint
|
|
268
|
+
errors remain failures rather than compatibility fallbacks. A retry starts
|
|
269
|
+
from the writer's durable checkpoint. `includeNextCheckpoint` is optional, and
|
|
270
|
+
legacy requests retain their existing response shape.
|
|
271
|
+
|
|
272
|
+
When a reader negotiates binary JSON, large schema-defined sync byte fields
|
|
273
|
+
are encoded as base64 instead of decimal number arrays. Legacy readers retain
|
|
274
|
+
the existing arrays; unrelated numeric fields are never reinterpreted as bytes.
|
|
275
|
+
Clients with `binaryRequests: true` use the same compact representation for
|
|
276
|
+
sync uploads after the server negotiates binary request support. The default
|
|
277
|
+
request setting is unchanged.
|
|
278
|
+
Binary JSON parsing preserves the existing marker and escaping rules while
|
|
279
|
+
avoiding a JavaScript reviver callback for every scalar byte. The SDK also
|
|
280
|
+
prevents certificate work or session recovery from dispatching another request
|
|
281
|
+
after the caller's authentication deadline has expired. This does not cancel a
|
|
282
|
+
write already received by a server or automatically replay failed writes.
|
|
283
|
+
|
|
284
|
+
Run the authenticated candidate-provider sync benchmark with:
|
|
285
|
+
|
|
286
|
+
```sh
|
|
287
|
+
pnpm bench:storage-sync
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Set `WALLET_TOOLBOX_BENCH_MYSQL=true`, `MYSQL_CONNECTION`, and optionally
|
|
291
|
+
`WALLET_TOOLBOX_BENCH_MYSQL_DATABASE` to exercise the same fixture through a
|
|
292
|
+
MySQL-backed provider. The benchmark reports HTTP p50/p95 latency and the
|
|
293
|
+
source-query limits used to fill a 250-record page; it is observational rather
|
|
294
|
+
than a cross-machine latency SLA. It also compares the old reviver with the
|
|
295
|
+
current parser on identical synthetic data and measures checkpoint size. On
|
|
296
|
+
one local Node 24 run, a 1 MiB numeric-array fixture (3.74 MB of JSON) measured
|
|
297
|
+
501.2 ms versus 10.1 ms median parsing time across nine alternating samples.
|
|
298
|
+
A synthetic 50,000-entry mapping occupied 678,850 bytes; its compact checkpoint
|
|
299
|
+
occupied 432 bytes. These are CPU and payload measurements, not a claim of the
|
|
300
|
+
same end-to-end network speedup. Encoding the synthetic byte field through
|
|
301
|
+
the negotiated sync codec reduced its JSON payload from 3,743,771 to 1,398,163
|
|
302
|
+
bytes (62.7%).
|
|
303
|
+
|
|
304
|
+
Retained integration tests cover authenticated HTTP backup and complete restore
|
|
305
|
+
into a fresh IndexedDB store, multipage progression, no-change resync,
|
|
306
|
+
interruption/resume, user isolation, malformed checkpoints, and legacy-provider
|
|
307
|
+
fallback. Live deployment results must be reported separately with the tested
|
|
308
|
+
revision and scope; a partial page sample is not a full restore verification.
|
|
309
|
+
|
|
310
|
+
A native desktop integration run against candidate runtime
|
|
311
|
+
`a88d18abf14b75a3227016bfd947d5a08b3ee236` completed a full remote-to-local
|
|
312
|
+
copy in 769.5 seconds, compared with 990.3 seconds for the preceding candidate
|
|
313
|
+
run with identical entity counts. Remote reads took 619.2 seconds, local writes
|
|
314
|
+
146.0 seconds, and measurement 4.1 seconds. Proof-page writes fell from 75.7 to
|
|
315
|
+
9.8 seconds after indexed preflight lookup. These are sequential observations,
|
|
316
|
+
not a controlled full-wallet comparison against upstream main. The all-state
|
|
317
|
+
100 ms timer probe reported p95 delay of 908 ms; foreground focus was not recorded,
|
|
318
|
+
so this does not establish foreground UI latency. Separate 90-second native
|
|
319
|
+
foreground probes during a retained backup measured p95 delays of 5 ms for
|
|
320
|
+
transactions, 8 ms for outputs, 10 ms for heavier output pages, and 5 ms for
|
|
321
|
+
proof requests. Their maxima were 60, 51, 298, and 62 ms respectively; these
|
|
322
|
+
samples are not a whole-copy latency guarantee. The retained-backup test also
|
|
323
|
+
verified cancellation at a page boundary and automatic checkpoint recovery after
|
|
324
|
+
a full native app restart. Development testing required refreshing Vite's cached
|
|
325
|
+
linked dependencies to load the candidate schema consistently. See
|
|
326
|
+
[PR486](https://github.com/bsv-blockchain/ts-stack/pull/486) for final integration
|
|
327
|
+
completion and release evidence. Personal deployment and wallet details are
|
|
328
|
+
retained privately, outside this repository.
|
|
61
329
|
|
|
62
330
|
`listOutputs` reports `totalOutputs` as the full matching result count on every
|
|
63
331
|
page for both Knex and IndexedDB storage, including short final pages and pages
|
|
@@ -92,6 +360,25 @@ checks leave multiple valid UMP tokens, and only when the pinned outpoint is
|
|
|
92
360
|
present in the verified candidates. A pin cannot introduce an outpoint that the
|
|
93
361
|
wallet did not independently retrieve and validate.
|
|
94
362
|
|
|
363
|
+
UMP renewal consumes only the exact canonical predecessor returned for its
|
|
364
|
+
outpoint. Its signed fields, presentation/recovery hashes, and locally derived
|
|
365
|
+
admin-token locking key are verified before the old token is signed. The manager
|
|
366
|
+
locates the predecessor at its actual input index and accepts the completed
|
|
367
|
+
action only when it preserves every authorized input and output, contains one
|
|
368
|
+
exact one-satoshi replacement token, and reports the transaction's real ID.
|
|
369
|
+
|
|
370
|
+
WAB faucet funding is subject to the same action-completion binding. The faucet
|
|
371
|
+
response must contain the exact declared Atomic BEEF target and output zero must
|
|
372
|
+
commit to the supplied nonzero R-puzzle scalar. The manager signs that outpoint
|
|
373
|
+
at its actual wallet input index and sends the fee-adjusted balance only to an
|
|
374
|
+
explicit BRC-29 output derived for the authenticated wallet. That output's exact
|
|
375
|
+
script and bounded amount are authorized before signing; an unrequested wallet
|
|
376
|
+
output cannot consume the faucet input. The signed action is staged locally,
|
|
377
|
+
labeled, and recorded in a recovery basket before broadcast. A retry recovers
|
|
378
|
+
and internalizes that exact transaction, or recognizes its already-internalized
|
|
379
|
+
managed output, instead of authorizing a second destination. Missing, reordered,
|
|
380
|
+
substituted, ambiguous, or result-only transactions fail closed.
|
|
381
|
+
|
|
95
382
|
New WAB registrations are interruption-safe across the off-chain/on-chain
|
|
96
383
|
boundary. A WAB that advertises `registrationStatus: "pending"` lets a verified
|
|
97
384
|
retry reuse the stored presentation key when a clean UMP lookup confirms that
|
|
@@ -139,11 +426,31 @@ HTTPS. Plain HTTP is accepted only for explicit loopback hosts during local
|
|
|
139
426
|
development. Arcade SSE dependency debug logging remains disabled because its
|
|
140
427
|
request URL and headers carry wallet callback credentials.
|
|
141
428
|
|
|
429
|
+
Remote storage responses must also complete BRC-103 mutual authentication;
|
|
430
|
+
ordinary HTTP fallback responses are rejected. Without an explicit
|
|
431
|
+
`serverIdentityKey`, the first authenticated server identity reached through
|
|
432
|
+
the configured HTTPS endpoint is authoritative for that client instance and
|
|
433
|
+
cannot change during its lifetime. Applications that independently provision
|
|
434
|
+
or validate the server key should pass it as `serverIdentityKey` to pin the
|
|
435
|
+
expected peer from the first response. In either mode, the
|
|
436
|
+
`storageIdentityKey` returned by the authenticated `makeAvailable()` response
|
|
437
|
+
is authoritative for that client instance. It may be distinct from the server
|
|
438
|
+
transport identity; applications that independently provision it can pin it
|
|
439
|
+
with the separate `storageIdentityKey` option. JSON-RPC responses are accepted
|
|
440
|
+
only when their version and request ID match and they contain exactly one of
|
|
441
|
+
`result` or `error`.
|
|
442
|
+
|
|
142
443
|
Certificate signatures fail closed at every wallet trust boundary. Direct and
|
|
143
444
|
issuer-mediated acquisition require an affirmative certifier-signature result
|
|
144
445
|
before storage, and identity discovery verifies each untrusted overlay
|
|
145
446
|
certificate before decryption or trust scoring.
|
|
146
447
|
|
|
448
|
+
BRC-100 originators may include a numeric port for compatibility, including
|
|
449
|
+
local-development ports. Permission and administrator authority is deliberately
|
|
450
|
+
scoped to the normalized lowercase hostname: all ports on one hostname are the
|
|
451
|
+
same originator. Existing authenticated permission tokens that recorded a port
|
|
452
|
+
are discovered through a bounded compatibility lookup and compared by hostname.
|
|
453
|
+
|
|
147
454
|
### ChainTracks sources and networks
|
|
148
455
|
|
|
149
456
|
Wallet services do not require a WhatsOnChain key for ChainTracks. Node
|
|
@@ -167,6 +474,86 @@ go-chaintracks client; existing legacy v1 URLs and explicit clients remain
|
|
|
167
474
|
compatible. Browser and mobile distributions expose the same fetch/SSE client
|
|
168
475
|
without Node `Buffer` or filesystem dependencies.
|
|
169
476
|
|
|
477
|
+
The configured ChainTracks endpoint remains the authority for the selected
|
|
478
|
+
chain view. Its transport bytes are not trusted blindly: JSON and binary reads
|
|
479
|
+
remain under one deadline and fixed byte ceilings, redirects are rejected, SSE
|
|
480
|
+
events have byte and idle-time limits, and every returned header is canonical,
|
|
481
|
+
proof-of-work-valid, and bound to the requested network, height, or hash before
|
|
482
|
+
use. Binary batches must be exact 80-byte linked sequences. The additive
|
|
483
|
+
`GoChaintracksServiceClientOptions` limits can be lowered for constrained hosts.
|
|
484
|
+
Live metadata is accepted only as a complete record with positive local
|
|
485
|
+
identities. Reorganization deactivation lists are bounded by their declared
|
|
486
|
+
depth, start at the old tip, contain no duplicates, and form one descending
|
|
487
|
+
linked chain before wallet monitor callbacks receive them. Remote diagnostic
|
|
488
|
+
text is reduced to bounded single-line output. The monitor repeats these checks
|
|
489
|
+
at its own trust boundary for custom event adapters, requires every configured
|
|
490
|
+
chain source to match the wallet network, and retains at most 4,096 unique
|
|
491
|
+
deactivated headers by default. `MonitorOptions.maxQueuedDeactivatedHeaders`
|
|
492
|
+
can lower that ceiling. Prepared-proof invalidations are coalesced and drained
|
|
493
|
+
during teardown; partial event subscriptions and rejected application
|
|
494
|
+
callbacks are contained and reported through bounded monitor events.
|
|
495
|
+
The legacy `BHServiceClient` applies the same endpoint, whole-body deadline,
|
|
496
|
+
byte, range, hash, linkage, and proof-of-work checks. Its historical public
|
|
497
|
+
`cache` property remains for source compatibility but is diagnostic only:
|
|
498
|
+
neither callers nor old or rejected roots can make it authoritative, and every
|
|
499
|
+
Merkle-root verdict resolves the current canonical header again so
|
|
500
|
+
reorganizations remain visible.
|
|
501
|
+
Local ChainTracks instances also validate and copy submitted headers, ignore
|
|
502
|
+
duplicate pending submissions, and retain at most 4,096 by default; the live
|
|
503
|
+
SSE adapter applies the same default queue ceiling. Construction rejects
|
|
504
|
+
unsupported networks, unsafe recursion/queue limits, and malformed ingestor
|
|
505
|
+
collections. Library logging is silent by default; applications that need
|
|
506
|
+
operational output must provide the existing optional `logging` callback.
|
|
507
|
+
Startup methods await initialization and surface failures; a failed attempt can
|
|
508
|
+
be retried, while `destroy()` drains sources and releases storage even if the
|
|
509
|
+
instance never became available. Header and reorganization subscriptions are
|
|
510
|
+
bounded, deleted on unsubscribe, and receive isolated snapshots so one listener
|
|
511
|
+
cannot alter another listener's event.
|
|
512
|
+
|
|
513
|
+
Local persistence treats both stored metadata and adapter calls as integrity
|
|
514
|
+
boundaries. Memory-backed trackers are instance-isolated; IndexedDB and Knex
|
|
515
|
+
require one active tip and one active header per height, reject nonconsecutive
|
|
516
|
+
parent links, bound ancestor walks, and fail closed on malformed state. Knex
|
|
517
|
+
serializes tip mutation with an internal transaction lock row. Run every
|
|
518
|
+
ChainTracks Knex migration before serving traffic. On MySQL, the migration
|
|
519
|
+
changes hex identifiers to `VARCHAR(64)` and cached header bytes to `LONGBLOB`;
|
|
520
|
+
because the former `VARBINARY(32)` representation could irreversibly truncate
|
|
521
|
+
live identifiers, the derived live-header cache is cleared and rebuilt from
|
|
522
|
+
authenticated bulk data during that migration.
|
|
523
|
+
|
|
524
|
+
To downgrade to code that predates the repair migration, first stop every
|
|
525
|
+
ChainTracks writer and take a verified database backup together with the
|
|
526
|
+
authenticated bulk-header data needed to rebuild the live cache. Using the
|
|
527
|
+
current `ChaintracksKnexMigrations` source, run a targeted `knex.migrate.down`
|
|
528
|
+
for only
|
|
529
|
+
`2026-09-17-001 repair MySQL live-header encodings and bulk blob`. Its `down`
|
|
530
|
+
is intentionally a schema no-op: it removes that migration's ledger entry but
|
|
531
|
+
must leave the repaired `VARCHAR(64)` identifier columns, `LONGBLOB` bulk data,
|
|
532
|
+
the `chaintracks_state` lock row, and authenticated bulk files intact. Validate
|
|
533
|
+
that retained schema and data against the older code in a non-production copy
|
|
534
|
+
before starting it. Never roll down the initial migration, recreate the tables,
|
|
535
|
+
or convert the identifiers back to truncating `VARBINARY(32)` columns.
|
|
536
|
+
|
|
537
|
+
Bulk-file additions and extensions reach durable storage before becoming
|
|
538
|
+
visible in memory. Reconciliation and any replacement spanning multiple files
|
|
539
|
+
commit atomically in the built-in Knex and IndexedDB adapters, preserve stored
|
|
540
|
+
bytes omitted from an update, and restore the prior manager state on failure.
|
|
541
|
+
Custom `ChaintracksStorageBulkFileApi` implementations remain source compatible,
|
|
542
|
+
but must implement the additive `replaceBulkFiles` method before the manager
|
|
543
|
+
will perform a multi-file replacement; this fail-closed rule prevents a restart
|
|
544
|
+
from observing gaps or overlapping stale rows.
|
|
545
|
+
|
|
546
|
+
WhatsOnChain is authoritative only when an application deliberately enables it
|
|
547
|
+
as a fallback chain source. URLs returned by its resource manifest are not
|
|
548
|
+
local/operator configuration: they are treated as untrusted locators and must
|
|
549
|
+
remain credential-free public HTTPS. Node downloads resolve, approve, and pin a
|
|
550
|
+
public address into the TLS connection; browser downloads retain HTTPS,
|
|
551
|
+
redirect, CORS, deadline, and byte controls. Resource manifests, recent-header
|
|
552
|
+
JSON, binary files, and legacy WebSocket frames are bounded and strictly
|
|
553
|
+
validated. WebSocket history is admitted in ordered chunks, live queues are
|
|
554
|
+
capped, and every candidate header is canonical and proof-of-work-valid before
|
|
555
|
+
its declared target can affect chain-work selection.
|
|
556
|
+
|
|
170
557
|
Browser, mobile, and Node applications can instead make a persisted local
|
|
171
558
|
ChainTracks instance their primary SDK `ChainTracker`. Immutable checkpoint
|
|
172
559
|
assets are read through `BulkFileDataCacheApi` before any network request;
|
|
@@ -178,13 +565,29 @@ verification through a bounded worker pool; browser and mobile builds retain
|
|
|
178
565
|
the portable `InlineBulkFileDataValidator`. Filesystem deployments can combine
|
|
179
566
|
the content-addressed, quarantining `BulkFileDataCacheFs` with
|
|
180
567
|
`DurableFileBulkFileDownloadBudget`, which flushes a conservative reservation
|
|
181
|
-
before every physical attempt
|
|
568
|
+
before every physical attempt, serializes replicas through the shared state
|
|
569
|
+
file, and preserves the allowance across restarts. A crash-abandoned
|
|
570
|
+
`<stateFile>.lock` is deliberately not reclaimed automatically: after proving
|
|
571
|
+
that no writer is active, an operator must remove that narrow lock directory or
|
|
572
|
+
choose a fresh ledger path. Cache files are read only up to their advertised
|
|
573
|
+
size plus one rejection byte and writes must match the advertised SHA-256.
|
|
574
|
+
Cache replacement, promotion, and quarantine are serialized through a
|
|
575
|
+
per-object `<digest>.headers.lock` directory with the same fail-closed,
|
|
576
|
+
operator-confirmed abandoned-lock procedure. Callers may release or reuse their
|
|
577
|
+
input buffers immediately because the cache snapshots identity metadata and
|
|
578
|
+
bytes before waiting for that lock.
|
|
182
579
|
`LocalChainTracker` reserves remote clients
|
|
183
580
|
for explicit remote-only mode, local exceptions, and quorum-backed consistency
|
|
184
581
|
or recovery checks. See
|
|
185
582
|
[Local-first ChainTracks](./docs/local-first-chaintracks.md) for packaging,
|
|
186
583
|
background synchronization, migration, and advanced-settings requirements.
|
|
187
584
|
|
|
585
|
+
Legacy filesystem import/export is restricted to path-free manifest and data
|
|
586
|
+
filenames beneath the caller-selected root. A missing manifest is created only
|
|
587
|
+
for a definite not-found error; permission, size, parse, and integrity failures
|
|
588
|
+
remain visible. Local files must form a contiguous genesis-anchored chain and
|
|
589
|
+
all reads, writes, reader buffers, and queued lock operations are bounded.
|
|
590
|
+
|
|
188
591
|
Arcade is the HTTPS/SSE gateway for Teranode-backed header data. Its v2 edge
|
|
189
592
|
must allow browser origins and OPTIONS before browser defaults can use it;
|
|
190
593
|
direct Teranode P2P is not included in browser/mobile artifacts.
|
|
@@ -222,6 +625,70 @@ cannot restore the failed transaction; recovery requires a mined status and a
|
|
|
222
625
|
Merkle proof validated by the configured chain tracker. Arcade SSE events are
|
|
223
626
|
acknowledged in order only after their storage update and cursor persistence
|
|
224
627
|
succeed, so a transient storage failure is retried instead of skipped.
|
|
628
|
+
The SSE client validates and owns every status record, retains at most 64 events
|
|
629
|
+
and 4 MiB by default, and enforces a 256 KiB ceiling per event. The additive
|
|
630
|
+
`maxEventBytes`, `maxPendingEvents`, and `maxPendingBytes` options may lower
|
|
631
|
+
those limits. A malformed, excessive, or failed event closes the stream and
|
|
632
|
+
prevents queued successors from advancing beyond the last durable cursor.
|
|
633
|
+
Client logging is silent unless `log` is supplied, and transport errors never
|
|
634
|
+
forward credential-bearing EventSource objects. Monitor startup awaits its
|
|
635
|
+
ChainTracks subscriptions and retries transient setup failures; removal and
|
|
636
|
+
teardown close Arcade SSE before storage is destroyed. Monitor operational
|
|
637
|
+
logging is likewise opt-in through `MonitorOptions.logging`.
|
|
638
|
+
|
|
639
|
+
### Transaction-status authentication
|
|
640
|
+
|
|
641
|
+
Transaction-status providers are untrusted observations, not permission to
|
|
642
|
+
change an arbitrary wallet transaction. Every result is copied and accepted
|
|
643
|
+
only when its txid is one of the exact requested ids and its depth agrees with
|
|
644
|
+
`mined`, `known`, or `unknown`. Terminal and input-conflict evidence is allowed
|
|
645
|
+
only on an internally consistent unknown lifecycle result. Competing txids and
|
|
646
|
+
diagnostics are bounded, and the durable provider name comes from local
|
|
647
|
+
configuration rather than the remote response.
|
|
648
|
+
|
|
649
|
+
A malformed provider response is recorded as that provider's failure and the
|
|
650
|
+
service tries the next configured source. Arcade additionally binds the whole
|
|
651
|
+
`GET /tx/{txid}` response to the request before interpreting lifecycle or proof
|
|
652
|
+
fields. Provider errors and omitted results remain unknown; they never become
|
|
653
|
+
mined, known, terminal, or input-conflict evidence by default.
|
|
654
|
+
|
|
655
|
+
### Raw transaction acquisition
|
|
656
|
+
|
|
657
|
+
Raw-transaction providers must return an accessor-free result whose declared
|
|
658
|
+
txid exactly matches the request. Transaction data is accepted only as a
|
|
659
|
+
nonempty dense byte array no larger than 32 MiB, copied before hashing, and
|
|
660
|
+
returned as wallet-owned bytes. The computed transaction hash must still match
|
|
661
|
+
the request. Provider attribution comes from local configuration, and an
|
|
662
|
+
invalid result is discarded before the next provider is tried.
|
|
663
|
+
|
|
664
|
+
### Merkle-proof authentication
|
|
665
|
+
|
|
666
|
+
Wallet proof providers are untrusted inputs. An ordinary `getMerklePath`
|
|
667
|
+
success is accepted only when a bounded, copied path contains an explicit leaf
|
|
668
|
+
for the requested transaction, computes the supplied header's Merkle root at
|
|
669
|
+
the same height, and the complete header resolves through the wallet's
|
|
670
|
+
proof-of-work-valid chain service. The monitor independently asks its configured
|
|
671
|
+
ChainTracks source to affirm that root and height before persisting proof state
|
|
672
|
+
or restoring a failed transaction. Raw transaction bytes must also hash to the
|
|
673
|
+
same txid.
|
|
674
|
+
|
|
675
|
+
Custom ordinary proof providers must return both a `MerklePath` and complete
|
|
676
|
+
`BlockHeader`; a path-only result is treated as unavailable. The additive
|
|
677
|
+
`getValidatedMerklePath` compatibility hook still permits a path-only custom
|
|
678
|
+
provider when its caller-supplied validator independently resolves and
|
|
679
|
+
authenticates the header. No proof-provider response, mined status label, or
|
|
680
|
+
non-null path alone is authority to release wallet funds.
|
|
681
|
+
|
|
682
|
+
Every configured proof provider is treated as untrusted. Wallet Toolbox checks
|
|
683
|
+
transaction membership, header/root agreement, and the active ChainTracks root
|
|
684
|
+
before a proof can be persisted; a stale orphan proof is rejected and the next
|
|
685
|
+
provider is tried. The lagged proven-transaction review retains unresolved
|
|
686
|
+
reorg heights and bounds retry work per run while its forward cursor continues,
|
|
687
|
+
so temporary provider lag cannot turn one failed repair attempt into a
|
|
688
|
+
permanent checkpoint skip. Failed retries rotate behind waiting heights, and
|
|
689
|
+
temporarily ineligible heights remain queued when the chain tip retreats.
|
|
690
|
+
Compound proofs may mark multiple transactions; validation checks membership
|
|
691
|
+
of the requested transaction. No consumer or database migration is required.
|
|
225
692
|
|
|
226
693
|
Invalid-change review applies the same positive-evidence rule. Only an
|
|
227
694
|
explicit successful `isUtxo: false` result is considered spent; a provider
|
|
@@ -235,6 +702,36 @@ positively spent subset while retaining and reporting unknowns. Each confirmed
|
|
|
235
702
|
spent output is rechecked for ownership and allocation state under the write
|
|
236
703
|
lock, and every release or blocked release records bounded audit evidence.
|
|
237
704
|
|
|
705
|
+
Provider responses are copied as accessor-free data, capped at 4,096 detail
|
|
706
|
+
rows, and bound to the requested outpoint whenever details are supplied. A
|
|
707
|
+
configured UTXO provider remains a locally chosen operational oracle: these
|
|
708
|
+
structural checks prevent response confusion but do not turn non-membership
|
|
709
|
+
claims into cryptographic proofs. Whole-wallet compatibility reviews stop
|
|
710
|
+
before provider work when more than 10,000 candidates would be inspected;
|
|
711
|
+
operators should use the bounded Monitor Admin pages for larger wallets. Manual
|
|
712
|
+
review inputs require canonical compressed identity keys and exact modes,
|
|
713
|
+
booleans, page sizes, and offsets. A release rechecks the exact user, txid,
|
|
714
|
+
vout, value, basket, and allocation state under the write lock.
|
|
715
|
+
|
|
716
|
+
Transaction-history and broadcast providers are locally selected operational
|
|
717
|
+
oracles, but their response objects are never trusted as wallet-owned state.
|
|
718
|
+
Script-history observations are bound to the exact normalized script hash and
|
|
719
|
+
endianness, copied into a dense 4,096-entry maximum, and checked for canonical
|
|
720
|
+
transaction IDs, safe heights, duplicates, and conflicts. WhatsOnChain calls
|
|
721
|
+
have a 30-second whole-request deadline by default; the additive
|
|
722
|
+
`requestTimeoutMsecs` option may be set from 1 through 3,600,000 milliseconds.
|
|
723
|
+
|
|
724
|
+
Broadcast accepts at most 1,000 unique requested transactions in a 64 MiB BEEF.
|
|
725
|
+
Each provider receives its own strict reparse and copied txid list. Results must
|
|
726
|
+
contain exactly one invariant-consistent entry for each request; provider names
|
|
727
|
+
come from local registration, competing transactions and diagnostics are
|
|
728
|
+
bounded, and raw transaction, BEEF, endpoint, and txid-list diagnostics are not
|
|
729
|
+
retained. In `UntilSuccess` mode, malformed, throwing, or soft-timed-out
|
|
730
|
+
providers remain inconclusive and the next provider is tried. A provider's
|
|
731
|
+
double-spend assertion becomes terminal only when the wallet independently
|
|
732
|
+
gets conclusive spent evidence for at least one exact input; an unavailable or
|
|
733
|
+
unknown UTXO oracle cannot quarantine funds by itself.
|
|
734
|
+
|
|
238
735
|
Core ChainTracks factories accept a final source-options argument when an
|
|
239
736
|
application must override the defaults. Set `disableChaintracks`, `disableCdn`,
|
|
240
737
|
or `disableWhatsOnChain` to `true` to opt out of an automatic source, or pass an
|
|
@@ -399,7 +896,10 @@ await storage.makeAvailable()
|
|
|
399
896
|
const sessionManager = new KnexSessionManager(storage.knex, {
|
|
400
897
|
ttlMs: 24 * 60 * 60 * 1000,
|
|
401
898
|
// Optional. Set to 0 when every authenticated use must update the row.
|
|
402
|
-
touchIntervalMs: 60 * 1000
|
|
899
|
+
touchIntervalMs: 60 * 1000,
|
|
900
|
+
// Optional global and per-identity rolling bounds for unsigned claims.
|
|
901
|
+
maxInitialRequestNonces: 100_000,
|
|
902
|
+
maxInitialRequestNoncesPerIdentity: 100_000
|
|
403
903
|
})
|
|
404
904
|
|
|
405
905
|
const server = new StorageServer(storage, {
|
|
@@ -413,6 +913,8 @@ const server = new StorageServer(storage, {
|
|
|
413
913
|
preAuthRateLimit: { limit: 300, windowMs: 60_000 },
|
|
414
914
|
// Per-identity before payment/RPC work (default 1,000/minute).
|
|
415
915
|
rateLimit: { limit: 1_000, windowMs: 60_000 },
|
|
916
|
+
// Bound database/cursor work caused by list and sync offsets.
|
|
917
|
+
maxRpcListOffset: 1_000_000,
|
|
416
918
|
// Public CORS is the default. Supply exact origins to opt into a whitelist.
|
|
417
919
|
allowedOrigins: process.env.WALLET_ALLOWED_ORIGINS?.split(','),
|
|
418
920
|
// Optional CSP/security-header overrides for an embedding deployment.
|
|
@@ -424,6 +926,33 @@ const server = new StorageServer(storage, {
|
|
|
424
926
|
server.start()
|
|
425
927
|
```
|
|
426
928
|
|
|
929
|
+
Run `storage.migrate(...)` before enabling this manager on any replica. The
|
|
930
|
+
additive `2026-09-16-001 add auth message replay claims` migration creates the
|
|
931
|
+
`auth_message_nonces` uniqueness table used to atomically consume every signed
|
|
932
|
+
BRC-103 message nonce and identity-scoped initial-request nonce across replicas.
|
|
933
|
+
Missing the migration causes authentication processing to fail closed. All
|
|
934
|
+
replicas must share this table; a per-process or per-replica table does not
|
|
935
|
+
provide replay protection during load-balanced routing.
|
|
936
|
+
|
|
937
|
+
Signed per-session nonce claims fail closed at their configured bound and are
|
|
938
|
+
retained across sliding TTL extensions for the full active session. Unsigned
|
|
939
|
+
initial-request claims instead use global and per-identity rolling windows: when
|
|
940
|
+
either window is full, its oldest claim is evicted. Expired claims are removed
|
|
941
|
+
across identities during admission. This preserves exact replay rejection
|
|
942
|
+
within the configured TTL/cardinality windows without allowing unauthenticated
|
|
943
|
+
nonces to grow storage without bound or disable all future handshakes.
|
|
944
|
+
|
|
945
|
+
Schema migration is an operator-owned server lifecycle step. Authenticated
|
|
946
|
+
remote `StorageClient.migrate(...)` and `destroy()` RPCs are compatibility
|
|
947
|
+
no-ops; wallet tenants cannot run global DDL or close the shared provider.
|
|
948
|
+
|
|
949
|
+
The standard resource profile rejects list, find, and sync offsets above
|
|
950
|
+
1,000,000 before storage access (`WALLET_STORAGE_RPC_MAX_LIST_OFFSET`). Small
|
|
951
|
+
and high-throughput profiles default to 100,000 and 10,000,000 respectively.
|
|
952
|
+
Operators with legitimately larger wallet histories can raise the bound; use
|
|
953
|
+
`-1` only when all tenants are trusted and the database has an independent
|
|
954
|
+
workload guard.
|
|
955
|
+
|
|
427
956
|
Shared Knex sessions immediately persist authentication, nonce, identity, and
|
|
428
957
|
certificate-state transitions. For an already-authenticated row, the default
|
|
429
958
|
manager coalesces only timestamp-only usage touches for up to one minute. This
|
|
@@ -456,6 +985,24 @@ does not apply schema changes.
|
|
|
456
985
|
|
|
457
986
|
## Development
|
|
458
987
|
|
|
988
|
+
### Overlay identity verification
|
|
989
|
+
|
|
990
|
+
Final identity discovery copies bounded resolver receipts, verifies their
|
|
991
|
+
transaction graph and canonical anchors with the wallet's existing
|
|
992
|
+
`Services.getChainTracker()`, and then validates the standard subject-signed
|
|
993
|
+
identity envelope and certificate. The wallet finally re-binds each verified
|
|
994
|
+
certificate to the requested subject or to every requested public attribute,
|
|
995
|
+
so a lookup host cannot substitute a different valid identity. Transaction and certificate reuse remain
|
|
996
|
+
bounded and canonical evidence is rechecked before cached results are used;
|
|
997
|
+
fresh provider tokens bracket asynchronous anchor checks where the configured
|
|
998
|
+
tracker supplies them. Invalid candidate evidence is dropped, while typed
|
|
999
|
+
limit/timeout outcomes propagate to the caller.
|
|
1000
|
+
Direct `identityUtils` callers must supply a canonical `ChainTracker`; missing
|
|
1001
|
+
context or invalid evidence produces no overlay identities. Local contacts
|
|
1002
|
+
retain their separate policy. Inclusion does not establish unspentness or
|
|
1003
|
+
freshness. See [identity verification](docs/identity-verification.md) for
|
|
1004
|
+
current C01/C02/C03 contracts, compatibility characterization, and limits.
|
|
1005
|
+
|
|
459
1006
|
```bash
|
|
460
1007
|
git clone https://github.com/bsv-blockchain/ts-stack.git
|
|
461
1008
|
cd ts-stack
|
|
@@ -477,9 +1024,12 @@ network access, or long runtimes. Files named `*.live.test.ts` are public-networ
|
|
|
477
1024
|
checks, also excluded from deterministic PR coverage. Run exactly one governed
|
|
478
1025
|
suite with `test:manual -- <path>` or `test:live -- <path>` after reviewing
|
|
479
1026
|
`governance/test-quality/policy.json`; never batch-run operator suites. CI
|
|
480
|
-
merges four Wallet Toolbox coverage shards
|
|
481
|
-
|
|
482
|
-
|
|
1027
|
+
merges four Wallet Toolbox coverage shards for reporting. The C01 local
|
|
1028
|
+
`test:coverage --runInBand` run passed 225 suites and 2,188 tests, with one
|
|
1029
|
+
pre-existing skipped test. Its all-files totals were 45.75% statements, 38.86%
|
|
1030
|
+
branches, 42.57% functions, and 45.46% lines; that collection includes imported
|
|
1031
|
+
`out/src` code as well as source files. Use the exact run's coverage report,
|
|
1032
|
+
rather than comparing unlike source-only and combined collections.
|
|
483
1033
|
|
|
484
1034
|
Operational repair, migration, export, and long-running service procedures are
|
|
485
1035
|
not tests. They live under [`operator/`](./operator/README.md), produce an exact
|