@bsv/wallet-toolbox 2.4.4 → 2.4.20
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 +43 -0
- package/LICENSE.txt +58 -0
- package/README.md +98 -36
- package/docs/action-batch-planning.md +117 -14
- package/docs/client.md +1535 -4125
- package/docs/monitor.md +34 -137
- package/docs/services.md +296 -602
- package/docs/setup.md +48 -28
- package/docs/storage.md +358 -1901
- package/docs/wallet.md +10316 -5665
- package/out/src/CWIStyleWalletManager.d.ts +11 -2
- package/out/src/CWIStyleWalletManager.d.ts.map +1 -1
- package/out/src/CWIStyleWalletManager.js +118 -87
- package/out/src/CWIStyleWalletManager.js.map +1 -1
- package/out/src/Setup.d.ts +7 -0
- package/out/src/Setup.d.ts.map +1 -1
- package/out/src/Setup.js +10 -11
- package/out/src/Setup.js.map +1 -1
- package/out/src/SetupClient.d.ts +2 -0
- package/out/src/SetupClient.d.ts.map +1 -1
- package/out/src/SetupClient.js +8 -9
- package/out/src/SetupClient.js.map +1 -1
- package/out/src/SetupWallet.d.ts +6 -0
- package/out/src/SetupWallet.d.ts.map +1 -1
- package/out/src/ShamirWalletManager.d.ts.map +1 -1
- package/out/src/ShamirWalletManager.js.map +1 -1
- package/out/src/SimpleWalletManager.d.ts.map +1 -1
- package/out/src/SimpleWalletManager.js +2 -5
- package/out/src/SimpleWalletManager.js.map +1 -1
- package/out/src/Wallet.d.ts +28 -10
- package/out/src/Wallet.d.ts.map +1 -1
- package/out/src/Wallet.js +146 -125
- package/out/src/Wallet.js.map +1 -1
- package/out/src/WalletAuthenticationManager.d.ts +11 -1
- package/out/src/WalletAuthenticationManager.d.ts.map +1 -1
- package/out/src/WalletAuthenticationManager.js +7 -6
- package/out/src/WalletAuthenticationManager.js.map +1 -1
- package/out/src/WalletLogger.d.ts.map +1 -1
- package/out/src/WalletLogger.js +33 -30
- package/out/src/WalletLogger.js.map +1 -1
- package/out/src/WalletPermissionsManager.d.ts +22 -1
- package/out/src/WalletPermissionsManager.d.ts.map +1 -1
- package/out/src/WalletPermissionsManager.js +392 -267
- package/out/src/WalletPermissionsManager.js.map +1 -1
- package/out/src/WalletSettingsManager.d.ts.map +1 -1
- package/out/src/WalletSettingsManager.js.map +1 -1
- package/out/src/entropy/EntropyCollector.d.ts.map +1 -1
- package/out/src/entropy/EntropyCollector.js +6 -8
- package/out/src/entropy/EntropyCollector.js.map +1 -1
- package/out/src/fundWalletP2PKH.js.map +1 -1
- package/out/src/index.all.js.map +1 -1
- package/out/src/index.client.js.map +1 -1
- package/out/src/index.mobile.d.ts +1 -0
- package/out/src/index.mobile.d.ts.map +1 -1
- package/out/src/index.mobile.js +1 -0
- package/out/src/index.mobile.js.map +1 -1
- package/out/src/mockchain/MockChainMigrations.d.ts.map +1 -1
- package/out/src/mockchain/MockChainMigrations.js.map +1 -1
- package/out/src/mockchain/MockChainStorage.d.ts.map +1 -1
- package/out/src/mockchain/MockChainStorage.js.map +1 -1
- package/out/src/mockchain/MockChainTracker.d.ts.map +1 -1
- package/out/src/mockchain/MockChainTracker.js.map +1 -1
- package/out/src/mockchain/MockMiner.d.ts.map +1 -1
- package/out/src/mockchain/MockMiner.js.map +1 -1
- package/out/src/mockchain/MockServices.d.ts +4 -0
- package/out/src/mockchain/MockServices.d.ts.map +1 -1
- package/out/src/mockchain/MockServices.js +69 -74
- package/out/src/mockchain/MockServices.js.map +1 -1
- package/out/src/mockchain/merkleTree.d.ts.map +1 -1
- package/out/src/mockchain/merkleTree.js +51 -56
- package/out/src/mockchain/merkleTree.js.map +1 -1
- package/out/src/monitor/Monitor.d.ts +4 -0
- package/out/src/monitor/Monitor.d.ts.map +1 -1
- package/out/src/monitor/Monitor.js +56 -54
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/MonitorDaemon.d.ts +3 -0
- package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
- package/out/src/monitor/MonitorDaemon.js +65 -56
- package/out/src/monitor/MonitorDaemon.js.map +1 -1
- package/out/src/monitor/index.all.js.map +1 -1
- package/out/src/monitor/tasks/TaskArcSSE.d.ts +5 -0
- package/out/src/monitor/tasks/TaskArcSSE.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskArcSSE.js +86 -77
- package/out/src/monitor/tasks/TaskArcSSE.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +4 -2
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.js +132 -131
- package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.d.ts +3 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.js +3 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -1
- package/out/src/monitor/tasks/TaskCleanupActionBatches.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCleanupActionBatches.js.map +1 -1
- package/out/src/monitor/tasks/TaskClock.d.ts +1 -1
- package/out/src/monitor/tasks/TaskClock.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskClock.js +1 -1
- package/out/src/monitor/tasks/TaskClock.js.map +1 -1
- package/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -1
- package/out/src/monitor/tasks/TaskMineBlock.d.ts +3 -1
- package/out/src/monitor/tasks/TaskMineBlock.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskMineBlock.js +3 -1
- package/out/src/monitor/tasks/TaskMineBlock.js.map +1 -1
- package/out/src/monitor/tasks/TaskMonitorCallHistory.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskMonitorCallHistory.js.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.d.ts +4 -3
- package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.js +4 -3
- package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -1
- package/out/src/monitor/tasks/TaskPurge.d.ts +3 -1
- package/out/src/monitor/tasks/TaskPurge.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskPurge.js +3 -1
- package/out/src/monitor/tasks/TaskPurge.js.map +1 -1
- package/out/src/monitor/tasks/TaskReorg.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReorg.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts +3 -1
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.js +3 -1
- package/out/src/monitor/tasks/TaskReviewDoubleSpends.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts +3 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.js +3 -1
- package/out/src/monitor/tasks/TaskReviewProvenTxs.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewStatus.d.ts +3 -1
- package/out/src/monitor/tasks/TaskReviewStatus.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewStatus.js +3 -1
- package/out/src/monitor/tasks/TaskReviewStatus.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.d.ts +3 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.js +3 -1
- package/out/src/monitor/tasks/TaskReviewUtxos.js.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts +3 -0
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.js +53 -46
- package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
- package/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts +1 -1
- package/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskSyncWhenIdle.js +1 -1
- package/out/src/monitor/tasks/TaskSyncWhenIdle.js.map +1 -1
- package/out/src/monitor/tasks/TaskUnFail.d.ts +3 -1
- package/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskUnFail.js +3 -1
- package/out/src/monitor/tasks/TaskUnFail.js.map +1 -1
- package/out/src/monitor/tasks/WalletMonitorTask.d.ts.map +1 -1
- package/out/src/monitor/tasks/WalletMonitorTask.js.map +1 -1
- package/out/src/sdk/ActionBatch.interfaces.d.ts +56 -2
- package/out/src/sdk/ActionBatch.interfaces.d.ts.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.js +3 -3
- package/out/src/sdk/PrivilegedKeyManager.js.map +1 -1
- package/out/src/sdk/WERR_errors.d.ts +1 -1
- package/out/src/sdk/WERR_errors.d.ts.map +1 -1
- package/out/src/sdk/WERR_errors.js +2 -2
- package/out/src/sdk/WERR_errors.js.map +1 -1
- package/out/src/sdk/WalletError.d.ts +3 -0
- package/out/src/sdk/WalletError.d.ts.map +1 -1
- package/out/src/sdk/WalletError.js +53 -56
- package/out/src/sdk/WalletError.js.map +1 -1
- package/out/src/sdk/WalletErrorFromJson.js.map +1 -1
- package/out/src/sdk/WalletServices.interfaces.d.ts +3 -1
- package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +5 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/sdk/types.js.map +1 -1
- package/out/src/services/ServiceCollection.d.ts.map +1 -1
- package/out/src/services/ServiceCollection.js.map +1 -1
- package/out/src/services/Services.d.ts +8 -2
- package/out/src/services/Services.d.ts.map +1 -1
- package/out/src/services/Services.js +86 -44
- package/out/src/services/Services.js.map +1 -1
- package/out/src/services/chaintracker/BHServiceClient.d.ts +7 -7
- package/out/src/services/chaintracker/BHServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/BHServiceClient.js +9 -9
- package/out/src/services/chaintracker/BHServiceClient.js.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts +4 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.js +42 -6
- package/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts +4 -4
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.js +1 -1
- package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts +3 -0
- package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js +45 -40
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksService.d.ts +5 -0
- package/out/src/services/chaintracker/chaintracks/ChaintracksService.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksService.js +25 -18
- package/out/src/services/chaintracker/chaintracks/ChaintracksService.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts +3 -3
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +6 -7
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.d.ts.map +1 -1
- 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.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.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js +0 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.d.ts.map +1 -1
- 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.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.d.ts +2 -2
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.js +2 -2
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts +12 -2
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js +110 -103
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts +8 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js +58 -48
- 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.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts +3 -0
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js +55 -54
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.d.ts +4 -0
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js +97 -72
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts +5 -0
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js +145 -136
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts +4 -0
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js +92 -68
- package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.d.ts +43 -0
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.js +76 -0
- package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/configureKnexChaintracks.d.ts +18 -0
- package/out/src/services/chaintracker/chaintracks/configureKnexChaintracks.d.ts.map +1 -0
- package/out/src/services/chaintracker/chaintracks/configureKnexChaintracks.js +24 -0
- package/out/src/services/chaintracker/chaintracks/configureKnexChaintracks.js.map +1 -0
- package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.d.ts +2 -3
- package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js +4 -22
- package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.d.ts +2 -4
- package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.js +12 -25
- package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.d.ts +2 -3
- package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.js +4 -22
- package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.d.ts +2 -1
- package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js +3 -15
- package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.d.ts +2 -2
- package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.js +3 -15
- package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.d.ts +2 -1
- package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.js +3 -15
- package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/index.mobile.d.ts +1 -1
- package/out/src/services/chaintracker/chaintracks/index.mobile.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/index.mobile.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts +2 -0
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js +64 -61
- 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.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 +4 -3
- package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.d.ts +8 -10
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.js +14 -24
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.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/SingleWriterMultiReaderLock.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts +1 -11
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js +20 -49
- package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/dirtyHashes.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/dirtyHashes.js +4 -2
- package/out/src/services/chaintracker/chaintracks/util/dirtyHashes.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.js.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.d.ts +23 -14
- package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.js +1 -14
- package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -1
- package/out/src/services/networkConfig.js.map +1 -1
- package/out/src/services/providers/ARC.d.ts +4 -0
- package/out/src/services/providers/ARC.d.ts.map +1 -1
- package/out/src/services/providers/ARC.js +96 -83
- package/out/src/services/providers/ARC.js.map +1 -1
- package/out/src/services/providers/ArcSSEClient.d.ts.map +1 -1
- package/out/src/services/providers/ArcSSEClient.js.map +1 -1
- package/out/src/services/providers/Arcade.d.ts +4 -0
- package/out/src/services/providers/Arcade.d.ts.map +1 -1
- package/out/src/services/providers/Arcade.js +118 -92
- package/out/src/services/providers/Arcade.js.map +1 -1
- package/out/src/services/providers/Bitails.d.ts.map +1 -1
- package/out/src/services/providers/Bitails.js +107 -86
- package/out/src/services/providers/Bitails.js.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.js.map +1 -1
- package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/WhatsOnChain.js +19 -6
- package/out/src/services/providers/WhatsOnChain.js.map +1 -1
- package/out/src/services/providers/exchangeRates.js +1 -1
- package/out/src/services/providers/exchangeRates.js.map +1 -1
- package/out/src/services/providers/getBeefForTxid.js.map +1 -1
- package/out/src/services/providers/whatsOnChainHelpers.js.map +1 -1
- package/out/src/signer/WalletSigner.d.ts.map +1 -1
- package/out/src/signer/WalletSigner.js.map +1 -1
- 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 +68 -35
- package/out/src/signer/actionBatch/ActionBatchPlanner.js.map +1 -1
- package/out/src/signer/actionBatch/ActionBatchWorkspace.d.ts.map +1 -1
- package/out/src/signer/actionBatch/ActionBatchWorkspace.js +217 -41
- package/out/src/signer/actionBatch/ActionBatchWorkspace.js.map +1 -1
- package/out/src/signer/actionBatch/actionBatchBootstrap.d.ts +11 -0
- package/out/src/signer/actionBatch/actionBatchBootstrap.d.ts.map +1 -0
- package/out/src/signer/actionBatch/actionBatchBootstrap.js +38 -0
- package/out/src/signer/actionBatch/actionBatchBootstrap.js.map +1 -0
- package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
- package/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -1
- package/out/src/signer/methods/buildSignableTransaction.js +95 -106
- package/out/src/signer/methods/buildSignableTransaction.js.map +1 -1
- package/out/src/signer/methods/completeSignedTransaction.d.ts +3 -7
- package/out/src/signer/methods/completeSignedTransaction.d.ts.map +1 -1
- package/out/src/signer/methods/completeSignedTransaction.js +14 -57
- package/out/src/signer/methods/completeSignedTransaction.js.map +1 -1
- package/out/src/signer/methods/createAction.d.ts.map +1 -1
- package/out/src/signer/methods/createAction.js +47 -20
- package/out/src/signer/methods/createAction.js.map +1 -1
- package/out/src/signer/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/signer/methods/internalizeAction.js +4 -4
- package/out/src/signer/methods/internalizeAction.js.map +1 -1
- package/out/src/signer/methods/proveCertificate.js.map +1 -1
- package/out/src/signer/methods/resultBeef.js.map +1 -1
- package/out/src/signer/methods/signAction.d.ts.map +1 -1
- package/out/src/signer/methods/signAction.js +29 -4
- package/out/src/signer/methods/signAction.js.map +1 -1
- package/out/src/signer/methods/verifyUnlockScripts.d.ts +17 -0
- package/out/src/signer/methods/verifyUnlockScripts.d.ts.map +1 -0
- package/out/src/signer/methods/verifyUnlockScripts.js +137 -0
- package/out/src/signer/methods/verifyUnlockScripts.js.map +1 -0
- package/out/src/storage/StorageIdb.d.ts +5 -3
- package/out/src/storage/StorageIdb.d.ts.map +1 -1
- package/out/src/storage/StorageIdb.js +80 -27
- package/out/src/storage/StorageIdb.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +10 -1
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +118 -9
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts +41 -13
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +241 -158
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/StorageReader.d.ts +13 -5
- package/out/src/storage/StorageReader.d.ts.map +1 -1
- package/out/src/storage/StorageReader.js +3 -0
- package/out/src/storage/StorageReader.js.map +1 -1
- package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
- package/out/src/storage/StorageSyncReader.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts +2 -0
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +25 -6
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/adminServer/adminServer.d.ts +79 -0
- package/out/src/storage/adminServer/adminServer.d.ts.map +1 -1
- package/out/src/storage/adminServer/adminServer.js +47 -16
- package/out/src/storage/adminServer/adminServer.js.map +1 -1
- package/out/src/storage/adminServer/adminUi.js.map +1 -1
- package/out/src/storage/idbHelpers.js.map +1 -1
- package/out/src/storage/index.all.js.map +1 -1
- package/out/src/storage/methods/ListActionsSpecOp.d.ts.map +1 -1
- package/out/src/storage/methods/ListActionsSpecOp.js +48 -71
- package/out/src/storage/methods/ListActionsSpecOp.js.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +1 -1
- package/out/src/storage/methods/ListOutputsSpecOp.js +29 -27
- package/out/src/storage/methods/ListOutputsSpecOp.js.map +1 -1
- package/out/src/storage/methods/actionBatch.d.ts +2 -1
- package/out/src/storage/methods/actionBatch.d.ts.map +1 -1
- package/out/src/storage/methods/actionBatch.js +143 -50
- package/out/src/storage/methods/actionBatch.js.map +1 -1
- package/out/src/storage/methods/actionBatchBlobs.d.ts +6 -3
- package/out/src/storage/methods/actionBatchBlobs.d.ts.map +1 -1
- package/out/src/storage/methods/actionBatchBlobs.js +77 -14
- package/out/src/storage/methods/actionBatchBlobs.js.map +1 -1
- package/out/src/storage/methods/actionBatchValidation.d.ts +6 -4
- package/out/src/storage/methods/actionBatchValidation.d.ts.map +1 -1
- package/out/src/storage/methods/actionBatchValidation.js +261 -155
- package/out/src/storage/methods/actionBatchValidation.js.map +1 -1
- package/out/src/storage/methods/actionPlanning.js.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +0 -21
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js +43 -51
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
- package/out/src/storage/methods/createAction.d.ts +1 -1
- package/out/src/storage/methods/createAction.d.ts.map +1 -1
- package/out/src/storage/methods/createAction.js +57 -38
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/generateChange.d.ts +2 -2
- package/out/src/storage/methods/generateChange.d.ts.map +1 -1
- package/out/src/storage/methods/generateChange.js +66 -38
- package/out/src/storage/methods/generateChange.js.map +1 -1
- package/out/src/storage/methods/getBeefForTransaction.d.ts.map +1 -1
- package/out/src/storage/methods/getBeefForTransaction.js +48 -42
- 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 +8 -6
- package/out/src/storage/methods/getSyncChunk.js.map +1 -1
- package/out/src/storage/methods/internalizeAction.js +145 -121
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/methods/listActionsIdb.js.map +1 -1
- package/out/src/storage/methods/listActionsKnex.js +1 -1
- package/out/src/storage/methods/listActionsKnex.js.map +1 -1
- package/out/src/storage/methods/listCertificates.d.ts +1 -1
- package/out/src/storage/methods/listCertificates.d.ts.map +1 -1
- package/out/src/storage/methods/listCertificates.js +1 -1
- package/out/src/storage/methods/listCertificates.js.map +1 -1
- package/out/src/storage/methods/listOutputsIdb.d.ts +1 -1
- package/out/src/storage/methods/listOutputsIdb.d.ts.map +1 -1
- package/out/src/storage/methods/listOutputsIdb.js +133 -152
- package/out/src/storage/methods/listOutputsIdb.js.map +1 -1
- package/out/src/storage/methods/listOutputsKnex.d.ts +1 -1
- package/out/src/storage/methods/listOutputsKnex.d.ts.map +1 -1
- package/out/src/storage/methods/listOutputsKnex.js +213 -254
- package/out/src/storage/methods/listOutputsKnex.js.map +1 -1
- package/out/src/storage/methods/managedChange.d.ts +3 -3
- package/out/src/storage/methods/managedChange.d.ts.map +1 -1
- package/out/src/storage/methods/managedChange.js +1 -2
- package/out/src/storage/methods/managedChange.js.map +1 -1
- package/out/src/storage/methods/offsetKey.d.ts.map +1 -1
- package/out/src/storage/methods/offsetKey.js +0 -1
- package/out/src/storage/methods/offsetKey.js.map +1 -1
- package/out/src/storage/methods/processAction.d.ts +2 -0
- package/out/src/storage/methods/processAction.d.ts.map +1 -1
- package/out/src/storage/methods/processAction.js +8 -8
- package/out/src/storage/methods/processAction.js.map +1 -1
- package/out/src/storage/methods/purgeData.d.ts.map +1 -1
- package/out/src/storage/methods/purgeData.js +157 -179
- package/out/src/storage/methods/purgeData.js.map +1 -1
- package/out/src/storage/methods/purgeDataIdb.d.ts +1 -1
- package/out/src/storage/methods/purgeDataIdb.d.ts.map +1 -1
- package/out/src/storage/methods/purgeDataIdb.js +1 -1
- package/out/src/storage/methods/purgeDataIdb.js.map +1 -1
- package/out/src/storage/methods/reviewStatus.js +6 -6
- package/out/src/storage/methods/reviewStatus.js.map +1 -1
- package/out/src/storage/methods/reviewStatusIdb.js.map +1 -1
- package/out/src/storage/methods/utils.Buffer.js.map +1 -1
- package/out/src/storage/methods/utils.js.map +1 -1
- package/out/src/storage/portable/index.js +2 -2
- package/out/src/storage/portable/index.js.map +1 -1
- package/out/src/storage/remoting/BinaryJson.d.ts.map +1 -1
- package/out/src/storage/remoting/BinaryJson.js +84 -38
- package/out/src/storage/remoting/BinaryJson.js.map +1 -1
- package/out/src/storage/remoting/KnexSessionManager.d.ts.map +1 -1
- package/out/src/storage/remoting/KnexSessionManager.js.map +1 -1
- package/out/src/storage/remoting/RateLimitPolicy.d.ts +10 -0
- package/out/src/storage/remoting/RateLimitPolicy.d.ts.map +1 -0
- package/out/src/storage/remoting/RateLimitPolicy.js +37 -0
- package/out/src/storage/remoting/RateLimitPolicy.js.map +1 -0
- package/out/src/storage/remoting/StorageClient.d.ts +2 -0
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js +82 -50
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/storage/remoting/StorageClientBase.d.ts +15 -5
- package/out/src/storage/remoting/StorageClientBase.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClientBase.js +61 -3
- package/out/src/storage/remoting/StorageClientBase.js.map +1 -1
- package/out/src/storage/remoting/StorageMobile.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageMobile.js +34 -22
- package/out/src/storage/remoting/StorageMobile.js.map +1 -1
- package/out/src/storage/remoting/StorageServer.d.ts +52 -1
- package/out/src/storage/remoting/StorageServer.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageServer.js +340 -201
- package/out/src/storage/remoting/StorageServer.js.map +1 -1
- package/out/src/storage/remoting/edgePolicy.d.ts +57 -0
- package/out/src/storage/remoting/edgePolicy.d.ts.map +1 -0
- package/out/src/storage/remoting/edgePolicy.js +387 -0
- package/out/src/storage/remoting/edgePolicy.js.map +1 -0
- package/out/src/storage/remoting/entityValidationHelpers.d.ts.map +1 -1
- package/out/src/storage/remoting/entityValidationHelpers.js +22 -5
- package/out/src/storage/remoting/entityValidationHelpers.js.map +1 -1
- package/out/src/storage/schema/KnexMigrations.d.ts.map +1 -1
- package/out/src/storage/schema/KnexMigrations.js +12 -0
- package/out/src/storage/schema/KnexMigrations.js.map +1 -1
- package/out/src/storage/schema/entities/EntityBase.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityBase.js.map +1 -1
- package/out/src/storage/schema/entities/EntityCertificate.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityCertificate.js.map +1 -1
- package/out/src/storage/schema/entities/EntityCertificateField.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityCertificateField.js.map +1 -1
- package/out/src/storage/schema/entities/EntityCommission.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityCommission.js.map +1 -1
- package/out/src/storage/schema/entities/EntityOutput.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutput.js.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputBasket.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputBasket.js.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputTag.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputTag.js.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputTagMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityOutputTagMap.js.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTx.d.ts +3 -0
- package/out/src/storage/schema/entities/EntityProvenTx.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTx.js +46 -36
- package/out/src/storage/schema/entities/EntityProvenTx.js.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTxReq.d.ts +2 -2
- package/out/src/storage/schema/entities/EntityProvenTxReq.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityProvenTxReq.js +12 -10
- package/out/src/storage/schema/entities/EntityProvenTxReq.js.map +1 -1
- package/out/src/storage/schema/entities/EntitySyncState.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntitySyncState.js +25 -34
- package/out/src/storage/schema/entities/EntitySyncState.js.map +1 -1
- package/out/src/storage/schema/entities/EntityTransaction.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityTransaction.js.map +1 -1
- package/out/src/storage/schema/entities/EntityTxLabel.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityTxLabel.js.map +1 -1
- package/out/src/storage/schema/entities/EntityTxLabelMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityTxLabelMap.js.map +1 -1
- package/out/src/storage/schema/entities/EntityUser.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityUser.js.map +1 -1
- package/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -1
- package/out/src/storage/schema/entities/MergeEntity.js +9 -14
- package/out/src/storage/schema/entities/MergeEntity.js.map +1 -1
- package/out/src/storage/schema/tables/TableActionBatch.d.ts +3 -1
- package/out/src/storage/schema/tables/TableActionBatch.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TableAuthSession.js.map +1 -1
- package/out/src/storage/storageProviderHelpers.js.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.d.ts +3 -0
- package/out/src/storage/sync/StorageMySQLDojoReader.d.ts.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.js +30 -16
- package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
- package/out/src/utility/Format.d.ts.map +1 -1
- package/out/src/utility/Format.js +2 -2
- package/out/src/utility/Format.js.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.js.map +1 -1
- package/out/src/utility/actionBatchDigest.d.ts.map +1 -1
- package/out/src/utility/actionBatchDigest.js +41 -3
- package/out/src/utility/actionBatchDigest.js.map +1 -1
- package/out/src/utility/actionBatchPack.d.ts +16 -0
- package/out/src/utility/actionBatchPack.d.ts.map +1 -0
- package/out/src/utility/actionBatchPack.js +220 -0
- package/out/src/utility/actionBatchPack.js.map +1 -0
- package/out/src/utility/aggregateResults.d.ts.map +1 -1
- package/out/src/utility/aggregateResults.js.map +1 -1
- package/out/src/utility/beefForTxids.js.map +1 -1
- package/out/src/utility/brc114ActionTimeLabels.d.ts.map +1 -1
- package/out/src/utility/brc114ActionTimeLabels.js +26 -30
- package/out/src/utility/brc114ActionTimeLabels.js.map +1 -1
- package/out/src/utility/formatUnknown.d.ts +6 -0
- package/out/src/utility/formatUnknown.d.ts.map +1 -0
- package/out/src/utility/formatUnknown.js +39 -0
- package/out/src/utility/formatUnknown.js.map +1 -0
- package/out/src/utility/hashWasm.d.ts +5 -0
- package/out/src/utility/hashWasm.d.ts.map +1 -0
- package/out/src/utility/hashWasm.js +15 -0
- package/out/src/utility/hashWasm.js.map +1 -0
- package/out/src/utility/identityUtils.d.ts.map +1 -1
- package/out/src/utility/identityUtils.js +2 -4
- package/out/src/utility/identityUtils.js.map +1 -1
- package/out/src/utility/parseTxScriptOffsets.d.ts +1 -1
- package/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -1
- package/out/src/utility/parseTxScriptOffsets.js +1 -1
- package/out/src/utility/parseTxScriptOffsets.js.map +1 -1
- package/out/src/utility/stampLog.d.ts.map +1 -1
- package/out/src/utility/stampLog.js +49 -42
- package/out/src/utility/stampLog.js.map +1 -1
- package/out/src/utility/traceContext.d.ts +13 -0
- package/out/src/utility/traceContext.d.ts.map +1 -0
- package/out/src/utility/traceContext.js +34 -0
- package/out/src/utility/traceContext.js.map +1 -0
- package/out/src/utility/tscProofToMerklePath.d.ts.map +1 -1
- package/out/src/utility/tscProofToMerklePath.js +1 -1
- package/out/src/utility/tscProofToMerklePath.js.map +1 -1
- package/out/src/utility/utilityHelpers.buffer.js.map +1 -1
- package/out/src/utility/utilityHelpers.d.ts +2 -2
- package/out/src/utility/utilityHelpers.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.js +8 -4
- 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 +1 -2
- package/out/src/utility/utilityHelpers.noBuffer.js.map +1 -1
- package/out/src/wab-client/WABClient.d.ts.map +1 -1
- package/out/src/wab-client/WABClient.js +1 -1
- package/out/src/wab-client/WABClient.js.map +1 -1
- package/out/src/wab-client/WABTransport.d.ts +33 -5
- package/out/src/wab-client/WABTransport.d.ts.map +1 -1
- package/out/src/wab-client/WABTransport.js +240 -120
- package/out/src/wab-client/WABTransport.js.map +1 -1
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts.map +1 -1
- package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -1
- package/out/src/wab-client/auth-method-interactors/DevConsoleInteractor.js.map +1 -1
- package/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.js.map +1 -1
- package/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.d.ts.map +1 -1
- package/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js +1 -1
- package/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js.map +1 -1
- package/package.json +57 -21
- package/license.md +0 -28
package/docs/storage.md
CHANGED
|
@@ -22,28 +22,25 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
22
22
|
|
|
23
23
|
| | | |
|
|
24
24
|
| --- | --- | --- |
|
|
25
|
-
| [AdminStatsResult](#interface-adminstatsresult) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
30
|
-
| [
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [
|
|
35
|
-
| [
|
|
36
|
-
| [
|
|
37
|
-
| [
|
|
38
|
-
| [
|
|
39
|
-
| [
|
|
40
|
-
| [
|
|
41
|
-
| [
|
|
42
|
-
| [
|
|
43
|
-
| [
|
|
44
|
-
| [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableCertificate](#interface-tablecertificate) | [WalletStorageServerOptions](#interface-walletstorageserveroptions) |
|
|
45
|
-
| [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TableCertificateField](#interface-tablecertificatefield) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
|
|
46
|
-
| [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TableCertificateX](#interface-tablecertificatex) | |
|
|
25
|
+
| [AdminStatsResult](#interface-adminstatsresult) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [TableOutputBasket](#interface-tableoutputbasket) |
|
|
26
|
+
| [CommitNewTxResults](#interface-commitnewtxresults) | [ProvenTxReqHistory](#interface-proventxreqhistory) | [TableOutputTag](#interface-tableoutputtag) |
|
|
27
|
+
| [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [TableOutputTagMap](#interface-tableoutputtagmap) |
|
|
28
|
+
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [TableOutputX](#interface-tableoutputx) |
|
|
29
|
+
| [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageAdminStats](#interface-storageadminstats) | [TableProvenTx](#interface-tableproventx) |
|
|
30
|
+
| [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageIdbOptions](#interface-storageidboptions) | [TableProvenTxReq](#interface-tableproventxreq) |
|
|
31
|
+
| [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageIdbSchema](#interface-storageidbschema) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
|
|
32
|
+
| [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [StorageKnexOptions](#interface-storageknexoptions) | [TableSettings](#interface-tablesettings) |
|
|
33
|
+
| [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [StorageProviderOptions](#interface-storageprovideroptions) | [TableSyncState](#interface-tablesyncstate) |
|
|
34
|
+
| [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [StorageReaderOptions](#interface-storagereaderoptions) | [TableTransaction](#interface-tabletransaction) |
|
|
35
|
+
| [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) | [TableTxLabel](#interface-tabletxlabel) |
|
|
36
|
+
| [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [SyncError](#interface-syncerror) | [TableTxLabelMap](#interface-tabletxlabelmap) |
|
|
37
|
+
| [ListActionsSpecOp](#interface-listactionsspecop) | [SyncMap](#interface-syncmap) | [TableUser](#interface-tableuser) |
|
|
38
|
+
| [ListOutputsSpecOp](#interface-listoutputsspecop) | [TableCertificate](#interface-tablecertificate) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
|
|
39
|
+
| [MonitorAdminContext](#interface-monitoradmincontext) | [TableCertificateField](#interface-tablecertificatefield) | [VerifyAndRepairBeefResult](#interface-verifyandrepairbeefresult) |
|
|
40
|
+
| [MonitorAdminContextConfig](#interface-monitoradmincontextconfig) | [TableCertificateX](#interface-tablecertificatex) | [WalletStorageServerOptions](#interface-walletstorageserveroptions) |
|
|
41
|
+
| [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableCommission](#interface-tablecommission) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
|
|
42
|
+
| [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TableMonitorEvent](#interface-tablemonitorevent) | |
|
|
43
|
+
| [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TableOutput](#interface-tableoutput) | |
|
|
47
44
|
|
|
48
45
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
49
46
|
|
|
@@ -58,48 +55,7 @@ export interface AdminStatsResult extends StorageAdminStats {
|
|
|
58
55
|
}
|
|
59
56
|
```
|
|
60
57
|
|
|
61
|
-
See also: [ServicesCallHistory](./client.md#
|
|
62
|
-
|
|
63
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
##### Interface: AggregatePostBeefTxResult
|
|
67
|
-
|
|
68
|
-
```ts
|
|
69
|
-
export interface AggregatePostBeefTxResult {
|
|
70
|
-
txid: string;
|
|
71
|
-
txidResults: sdk.PostTxResultForTxid[];
|
|
72
|
-
status: AggregateStatus;
|
|
73
|
-
vreq: PostReqsToNetworkDetails;
|
|
74
|
-
successCount: number;
|
|
75
|
-
doubleSpendCount: number;
|
|
76
|
-
statusErrorCount: number;
|
|
77
|
-
serviceErrorCount: number;
|
|
78
|
-
competingTxs: string[];
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
See also: [PostReqsToNetworkDetails](./storage.md#interface-postreqstonetworkdetails), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
83
|
-
|
|
84
|
-
###### Property competingTxs
|
|
85
|
-
|
|
86
|
-
Any competing double spend txids reported for this txid
|
|
87
|
-
|
|
88
|
-
```ts
|
|
89
|
-
competingTxs: string[]
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
##### Interface: CanonicalFundingCandidate
|
|
96
|
-
|
|
97
|
-
```ts
|
|
98
|
-
export interface CanonicalFundingCandidate {
|
|
99
|
-
outputId: number;
|
|
100
|
-
satoshis: number;
|
|
101
|
-
}
|
|
102
|
-
```
|
|
58
|
+
See also: [ServicesCallHistory](./client.md#type-servicescallhistory), [StorageAdminStats](./storage.md#interface-storageadminstats)
|
|
103
59
|
|
|
104
60
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
105
61
|
|
|
@@ -357,34 +313,6 @@ See also: [GetReqsAndBeefDetail](./storage.md#interface-getreqsandbeefdetail)
|
|
|
357
313
|
|
|
358
314
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
359
315
|
|
|
360
|
-
---
|
|
361
|
-
##### Interface: KnexSessionManagerOptions
|
|
362
|
-
|
|
363
|
-
```ts
|
|
364
|
-
export interface KnexSessionManagerOptions {
|
|
365
|
-
ttlMs?: number;
|
|
366
|
-
now?: () => number;
|
|
367
|
-
}
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
###### Property now
|
|
371
|
-
|
|
372
|
-
Testable clock source. Defaults to `Date.now`.
|
|
373
|
-
|
|
374
|
-
```ts
|
|
375
|
-
now?: () => number
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
###### Property ttlMs
|
|
379
|
-
|
|
380
|
-
Session lifetime since its most recent authenticated use. Default: 24 hours.
|
|
381
|
-
|
|
382
|
-
```ts
|
|
383
|
-
ttlMs?: number
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
387
|
-
|
|
388
316
|
---
|
|
389
317
|
##### Interface: ListActionsSpecOp
|
|
390
318
|
|
|
@@ -393,7 +321,7 @@ export interface ListActionsSpecOp {
|
|
|
393
321
|
name: string;
|
|
394
322
|
labelsToIntercept?: string[];
|
|
395
323
|
setStatusFilter?: () => TransactionStatus[];
|
|
396
|
-
postProcess?: (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs:
|
|
324
|
+
postProcess?: (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction>[]) => Promise<void>;
|
|
397
325
|
}
|
|
398
326
|
```
|
|
399
327
|
|
|
@@ -422,7 +350,6 @@ export interface ListOutputsSpecOp {
|
|
|
422
350
|
includeOutputScripts?: boolean;
|
|
423
351
|
includeSpent?: boolean;
|
|
424
352
|
totalOutputsIsSumOfSatoshis?: boolean;
|
|
425
|
-
managedChangeOnly?: boolean;
|
|
426
353
|
resultFromTags?: (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListOutputsArgs, specOpTags: string[]) => Promise<ListOutputsResult>;
|
|
427
354
|
resultFromOutputs?: (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListOutputsArgs, specOpTags: string[], outputs: TableOutput[]) => Promise<ListOutputsResult>;
|
|
428
355
|
filterOutputs?: (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListOutputsArgs, specOpTags: string[], outputs: TableOutput[]) => Promise<TableOutput[]>;
|
|
@@ -433,14 +360,6 @@ export interface ListOutputsSpecOp {
|
|
|
433
360
|
|
|
434
361
|
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider), [TableOutput](./storage.md#interface-tableoutput)
|
|
435
362
|
|
|
436
|
-
###### Property managedChangeOnly
|
|
437
|
-
|
|
438
|
-
Restrict the operation to wallet-managed, BRC-29-signable change.
|
|
439
|
-
|
|
440
|
-
```ts
|
|
441
|
-
managedChangeOnly?: boolean
|
|
442
|
-
```
|
|
443
|
-
|
|
444
363
|
###### Property tagsParamsCount
|
|
445
364
|
|
|
446
365
|
How many positional tags to intercept.
|
|
@@ -599,7 +518,7 @@ export interface ProvenTxReqHistory {
|
|
|
599
518
|
}
|
|
600
519
|
```
|
|
601
520
|
|
|
602
|
-
See also: [ReqHistoryNote](./client.md#
|
|
521
|
+
See also: [ReqHistoryNote](./client.md#type-reqhistorynote)
|
|
603
522
|
|
|
604
523
|
###### Property notes
|
|
605
524
|
|
|
@@ -609,7 +528,7 @@ Values are a description of what happened.
|
|
|
609
528
|
```ts
|
|
610
529
|
notes?: ReqHistoryNote[]
|
|
611
530
|
```
|
|
612
|
-
See also: [ReqHistoryNote](./client.md#
|
|
531
|
+
See also: [ReqHistoryNote](./client.md#type-reqhistorynote)
|
|
613
532
|
|
|
614
533
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
615
534
|
|
|
@@ -640,26 +559,6 @@ export interface ProvenTxReqNotify {
|
|
|
640
559
|
|
|
641
560
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
642
561
|
|
|
643
|
-
---
|
|
644
|
-
##### Interface: SpentInputTransition
|
|
645
|
-
|
|
646
|
-
```ts
|
|
647
|
-
export interface SpentInputTransition {
|
|
648
|
-
outputId: number;
|
|
649
|
-
setSpentBy: boolean;
|
|
650
|
-
}
|
|
651
|
-
```
|
|
652
|
-
|
|
653
|
-
###### Property setSpentBy
|
|
654
|
-
|
|
655
|
-
true if the call set spentBy; false if only spendable was flipped.
|
|
656
|
-
|
|
657
|
-
```ts
|
|
658
|
-
setSpentBy: boolean
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
662
|
-
|
|
663
562
|
---
|
|
664
563
|
##### Interface: StorageAdminStats
|
|
665
564
|
|
|
@@ -740,27 +639,6 @@ export interface StorageAdminStats {
|
|
|
740
639
|
|
|
741
640
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
742
641
|
|
|
743
|
-
---
|
|
744
|
-
##### Interface: StorageClientOptions
|
|
745
|
-
|
|
746
|
-
```ts
|
|
747
|
-
export interface StorageClientOptions {
|
|
748
|
-
binaryRequests?: boolean;
|
|
749
|
-
}
|
|
750
|
-
```
|
|
751
|
-
|
|
752
|
-
###### Property binaryRequests
|
|
753
|
-
|
|
754
|
-
Send compact tagged binary request values after the server advertises
|
|
755
|
-
support. Leave disabled during rolling deployments where an endpoint may
|
|
756
|
-
still route requests to legacy server instances.
|
|
757
|
-
|
|
758
|
-
```ts
|
|
759
|
-
binaryRequests?: boolean
|
|
760
|
-
```
|
|
761
|
-
|
|
762
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
763
|
-
|
|
764
642
|
---
|
|
765
643
|
##### Interface: StorageIdbOptions
|
|
766
644
|
|
|
@@ -778,35 +656,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
778
656
|
|
|
779
657
|
```ts
|
|
780
658
|
export interface StorageIdbSchema {
|
|
781
|
-
action_batches: {
|
|
782
|
-
key: number;
|
|
783
|
-
value: TableActionBatch;
|
|
784
|
-
indexes: {
|
|
785
|
-
userId: number;
|
|
786
|
-
userId_batchId: [
|
|
787
|
-
number,
|
|
788
|
-
string
|
|
789
|
-
];
|
|
790
|
-
expiresAt: Date;
|
|
791
|
-
};
|
|
792
|
-
};
|
|
793
|
-
action_batch_outputs: {
|
|
794
|
-
key: number;
|
|
795
|
-
value: TableActionBatchOutput;
|
|
796
|
-
indexes: {
|
|
797
|
-
actionBatchId: number;
|
|
798
|
-
};
|
|
799
|
-
};
|
|
800
|
-
action_batch_blobs: {
|
|
801
|
-
key: [
|
|
802
|
-
number,
|
|
803
|
-
string
|
|
804
|
-
];
|
|
805
|
-
value: TableActionBatchBlob;
|
|
806
|
-
indexes: {
|
|
807
|
-
actionBatchId: number;
|
|
808
|
-
};
|
|
809
|
-
};
|
|
810
659
|
certificates: {
|
|
811
660
|
key: number;
|
|
812
661
|
value: TableCertificate;
|
|
@@ -955,7 +804,7 @@ export interface StorageIdbSchema {
|
|
|
955
804
|
}
|
|
956
805
|
```
|
|
957
806
|
|
|
958
|
-
See also: [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [SyncStatus](./client.md#type-syncstatus), [
|
|
807
|
+
See also: [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [SyncStatus](./client.md#type-syncstatus), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TransactionStatus](./client.md#type-transactionstatus)
|
|
959
808
|
|
|
960
809
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
961
810
|
|
|
@@ -989,6 +838,7 @@ export interface StorageProviderOptions extends StorageReaderWriterOptions {
|
|
|
989
838
|
feeModel: StorageFeeModel;
|
|
990
839
|
commissionSatoshis: number;
|
|
991
840
|
commissionPubKeyHex?: PubKeyHex;
|
|
841
|
+
scriptVerifier?: SpendVerifierInterface;
|
|
992
842
|
}
|
|
993
843
|
```
|
|
994
844
|
|
|
@@ -1013,6 +863,15 @@ A value of zero disables commission fees.
|
|
|
1013
863
|
commissionSatoshis: number
|
|
1014
864
|
```
|
|
1015
865
|
|
|
866
|
+
###### Property scriptVerifier
|
|
867
|
+
|
|
868
|
+
Optional verifier for server-side action-batch script checks. This Wallet
|
|
869
|
+
Toolbox extension leaves the BRC-100 interface unchanged.
|
|
870
|
+
|
|
871
|
+
```ts
|
|
872
|
+
scriptVerifier?: SpendVerifierInterface
|
|
873
|
+
```
|
|
874
|
+
|
|
1016
875
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1017
876
|
|
|
1018
877
|
---
|
|
@@ -1077,81 +936,6 @@ See also: [EntitySyncMap](./storage.md#interface-entitysyncmap)
|
|
|
1077
936
|
|
|
1078
937
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1079
938
|
|
|
1080
|
-
---
|
|
1081
|
-
##### Interface: TableActionBatch
|
|
1082
|
-
|
|
1083
|
-
```ts
|
|
1084
|
-
export interface TableActionBatch extends EntityTimeStamp {
|
|
1085
|
-
actionBatchId: number;
|
|
1086
|
-
userId: number;
|
|
1087
|
-
batchId: string;
|
|
1088
|
-
status: ActionBatchStatus;
|
|
1089
|
-
expiresAt: Date;
|
|
1090
|
-
hardExpiresAt: Date;
|
|
1091
|
-
manifestDigest?: string;
|
|
1092
|
-
uploadDigests?: string;
|
|
1093
|
-
result?: string;
|
|
1094
|
-
}
|
|
1095
|
-
```
|
|
1096
|
-
|
|
1097
|
-
See also: [ActionBatchStatus](./storage.md#type-actionbatchstatus), [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
1098
|
-
|
|
1099
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1100
|
-
|
|
1101
|
-
---
|
|
1102
|
-
##### Interface: TableActionBatchBlob
|
|
1103
|
-
|
|
1104
|
-
```ts
|
|
1105
|
-
export interface TableActionBatchBlob extends EntityTimeStamp {
|
|
1106
|
-
actionBatchBlobId: number;
|
|
1107
|
-
actionBatchId: number;
|
|
1108
|
-
digest: string;
|
|
1109
|
-
bytes: number[];
|
|
1110
|
-
}
|
|
1111
|
-
```
|
|
1112
|
-
|
|
1113
|
-
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
1114
|
-
|
|
1115
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1116
|
-
|
|
1117
|
-
---
|
|
1118
|
-
##### Interface: TableActionBatchOutput
|
|
1119
|
-
|
|
1120
|
-
```ts
|
|
1121
|
-
export interface TableActionBatchOutput extends EntityTimeStamp {
|
|
1122
|
-
actionBatchId: number;
|
|
1123
|
-
outputId: number;
|
|
1124
|
-
}
|
|
1125
|
-
```
|
|
1126
|
-
|
|
1127
|
-
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
1128
|
-
|
|
1129
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1130
|
-
|
|
1131
|
-
---
|
|
1132
|
-
##### Interface: TableAuthSession
|
|
1133
|
-
|
|
1134
|
-
Durable representation of a BRC-103 peer session.
|
|
1135
|
-
|
|
1136
|
-
The session nonce is the authoritative key. `lastUpdate` also acts as the
|
|
1137
|
-
optimistic-write version so a delayed request from one replica cannot
|
|
1138
|
-
overwrite newer authentication state written by another replica.
|
|
1139
|
-
|
|
1140
|
-
```ts
|
|
1141
|
-
export interface TableAuthSession {
|
|
1142
|
-
sessionNonce: string;
|
|
1143
|
-
peerNonce?: string | null;
|
|
1144
|
-
peerIdentityKey?: string | null;
|
|
1145
|
-
isAuthenticated: boolean | number;
|
|
1146
|
-
lastUpdate: number | string;
|
|
1147
|
-
certificatesRequired?: boolean | number | null;
|
|
1148
|
-
certificatesValidated?: boolean | number | null;
|
|
1149
|
-
expiresAt: number | string;
|
|
1150
|
-
}
|
|
1151
|
-
```
|
|
1152
|
-
|
|
1153
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1154
|
-
|
|
1155
939
|
---
|
|
1156
940
|
##### Interface: TableCertificate
|
|
1157
941
|
|
|
@@ -1392,8 +1176,6 @@ export interface TableProvenTxReq extends TableProvenTxReqDynamics {
|
|
|
1392
1176
|
notify: string;
|
|
1393
1177
|
rawTx: number[];
|
|
1394
1178
|
inputBEEF?: number[];
|
|
1395
|
-
wasBroadcast?: boolean;
|
|
1396
|
-
rebroadcastAttempts?: number;
|
|
1397
1179
|
}
|
|
1398
1180
|
```
|
|
1399
1181
|
|
|
@@ -1441,27 +1223,6 @@ Parses to `ProvenTxReqNotifyApi`.
|
|
|
1441
1223
|
notify: string
|
|
1442
1224
|
```
|
|
1443
1225
|
|
|
1444
|
-
###### Property rebroadcastAttempts
|
|
1445
|
-
|
|
1446
|
-
Count of how many times this req has been reset to 'unsent' for rebroadcast
|
|
1447
|
-
after proof check timeout. Used by the circuit-breaker (maxRebroadcastAttempts).
|
|
1448
|
-
Defaults to 0 (added by migration 2026-04-30-001).
|
|
1449
|
-
|
|
1450
|
-
```ts
|
|
1451
|
-
rebroadcastAttempts?: number
|
|
1452
|
-
```
|
|
1453
|
-
|
|
1454
|
-
###### Property wasBroadcast
|
|
1455
|
-
|
|
1456
|
-
Set to true the first time this req transitions to 'unmined' or 'callback' status,
|
|
1457
|
-
indicating the transaction was successfully broadcast to the network.
|
|
1458
|
-
Used to distinguish rebroadcast candidates from transactions that were never sent.
|
|
1459
|
-
Defaults to false (added by migration 2026-04-30-001).
|
|
1460
|
-
|
|
1461
|
-
```ts
|
|
1462
|
-
wasBroadcast?: boolean
|
|
1463
|
-
```
|
|
1464
|
-
|
|
1465
1226
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1466
1227
|
|
|
1467
1228
|
---
|
|
@@ -1479,8 +1240,6 @@ export interface TableProvenTxReqDynamics extends sdk.EntityTimeStamp {
|
|
|
1479
1240
|
batch?: string;
|
|
1480
1241
|
history: string;
|
|
1481
1242
|
notify: string;
|
|
1482
|
-
wasBroadcast?: boolean;
|
|
1483
|
-
rebroadcastAttempts?: number;
|
|
1484
1243
|
}
|
|
1485
1244
|
```
|
|
1486
1245
|
|
|
@@ -1528,24 +1287,6 @@ Parses to `ProvenTxReqNotifyApi`.
|
|
|
1528
1287
|
notify: string
|
|
1529
1288
|
```
|
|
1530
1289
|
|
|
1531
|
-
###### Property rebroadcastAttempts
|
|
1532
|
-
|
|
1533
|
-
Count of rebroadcast cycles for this req. Used by the circuit-breaker.
|
|
1534
|
-
Defaults to 0 (added by migration 2026-04-30-001).
|
|
1535
|
-
|
|
1536
|
-
```ts
|
|
1537
|
-
rebroadcastAttempts?: number
|
|
1538
|
-
```
|
|
1539
|
-
|
|
1540
|
-
###### Property wasBroadcast
|
|
1541
|
-
|
|
1542
|
-
Set to true the first time this req transitions to 'unmined' or 'callback' status.
|
|
1543
|
-
Defaults to false (added by migration 2026-04-30-001).
|
|
1544
|
-
|
|
1545
|
-
```ts
|
|
1546
|
-
wasBroadcast?: boolean
|
|
1547
|
-
```
|
|
1548
|
-
|
|
1549
1290
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1550
1291
|
|
|
1551
1292
|
---
|
|
@@ -1752,22 +1493,6 @@ export interface ValidateGenerateChangeSdkParamsResult {
|
|
|
1752
1493
|
|
|
1753
1494
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1754
1495
|
|
|
1755
|
-
---
|
|
1756
|
-
##### Interface: ValidatedBatchAction
|
|
1757
|
-
|
|
1758
|
-
```ts
|
|
1759
|
-
export interface ValidatedBatchAction {
|
|
1760
|
-
action: ActionBatchCommitAction;
|
|
1761
|
-
tx: Transaction;
|
|
1762
|
-
rawTx: number[];
|
|
1763
|
-
inputBeef: number[];
|
|
1764
|
-
}
|
|
1765
|
-
```
|
|
1766
|
-
|
|
1767
|
-
See also: [ActionBatchCommitAction](./client.md#interface-actionbatchcommitaction)
|
|
1768
|
-
|
|
1769
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1770
|
-
|
|
1771
1496
|
---
|
|
1772
1497
|
##### Interface: VerifyAndRepairBeefResult
|
|
1773
1498
|
|
|
@@ -1798,41 +1523,11 @@ export interface WalletStorageServerOptions {
|
|
|
1798
1523
|
calculateRequestPrice?: (req: Request) => number | Promise<number>;
|
|
1799
1524
|
adminIdentityKeys?: string[];
|
|
1800
1525
|
makeLogger?: MakeWalletLogger;
|
|
1801
|
-
sessionManager?: AuthMiddlewareOptions["sessionManager"];
|
|
1802
|
-
rateLimit?: Partial<RateLimitOptions>;
|
|
1803
|
-
logRpcRequests?: boolean;
|
|
1804
1526
|
}
|
|
1805
1527
|
```
|
|
1806
1528
|
|
|
1807
1529
|
See also: [Wallet](./client.md#class-wallet)
|
|
1808
1530
|
|
|
1809
|
-
###### Property logRpcRequests
|
|
1810
|
-
|
|
1811
|
-
Emit one JSON log record for each authenticated RPC. Default: true.
|
|
1812
|
-
|
|
1813
|
-
```ts
|
|
1814
|
-
logRpcRequests?: boolean
|
|
1815
|
-
```
|
|
1816
|
-
|
|
1817
|
-
###### Property rateLimit
|
|
1818
|
-
|
|
1819
|
-
Authenticated request rate limiting. Defaults to 1,000 requests per
|
|
1820
|
-
identity key per minute. Override the store for shared enforcement across
|
|
1821
|
-
multiple server processes or replicas.
|
|
1822
|
-
|
|
1823
|
-
```ts
|
|
1824
|
-
rateLimit?: Partial<RateLimitOptions>
|
|
1825
|
-
```
|
|
1826
|
-
|
|
1827
|
-
###### Property sessionManager
|
|
1828
|
-
|
|
1829
|
-
Shared BRC-103 session storage for multi-process or multi-replica servers.
|
|
1830
|
-
Defaults to the auth middleware's in-process SessionManager.
|
|
1831
|
-
|
|
1832
|
-
```ts
|
|
1833
|
-
sessionManager?: AuthMiddlewareOptions["sessionManager"]
|
|
1834
|
-
```
|
|
1835
|
-
|
|
1836
1531
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1837
1532
|
|
|
1838
1533
|
---
|
|
@@ -1857,16 +1552,15 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1857
1552
|
|
|
1858
1553
|
| | | |
|
|
1859
1554
|
| --- | --- | --- |
|
|
1860
|
-
| [AdminServer](#class-adminserver) | [
|
|
1861
|
-
| [EntityBase](#class-entitybase) | [
|
|
1862
|
-
| [EntityCertificate](#class-entitycertificate) | [
|
|
1863
|
-
| [EntityCertificateField](#class-entitycertificatefield) | [
|
|
1864
|
-
| [EntityCommission](#class-entitycommission) | [
|
|
1865
|
-
| [EntityOutput](#class-entityoutput) | [
|
|
1866
|
-
| [EntityOutputBasket](#class-entityoutputbasket) | [
|
|
1867
|
-
| [EntityOutputTag](#class-entityoutputtag) | [
|
|
1555
|
+
| [AdminServer](#class-adminserver) | [EntityProvenTx](#class-entityproventx) | [StorageClient](#class-storageclient) |
|
|
1556
|
+
| [EntityBase](#class-entitybase) | [EntityProvenTxReq](#class-entityproventxreq) | [StorageIdb](#class-storageidb) |
|
|
1557
|
+
| [EntityCertificate](#class-entitycertificate) | [EntitySyncState](#class-entitysyncstate) | [StorageKnex](#class-storageknex) |
|
|
1558
|
+
| [EntityCertificateField](#class-entitycertificatefield) | [EntityTransaction](#class-entitytransaction) | [StorageProvider](#class-storageprovider) |
|
|
1559
|
+
| [EntityCommission](#class-entitycommission) | [EntityTxLabel](#class-entitytxlabel) | [StorageReader](#class-storagereader) |
|
|
1560
|
+
| [EntityOutput](#class-entityoutput) | [EntityTxLabelMap](#class-entitytxlabelmap) | [StorageReaderWriter](#class-storagereaderwriter) |
|
|
1561
|
+
| [EntityOutputBasket](#class-entityoutputbasket) | [EntityUser](#class-entityuser) | [StorageServer](#class-storageserver) |
|
|
1562
|
+
| [EntityOutputTag](#class-entityoutputtag) | [KnexMigrations](#class-knexmigrations) | [StorageSyncReader](#class-storagesyncreader) |
|
|
1868
1563
|
| [EntityOutputTagMap](#class-entityoutputtagmap) | [MergeEntity](#class-mergeentity) | [WalletStorageManager](#class-walletstoragemanager) |
|
|
1869
|
-
| [EntityProvenTx](#class-entityproventx) | [StorageClient](#class-storageclient) | |
|
|
1870
1564
|
|
|
1871
1565
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1872
1566
|
|
|
@@ -2342,9 +2036,9 @@ export class EntityProvenTx extends EntityBase<TableProvenTx> {
|
|
|
2342
2036
|
}>
|
|
2343
2037
|
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: TrxToken): Promise<void>
|
|
2344
2038
|
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableProvenTx, syncMap: SyncMap, trx?: TrxToken): Promise<boolean>
|
|
2345
|
-
static
|
|
2346
|
-
static
|
|
2347
|
-
static async fromReq(req: EntityProvenTxReq, gmpResult: GetMerklePathResult, countsAsAttempt: boolean
|
|
2039
|
+
static getProofAttemptsLimit = 8;
|
|
2040
|
+
static getProofMinutes = 60;
|
|
2041
|
+
static async fromReq(req: EntityProvenTxReq, gmpResult: GetMerklePathResult, countsAsAttempt: boolean): Promise<EntityProvenTx | undefined>
|
|
2348
2042
|
}
|
|
2349
2043
|
```
|
|
2350
2044
|
|
|
@@ -2355,7 +2049,7 @@ See also: [EntityBase](./storage.md#class-entitybase), [EntityProvenTxReq](./sto
|
|
|
2355
2049
|
How high attempts can go before status is forced to invalid
|
|
2356
2050
|
|
|
2357
2051
|
```ts
|
|
2358
|
-
static
|
|
2052
|
+
static getProofAttemptsLimit = 8
|
|
2359
2053
|
```
|
|
2360
2054
|
|
|
2361
2055
|
###### Property getProofMinutes
|
|
@@ -2363,7 +2057,7 @@ static readonly getProofAttemptsLimit = 8
|
|
|
2363
2057
|
How many hours we have to try for a poof
|
|
2364
2058
|
|
|
2365
2059
|
```ts
|
|
2366
|
-
static
|
|
2060
|
+
static getProofMinutes = 60
|
|
2367
2061
|
```
|
|
2368
2062
|
|
|
2369
2063
|
###### Method fromReq
|
|
@@ -2373,7 +2067,7 @@ Try to create a new ProvenTx from a ProvenTxReq and GetMerkleProofResultApi
|
|
|
2373
2067
|
Otherwise it returns undefined and updates req.status to either 'unknown', 'invalid', or 'unconfirmed'
|
|
2374
2068
|
|
|
2375
2069
|
```ts
|
|
2376
|
-
static async fromReq(req: EntityProvenTxReq, gmpResult: GetMerklePathResult, countsAsAttempt: boolean
|
|
2070
|
+
static async fromReq(req: EntityProvenTxReq, gmpResult: GetMerklePathResult, countsAsAttempt: boolean): Promise<EntityProvenTx | undefined>
|
|
2377
2071
|
```
|
|
2378
2072
|
See also: [EntityProvenTx](./storage.md#class-entityproventx), [EntityProvenTxReq](./storage.md#class-entityproventxreq), [GetMerklePathResult](./client.md#interface-getmerklepathresult)
|
|
2379
2073
|
|
|
@@ -2411,7 +2105,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
2411
2105
|
|
|
2412
2106
|
```ts
|
|
2413
2107
|
export class EntityProvenTxReq extends EntityBase<TableProvenTxReq> {
|
|
2414
|
-
static readonly wasBroadcastStatuses: ProvenTxReqStatus[] = ["unmined", "callback", "unconfirmed", "completed"];
|
|
2415
2108
|
static async fromStorageTxid(storage: EntityStorage, txid: string, trx?: TrxToken): Promise<EntityProvenTxReq | undefined>
|
|
2416
2109
|
static async fromStorageId(storage: EntityStorage, id: number, trx?: TrxToken): Promise<EntityProvenTxReq>
|
|
2417
2110
|
static fromTxid(txid: string, rawTx: number[], inputBEEF?: number[]): EntityProvenTxReq
|
|
@@ -2461,14 +2154,6 @@ export class EntityProvenTxReq extends EntityBase<TableProvenTxReq> {
|
|
|
2461
2154
|
set notified(v: boolean)
|
|
2462
2155
|
get batch()
|
|
2463
2156
|
set batch(v: string | undefined)
|
|
2464
|
-
get wasBroadcast(): boolean
|
|
2465
|
-
set wasBroadcast(v: boolean)
|
|
2466
|
-
get rebroadcastAttempts(): number
|
|
2467
|
-
set rebroadcastAttempts(v: number)
|
|
2468
|
-
applyProofTimeout(maxRebroadcastAttempts = 0): {
|
|
2469
|
-
action: "invalid" | "rebroadcast";
|
|
2470
|
-
rebroadcastAttempts: number;
|
|
2471
|
-
}
|
|
2472
2157
|
override get id()
|
|
2473
2158
|
override set id(v: number)
|
|
2474
2159
|
override get entityName(): string
|
|
@@ -2488,7 +2173,7 @@ export class EntityProvenTxReq extends EntityBase<TableProvenTxReq> {
|
|
|
2488
2173
|
}
|
|
2489
2174
|
```
|
|
2490
2175
|
|
|
2491
|
-
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [ProvenTxReqHistory](./storage.md#interface-proventxreqhistory), [ProvenTxReqHistorySummaryApi](./storage.md#interface-proventxreqhistorysummaryapi), [ProvenTxReqNotify](./storage.md#interface-proventxreqnotify), [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [ReqHistoryNote](./client.md#
|
|
2176
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [ProvenTxReqHistory](./storage.md#interface-proventxreqhistory), [ProvenTxReqHistorySummaryApi](./storage.md#interface-proventxreqhistorysummaryapi), [ProvenTxReqNotify](./storage.md#interface-proventxreqnotify), [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [ReqHistoryNote](./client.md#type-reqhistorynote), [StorageProvider](./storage.md#class-storageprovider), [SyncMap](./storage.md#interface-syncmap), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TrxToken](./client.md#interface-trxtoken), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
2492
2177
|
|
|
2493
2178
|
###### Method addHistoryNote
|
|
2494
2179
|
|
|
@@ -2498,7 +2183,7 @@ Notes with identical property values to an existing note are ignored.
|
|
|
2498
2183
|
```ts
|
|
2499
2184
|
addHistoryNote(note: ReqHistoryNote, noDupes?: boolean)
|
|
2500
2185
|
```
|
|
2501
|
-
See also: [ReqHistoryNote](./client.md#
|
|
2186
|
+
See also: [ReqHistoryNote](./client.md#type-reqhistorynote)
|
|
2502
2187
|
|
|
2503
2188
|
Argument Details
|
|
2504
2189
|
|
|
@@ -2624,28 +2309,28 @@ export class EntitySyncState extends EntityBase<TableSyncState> {
|
|
|
2624
2309
|
to storage: ${c.toStorageIdentityKey}
|
|
2625
2310
|
for user: ${c.userIdentityKey}
|
|
2626
2311
|
`;
|
|
2627
|
-
if (c.user
|
|
2312
|
+
if (c.user)
|
|
2628
2313
|
log += ` USER activeStorage ${c.user.activeStorage}\n`;
|
|
2629
|
-
if (c.provenTxs
|
|
2630
|
-
log +=
|
|
2314
|
+
if (!!c.provenTxs) {
|
|
2315
|
+
log += ` PROVEN_TXS\n`;
|
|
2631
2316
|
for (const r of c.provenTxs) {
|
|
2632
2317
|
log += ` ${r.provenTxId} ${r.txid}\n`;
|
|
2633
2318
|
}
|
|
2634
2319
|
}
|
|
2635
|
-
if (c.provenTxReqs
|
|
2636
|
-
log +=
|
|
2320
|
+
if (!!c.provenTxReqs) {
|
|
2321
|
+
log += ` PROVEN_TX_REQS\n`;
|
|
2637
2322
|
for (const r of c.provenTxReqs) {
|
|
2638
2323
|
log += ` ${r.provenTxReqId} ${r.txid} ${r.status} ${r.provenTxId || ""}\n`;
|
|
2639
2324
|
}
|
|
2640
2325
|
}
|
|
2641
|
-
if (c.transactions
|
|
2642
|
-
log +=
|
|
2326
|
+
if (!!c.transactions) {
|
|
2327
|
+
log += ` TRANSACTIONS\n`;
|
|
2643
2328
|
for (const r of c.transactions) {
|
|
2644
2329
|
log += ` ${r.transactionId} ${r.txid} ${r.status} ${r.provenTxId || ""} sats:${r.satoshis}\n`;
|
|
2645
2330
|
}
|
|
2646
2331
|
}
|
|
2647
|
-
if (c.outputs
|
|
2648
|
-
log +=
|
|
2332
|
+
if (!!c.outputs) {
|
|
2333
|
+
log += ` OUTPUTS\n`;
|
|
2649
2334
|
for (const r of c.outputs) {
|
|
2650
2335
|
log += ` ${r.outputId} ${r.txid}.${r.vout} ${r.transactionId} ${r.spendable ? "spendable" : ""} sats:${r.satoshis}\n`;
|
|
2651
2336
|
}
|
|
@@ -2912,40 +2597,6 @@ Argument Details
|
|
|
2912
2597
|
|
|
2913
2598
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2914
2599
|
|
|
2915
|
-
---
|
|
2916
|
-
##### Class: KnexSessionManager
|
|
2917
|
-
|
|
2918
|
-
Shared BRC-103 session storage for horizontally scaled StorageServer nodes.
|
|
2919
|
-
|
|
2920
|
-
Every instance must use the same Knex database. The wallet-toolbox migration
|
|
2921
|
-
creates the required `auth_sessions` table. Writes are monotonic by
|
|
2922
|
-
`PeerSession.lastUpdate`, preventing a delayed request on one replica from
|
|
2923
|
-
replacing newer session state written by another replica.
|
|
2924
|
-
|
|
2925
|
-
```ts
|
|
2926
|
-
export class KnexSessionManager implements AsyncSessionManager {
|
|
2927
|
-
constructor(private readonly knex: Knex, options: KnexSessionManagerOptions = {})
|
|
2928
|
-
async addSession(session: PeerSession): Promise<void>
|
|
2929
|
-
async updateSession(session: PeerSession): Promise<void>
|
|
2930
|
-
async getSession(identifier: string): Promise<PeerSession | undefined>
|
|
2931
|
-
async removeSession(session: PeerSession): Promise<void>
|
|
2932
|
-
async hasSession(identifier: string): Promise<boolean>
|
|
2933
|
-
async pruneExpiredSessions(): Promise<number>
|
|
2934
|
-
}
|
|
2935
|
-
```
|
|
2936
|
-
|
|
2937
|
-
See also: [KnexSessionManagerOptions](./storage.md#interface-knexsessionmanageroptions)
|
|
2938
|
-
|
|
2939
|
-
###### Method pruneExpiredSessions
|
|
2940
|
-
|
|
2941
|
-
Delete expired rows. Call from an operator-controlled maintenance task.
|
|
2942
|
-
|
|
2943
|
-
```ts
|
|
2944
|
-
async pruneExpiredSessions(): Promise<number>
|
|
2945
|
-
```
|
|
2946
|
-
|
|
2947
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2948
|
-
|
|
2949
2600
|
---
|
|
2950
2601
|
##### Class: MergeEntity
|
|
2951
2602
|
|
|
@@ -3001,51 +2652,11 @@ the party making requests of the remote service.
|
|
|
3001
2652
|
For details of the API implemented, follow the "See also" link for the `WalletStorageProvider` interface.
|
|
3002
2653
|
|
|
3003
2654
|
```ts
|
|
3004
|
-
export class StorageClient
|
|
3005
|
-
constructor(wallet: WalletInterface, endpointUrl: string, options: StorageClientOptions = {})
|
|
3006
|
-
protected async rpcCall<T>(method: string, params: unknown[]): Promise<T>
|
|
3007
|
-
}
|
|
3008
|
-
```
|
|
3009
|
-
|
|
3010
|
-
See also: [StorageClientBase](./storage.md#class-storageclientbase), [StorageClientOptions](./storage.md#interface-storageclientoptions)
|
|
3011
|
-
|
|
3012
|
-
###### Method rpcCall
|
|
3013
|
-
|
|
3014
|
-
Make a JSON-RPC call to the remote server.
|
|
3015
|
-
|
|
3016
|
-
```ts
|
|
3017
|
-
protected async rpcCall<T>(method: string, params: unknown[]): Promise<T>
|
|
3018
|
-
```
|
|
3019
|
-
|
|
3020
|
-
Argument Details
|
|
3021
|
-
|
|
3022
|
-
+ **method**
|
|
3023
|
-
+ The WalletStorage method name to call.
|
|
3024
|
-
+ **params**
|
|
3025
|
-
+ The array of parameters to pass to the method in order.
|
|
3026
|
-
|
|
3027
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3028
|
-
|
|
3029
|
-
---
|
|
3030
|
-
##### Class: StorageClientBase
|
|
3031
|
-
|
|
3032
|
-
Abstract base class shared by `StorageClient` and `StorageMobile`.
|
|
3033
|
-
|
|
3034
|
-
Contains all `WalletStorageProvider` method implementations and entity-validation
|
|
3035
|
-
helpers. Subclasses only need to provide `rpcCall`, which differs between
|
|
3036
|
-
the full (logger-aware) and mobile (lightweight) variants.
|
|
3037
|
-
|
|
3038
|
-
```ts
|
|
3039
|
-
export abstract class StorageClientBase implements WalletStorageProvider {
|
|
2655
|
+
export class StorageClient implements WalletStorageProvider {
|
|
3040
2656
|
readonly endpointUrl: string;
|
|
3041
|
-
protected readonly authClient: AuthFetch;
|
|
3042
|
-
protected nextId = 1;
|
|
3043
|
-
protected serverSupportsBinary = false;
|
|
3044
|
-
protected readonly binaryRequests: boolean;
|
|
3045
2657
|
public settings?: TableSettings;
|
|
3046
|
-
constructor(wallet: WalletInterface, endpointUrl: string
|
|
2658
|
+
constructor(wallet: WalletInterface, endpointUrl: string)
|
|
3047
2659
|
isStorageProvider(): boolean
|
|
3048
|
-
protected abstract rpcCall<T>(method: string, params: unknown[]): Promise<T>;
|
|
3049
2660
|
isAvailable(): boolean
|
|
3050
2661
|
getSettings(): TableSettings
|
|
3051
2662
|
async makeAvailable(): Promise<TableSettings>
|
|
@@ -3056,14 +2667,6 @@ export abstract class StorageClientBase implements WalletStorageProvider {
|
|
|
3056
2667
|
async internalizeAction(auth: AuthId, args: InternalizeActionArgs): Promise<StorageInternalizeActionResult>
|
|
3057
2668
|
async createAction(auth: AuthId, args: Validation.ValidCreateActionArgs): Promise<StorageCreateActionResult>
|
|
3058
2669
|
async processAction(auth: AuthId, args: StorageProcessActionArgs): Promise<StorageProcessActionResults>
|
|
3059
|
-
async getCapabilities(): Promise<StorageCapabilities>
|
|
3060
|
-
async beginActionBatch(auth: AuthId, args: BeginActionBatchArgs): Promise<BeginActionBatchResult>
|
|
3061
|
-
async extendActionBatch(auth: AuthId, args: ExtendActionBatchArgs): Promise<ExtendActionBatchResult>
|
|
3062
|
-
async renewActionBatch(auth: AuthId, batchId: string): Promise<RenewActionBatchResult>
|
|
3063
|
-
async prepareActionBatchCommit(auth: AuthId, manifest: ActionBatchManifest): Promise<PrepareActionBatchCommitResult>
|
|
3064
|
-
async putActionBatchBlob(auth: AuthId, args: PutActionBatchBlobArgs): Promise<void>
|
|
3065
|
-
async commitActionBatch(auth: AuthId, manifest: ActionBatchManifest): Promise<CommitActionBatchResult>
|
|
3066
|
-
async abortActionBatch(auth: AuthId, batchId: string): Promise<AbortActionBatchResult>
|
|
3067
2670
|
async abortAction(auth: AuthId, args: AbortActionArgs): Promise<AbortActionResult>
|
|
3068
2671
|
async findOrInsertUser(identityKey): Promise<{
|
|
3069
2672
|
user: TableUser;
|
|
@@ -3093,7 +2696,7 @@ export abstract class StorageClientBase implements WalletStorageProvider {
|
|
|
3093
2696
|
}
|
|
3094
2697
|
```
|
|
3095
2698
|
|
|
3096
|
-
See also: [
|
|
2699
|
+
See also: [AuthId](./client.md#interface-authid), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageInternalizeActionResult](./client.md#interface-storageinternalizeactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [SyncChunk](./client.md#interface-syncchunk), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableUser](./storage.md#interface-tableuser), [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](./client.md#interface-updateproventxreqwithnewproventxresult), [WalletServices](./client.md#interface-walletservices), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [createAction](./storage.md#function-createaction), [getSyncChunk](./storage.md#function-getsyncchunk), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
3097
2700
|
|
|
3098
2701
|
###### Method abortAction
|
|
3099
2702
|
|
|
@@ -3583,22 +3186,6 @@ This must match the `AuthFetch` identity securing the remote conneciton.
|
|
|
3583
3186
|
+ **args**
|
|
3584
3187
|
+ original wallet `relinquishOutput` args.
|
|
3585
3188
|
|
|
3586
|
-
###### Method rpcCall
|
|
3587
|
-
|
|
3588
|
-
Make a JSON-RPC call to the remote server.
|
|
3589
|
-
Implemented differently by each subclass (with or without logger support).
|
|
3590
|
-
|
|
3591
|
-
```ts
|
|
3592
|
-
protected abstract rpcCall<T>(method: string, params: unknown[]): Promise<T>
|
|
3593
|
-
```
|
|
3594
|
-
|
|
3595
|
-
Argument Details
|
|
3596
|
-
|
|
3597
|
-
+ **method**
|
|
3598
|
-
+ The WalletStorage method name to call.
|
|
3599
|
-
+ **params**
|
|
3600
|
-
+ The array of parameters to pass to the method in order.
|
|
3601
|
-
|
|
3602
3189
|
###### Method setActive
|
|
3603
3190
|
|
|
3604
3191
|
Ensures up-to-date wallet data replication to all configured backup storage providers,
|
|
@@ -3686,7 +3273,6 @@ export class StorageIdb extends StorageProvider implements WalletStorageProvider
|
|
|
3686
3273
|
dbName: string;
|
|
3687
3274
|
db?: IDBPDatabase<StorageIdbSchema>;
|
|
3688
3275
|
constructor(options: StorageIdbOptions)
|
|
3689
|
-
protected override supportsActionBatchPersistence(): boolean
|
|
3690
3276
|
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
3691
3277
|
async verifyDB(storageName?: string, storageIdentityKey?: string): Promise<IDBPDatabase<StorageIdbSchema>>
|
|
3692
3278
|
toDbTrx(stores: string[], mode: "readonly" | "readwrite", trx?: TrxToken): IDBPTransaction<StorageIdbSchema, string[], "readwrite" | "readonly">
|
|
@@ -3740,7 +3326,7 @@ export class StorageIdb extends StorageProvider implements WalletStorageProvider
|
|
|
3740
3326
|
async insertTxLabelMap(labelMap: TableTxLabelMap, trx?: TrxToken): Promise<void>
|
|
3741
3327
|
async insertUser(user: TableUser, trx?: TrxToken): Promise<number>
|
|
3742
3328
|
async updateIdb<T>(id: number | number[], update: Partial<T>, keyProp: string, storeName: string, trx?: TrxToken): Promise<number>
|
|
3743
|
-
async updateIdbKey<T>(key:
|
|
3329
|
+
async updateIdbKey<T>(key: (number | string)[], update: Partial<T>, keyProps: string[], storeName: string, trx?: TrxToken): Promise<number>
|
|
3744
3330
|
async updateCertificate(id: number, update: Partial<TableCertificate>, trx?: TrxToken): Promise<number>
|
|
3745
3331
|
async updateCertificateField(certificateId: number, fieldName: string, update: Partial<TableCertificateField>, trx?: TrxToken): Promise<number>
|
|
3746
3332
|
async updateCommission(id: number, update: Partial<TableCommission>, trx?: TrxToken): Promise<number>
|
|
@@ -3758,9 +3344,6 @@ export class StorageIdb extends StorageProvider implements WalletStorageProvider
|
|
|
3758
3344
|
async updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<TableTxLabelMap>, trx?: TrxToken): Promise<number>
|
|
3759
3345
|
async destroy(): Promise<void>
|
|
3760
3346
|
allStores: string[] = [
|
|
3761
|
-
"action_batches",
|
|
3762
|
-
"action_batch_outputs",
|
|
3763
|
-
"action_batch_blobs",
|
|
3764
3347
|
"certificates",
|
|
3765
3348
|
"certificate_fields",
|
|
3766
3349
|
"commissions",
|
|
@@ -3777,18 +3360,6 @@ export class StorageIdb extends StorageProvider implements WalletStorageProvider
|
|
|
3777
3360
|
"tx_labels_map",
|
|
3778
3361
|
"users"
|
|
3779
3362
|
];
|
|
3780
|
-
override async insertActionBatch(batch: TableActionBatch, trx?: TrxToken): Promise<number>
|
|
3781
|
-
override async findActionBatch(userId: number, batchId: string, trx?: TrxToken): Promise<TableActionBatch | undefined>
|
|
3782
|
-
override async findExpiredActionBatches(now: Date, trx?: TrxToken): Promise<TableActionBatch[]>
|
|
3783
|
-
override async updateActionBatch(actionBatchId: number, update: Partial<TableActionBatch>, trx?: TrxToken): Promise<number>
|
|
3784
|
-
override async deleteActionBatch(actionBatchId: number, trx?: TrxToken): Promise<void>
|
|
3785
|
-
override async reserveActionBatchOutputs(reservations: TableActionBatchOutput[], trx?: TrxToken): Promise<void>
|
|
3786
|
-
override async findActionBatchOutputIds(actionBatchId: number, trx?: TrxToken): Promise<number[]>
|
|
3787
|
-
override async findReservedActionBatchOutputIds(outputIds: number[], trx?: TrxToken): Promise<number[]>
|
|
3788
|
-
override async deleteActionBatchOutputReservations(actionBatchId: number, trx?: TrxToken): Promise<void>
|
|
3789
|
-
override async putActionBatchBlobRecord(blob: TableActionBatchBlob, trx?: TrxToken): Promise<void>
|
|
3790
|
-
override async findActionBatchBlobRecord(actionBatchId: number, digest: string, trx?: TrxToken): Promise<TableActionBatchBlob | undefined>
|
|
3791
|
-
override async deleteActionBatchBlobRecords(actionBatchId: number, trx?: TrxToken): Promise<void>
|
|
3792
3363
|
async transaction<T>(scope: (trx: TrxToken) => Promise<T>, trx?: TrxToken): Promise<T>
|
|
3793
3364
|
async filterCertificateFields(args: FindCertificateFieldsArgs, filtered: (v: TableCertificateField) => void): Promise<void>
|
|
3794
3365
|
async findCertificateFields(args: FindCertificateFieldsArgs): Promise<TableCertificateField[]>
|
|
@@ -3837,7 +3408,7 @@ export class StorageIdb extends StorageProvider implements WalletStorageProvider
|
|
|
3837
3408
|
}
|
|
3838
3409
|
```
|
|
3839
3410
|
|
|
3840
|
-
See also: [AuthId](./client.md#interface-authid), [DBType](./storage.md#type-dbtype), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageAdminStats](./storage.md#interface-storageadminstats), [StorageIdbOptions](./storage.md#interface-storageidboptions), [StorageIdbSchema](./storage.md#interface-storageidbschema), [StorageProvider](./storage.md#class-storageprovider), [
|
|
3411
|
+
See also: [AuthId](./client.md#interface-authid), [DBType](./storage.md#type-dbtype), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageAdminStats](./storage.md#interface-storageadminstats), [StorageIdbOptions](./storage.md#interface-storageidboptions), [StorageIdbSchema](./storage.md#interface-storageidbschema), [StorageProvider](./storage.md#class-storageprovider), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [listActions](./storage.md#function-listactions), [listOutputs](./storage.md#function-listoutputs), [purgeData](./storage.md#function-purgedata), [reviewStatus](./storage.md#function-reviewstatus)
|
|
3841
3412
|
|
|
3842
3413
|
###### Method allocateChangeInput
|
|
3843
3414
|
|
|
@@ -3847,8 +3418,7 @@ Proceeds in three stages:
|
|
|
3847
3418
|
3. Find an output that comes as close to funding as possible (targetSatoshis).
|
|
3848
3419
|
4. Return undefined if no output is found.
|
|
3849
3420
|
|
|
3850
|
-
Outputs must belong to userId and basketId and
|
|
3851
|
-
BRC-29 change policy.
|
|
3421
|
+
Outputs must belong to userId and basketId and have spendable true.
|
|
3852
3422
|
Their corresponding transaction must have status of 'completed', 'unproven', or 'sending' (if excludeSending is false).
|
|
3853
3423
|
|
|
3854
3424
|
```ts
|
|
@@ -3961,10 +3531,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
3961
3531
|
export class StorageKnex extends StorageProvider implements WalletStorageProvider {
|
|
3962
3532
|
knex: Knex;
|
|
3963
3533
|
constructor(options: StorageKnexOptions)
|
|
3964
|
-
protected override supportsActionBatchPersistence(): boolean
|
|
3965
3534
|
async readSettings(): Promise<TableSettings>
|
|
3966
3535
|
override async getProvenOrRawTx(txid: string, trx?: TrxToken): Promise<ProvenOrRawTx>
|
|
3967
|
-
dbTypeSubstring(source: string, fromOffset: number, forLength?: number)
|
|
3536
|
+
dbTypeSubstring(source: string, fromOffset: number, forLength?: number)
|
|
3968
3537
|
override async getRawTxOfKnownValidTransaction(txid?: string, offset?: number, length?: number, trx?: TrxToken): Promise<number[] | undefined>
|
|
3969
3538
|
getProvenTxsForUserQuery(args: FindForUserSincePagedArgs): Knex.QueryBuilder
|
|
3970
3539
|
override async getProvenTxsForUser(args: FindForUserSincePagedArgs): Promise<TableProvenTx[]>
|
|
@@ -3977,19 +3546,6 @@ export class StorageKnex extends StorageProvider implements WalletStorageProvide
|
|
|
3977
3546
|
override async listActions(auth: AuthId, vargs: Validation.ValidListActionsArgs): Promise<ListActionsResult>
|
|
3978
3547
|
override async listOutputs(auth: AuthId, vargs: Validation.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
3979
3548
|
override async insertProvenTx(tx: TableProvenTx, trx?: TrxToken): Promise<number>
|
|
3980
|
-
override async insertActionBatch(batch: TableActionBatch, trx?: TrxToken): Promise<number>
|
|
3981
|
-
override async findActionBatch(userId: number, batchId: string, trx?: TrxToken): Promise<TableActionBatch | undefined>
|
|
3982
|
-
override async findActionBatchForUpdate(userId: number, batchId: string, trx: TrxToken): Promise<TableActionBatch | undefined>
|
|
3983
|
-
override async findExpiredActionBatches(now: Date, trx?: TrxToken): Promise<TableActionBatch[]>
|
|
3984
|
-
override async updateActionBatch(actionBatchId: number, update: Partial<TableActionBatch>, trx?: TrxToken): Promise<number>
|
|
3985
|
-
override async deleteActionBatch(actionBatchId: number, trx?: TrxToken): Promise<void>
|
|
3986
|
-
override async reserveActionBatchOutputs(reservations: TableActionBatchOutput[], trx?: TrxToken): Promise<void>
|
|
3987
|
-
override async findActionBatchOutputIds(actionBatchId: number, trx?: TrxToken): Promise<number[]>
|
|
3988
|
-
override async findReservedActionBatchOutputIds(outputIds: number[], trx?: TrxToken): Promise<number[]>
|
|
3989
|
-
override async deleteActionBatchOutputReservations(actionBatchId: number, trx?: TrxToken): Promise<void>
|
|
3990
|
-
override async putActionBatchBlobRecord(blob: TableActionBatchBlob, trx?: TrxToken): Promise<void>
|
|
3991
|
-
override async findActionBatchBlobRecord(actionBatchId: number, digest: string, trx?: TrxToken): Promise<TableActionBatchBlob | undefined>
|
|
3992
|
-
override async deleteActionBatchBlobRecords(actionBatchId: number, trx?: TrxToken): Promise<void>
|
|
3993
3549
|
override async insertProvenTxReq(tx: TableProvenTxReq, trx?: TrxToken): Promise<number>
|
|
3994
3550
|
override async insertUser(user: TableUser, trx?: TrxToken): Promise<number>
|
|
3995
3551
|
override async insertCertificateAuth(auth: AuthId, certificate: TableCertificateX): Promise<number>
|
|
@@ -4077,7 +3633,7 @@ export class StorageKnex extends StorageProvider implements WalletStorageProvide
|
|
|
4077
3633
|
override async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
4078
3634
|
override async dropAllData(): Promise<void>
|
|
4079
3635
|
override async transaction<T>(scope: (trx: TrxToken) => Promise<T>, trx?: TrxToken): Promise<T>
|
|
4080
|
-
toDb(trx?: TrxToken)
|
|
3636
|
+
toDb(trx?: TrxToken)
|
|
4081
3637
|
async validateRawTransaction(t: TableTransaction, trx?: TrxToken): Promise<void>
|
|
4082
3638
|
_verifiedReadyForDatabaseAccess: boolean = false;
|
|
4083
3639
|
async verifyReadyForDatabaseAccess(trx?: TrxToken): Promise<DBType>
|
|
@@ -4098,10 +3654,6 @@ export class StorageKnex extends StorageProvider implements WalletStorageProvide
|
|
|
4098
3654
|
txid: string;
|
|
4099
3655
|
vout: number;
|
|
4100
3656
|
}>, trx?: TrxToken): Promise<Record<string, TableOutput>>
|
|
4101
|
-
override async findOutputsByOutpointsForUpdate(userId: number, outpoints: Array<{
|
|
4102
|
-
txid: string;
|
|
4103
|
-
vout: number;
|
|
4104
|
-
}>, trx: TrxToken): Promise<Record<string, TableOutput>>
|
|
4105
3657
|
override async findOrInsertOutputBasketsBulk(userId: number, names: string[], trx?: TrxToken): Promise<Record<string, TableOutputBasket>>
|
|
4106
3658
|
override async findOrInsertOutputTagsBulk(userId: number, tags: string[], trx?: TrxToken): Promise<Record<string, TableOutputTag>>
|
|
4107
3659
|
override async sumSpendableSatoshisInBasket(userId: number, basketId: number, excludeSending: boolean, trx?: TrxToken): Promise<number>
|
|
@@ -4116,81 +3668,81 @@ export class StorageKnex extends StorageProvider implements WalletStorageProvide
|
|
|
4116
3668
|
orderDescending: true,
|
|
4117
3669
|
paged: { limit: 1 }
|
|
4118
3670
|
}));
|
|
4119
|
-
const monitorStats: ServicesCallHistory | undefined =
|
|
3671
|
+
const monitorStats: ServicesCallHistory | undefined = monitorEvent ? JSON.parse(monitorEvent.details!) : undefined;
|
|
4120
3672
|
const servicesStats = this.getServices().getServicesCallHistory(true);
|
|
4121
|
-
const
|
|
4122
|
-
const
|
|
4123
|
-
const
|
|
3673
|
+
const one_day_ago = new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString();
|
|
3674
|
+
const one_week_ago = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString();
|
|
3675
|
+
const one_month_ago = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString();
|
|
4124
3676
|
const [[{ usersDay, usersMonth, usersWeek, usersTotal, transactionsDay, transactionsMonth, transactionsWeek, transactionsTotal, txCompletedDay, txCompletedMonth, txCompletedWeek, txCompletedTotal, txFailedDay, txFailedMonth, txFailedWeek, txFailedTotal, txAbandonedDay, txAbandonedMonth, txAbandonedWeek, txAbandonedTotal, txUnprocessedDay, txUnprocessedMonth, txUnprocessedWeek, txUnprocessedTotal, txSendingDay, txSendingMonth, txSendingWeek, txSendingTotal, txUnprovenDay, txUnprovenMonth, txUnprovenWeek, txUnprovenTotal, txUnsignedDay, txUnsignedMonth, txUnsignedWeek, txUnsignedTotal, txNosendDay, txNosendMonth, txNosendWeek, txNosendTotal, txNonfinalDay, txNonfinalMonth, txNonfinalWeek, txNonfinalTotal, txUnfailDay, txUnfailMonth, txUnfailWeek, txUnfailTotal, satoshisDefaultDay, satoshisDefaultMonth, satoshisDefaultWeek, satoshisDefaultTotal, satoshisOtherDay, satoshisOtherMonth, satoshisOtherWeek, satoshisOtherTotal, basketsDay, basketsMonth, basketsWeek, basketsTotal, labelsDay, labelsMonth, labelsWeek, labelsTotal, tagsDay, tagsMonth, tagsWeek, tagsTotal }]] = await this.knex.raw(`
|
|
4125
3677
|
select
|
|
4126
|
-
(select count(*) from users where created_at > '${
|
|
4127
|
-
(select count(*) from users where created_at > '${
|
|
4128
|
-
(select count(*) from users where created_at > '${
|
|
4129
|
-
|
|
4130
|
-
(select count(*) from transactions where created_at > '${
|
|
4131
|
-
(select count(*) from transactions where created_at > '${
|
|
4132
|
-
(select count(*) from transactions where created_at > '${
|
|
4133
|
-
|
|
4134
|
-
(select count(*) from transactions where status = 'completed' and created_at > '${
|
|
4135
|
-
(select count(*) from transactions where status = 'completed' and created_at > '${
|
|
4136
|
-
(select count(*) from transactions where status = 'completed' and created_at > '${
|
|
4137
|
-
|
|
4138
|
-
(select count(*) from transactions where status = 'failed' and not txid is null and created_at > '${
|
|
4139
|
-
(select count(*) from transactions where status = 'failed' and not txid is null and created_at > '${
|
|
4140
|
-
(select count(*) from transactions where status = 'failed' and not txid is null and created_at > '${
|
|
4141
|
-
|
|
4142
|
-
(select count(*) from transactions where status = 'failed' and txid is null and created_at > '${
|
|
4143
|
-
(select count(*) from transactions where status = 'failed' and txid is null and created_at > '${
|
|
4144
|
-
(select count(*) from transactions where status = 'failed' and txid is null and created_at > '${
|
|
4145
|
-
|
|
4146
|
-
(select count(*) from transactions where status = 'unprocessed' and created_at > '${
|
|
4147
|
-
(select count(*) from transactions where status = 'unprocessed' and created_at > '${
|
|
4148
|
-
(select count(*) from transactions where status = 'unprocessed' and created_at > '${
|
|
4149
|
-
|
|
4150
|
-
(select count(*) from transactions where status = 'sending' and created_at > '${
|
|
4151
|
-
(select count(*) from transactions where status = 'sending' and created_at > '${
|
|
4152
|
-
(select count(*) from transactions where status = 'sending' and created_at > '${
|
|
4153
|
-
|
|
4154
|
-
(select count(*) from transactions where status = 'unproven' and created_at > '${
|
|
4155
|
-
(select count(*) from transactions where status = 'unproven' and created_at > '${
|
|
4156
|
-
(select count(*) from transactions where status = 'unproven' and created_at > '${
|
|
4157
|
-
|
|
4158
|
-
(select count(*) from transactions where status = 'unsigned' and created_at > '${
|
|
4159
|
-
(select count(*) from transactions where status = 'unsigned' and created_at > '${
|
|
4160
|
-
(select count(*) from transactions where status = 'unsigned' and created_at > '${
|
|
4161
|
-
|
|
4162
|
-
(select count(*) from transactions where status = 'nosend' and created_at > '${
|
|
4163
|
-
(select count(*) from transactions where status = 'nosend' and created_at > '${
|
|
4164
|
-
(select count(*) from transactions where status = 'nosend' and created_at > '${
|
|
4165
|
-
|
|
4166
|
-
(select count(*) from transactions where status = 'nonfinal' and created_at > '${
|
|
4167
|
-
(select count(*) from transactions where status = 'nonfinal' and created_at > '${
|
|
4168
|
-
(select count(*) from transactions where status = 'nonfinal' and created_at > '${
|
|
4169
|
-
|
|
4170
|
-
(select count(*) from transactions where status = 'unfail' and created_at > '${
|
|
4171
|
-
(select count(*) from transactions where status = 'unfail' and created_at > '${
|
|
4172
|
-
(select count(*) from transactions where status = 'unfail' and created_at > '${
|
|
4173
|
-
|
|
4174
|
-
(select sum(
|
|
4175
|
-
(select sum(
|
|
4176
|
-
(select sum(
|
|
4177
|
-
|
|
4178
|
-
(select sum(
|
|
4179
|
-
(select sum(
|
|
4180
|
-
(select sum(
|
|
4181
|
-
|
|
4182
|
-
(select count(*) from output_baskets where created_at > '${
|
|
4183
|
-
(select count(*) from output_baskets where created_at > '${
|
|
4184
|
-
(select count(*) from output_baskets where created_at > '${
|
|
4185
|
-
|
|
4186
|
-
(select count(*) from tx_labels where created_at > '${
|
|
4187
|
-
(select count(*) from tx_labels where created_at > '${
|
|
4188
|
-
(select count(*) from tx_labels where created_at > '${
|
|
4189
|
-
|
|
4190
|
-
(select count(*) from output_tags where created_at > '${
|
|
4191
|
-
(select count(*) from output_tags where created_at > '${
|
|
4192
|
-
(select count(*) from output_tags where created_at > '${
|
|
4193
|
-
|
|
3678
|
+
(select count(*) from users where created_at > '${one_day_ago}') as usersDay,
|
|
3679
|
+
(select count(*) from users where created_at > '${one_week_ago}') as usersWeek,
|
|
3680
|
+
(select count(*) from users where created_at > '${one_month_ago}') as usersMonth,
|
|
3681
|
+
(select count(*) from users) as usersTotal,
|
|
3682
|
+
(select count(*) from transactions where created_at > '${one_day_ago}') as transactionsDay,
|
|
3683
|
+
(select count(*) from transactions where created_at > '${one_week_ago}') as transactionsWeek,
|
|
3684
|
+
(select count(*) from transactions where created_at > '${one_month_ago}') as transactionsMonth,
|
|
3685
|
+
(select count(*) from transactions) as transactionsTotal,
|
|
3686
|
+
(select count(*) from transactions where status = 'completed' and created_at > '${one_day_ago}') as txCompletedDay,
|
|
3687
|
+
(select count(*) from transactions where status = 'completed' and created_at > '${one_week_ago}') as txCompletedWeek,
|
|
3688
|
+
(select count(*) from transactions where status = 'completed' and created_at > '${one_month_ago}') as txCompletedMonth,
|
|
3689
|
+
(select count(*) from transactions where status = 'completed') as txCompletedTotal,
|
|
3690
|
+
(select count(*) from transactions where status = 'failed' and not txid is null and created_at > '${one_day_ago}') as txFailedDay,
|
|
3691
|
+
(select count(*) from transactions where status = 'failed' and not txid is null and created_at > '${one_week_ago}') as txFailedWeek,
|
|
3692
|
+
(select count(*) from transactions where status = 'failed' and not txid is null and created_at > '${one_month_ago}') as txFailedMonth,
|
|
3693
|
+
(select count(*) from transactions where status = 'failed' and not txid is null) as txFailedTotal,
|
|
3694
|
+
(select count(*) from transactions where status = 'failed' and txid is null and created_at > '${one_day_ago}') as txAbandonedDay,
|
|
3695
|
+
(select count(*) from transactions where status = 'failed' and txid is null and created_at > '${one_week_ago}') as txAbandonedWeek,
|
|
3696
|
+
(select count(*) from transactions where status = 'failed' and txid is null and created_at > '${one_month_ago}') as txAbandonedMonth,
|
|
3697
|
+
(select count(*) from transactions where status = 'failed' and txid is null) as txAbandonedTotal,
|
|
3698
|
+
(select count(*) from transactions where status = 'unprocessed' and created_at > '${one_day_ago}') as txUnprocessedDay,
|
|
3699
|
+
(select count(*) from transactions where status = 'unprocessed' and created_at > '${one_week_ago}') as txUnprocessedWeek,
|
|
3700
|
+
(select count(*) from transactions where status = 'unprocessed' and created_at > '${one_month_ago}') as txUnprocessedMonth,
|
|
3701
|
+
(select count(*) from transactions where status = 'unprocessed') as txUnprocessedTotal,
|
|
3702
|
+
(select count(*) from transactions where status = 'sending' and created_at > '${one_day_ago}') as txSendingDay,
|
|
3703
|
+
(select count(*) from transactions where status = 'sending' and created_at > '${one_week_ago}') as txSendingWeek,
|
|
3704
|
+
(select count(*) from transactions where status = 'sending' and created_at > '${one_month_ago}') as txSendingMonth,
|
|
3705
|
+
(select count(*) from transactions where status = 'sending') as txSendingTotal,
|
|
3706
|
+
(select count(*) from transactions where status = 'unproven' and created_at > '${one_day_ago}') as txUnprovenDay,
|
|
3707
|
+
(select count(*) from transactions where status = 'unproven' and created_at > '${one_week_ago}') as txUnprovenWeek,
|
|
3708
|
+
(select count(*) from transactions where status = 'unproven' and created_at > '${one_month_ago}') as txUnprovenMonth,
|
|
3709
|
+
(select count(*) from transactions where status = 'unproven') as txUnprovenTotal,
|
|
3710
|
+
(select count(*) from transactions where status = 'unsigned' and created_at > '${one_day_ago}') as txUnsignedDay,
|
|
3711
|
+
(select count(*) from transactions where status = 'unsigned' and created_at > '${one_week_ago}') as txUnsignedWeek,
|
|
3712
|
+
(select count(*) from transactions where status = 'unsigned' and created_at > '${one_month_ago}') as txUnsignedMonth,
|
|
3713
|
+
(select count(*) from transactions where status = 'unsigned') as txUnsignedTotal,
|
|
3714
|
+
(select count(*) from transactions where status = 'nosend' and created_at > '${one_day_ago}') as txNosendDay,
|
|
3715
|
+
(select count(*) from transactions where status = 'nosend' and created_at > '${one_week_ago}') as txNosendWeek,
|
|
3716
|
+
(select count(*) from transactions where status = 'nosend' and created_at > '${one_month_ago}') as txNosendMonth,
|
|
3717
|
+
(select count(*) from transactions where status = 'nosend') as txNosendTotal,
|
|
3718
|
+
(select count(*) from transactions where status = 'nonfinal' and created_at > '${one_day_ago}') as txNonfinalDay,
|
|
3719
|
+
(select count(*) from transactions where status = 'nonfinal' and created_at > '${one_week_ago}') as txNonfinalWeek,
|
|
3720
|
+
(select count(*) from transactions where status = 'nonfinal' and created_at > '${one_month_ago}') as txNonfinalMonth,
|
|
3721
|
+
(select count(*) from transactions where status = 'nonfinal') as txNonfinalTotal,
|
|
3722
|
+
(select count(*) from transactions where status = 'unfail' and created_at > '${one_day_ago}') as txUnfailDay,
|
|
3723
|
+
(select count(*) from transactions where status = 'unfail' and created_at > '${one_week_ago}') as txUnfailWeek,
|
|
3724
|
+
(select count(*) from transactions where status = 'unfail' and created_at > '${one_month_ago}') as txUnfailMonth,
|
|
3725
|
+
(select count(*) from transactions where status = 'unfail') as txUnfailTotal,
|
|
3726
|
+
(select sum(satoshis) from outputs where spendable = 1 and \`change\` = 1 and created_at > '${one_day_ago}') as satoshisDefaultDay,
|
|
3727
|
+
(select sum(satoshis) from outputs where spendable = 1 and \`change\` = 1 and created_at > '${one_week_ago}') as satoshisDefaultWeek,
|
|
3728
|
+
(select sum(satoshis) from outputs where spendable = 1 and \`change\` = 1 and created_at > '${one_month_ago}') as satoshisDefaultMonth,
|
|
3729
|
+
(select sum(satoshis) from outputs where spendable = 1 and \`change\` = 1) as satoshisDefaultTotal,
|
|
3730
|
+
(select sum(satoshis) from outputs where spendable = 1 and \`change\` = 0 and not basketId is null and created_at > '${one_day_ago}') as satoshisOtherDay,
|
|
3731
|
+
(select sum(satoshis) from outputs where spendable = 1 and \`change\` = 0 and not basketId is null and created_at > '${one_week_ago}') as satoshisOtherWeek,
|
|
3732
|
+
(select sum(satoshis) from outputs where spendable = 1 and \`change\` = 0 and not basketId is null and created_at > '${one_month_ago}') as satoshisOtherMonth,
|
|
3733
|
+
(select sum(satoshis) from outputs where spendable = 1 and \`change\` = 0 and not basketId is null) as satoshisOtherTotal,
|
|
3734
|
+
(select count(*) from output_baskets where created_at > '${one_day_ago}') as basketsDay,
|
|
3735
|
+
(select count(*) from output_baskets where created_at > '${one_week_ago}') as basketsWeek,
|
|
3736
|
+
(select count(*) from output_baskets where created_at > '${one_month_ago}') as basketsMonth,
|
|
3737
|
+
(select count(*) from output_baskets) as basketsTotal,
|
|
3738
|
+
(select count(*) from tx_labels where created_at > '${one_day_ago}') as labelsDay,
|
|
3739
|
+
(select count(*) from tx_labels where created_at > '${one_week_ago}') as labelsWeek,
|
|
3740
|
+
(select count(*) from tx_labels where created_at > '${one_month_ago}') as labelsMonth,
|
|
3741
|
+
(select count(*) from tx_labels) as labelsTotal,
|
|
3742
|
+
(select count(*) from output_tags where created_at > '${one_day_ago}') as tagsDay,
|
|
3743
|
+
(select count(*) from output_tags where created_at > '${one_week_ago}') as tagsWeek,
|
|
3744
|
+
(select count(*) from output_tags where created_at > '${one_month_ago}') as tagsMonth,
|
|
3745
|
+
(select count(*) from output_tags) as tagsTotal
|
|
4194
3746
|
`);
|
|
4195
3747
|
const r: AdminStatsResult = {
|
|
4196
3748
|
monitorStats,
|
|
@@ -4271,7 +3823,7 @@ select
|
|
|
4271
3823
|
}
|
|
4272
3824
|
```
|
|
4273
3825
|
|
|
4274
|
-
See also: [AdminStatsResult](./storage.md#interface-adminstatsresult), [AuthId](./client.md#interface-authid), [DBType](./storage.md#type-dbtype), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindPartialSincePagedArgs](./client.md#interface-findpartialsincepagedargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindStaleMerkleRootsArgs](./client.md#interface-findstalemerklerootsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [ServicesCallHistory](./client.md#
|
|
3826
|
+
See also: [AdminStatsResult](./storage.md#interface-adminstatsresult), [AuthId](./client.md#interface-authid), [DBType](./storage.md#type-dbtype), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindPartialSincePagedArgs](./client.md#interface-findpartialsincepagedargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindStaleMerkleRootsArgs](./client.md#interface-findstalemerklerootsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [ServicesCallHistory](./client.md#type-servicescallhistory), [StorageKnexOptions](./storage.md#interface-storageknexoptions), [StorageProvider](./storage.md#class-storageprovider), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [WERR_NOT_IMPLEMENTED](./client.md#class-werr_not_implemented), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [listActions](./storage.md#function-listactions), [listOutputs](./storage.md#function-listoutputs), [purgeData](./storage.md#function-purgedata), [reviewStatus](./storage.md#function-reviewstatus), [verifyOneOrNone](./client.md#function-verifyoneornone)
|
|
4275
3827
|
|
|
4276
3828
|
###### Method allocateChangeInput
|
|
4277
3829
|
|
|
@@ -4286,8 +3838,7 @@ See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
|
4286
3838
|
|
|
4287
3839
|
###### Method countChangeInputs
|
|
4288
3840
|
|
|
4289
|
-
Counts
|
|
4290
|
-
are currently eligible for automatic allocation
|
|
3841
|
+
Counts the outputs for userId in basketId that are spendable: true
|
|
4291
3842
|
AND whose transaction status is one of:
|
|
4292
3843
|
- completed
|
|
4293
3844
|
- unproven
|
|
@@ -4303,7 +3854,7 @@ Convert the standard optional `TrxToken` parameter into either a direct knex dat
|
|
|
4303
3854
|
or a Knex.Transaction as appropriate.
|
|
4304
3855
|
|
|
4305
3856
|
```ts
|
|
4306
|
-
toDb(trx?: TrxToken)
|
|
3857
|
+
toDb(trx?: TrxToken)
|
|
4307
3858
|
```
|
|
4308
3859
|
See also: [TrxToken](./client.md#interface-trxtoken)
|
|
4309
3860
|
|
|
@@ -4376,11 +3927,7 @@ export abstract class StorageProvider extends StorageReaderWriter implements Wal
|
|
|
4376
3927
|
commissionSatoshis: number;
|
|
4377
3928
|
commissionPubKeyHex?: PubKeyHex;
|
|
4378
3929
|
maxRecursionDepth?: number;
|
|
4379
|
-
static defaultOptions()
|
|
4380
|
-
feeModel: StorageFeeModel;
|
|
4381
|
-
commissionSatoshis: number;
|
|
4382
|
-
commissionPubKeyHex: undefined;
|
|
4383
|
-
}
|
|
3930
|
+
static defaultOptions()
|
|
4384
3931
|
static createStorageBaseOptions(chain: Chain): StorageProviderOptions
|
|
4385
3932
|
constructor(options: StorageProviderOptions)
|
|
4386
3933
|
abstract reviewStatus(args: {
|
|
@@ -4398,38 +3945,12 @@ export abstract class StorageProvider extends StorageReaderWriter implements Wal
|
|
|
4398
3945
|
abstract listActions(auth: AuthId, args: Validation.ValidListActionsArgs): Promise<ListActionsResult>;
|
|
4399
3946
|
abstract listOutputs(auth: AuthId, args: Validation.ValidListOutputsArgs): Promise<ListOutputsResult>;
|
|
4400
3947
|
abstract countChangeInputs(userId: number, basketId: number, excludeSending: boolean): Promise<number>;
|
|
4401
|
-
async insertActionBatch(batch: TableActionBatch, trx?: TrxToken): Promise<number>
|
|
4402
|
-
async findActionBatch(userId: number, batchId: string, trx?: TrxToken): Promise<TableActionBatch | undefined>
|
|
4403
|
-
async findActionBatchForUpdate(userId: number, batchId: string, trx: TrxToken): Promise<TableActionBatch | undefined>
|
|
4404
|
-
async findExpiredActionBatches(now: Date, trx?: TrxToken): Promise<TableActionBatch[]>
|
|
4405
|
-
async updateActionBatch(actionBatchId: number, update: Partial<TableActionBatch>, trx?: TrxToken): Promise<number>
|
|
4406
|
-
async deleteActionBatch(actionBatchId: number, trx?: TrxToken): Promise<void>
|
|
4407
|
-
async reserveActionBatchOutputs(reservations: TableActionBatchOutput[], trx?: TrxToken): Promise<void>
|
|
4408
|
-
async findActionBatchOutputIds(actionBatchId: number, trx?: TrxToken): Promise<number[]>
|
|
4409
|
-
async findReservedActionBatchOutputIds(_outputIds: number[], _trx?: TrxToken): Promise<number[]>
|
|
4410
|
-
async deleteActionBatchOutputReservations(actionBatchId: number, trx?: TrxToken): Promise<void>
|
|
4411
|
-
async putActionBatchBlobRecord(blob: TableActionBatchBlob, trx?: TrxToken): Promise<void>
|
|
4412
|
-
async findActionBatchBlobRecord(actionBatchId: number, digest: string, trx?: TrxToken): Promise<TableActionBatchBlob | undefined>
|
|
4413
|
-
async deleteActionBatchBlobRecords(actionBatchId: number, trx?: TrxToken): Promise<void>
|
|
4414
|
-
async getCapabilities(): Promise<StorageCapabilities>
|
|
4415
|
-
protected supportsActionBatchPersistence(): boolean
|
|
4416
|
-
async beginActionBatch(auth: AuthId, args: BeginActionBatchArgs): Promise<BeginActionBatchResult>
|
|
4417
|
-
async extendActionBatch(auth: AuthId, args: ExtendActionBatchArgs): Promise<ExtendActionBatchResult>
|
|
4418
|
-
async renewActionBatch(auth: AuthId, batchId: string): Promise<RenewActionBatchResult>
|
|
4419
|
-
async prepareActionBatchCommit(auth: AuthId, manifest: ActionBatchManifest): Promise<PrepareActionBatchCommitResult>
|
|
4420
|
-
async putActionBatchBlob(auth: AuthId, args: PutActionBatchBlobArgs): Promise<void>
|
|
4421
|
-
async commitActionBatch(auth: AuthId, manifest: ActionBatchManifest): Promise<CommitActionBatchResult>
|
|
4422
|
-
async abortActionBatch(auth: AuthId, batchId: string): Promise<AbortActionBatchResult>
|
|
4423
3948
|
async findOutputsByIds(outputIds: number[], trx?: TrxToken): Promise<Record<number, TableOutput>>
|
|
4424
3949
|
async findStaleMerkleRoots(args: FindStaleMerkleRootsArgs): Promise<string[]>
|
|
4425
3950
|
async findOutputsByOutpoints(userId: number, outpoints: Array<{
|
|
4426
3951
|
txid: string;
|
|
4427
3952
|
vout: number;
|
|
4428
3953
|
}>, trx?: TrxToken): Promise<Record<string, TableOutput>>
|
|
4429
|
-
async findOutputsByOutpointsForUpdate(userId: number, outpoints: Array<{
|
|
4430
|
-
txid: string;
|
|
4431
|
-
vout: number;
|
|
4432
|
-
}>, trx: TrxToken): Promise<Record<string, TableOutput>>
|
|
4433
3954
|
async findOrInsertOutputBasketsBulk(userId: number, names: string[], trx?: TrxToken): Promise<Record<string, TableOutputBasket>>
|
|
4434
3955
|
async findOrInsertOutputTagsBulk(userId: number, tags: string[], trx?: TrxToken): Promise<Record<string, TableOutputTag>>
|
|
4435
3956
|
async sumSpendableSatoshisInBasket(userId: number, basketId: number, excludeSending: boolean, trx?: TrxToken): Promise<number>
|
|
@@ -4440,7 +3961,7 @@ export abstract class StorageProvider extends StorageReaderWriter implements Wal
|
|
|
4440
3961
|
abstract adminStats(adminIdentityKey: string): Promise<AdminStatsResult>;
|
|
4441
3962
|
async recentlyActiveUsers(limit = 50, trx?: TrxToken): Promise<TableUser[]>
|
|
4442
3963
|
override isStorageProvider(): boolean
|
|
4443
|
-
setServices(v: WalletServices)
|
|
3964
|
+
setServices(v: WalletServices)
|
|
4444
3965
|
getServices(): WalletServices
|
|
4445
3966
|
async abortAction(auth: AuthId, args: AbortActionArgs): Promise<AbortActionResult>
|
|
4446
3967
|
async internalizeAction(auth: AuthId, args: InternalizeActionArgs): Promise<StorageInternalizeActionResult>
|
|
@@ -4462,10 +3983,6 @@ export abstract class StorageProvider extends StorageReaderWriter implements Wal
|
|
|
4462
3983
|
async relinquishOutput(auth: AuthId, args: RelinquishOutputArgs): Promise<number>
|
|
4463
3984
|
async processSyncChunk(args: RequestSyncChunkArgs, chunk: SyncChunk): Promise<ProcessSyncChunkResult>
|
|
4464
3985
|
async updateProvenTxReqWithNewProvenTx(args: UpdateProvenTxReqWithNewProvenTxArgs): Promise<UpdateProvenTxReqWithNewProvenTxResult>
|
|
4465
|
-
async reconcileCompletedProvenTxReqs(): Promise<{
|
|
4466
|
-
log: string;
|
|
4467
|
-
}>
|
|
4468
|
-
async unfailTransactionsForProof(req: EntityProvenTxReq, indent = 0, requestUpdate?: Pick<TableProvenTxReqDynamics, "status" | "attempts">): Promise<string>
|
|
4469
3986
|
async confirmSpendableOutputs(): Promise<{
|
|
4470
3987
|
invalidSpendableOutputs: TableOutput[];
|
|
4471
3988
|
}>
|
|
@@ -4475,7 +3992,7 @@ export abstract class StorageProvider extends StorageReaderWriter implements Wal
|
|
|
4475
3992
|
}
|
|
4476
3993
|
```
|
|
4477
3994
|
|
|
4478
|
-
See also: [
|
|
3995
|
+
See also: [AdminStatsResult](./storage.md#interface-adminstatsresult), [AuthId](./client.md#interface-authid), [Chain](./client.md#type-chain), [EntityProvenTxReq](./storage.md#class-entityproventxreq), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindStaleMerkleRootsArgs](./client.md#interface-findstalemerklerootsargs), [GetReqsAndBeefResult](./storage.md#interface-getreqsandbeefresult), [PostReqsToNetworkResult](./storage.md#interface-postreqstonetworkresult), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageFeeModel](./client.md#interface-storagefeemodel), [StorageGetBeefOptions](./client.md#interface-storagegetbeefoptions), [StorageInternalizeActionResult](./client.md#interface-storageinternalizeactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvenOrReq](./client.md#interface-storageprovenorreq), [StorageProviderOptions](./storage.md#interface-storageprovideroptions), [StorageReaderWriter](./storage.md#class-storagereaderwriter), [SyncChunk](./client.md#interface-syncchunk), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputX](./storage.md#interface-tableoutputx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableProvenTxReqDynamics](./storage.md#interface-tableproventxreqdynamics), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableUser](./storage.md#interface-tableuser), [TransactionStatus](./client.md#type-transactionstatus), [TrxToken](./client.md#interface-trxtoken), [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](./client.md#interface-updateproventxreqwithnewproventxresult), [WalletServices](./client.md#interface-walletservices), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [attemptToPostReqsToNetwork](./storage.md#function-attempttopostreqstonetwork), [createAction](./storage.md#function-createaction), [getBeefForTransaction](./storage.md#function-getbeeffortransaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [logger](./client.md#variable-logger), [processAction](./storage.md#function-processaction), [purgeData](./storage.md#function-purgedata), [reviewStatus](./storage.md#function-reviewstatus)
|
|
4479
3996
|
|
|
4480
3997
|
###### Method confirmSpendableOutputs
|
|
4481
3998
|
|
|
@@ -4494,6 +4011,21 @@ Returns
|
|
|
4494
4011
|
|
|
4495
4012
|
object with invalidSpendableOutputs array. A good result is an empty array.
|
|
4496
4013
|
|
|
4014
|
+
###### Method getProvenOrReq
|
|
4015
|
+
|
|
4016
|
+
Checks if txid is a known valid ProvenTx and returns it if found.
|
|
4017
|
+
Next checks if txid is a current ProvenTxReq and returns that if found.
|
|
4018
|
+
If `newReq` is provided and an existing ProvenTxReq isn't found,
|
|
4019
|
+
use `newReq` to create a new ProvenTxReq.
|
|
4020
|
+
|
|
4021
|
+
This is safe "findOrInsert" operation using retry if unique index constraint
|
|
4022
|
+
is violated by a race condition insert.
|
|
4023
|
+
|
|
4024
|
+
```ts
|
|
4025
|
+
async getProvenOrReq(txid: string, newReq?: TableProvenTxReq, trx?: TrxToken): Promise<StorageProvenOrReq>
|
|
4026
|
+
```
|
|
4027
|
+
See also: [StorageProvenOrReq](./client.md#interface-storageprovenorreq), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TrxToken](./client.md#interface-trxtoken)
|
|
4028
|
+
|
|
4497
4029
|
###### Method getReqsAndBeefToShareWithWorld
|
|
4498
4030
|
|
|
4499
4031
|
Given an array of transaction txids with current ProvenTxReq ready-to-share status,
|
|
@@ -4517,31 +4049,6 @@ async getValidBeefForKnownTxid(txid: string, mergeToBeef?: Beef, trustSelf?: Tru
|
|
|
4517
4049
|
```
|
|
4518
4050
|
See also: [TrxToken](./client.md#interface-trxtoken)
|
|
4519
4051
|
|
|
4520
|
-
###### Method reconcileCompletedProvenTxReqs
|
|
4521
|
-
|
|
4522
|
-
Reconcile completed proof requests whose transaction fan-out previously
|
|
4523
|
-
failed or whose durable notification state drifted.
|
|
4524
|
-
|
|
4525
|
-
This is called by TaskReviewStatus so a completed request with
|
|
4526
|
-
`notified = false` is retried and can become eligible for normal purge.
|
|
4527
|
-
|
|
4528
|
-
```ts
|
|
4529
|
-
async reconcileCompletedProvenTxReqs(): Promise<{
|
|
4530
|
-
log: string;
|
|
4531
|
-
}>
|
|
4532
|
-
```
|
|
4533
|
-
|
|
4534
|
-
###### Method unfailTransactionsForProof
|
|
4535
|
-
|
|
4536
|
-
Restore every failed local copy of a transaction before proof completion.
|
|
4537
|
-
Also heals the request's notification set from the authoritative txid
|
|
4538
|
-
lookup so TaskUnFail cannot omit a local copy after notification drift.
|
|
4539
|
-
|
|
4540
|
-
```ts
|
|
4541
|
-
async unfailTransactionsForProof(req: EntityProvenTxReq, indent = 0, requestUpdate?: Pick<TableProvenTxReqDynamics, "status" | "attempts">): Promise<string>
|
|
4542
|
-
```
|
|
4543
|
-
See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq), [TableProvenTxReqDynamics](./storage.md#interface-tableproventxreqdynamics)
|
|
4544
|
-
|
|
4545
4052
|
###### Method updateProvenTxReqWithNewProvenTx
|
|
4546
4053
|
|
|
4547
4054
|
Handles storage changes when a valid MerklePath and mined block header are found for a ProvenTxReq txid.
|
|
@@ -4565,8 +4072,7 @@ See also: [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updatepro
|
|
|
4565
4072
|
|
|
4566
4073
|
For all `status` values besides 'failed', just updates the transaction records status property.
|
|
4567
4074
|
|
|
4568
|
-
For 'status' of 'failed', attempts to make outputs previously allocated as inputs to this transaction usable again
|
|
4569
|
-
and makes outputs generated by this transaction non-spendable.
|
|
4075
|
+
For 'status' of 'failed', attempts to make outputs previously allocated as inputs to this transaction usable again.
|
|
4570
4076
|
|
|
4571
4077
|
```ts
|
|
4572
4078
|
async updateTransactionStatus(status: TransactionStatus, transactionId?: number, userId?: number, reference?: string, trx?: TrxToken): Promise<void>
|
|
@@ -4639,7 +4145,7 @@ export abstract class StorageReader implements sdk.WalletStorageSyncReader {
|
|
|
4639
4145
|
}
|
|
4640
4146
|
```
|
|
4641
4147
|
|
|
4642
|
-
See also: [Chain](./client.md#type-chain), [DBType](./storage.md#type-dbtype), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReaderOptions](./storage.md#interface-storagereaderoptions), [SyncChunk](./client.md#interface-syncchunk), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [WalletStorageSyncReader](./client.md#interface-walletstoragesyncreader), [getSyncChunk](./storage.md#function-getsyncchunk)
|
|
4148
|
+
See also: [Chain](./client.md#type-chain), [DBType](./storage.md#type-dbtype), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReaderOptions](./storage.md#interface-storagereaderoptions), [SyncChunk](./client.md#interface-syncchunk), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [WalletStorageSyncReader](./client.md#interface-walletstoragesyncreader), [getSyncChunk](./storage.md#function-getsyncchunk)
|
|
4643
4149
|
|
|
4644
4150
|
###### Method validateEntityDate
|
|
4645
4151
|
|
|
@@ -4667,6 +4173,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4667
4173
|
|
|
4668
4174
|
```ts
|
|
4669
4175
|
export abstract class StorageReaderWriter extends StorageReader {
|
|
4176
|
+
constructor(options: StorageReaderWriterOptions)
|
|
4670
4177
|
abstract dropAllData(): Promise<void>;
|
|
4671
4178
|
abstract migrate(storageName: string, storageIdentityKey: string): Promise<string>;
|
|
4672
4179
|
abstract findOutputTagMaps(args: FindOutputTagMapsArgs): Promise<TableOutputTagMap[]>;
|
|
@@ -4750,7 +4257,7 @@ export abstract class StorageReaderWriter extends StorageReader {
|
|
|
4750
4257
|
}
|
|
4751
4258
|
```
|
|
4752
4259
|
|
|
4753
|
-
See also: [AuthId](./client.md#interface-authid), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindStaleMerkleRootsArgs](./client.md#interface-findstalemerklerootsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReader](./storage.md#class-storagereader), [SyncChunk](./client.md#interface-syncchunk), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken)
|
|
4260
|
+
See also: [AuthId](./client.md#interface-authid), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindStaleMerkleRootsArgs](./client.md#interface-findstalemerklerootsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReader](./storage.md#class-storagereader), [StorageReaderWriterOptions](./storage.md#interface-storagereaderwriteroptions), [SyncChunk](./client.md#interface-syncchunk), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken)
|
|
4754
4261
|
|
|
4755
4262
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4756
4263
|
|
|
@@ -4769,7 +4276,7 @@ export class StorageServer {
|
|
|
4769
4276
|
}
|
|
4770
4277
|
```
|
|
4771
4278
|
|
|
4772
|
-
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [StorageProvider](./storage.md#class-storageprovider), [WalletStorageServerOptions](./storage.md#interface-walletstorageserveroptions)
|
|
4279
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [StorageProvider](./storage.md#class-storageprovider), [WalletStorageServerOptions](./storage.md#interface-walletstorageserveroptions)
|
|
4773
4280
|
|
|
4774
4281
|
###### Method validateEntities
|
|
4775
4282
|
|
|
@@ -4809,7 +4316,7 @@ and the `StorageBaseReader` to be protected.
|
|
|
4809
4316
|
export class StorageSyncReader implements sdk.WalletStorageSyncReader {
|
|
4810
4317
|
constructor(public auth: sdk.AuthId, public storage: StorageReader)
|
|
4811
4318
|
async makeAvailable(): Promise<TableSettings>
|
|
4812
|
-
|
|
4319
|
+
destroy(): Promise<void>
|
|
4813
4320
|
async getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
4814
4321
|
}
|
|
4815
4322
|
```
|
|
@@ -4866,7 +4373,7 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
4866
4373
|
async runAsStorageProvider<R>(sync: (active: StorageProvider) => Promise<R>): Promise<R>
|
|
4867
4374
|
isActiveStorageProvider(): boolean
|
|
4868
4375
|
async addWalletStorageProvider(provider: sdk.WalletStorageProvider): Promise<void>
|
|
4869
|
-
setServices(v: sdk.WalletServices)
|
|
4376
|
+
setServices(v: sdk.WalletServices)
|
|
4870
4377
|
getServices(): sdk.WalletServices
|
|
4871
4378
|
getSettings(): TableSettings
|
|
4872
4379
|
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
@@ -4881,14 +4388,6 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
4881
4388
|
async relinquishCertificate(args: RelinquishCertificateArgs): Promise<number>
|
|
4882
4389
|
async relinquishOutput(args: RelinquishOutputArgs): Promise<number>
|
|
4883
4390
|
async processAction(args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
4884
|
-
async getCapabilities(): Promise<sdk.StorageCapabilities>
|
|
4885
|
-
async beginActionBatch(args: sdk.BeginActionBatchArgs): Promise<sdk.BeginActionBatchResult>
|
|
4886
|
-
async extendActionBatch(args: sdk.ExtendActionBatchArgs): Promise<sdk.ExtendActionBatchResult>
|
|
4887
|
-
async renewActionBatch(batchId: string): Promise<sdk.RenewActionBatchResult>
|
|
4888
|
-
async prepareActionBatchCommit(manifest: sdk.ActionBatchManifest): Promise<sdk.PrepareActionBatchCommitResult>
|
|
4889
|
-
async putActionBatchBlob(args: sdk.PutActionBatchBlobArgs): Promise<void>
|
|
4890
|
-
async commitActionBatch(manifest: sdk.ActionBatchManifest): Promise<sdk.CommitActionBatchResult>
|
|
4891
|
-
async abortActionBatch(batchId: string): Promise<sdk.AbortActionBatchResult>
|
|
4892
4391
|
async insertCertificate(certificate: TableCertificate): Promise<number>
|
|
4893
4392
|
async listActions(vargs: Validation.ValidListActionsArgs): Promise<ListActionsResult>
|
|
4894
4393
|
async listCertificates(args: Validation.ValidListCertificatesArgs): Promise<ListCertificatesResult>
|
|
@@ -4917,7 +4416,7 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
4917
4416
|
}
|
|
4918
4417
|
```
|
|
4919
4418
|
|
|
4920
|
-
See also: [
|
|
4419
|
+
See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [ReproveHeaderResult](./client.md#interface-reproveheaderresult), [ReproveProvenResult](./client.md#interface-reproveprovenresult), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageInternalizeActionResult](./client.md#interface-storageinternalizeactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvider](./storage.md#class-storageprovider), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableUser](./storage.md#interface-tableuser), [WalletServices](./client.md#interface-walletservices), [WalletStorage](./client.md#interface-walletstorage), [WalletStorageInfo](./client.md#interface-walletstorageinfo), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [WalletStorageReader](./client.md#interface-walletstoragereader), [WalletStorageSync](./client.md#interface-walletstoragesync), [WalletStorageSyncReader](./client.md#interface-walletstoragesyncreader), [WalletStorageWriter](./client.md#interface-walletstoragewriter), [createAction](./storage.md#function-createaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
4921
4420
|
|
|
4922
4421
|
###### Constructor
|
|
4923
4422
|
|
|
@@ -5015,10 +4514,30 @@ Returns
|
|
|
5015
4514
|
|
|
5016
4515
|
true if the active `WalletStorageProvider` also implements `StorageProvider`
|
|
5017
4516
|
|
|
5018
|
-
###### Method
|
|
4517
|
+
###### Method makeAvailable
|
|
5019
4518
|
|
|
5020
|
-
|
|
5021
|
-
|
|
4519
|
+
This async function must be called after construction and before
|
|
4520
|
+
any other async function can proceed.
|
|
4521
|
+
|
|
4522
|
+
Runs through `_stores` validating all properties and partitioning across `_active`, `_backups`, `_conflictingActives`.
|
|
4523
|
+
|
|
4524
|
+
```ts
|
|
4525
|
+
async makeAvailable(): Promise<TableSettings>
|
|
4526
|
+
```
|
|
4527
|
+
See also: [TableSettings](./storage.md#interface-tablesettings)
|
|
4528
|
+
|
|
4529
|
+
Returns
|
|
4530
|
+
|
|
4531
|
+
from the active storage.
|
|
4532
|
+
|
|
4533
|
+
Throws
|
|
4534
|
+
|
|
4535
|
+
WERR_INVALID_PARAMETER if canMakeAvailable returns false.
|
|
4536
|
+
|
|
4537
|
+
###### Method reproveHeader
|
|
4538
|
+
|
|
4539
|
+
For each proven_txs record currently sourcing its transaction merkle proof from the given deactivated header,
|
|
4540
|
+
attempt to reprove the transaction against the current chain,
|
|
5022
4541
|
updating the proven_txs record if a new valid proof is found.
|
|
5023
4542
|
|
|
5024
4543
|
```ts
|
|
@@ -5043,6 +4562,23 @@ async reproveHeightMerkleRoot(height: number, staleMerkleRoot: string): Promise<
|
|
|
5043
4562
|
```
|
|
5044
4563
|
See also: [ReproveHeaderResult](./client.md#interface-reproveheaderresult)
|
|
5045
4564
|
|
|
4565
|
+
###### Method reproveProven
|
|
4566
|
+
|
|
4567
|
+
Attempt to reprove the transaction against the current chain,
|
|
4568
|
+
If a new valid proof is found and noUpdate is not true,
|
|
4569
|
+
update the proven_txs record with new block and merkle proof data.
|
|
4570
|
+
If noUpdate is true, the update to be applied is available in the returned result.
|
|
4571
|
+
|
|
4572
|
+
```ts
|
|
4573
|
+
async reproveProven(ptx: TableProvenTx, noUpdate?: boolean): Promise<sdk.ReproveProvenResult>
|
|
4574
|
+
```
|
|
4575
|
+
See also: [ReproveProvenResult](./client.md#interface-reproveprovenresult), [TableProvenTx](./storage.md#interface-tableproventx)
|
|
4576
|
+
|
|
4577
|
+
Argument Details
|
|
4578
|
+
|
|
4579
|
+
+ **ptx**
|
|
4580
|
+
+ proven_txs record to reprove
|
|
4581
|
+
|
|
5046
4582
|
###### Method runAsSync
|
|
5047
4583
|
|
|
5048
4584
|
```ts
|
|
@@ -5079,57 +4615,23 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5079
4615
|
|
|
5080
4616
|
| | | |
|
|
5081
4617
|
| --- | --- | --- |
|
|
5082
|
-
| [
|
|
5083
|
-
| [
|
|
5084
|
-
| [
|
|
5085
|
-
| [
|
|
5086
|
-
| [
|
|
5087
|
-
| [
|
|
5088
|
-
| [
|
|
5089
|
-
| [
|
|
5090
|
-
| [
|
|
5091
|
-
| [
|
|
5092
|
-
| [
|
|
5093
|
-
| [
|
|
5094
|
-
| [decodeBinaryJsonValue](#function-decodebinaryjsonvalue) | [matchesTxLabelPartial](#function-matchestxlabelpartial) | [upgradeMonitorEvents](#function-upgrademonitorevents) |
|
|
5095
|
-
| [determineDBType](#function-determinedbtype) | [mergeInputBeefs](#function-mergeinputbeefs) | [upgradeOutputBaskets](#function-upgradeoutputbaskets) |
|
|
5096
|
-
| [extendActionBatch](#function-extendactionbatch) | [mergeInputsIntoBeef](#function-mergeinputsintobeef) | [upgradeOutputTags](#function-upgradeoutputtags) |
|
|
5097
|
-
| [generateChangeSdk](#function-generatechangesdk) | [notifyTransactionsOfProof](#function-notifytransactionsofproof) | [upgradeOutputTagsMap](#function-upgradeoutputtagsmap) |
|
|
5098
|
-
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [offsetPrivKey](#function-offsetprivkey) | [upgradeOutputs](#function-upgradeoutputs) |
|
|
5099
|
-
| [getActionBatchCapabilities](#function-getactionbatchcapabilities) | [offsetPubKey](#function-offsetpubkey) | [upgradeProvenTxReqs](#function-upgradeproventxreqs) |
|
|
5100
|
-
| [getBeefForTransaction](#function-getbeeffortransaction) | [parseJsonRpc](#function-parsejsonrpc) | [upgradeProvenTxs](#function-upgradeproventxs) |
|
|
5101
|
-
| [getListOutputsSpecOp](#function-getlistoutputsspecop) | [partitionActionLabels](#function-partitionactionlabels) | [upgradeSyncStates](#function-upgradesyncstates) |
|
|
5102
|
-
| [getSyncChunk](#function-getsyncchunk) | [prepareActionBatchCommit](#function-prepareactionbatchcommit) | [upgradeTransactions](#function-upgradetransactions) |
|
|
5103
|
-
| [internalizeAction](#function-internalizeaction) | [processAction](#function-processaction) | [upgradeTxLabels](#function-upgradetxlabels) |
|
|
5104
|
-
| [isAutoSpendableChangeOutput](#function-isautospendablechangeoutput) | [purgeData](#function-purgedata) | [upgradeTxLabelsMap](#function-upgradetxlabelsmap) |
|
|
5105
|
-
| [isManagedChangeOutput](#function-ismanagedchangeoutput) | [purgeDataIdb](#function-purgedataidb) | [upgradeUsers](#function-upgradeusers) |
|
|
5106
|
-
| [keyOffsetToHashedSecret](#function-keyoffsettohashedsecret) | [putActionBatchBlob](#function-putactionbatchblob) | [validateActionBatchInlinePayload](#function-validateactionbatchinlinepayload) |
|
|
5107
|
-
| [legacyBinaryJsonReplacer](#function-legacybinaryjsonreplacer) | [randomizeOutputVouts](#function-randomizeoutputvouts) | [validateDate](#function-validatedate) |
|
|
5108
|
-
| [listActions](#function-listactions) | [redeemServiceCharges](#function-redeemservicecharges) | [validateEntities](#function-validateentities) |
|
|
5109
|
-
| [listActionsIdb](#function-listactionsidb) | [renderAdminPage](#function-renderadminpage) | [validateEntity](#function-validateentity) |
|
|
5110
|
-
| [listCertificates](#function-listcertificates) | [renewActionBatch](#function-renewactionbatch) | [validateGenerateChangeSdkParams](#function-validategeneratechangesdkparams) |
|
|
5111
|
-
| [listOutputs](#function-listoutputs) | [repeatableRandom](#function-repeatablerandom) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
|
|
5112
|
-
| [listOutputsIdb](#function-listoutputsidb) | [restoreInputsToSpendable](#function-restoreinputstospendable) | [validateManifestActions](#function-validatemanifestactions) |
|
|
5113
|
-
| [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [reviewStatus](#function-reviewstatus) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
5114
|
-
| [markStaleInputsAsSpent](#function-markstaleinputsasspent) | [reviewStatusIdb](#function-reviewstatusidb) | [validateSyncChunkEntities](#function-validatesyncchunkentities) |
|
|
5115
|
-
| [markUserInputsSpent](#function-markuserinputsspent) | [selectCanonicalChange](#function-selectcanonicalchange) | [varUintSize](#function-varuintsize) |
|
|
5116
|
-
| [matchesCertificateFieldPartial](#function-matchescertificatefieldpartial) | [setDisableDoubleSpendCheckForTest](#function-setdisabledoublespendcheckfortest) | |
|
|
4618
|
+
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [listActions](#function-listactions) | [renderAdminPage](#function-renderadminpage) |
|
|
4619
|
+
| [createAction](#function-createaction) | [listActionsIdb](#function-listactionsidb) | [reviewStatus](#function-reviewstatus) |
|
|
4620
|
+
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [listCertificates](#function-listcertificates) | [reviewStatusIdb](#function-reviewstatusidb) |
|
|
4621
|
+
| [createSyncMap](#function-createsyncmap) | [listOutputs](#function-listoutputs) | [setDisableDoubleSpendCheckForTest](#function-setdisabledoublespendcheckfortest) |
|
|
4622
|
+
| [determineDBType](#function-determinedbtype) | [listOutputsIdb](#function-listoutputsidb) | [shareReqsWithWorld](#function-sharereqswithworld) |
|
|
4623
|
+
| [generateChangeSdk](#function-generatechangesdk) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [transactionInputSize](#function-transactioninputsize) |
|
|
4624
|
+
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [offsetPrivKey](#function-offsetprivkey) | [transactionOutputSize](#function-transactionoutputsize) |
|
|
4625
|
+
| [getBeefForTransaction](#function-getbeeffortransaction) | [offsetPubKey](#function-offsetpubkey) | [transactionSize](#function-transactionsize) |
|
|
4626
|
+
| [getListOutputsSpecOp](#function-getlistoutputsspecop) | [processAction](#function-processaction) | [validateGenerateChangeSdkParams](#function-validategeneratechangesdkparams) |
|
|
4627
|
+
| [getSyncChunk](#function-getsyncchunk) | [purgeData](#function-purgedata) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
|
|
4628
|
+
| [internalizeAction](#function-internalizeaction) | [purgeDataIdb](#function-purgedataidb) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
4629
|
+
| [keyOffsetToHashedSecret](#function-keyoffsettohashedsecret) | [redeemServiceCharges](#function-redeemservicecharges) | [varUintSize](#function-varuintsize) |
|
|
5117
4630
|
|
|
5118
4631
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5119
4632
|
|
|
5120
4633
|
---
|
|
5121
4634
|
|
|
5122
|
-
##### Function: abortActionBatch
|
|
5123
|
-
|
|
5124
|
-
```ts
|
|
5125
|
-
export async function abortActionBatch(storage: StorageProvider, auth: AuthId, batchId: string): Promise<AbortActionBatchResult>
|
|
5126
|
-
```
|
|
5127
|
-
|
|
5128
|
-
See also: [AbortActionBatchResult](./client.md#interface-abortactionbatchresult), [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider)
|
|
5129
|
-
|
|
5130
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5131
|
-
|
|
5132
|
-
---
|
|
5133
4635
|
##### Function: attemptToPostReqsToNetwork
|
|
5134
4636
|
|
|
5135
4637
|
Attempt to post one or more `ProvenTxReq` with status 'unsent'
|
|
@@ -5143,71 +4645,6 @@ See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq), [PostReqsTo
|
|
|
5143
4645
|
|
|
5144
4646
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5145
4647
|
|
|
5146
|
-
---
|
|
5147
|
-
##### Function: beginActionBatch
|
|
5148
|
-
|
|
5149
|
-
```ts
|
|
5150
|
-
export async function beginActionBatch(storage: StorageProvider, auth: AuthId, args: BeginActionBatchArgs): Promise<BeginActionBatchResult>
|
|
5151
|
-
```
|
|
5152
|
-
|
|
5153
|
-
See also: [AuthId](./client.md#interface-authid), [BeginActionBatchArgs](./client.md#interface-beginactionbatchargs), [BeginActionBatchResult](./client.md#interface-beginactionbatchresult), [StorageProvider](./storage.md#class-storageprovider)
|
|
5154
|
-
|
|
5155
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5156
|
-
|
|
5157
|
-
---
|
|
5158
|
-
##### Function: binaryJsonReplacer
|
|
5159
|
-
|
|
5160
|
-
```ts
|
|
5161
|
-
export function binaryJsonReplacer(this: Record<string, unknown>, key: string, value: unknown): unknown
|
|
5162
|
-
```
|
|
5163
|
-
|
|
5164
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5165
|
-
|
|
5166
|
-
---
|
|
5167
|
-
##### Function: binaryJsonReviver
|
|
5168
|
-
|
|
5169
|
-
```ts
|
|
5170
|
-
export function binaryJsonReviver(_key: string, value: unknown): unknown
|
|
5171
|
-
```
|
|
5172
|
-
|
|
5173
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5174
|
-
|
|
5175
|
-
---
|
|
5176
|
-
##### Function: classifyReqStatus
|
|
5177
|
-
|
|
5178
|
-
Classify a ProvenTxReq status into beef-sharing lifecycle status.
|
|
5179
|
-
Mutates `d` in place.
|
|
5180
|
-
|
|
5181
|
-
```ts
|
|
5182
|
-
export function classifyReqStatus(d: GetReqsAndBeefDetail, req: TableProvenTxReq): void
|
|
5183
|
-
```
|
|
5184
|
-
|
|
5185
|
-
See also: [GetReqsAndBeefDetail](./storage.md#interface-getreqsandbeefdetail), [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
5186
|
-
|
|
5187
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5188
|
-
|
|
5189
|
-
---
|
|
5190
|
-
##### Function: cleanupExpiredActionBatches
|
|
5191
|
-
|
|
5192
|
-
```ts
|
|
5193
|
-
export async function cleanupExpiredActionBatches(storage: StorageProvider): Promise<number>
|
|
5194
|
-
```
|
|
5195
|
-
|
|
5196
|
-
See also: [StorageProvider](./storage.md#class-storageprovider)
|
|
5197
|
-
|
|
5198
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5199
|
-
|
|
5200
|
-
---
|
|
5201
|
-
##### Function: commitActionBatch
|
|
5202
|
-
|
|
5203
|
-
```ts
|
|
5204
|
-
export async function commitActionBatch(storage: StorageProvider, auth: AuthId, manifest: ActionBatchManifest): Promise<CommitActionBatchResult>
|
|
5205
|
-
```
|
|
5206
|
-
|
|
5207
|
-
See also: [ActionBatchManifest](./client.md#interface-actionbatchmanifest), [AuthId](./client.md#interface-authid), [CommitActionBatchResult](./client.md#interface-commitactionbatchresult), [StorageProvider](./storage.md#class-storageprovider)
|
|
5208
|
-
|
|
5209
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5210
|
-
|
|
5211
4648
|
---
|
|
5212
4649
|
##### Function: createAction
|
|
5213
4650
|
|
|
@@ -5242,24 +4679,6 @@ See also: [SyncMap](./storage.md#interface-syncmap)
|
|
|
5242
4679
|
|
|
5243
4680
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5244
4681
|
|
|
5245
|
-
---
|
|
5246
|
-
##### Function: dateMatches
|
|
5247
|
-
|
|
5248
|
-
```ts
|
|
5249
|
-
export function dateMatches(a: Date | undefined, b: Date | undefined): boolean
|
|
5250
|
-
```
|
|
5251
|
-
|
|
5252
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5253
|
-
|
|
5254
|
-
---
|
|
5255
|
-
##### Function: decodeBinaryJsonValue
|
|
5256
|
-
|
|
5257
|
-
```ts
|
|
5258
|
-
export function decodeBinaryJsonValue(value: unknown): unknown
|
|
5259
|
-
```
|
|
5260
|
-
|
|
5261
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5262
|
-
|
|
5263
4682
|
---
|
|
5264
4683
|
##### Function: determineDBType
|
|
5265
4684
|
|
|
@@ -5275,17 +4694,6 @@ connected database engine variant
|
|
|
5275
4694
|
|
|
5276
4695
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5277
4696
|
|
|
5278
|
-
---
|
|
5279
|
-
##### Function: extendActionBatch
|
|
5280
|
-
|
|
5281
|
-
```ts
|
|
5282
|
-
export async function extendActionBatch(storage: StorageProvider, auth: AuthId, args: ExtendActionBatchArgs): Promise<ExtendActionBatchResult>
|
|
5283
|
-
```
|
|
5284
|
-
|
|
5285
|
-
See also: [AuthId](./client.md#interface-authid), [ExtendActionBatchArgs](./client.md#interface-extendactionbatchargs), [ExtendActionBatchResult](./client.md#interface-extendactionbatchresult), [StorageProvider](./storage.md#class-storageprovider)
|
|
5286
|
-
|
|
5287
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5288
|
-
|
|
5289
4697
|
---
|
|
5290
4698
|
##### Function: generateChangeSdk
|
|
5291
4699
|
|
|
@@ -5318,17 +4726,6 @@ See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesd
|
|
|
5318
4726
|
|
|
5319
4727
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5320
4728
|
|
|
5321
|
-
---
|
|
5322
|
-
##### Function: getActionBatchCapabilities
|
|
5323
|
-
|
|
5324
|
-
```ts
|
|
5325
|
-
export function getActionBatchCapabilities(): StorageCapabilities
|
|
5326
|
-
```
|
|
5327
|
-
|
|
5328
|
-
See also: [StorageCapabilities](./client.md#interface-storagecapabilities)
|
|
5329
|
-
|
|
5330
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5331
|
-
|
|
5332
4729
|
---
|
|
5333
4730
|
##### Function: getBeefForTransaction
|
|
5334
4731
|
|
|
@@ -5405,19 +4802,7 @@ A "wallet payment" adds an outputs value to the wallet's change "balance". These
|
|
|
5405
4802
|
Processing starts with simple validation and then checks for a pre-existing transaction.
|
|
5406
4803
|
If the transaction is already known to the user, then the outputs are reviewed against the existing outputs treatment,
|
|
5407
4804
|
and merge rules are added to the arguments passed to the storage layer.
|
|
5408
|
-
|
|
5409
|
-
The existing transaction's `status` determines what the merge path does next:
|
|
5410
|
-
- `'unproven'`, `'completed'`, or `'sending'`: outputs are merged into the existing record. The transaction status is left as-is.
|
|
5411
|
-
The `'sending'` case covers a transaction this wallet already signed and handed to broadcast processing, but
|
|
5412
|
-
whose proven_tx_req has not yet been advanced by the normal monitor/posting flow.
|
|
5413
|
-
- `'nosend'`: an ambiguous case. The transaction was created with `noSend: true` and may have been externally
|
|
5414
|
-
broadcast, may be sitting in a sendWith chain, or may be stuck mid-flight. The merge path treats the
|
|
5415
|
-
`internalizeAction` call as explicit authorization to advance the lifecycle. Specifically: `transactions.status`
|
|
5416
|
-
is promoted to `'completed'` (when a BUMP is included in the BEEF) or `'unproven'` (otherwise), and the
|
|
5417
|
-
`proven_tx_req` is moved out of `'nosend'` so Monitor's standard proof-fetching flow can finalize it.
|
|
5418
|
-
This makes the `internalizeAction` semantics consistent regardless of whether the originator shares the
|
|
5419
|
-
same storage as the internalizer or not.
|
|
5420
|
-
- Any other status: an error.
|
|
4805
|
+
The existing transaction must be in the 'unproven' or 'completed' status. Any other status is an error.
|
|
5421
4806
|
|
|
5422
4807
|
When the transaction already exists, the description is updated. The isOutgoing sense is not changed.
|
|
5423
4808
|
|
|
@@ -5427,10 +4812,8 @@ When the transaction already exists, the description is updated. The isOutgoing
|
|
|
5427
4812
|
3. Basket insertions do not affect wallet balance and are typed "custom".
|
|
5428
4813
|
|
|
5429
4814
|
"wallet payment" Merge Rules:
|
|
5430
|
-
1. Targeting
|
|
5431
|
-
2. Targeting
|
|
5432
|
-
change and increases wallet balance. This includes verified recovery of
|
|
5433
|
-
a legacy custom row that was incorrectly placed in the default basket.
|
|
4815
|
+
1. Targeting existing managed change in the default basket is idempotent.
|
|
4816
|
+
2. Targeting a custom output promotes it to managed BRC-29 change and increases wallet balance. This includes recovery of a legacy custom row incorrectly stored in the default basket.
|
|
5434
4817
|
|
|
5435
4818
|
```ts
|
|
5436
4819
|
export async function internalizeAction(storage: StorageProvider, auth: AuthId, args: InternalizeActionArgs): Promise<StorageInternalizeActionResult>
|
|
@@ -5440,35 +4823,6 @@ See also: [AuthId](./client.md#interface-authid), [StorageInternalizeActionResul
|
|
|
5440
4823
|
|
|
5441
4824
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5442
4825
|
|
|
5443
|
-
---
|
|
5444
|
-
##### Function: isAutoSpendableChangeOutput
|
|
5445
|
-
|
|
5446
|
-
True when managed change is currently eligible for automatic allocation.
|
|
5447
|
-
|
|
5448
|
-
```ts
|
|
5449
|
-
export function isAutoSpendableChangeOutput(output: TableOutput | undefined): output is TableOutput
|
|
5450
|
-
```
|
|
5451
|
-
|
|
5452
|
-
See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
5453
|
-
|
|
5454
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5455
|
-
|
|
5456
|
-
---
|
|
5457
|
-
##### Function: isManagedChangeOutput
|
|
5458
|
-
|
|
5459
|
-
True when an output has all metadata required to use the wallet-managed
|
|
5460
|
-
BRC-29 signing path. `senderIdentityKey` is optional: wallet-created change
|
|
5461
|
-
uses the client's change public key when it is absent, while received
|
|
5462
|
-
BRC-29 payments record the sender's identity key.
|
|
5463
|
-
|
|
5464
|
-
```ts
|
|
5465
|
-
export function isManagedChangeOutput(output: TableOutput | undefined): output is TableOutput
|
|
5466
|
-
```
|
|
5467
|
-
|
|
5468
|
-
See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
5469
|
-
|
|
5470
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5471
|
-
|
|
5472
4826
|
---
|
|
5473
4827
|
##### Function: keyOffsetToHashedSecret
|
|
5474
4828
|
|
|
@@ -5481,15 +4835,6 @@ export function keyOffsetToHashedSecret(pub: PublicKey, keyOffset?: string): {
|
|
|
5481
4835
|
|
|
5482
4836
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5483
4837
|
|
|
5484
|
-
---
|
|
5485
|
-
##### Function: legacyBinaryJsonReplacer
|
|
5486
|
-
|
|
5487
|
-
```ts
|
|
5488
|
-
export function legacyBinaryJsonReplacer(_key: string, value: unknown): unknown
|
|
5489
|
-
```
|
|
5490
|
-
|
|
5491
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5492
|
-
|
|
5493
4838
|
---
|
|
5494
4839
|
##### Function: listActions
|
|
5495
4840
|
|
|
@@ -5558,97 +4903,67 @@ export function lockScriptWithKeyOffsetFromPubKey(pubKey: string, keyOffset?: st
|
|
|
5558
4903
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5559
4904
|
|
|
5560
4905
|
---
|
|
5561
|
-
##### Function:
|
|
5562
|
-
|
|
5563
|
-
After any failed broadcast (doubleSpend, invalidTx, etc.), query each
|
|
5564
|
-
consumed-input outpoint of the failed transaction against on-chain
|
|
5565
|
-
UTXO state. For inputs the chain authoritatively confirms are spent
|
|
5566
|
-
(i.e. NOT a UTXO), update the corresponding wallet basket entry to
|
|
5567
|
-
spendable=false.
|
|
5568
|
-
|
|
5569
|
-
Background: `updateTransactionStatus(failed)` optimistically restores
|
|
5570
|
-
all consumed-input outputs to spendable=true so the user can retry
|
|
5571
|
-
with the same inputs. For some failures (genuine doubleSpend, or any
|
|
5572
|
-
'missing-inputs' outcome where the input has been spent on chain by
|
|
5573
|
-
a different transaction), restoration is incorrect — the input is
|
|
5574
|
-
gone and restoring it produces an infinite missing-inputs loop on
|
|
5575
|
-
the next createAction → broadcast cycle. Apps cannot evict from the
|
|
5576
|
-
default basket on app-isolated wallets (admin-only policy), so this
|
|
5577
|
-
self-heal must run inside the wallet.
|
|
5578
|
-
|
|
5579
|
-
Different broadcasters classify the same on-chain reality differently
|
|
5580
|
-
(ARC → doubleSpend, WhatsOnChain/Bitails → invalidTx via
|
|
5581
|
-
'missing-inputs'); this helper is broadcaster-agnostic because its
|
|
5582
|
-
decision is based on services.isUtxo, not the aggregate failure
|
|
5583
|
-
classification.
|
|
4906
|
+
##### Function: offsetPrivKey
|
|
5584
4907
|
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
4908
|
+
```ts
|
|
4909
|
+
export function offsetPrivKey(privKey: string, keyOffset?: string): {
|
|
4910
|
+
offsetPrivKey: string;
|
|
4911
|
+
keyOffset: string;
|
|
4912
|
+
}
|
|
4913
|
+
```
|
|
5588
4914
|
|
|
5589
|
-
|
|
5590
|
-
- Only inputs found in the failing user's basket are touched.
|
|
5591
|
-
- Inputs whose on-chain UTXO status cannot be determined (service
|
|
5592
|
-
error / inconclusive) are left spendable=true. Eviction is opt-in
|
|
5593
|
-
based on positive evidence of stale state.
|
|
5594
|
-
- Inputs the chain confirms are still UTXOs (e.g. a competing tx
|
|
5595
|
-
itself failed, or a malformed/fee failure where inputs are intact)
|
|
5596
|
-
are left spendable=true — preserving the existing transient-retry
|
|
5597
|
-
semantics callers depend on.
|
|
4915
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5598
4916
|
|
|
5599
|
-
|
|
5600
|
-
|
|
4917
|
+
---
|
|
4918
|
+
##### Function: offsetPubKey
|
|
5601
4919
|
|
|
5602
4920
|
```ts
|
|
5603
|
-
export
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
}>
|
|
4921
|
+
export function offsetPubKey(pubKey: string, keyOffset?: string): {
|
|
4922
|
+
offsetPubKey: string;
|
|
4923
|
+
keyOffset: string;
|
|
4924
|
+
}
|
|
5608
4925
|
```
|
|
5609
4926
|
|
|
5610
|
-
See also: [AggregatePostBeefTxResult](./storage.md#interface-aggregatepostbeeftxresult), [StorageProvider](./storage.md#class-storageprovider), [TrxToken](./client.md#interface-trxtoken), [WalletServices](./client.md#interface-walletservices), [logger](./client.md#variable-logger)
|
|
5611
|
-
|
|
5612
4927
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5613
4928
|
|
|
5614
4929
|
---
|
|
5615
|
-
##### Function:
|
|
4930
|
+
##### Function: processAction
|
|
5616
4931
|
|
|
5617
4932
|
```ts
|
|
5618
|
-
export async function
|
|
4933
|
+
export async function processAction(storage: StorageProvider, auth: AuthId, args: StorageProcessActionArgs): Promise<StorageProcessActionResults>
|
|
5619
4934
|
```
|
|
5620
4935
|
|
|
5621
|
-
See also: [
|
|
4936
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvider](./storage.md#class-storageprovider)
|
|
5622
4937
|
|
|
5623
4938
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5624
4939
|
|
|
5625
4940
|
---
|
|
5626
|
-
##### Function:
|
|
4941
|
+
##### Function: purgeData
|
|
5627
4942
|
|
|
5628
4943
|
```ts
|
|
5629
|
-
export function
|
|
4944
|
+
export async function purgeData(storage: StorageKnex, params: PurgeParams, trx?: TrxToken): Promise<PurgeResults>
|
|
5630
4945
|
```
|
|
5631
4946
|
|
|
5632
|
-
See also: [
|
|
4947
|
+
See also: [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
|
|
5633
4948
|
|
|
5634
4949
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5635
4950
|
|
|
5636
4951
|
---
|
|
5637
|
-
##### Function:
|
|
4952
|
+
##### Function: purgeDataIdb
|
|
5638
4953
|
|
|
5639
4954
|
```ts
|
|
5640
|
-
export function
|
|
4955
|
+
export async function purgeDataIdb(storage: StorageIdb, params: PurgeParams, trx?: TrxToken): Promise<PurgeResults>
|
|
5641
4956
|
```
|
|
5642
4957
|
|
|
5643
|
-
See also: [
|
|
4958
|
+
See also: [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageIdb](./storage.md#class-storageidb), [TrxToken](./client.md#interface-trxtoken)
|
|
5644
4959
|
|
|
5645
4960
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5646
4961
|
|
|
5647
4962
|
---
|
|
5648
|
-
##### Function:
|
|
4963
|
+
##### Function: redeemServiceCharges
|
|
5649
4964
|
|
|
5650
4965
|
```ts
|
|
5651
|
-
export function
|
|
4966
|
+
export function redeemServiceCharges(privateKeyWif: string, charges: TableCommission[]): {}[]
|
|
5652
4967
|
```
|
|
5653
4968
|
|
|
5654
4969
|
See also: [TableCommission](./storage.md#interface-tablecommission)
|
|
@@ -5656,850 +4971,186 @@ See also: [TableCommission](./storage.md#interface-tablecommission)
|
|
|
5656
4971
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5657
4972
|
|
|
5658
4973
|
---
|
|
5659
|
-
##### Function:
|
|
4974
|
+
##### Function: renderAdminPage
|
|
5660
4975
|
|
|
5661
4976
|
```ts
|
|
5662
|
-
export function
|
|
4977
|
+
export function renderAdminPage(): string
|
|
5663
4978
|
```
|
|
5664
4979
|
|
|
5665
|
-
See also: [TableMonitorEvent](./storage.md#interface-tablemonitorevent)
|
|
5666
|
-
|
|
5667
4980
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5668
4981
|
|
|
5669
4982
|
---
|
|
5670
|
-
##### Function:
|
|
4983
|
+
##### Function: reviewStatus
|
|
4984
|
+
|
|
4985
|
+
Looks for unpropagated state:
|
|
4986
|
+
|
|
4987
|
+
1. set transactions to 'failed' if not already failed and provenTxReq with matching txid has status of 'invalid'.
|
|
4988
|
+
2. sets outputs to spendable true, spentBy undefined if spentBy is a transaction with status 'failed'.
|
|
4989
|
+
3. sets transactions to 'completed' if provenTx with matching txid exists and current provenTxId is null.
|
|
5671
4990
|
|
|
5672
4991
|
```ts
|
|
5673
|
-
export function
|
|
4992
|
+
export async function reviewStatus(storage: StorageKnex, args: {
|
|
4993
|
+
agedLimit: Date;
|
|
4994
|
+
trx?: TrxToken;
|
|
4995
|
+
}): Promise<{
|
|
4996
|
+
log: string;
|
|
4997
|
+
}>
|
|
5674
4998
|
```
|
|
5675
4999
|
|
|
5676
|
-
See also: [
|
|
5000
|
+
See also: [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
|
|
5677
5001
|
|
|
5678
5002
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5679
5003
|
|
|
5680
5004
|
---
|
|
5681
|
-
##### Function:
|
|
5005
|
+
##### Function: reviewStatusIdb
|
|
5006
|
+
|
|
5007
|
+
Looks for unpropagated state:
|
|
5008
|
+
|
|
5009
|
+
1. set transactions to 'failed' if not already failed and provenTxReq with matching txid has status of 'invalid'.
|
|
5010
|
+
2. sets transactions to 'completed' if provenTx with matching txid exists and current provenTxId is null.
|
|
5011
|
+
3. sets outputs to spendable true, spentBy undefined if spentBy is a transaction with status 'failed'.
|
|
5682
5012
|
|
|
5683
5013
|
```ts
|
|
5684
|
-
export function
|
|
5014
|
+
export async function reviewStatusIdb(storage: StorageIdb, args: {
|
|
5015
|
+
agedLimit: Date;
|
|
5016
|
+
trx?: sdk.TrxToken;
|
|
5017
|
+
}): Promise<{
|
|
5018
|
+
log: string;
|
|
5019
|
+
}>
|
|
5685
5020
|
```
|
|
5686
5021
|
|
|
5687
|
-
See also: [
|
|
5022
|
+
See also: [StorageIdb](./storage.md#class-storageidb), [TrxToken](./client.md#interface-trxtoken)
|
|
5688
5023
|
|
|
5689
5024
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5690
5025
|
|
|
5691
5026
|
---
|
|
5692
|
-
##### Function:
|
|
5027
|
+
##### Function: setDisableDoubleSpendCheckForTest
|
|
5693
5028
|
|
|
5694
5029
|
```ts
|
|
5695
|
-
export function
|
|
5030
|
+
export function setDisableDoubleSpendCheckForTest(v: boolean)
|
|
5696
5031
|
```
|
|
5697
5032
|
|
|
5698
|
-
See also: [TableOutputTagMap](./storage.md#interface-tableoutputtagmap)
|
|
5699
|
-
|
|
5700
5033
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5701
5034
|
|
|
5702
5035
|
---
|
|
5703
|
-
##### Function:
|
|
5036
|
+
##### Function: shareReqsWithWorld
|
|
5037
|
+
|
|
5038
|
+
Verifies that all the txids are known reqs with ready-to-share status.
|
|
5039
|
+
Assigns a batch identifier and updates all the provenTxReqs.
|
|
5040
|
+
If not isDelayed, triggers an initial attempt to broadcast the batch and returns the results.
|
|
5704
5041
|
|
|
5705
5042
|
```ts
|
|
5706
|
-
export function
|
|
5043
|
+
export async function shareReqsWithWorld(storage: StorageProvider, userId: number, txids: string[], isDelayed: boolean, r?: GetReqsAndBeefResult, logger?: WalletLoggerInterface): Promise<{
|
|
5044
|
+
swr: SendWithResult[];
|
|
5045
|
+
ndr: ReviewActionResult[] | undefined;
|
|
5046
|
+
}>
|
|
5707
5047
|
```
|
|
5708
5048
|
|
|
5709
|
-
See also: [
|
|
5049
|
+
See also: [GetReqsAndBeefResult](./storage.md#interface-getreqsandbeefresult), [ReviewActionResult](./client.md#interface-reviewactionresult), [StorageProvider](./storage.md#class-storageprovider), [logger](./client.md#variable-logger)
|
|
5050
|
+
|
|
5051
|
+
Argument Details
|
|
5052
|
+
|
|
5053
|
+
+ **r**
|
|
5054
|
+
+ Optional. Ignores txids and allows ProvenTxReqs and merged beef to be passed in.
|
|
5710
5055
|
|
|
5711
5056
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5712
5057
|
|
|
5713
5058
|
---
|
|
5714
|
-
##### Function:
|
|
5059
|
+
##### Function: transactionInputSize
|
|
5715
5060
|
|
|
5716
5061
|
```ts
|
|
5717
|
-
export function
|
|
5062
|
+
export function transactionInputSize(scriptSize: number): number
|
|
5718
5063
|
```
|
|
5719
5064
|
|
|
5720
|
-
|
|
5065
|
+
Returns
|
|
5066
|
+
|
|
5067
|
+
serialized byte length a transaction input
|
|
5068
|
+
|
|
5069
|
+
Argument Details
|
|
5070
|
+
|
|
5071
|
+
+ **scriptSize**
|
|
5072
|
+
+ byte length of input script
|
|
5721
5073
|
|
|
5722
5074
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5723
5075
|
|
|
5724
5076
|
---
|
|
5725
|
-
##### Function:
|
|
5077
|
+
##### Function: transactionOutputSize
|
|
5726
5078
|
|
|
5727
5079
|
```ts
|
|
5728
|
-
export function
|
|
5080
|
+
export function transactionOutputSize(scriptSize: number): number
|
|
5729
5081
|
```
|
|
5730
5082
|
|
|
5731
|
-
|
|
5083
|
+
Returns
|
|
5084
|
+
|
|
5085
|
+
serialized byte length a transaction output
|
|
5086
|
+
|
|
5087
|
+
Argument Details
|
|
5088
|
+
|
|
5089
|
+
+ **scriptSize**
|
|
5090
|
+
+ byte length of output script
|
|
5732
5091
|
|
|
5733
5092
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5734
5093
|
|
|
5735
5094
|
---
|
|
5736
|
-
##### Function:
|
|
5095
|
+
##### Function: transactionSize
|
|
5096
|
+
|
|
5097
|
+
Compute the serialized binary transaction size in bytes
|
|
5098
|
+
given the number of inputs and outputs,
|
|
5099
|
+
and the size of each script.
|
|
5737
5100
|
|
|
5738
5101
|
```ts
|
|
5739
|
-
export function
|
|
5102
|
+
export function transactionSize(inputs: number[], outputs: number[]): number
|
|
5740
5103
|
```
|
|
5741
5104
|
|
|
5742
|
-
|
|
5105
|
+
Returns
|
|
5106
|
+
|
|
5107
|
+
total transaction size in bytes
|
|
5108
|
+
|
|
5109
|
+
Argument Details
|
|
5110
|
+
|
|
5111
|
+
+ **inputs**
|
|
5112
|
+
+ array of input script lengths, in bytes
|
|
5113
|
+
+ **outputs**
|
|
5114
|
+
+ array of output script lengths, in bytes
|
|
5743
5115
|
|
|
5744
5116
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5745
5117
|
|
|
5746
5118
|
---
|
|
5747
|
-
##### Function:
|
|
5119
|
+
##### Function: validateGenerateChangeSdkParams
|
|
5748
5120
|
|
|
5749
5121
|
```ts
|
|
5750
|
-
export function
|
|
5122
|
+
export function validateGenerateChangeSdkParams(params: GenerateChangeSdkParams): ValidateGenerateChangeSdkParamsResult
|
|
5751
5123
|
```
|
|
5752
5124
|
|
|
5753
|
-
See also: [
|
|
5125
|
+
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams), [ValidateGenerateChangeSdkParamsResult](./storage.md#interface-validategeneratechangesdkparamsresult)
|
|
5754
5126
|
|
|
5755
5127
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5756
5128
|
|
|
5757
5129
|
---
|
|
5758
|
-
##### Function:
|
|
5130
|
+
##### Function: validateGenerateChangeSdkResult
|
|
5759
5131
|
|
|
5760
5132
|
```ts
|
|
5761
|
-
export function
|
|
5133
|
+
export function validateGenerateChangeSdkResult(params: GenerateChangeSdkParams, r: GenerateChangeSdkResult): {
|
|
5134
|
+
ok: boolean;
|
|
5135
|
+
log: string;
|
|
5136
|
+
}
|
|
5762
5137
|
```
|
|
5763
5138
|
|
|
5764
|
-
See also: [
|
|
5139
|
+
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams), [GenerateChangeSdkResult](./storage.md#interface-generatechangesdkresult)
|
|
5765
5140
|
|
|
5766
5141
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5767
5142
|
|
|
5768
5143
|
---
|
|
5769
|
-
##### Function:
|
|
5144
|
+
##### Function: validateStorageFeeModel
|
|
5770
5145
|
|
|
5771
5146
|
```ts
|
|
5772
|
-
export function
|
|
5773
|
-
```
|
|
5774
|
-
|
|
5775
|
-
See also: [TableTxLabel](./storage.md#interface-tabletxlabel)
|
|
5776
|
-
|
|
5777
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5778
|
-
|
|
5779
|
-
---
|
|
5780
|
-
##### Function: mergeInputBeefs
|
|
5781
|
-
|
|
5782
|
-
For each input of `rawTx`, ensure the source txid is represented in `beef`.
|
|
5783
|
-
|
|
5784
|
-
When `requiredLevels` is undefined/0 and `knownTxids` contains the source txid,
|
|
5785
|
-
a txid-only stub is merged rather than recursing into storage.
|
|
5786
|
-
|
|
5787
|
-
```ts
|
|
5788
|
-
export async function mergeInputBeefs(rawTx: number[], beef: Beef, trustSelf: "known" | undefined, knownTxids: string[] | undefined, trx: TrxToken | undefined, requiredLevels: number | undefined, getValidBeef: (txid: string, beef: Beef, trustSelf: "known" | undefined, knownTxids: string[] | undefined, trx: TrxToken | undefined, requiredLevels: number | undefined) => Promise<unknown>): Promise<void>
|
|
5789
|
-
```
|
|
5790
|
-
|
|
5791
|
-
See also: [TrxToken](./client.md#interface-trxtoken)
|
|
5792
|
-
|
|
5793
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5794
|
-
|
|
5795
|
-
---
|
|
5796
|
-
##### Function: mergeInputsIntoBeef
|
|
5797
|
-
|
|
5798
|
-
Convenience wrapper for the external-sharing path where `trustSelf` and
|
|
5799
|
-
`requiredLevels` are always absent.
|
|
5800
|
-
|
|
5801
|
-
```ts
|
|
5802
|
-
export async function mergeInputsIntoBeef(rawTx: number[], beef: Beef, knownTxids: string[], trx: TrxToken | undefined, getValidBeef: (txid: string, beef: Beef, trustSelf: undefined, knownTxids: string[], trx: TrxToken | undefined) => Promise<unknown>): Promise<void>
|
|
5803
|
-
```
|
|
5804
|
-
|
|
5805
|
-
See also: [TrxToken](./client.md#interface-trxtoken)
|
|
5806
|
-
|
|
5807
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5808
|
-
|
|
5809
|
-
---
|
|
5810
|
-
##### Function: notifyTransactionsOfProof
|
|
5811
|
-
|
|
5812
|
-
Notify each transaction that a proof has been found.
|
|
5813
|
-
Mutates `req` history notes in place.
|
|
5814
|
-
|
|
5815
|
-
The `addNote` callback avoids coupling this helper to a specific entity type.
|
|
5816
|
-
Returns false if any transaction update failed so callers can retain the
|
|
5817
|
-
request for later status repair.
|
|
5818
|
-
|
|
5819
|
-
```ts
|
|
5820
|
-
export async function notifyTransactionsOfProof(ids: number[], provenTxId: number, addNote: (note: ReqHistoryNote) => void, updateTransaction: (id: number, update: {
|
|
5821
|
-
provenTxId: number;
|
|
5822
|
-
status: "completed";
|
|
5823
|
-
}) => Promise<unknown>): Promise<boolean>
|
|
5824
|
-
```
|
|
5825
|
-
|
|
5826
|
-
See also: [ReqHistoryNote](./client.md#interface-reqhistorynote)
|
|
5827
|
-
|
|
5828
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5829
|
-
|
|
5830
|
-
---
|
|
5831
|
-
##### Function: offsetPrivKey
|
|
5832
|
-
|
|
5833
|
-
```ts
|
|
5834
|
-
export function offsetPrivKey(privKey: string, keyOffset?: string): {
|
|
5835
|
-
offsetPrivKey: string;
|
|
5836
|
-
keyOffset: string;
|
|
5837
|
-
}
|
|
5838
|
-
```
|
|
5839
|
-
|
|
5840
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5841
|
-
|
|
5842
|
-
---
|
|
5843
|
-
##### Function: offsetPubKey
|
|
5844
|
-
|
|
5845
|
-
```ts
|
|
5846
|
-
export function offsetPubKey(pubKey: string, keyOffset?: string): {
|
|
5847
|
-
offsetPubKey: string;
|
|
5848
|
-
keyOffset: string;
|
|
5849
|
-
}
|
|
5850
|
-
```
|
|
5851
|
-
|
|
5852
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5853
|
-
|
|
5854
|
-
---
|
|
5855
|
-
##### Function: parseJsonRpc
|
|
5856
|
-
|
|
5857
|
-
```ts
|
|
5858
|
-
export function parseJsonRpc(text: string, binary: boolean = false): any
|
|
5859
|
-
```
|
|
5860
|
-
|
|
5861
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5862
|
-
|
|
5863
|
-
---
|
|
5864
|
-
##### Function: partitionActionLabels
|
|
5865
|
-
|
|
5866
|
-
```ts
|
|
5867
|
-
export function partitionActionLabels(ordinaryLabels: string[]): {
|
|
5868
|
-
specOp: ListActionsSpecOp | undefined;
|
|
5869
|
-
specOpLabels: string[];
|
|
5870
|
-
labels: string[];
|
|
5871
|
-
}
|
|
5872
|
-
```
|
|
5873
|
-
|
|
5874
|
-
See also: [ListActionsSpecOp](./storage.md#interface-listactionsspecop)
|
|
5875
|
-
|
|
5876
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5877
|
-
|
|
5878
|
-
---
|
|
5879
|
-
##### Function: prepareActionBatchCommit
|
|
5880
|
-
|
|
5881
|
-
```ts
|
|
5882
|
-
export async function prepareActionBatchCommit(storage: StorageProvider, auth: AuthId, manifest: ActionBatchManifest): Promise<PrepareActionBatchCommitResult>
|
|
5883
|
-
```
|
|
5884
|
-
|
|
5885
|
-
See also: [ActionBatchManifest](./client.md#interface-actionbatchmanifest), [AuthId](./client.md#interface-authid), [PrepareActionBatchCommitResult](./client.md#interface-prepareactionbatchcommitresult), [StorageProvider](./storage.md#class-storageprovider)
|
|
5886
|
-
|
|
5887
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5888
|
-
|
|
5889
|
-
---
|
|
5890
|
-
##### Function: processAction
|
|
5891
|
-
|
|
5892
|
-
```ts
|
|
5893
|
-
export async function processAction(storage: StorageProvider, auth: AuthId, args: StorageProcessActionArgs): Promise<StorageProcessActionResults>
|
|
5894
|
-
```
|
|
5895
|
-
|
|
5896
|
-
See also: [AuthId](./client.md#interface-authid), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvider](./storage.md#class-storageprovider)
|
|
5897
|
-
|
|
5898
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5899
|
-
|
|
5900
|
-
---
|
|
5901
|
-
##### Function: purgeData
|
|
5902
|
-
|
|
5903
|
-
```ts
|
|
5904
|
-
export async function purgeData(storage: StorageKnex, params: PurgeParams, trx?: TrxToken): Promise<PurgeResults>
|
|
5905
|
-
```
|
|
5906
|
-
|
|
5907
|
-
See also: [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
|
|
5908
|
-
|
|
5909
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5910
|
-
|
|
5911
|
-
---
|
|
5912
|
-
##### Function: purgeDataIdb
|
|
5913
|
-
|
|
5914
|
-
```ts
|
|
5915
|
-
export async function purgeDataIdb(storage: StorageIdb, params: PurgeParams, trx?: TrxToken): Promise<PurgeResults>
|
|
5916
|
-
```
|
|
5917
|
-
|
|
5918
|
-
See also: [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageIdb](./storage.md#class-storageidb), [TrxToken](./client.md#interface-trxtoken)
|
|
5919
|
-
|
|
5920
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5921
|
-
|
|
5922
|
-
---
|
|
5923
|
-
##### Function: putActionBatchBlob
|
|
5924
|
-
|
|
5925
|
-
```ts
|
|
5926
|
-
export async function putActionBatchBlob(storage: StorageProvider, auth: AuthId, args: PutActionBatchBlobArgs): Promise<void>
|
|
5927
|
-
```
|
|
5928
|
-
|
|
5929
|
-
See also: [AuthId](./client.md#interface-authid), [PutActionBatchBlobArgs](./client.md#interface-putactionbatchblobargs), [StorageProvider](./storage.md#class-storageprovider)
|
|
5930
|
-
|
|
5931
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5932
|
-
|
|
5933
|
-
---
|
|
5934
|
-
##### Function: randomizeOutputVouts
|
|
5935
|
-
|
|
5936
|
-
Pure Fisher-Yates vout assignment shared by legacy and batch planning.
|
|
5937
|
-
|
|
5938
|
-
```ts
|
|
5939
|
-
export function randomizeOutputVouts<T extends {
|
|
5940
|
-
vout: number;
|
|
5941
|
-
}>(outputs: T[], randomVals?: number[]): void
|
|
5942
|
-
```
|
|
5943
|
-
|
|
5944
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5945
|
-
|
|
5946
|
-
---
|
|
5947
|
-
##### Function: redeemServiceCharges
|
|
5948
|
-
|
|
5949
|
-
```ts
|
|
5950
|
-
export function redeemServiceCharges(privateKeyWif: string, charges: TableCommission[]): Array<{}>
|
|
5951
|
-
```
|
|
5952
|
-
|
|
5953
|
-
See also: [TableCommission](./storage.md#interface-tablecommission)
|
|
5954
|
-
|
|
5955
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5956
|
-
|
|
5957
|
-
---
|
|
5958
|
-
##### Function: renderAdminPage
|
|
5959
|
-
|
|
5960
|
-
```ts
|
|
5961
|
-
export function renderAdminPage(): string
|
|
5962
|
-
```
|
|
5963
|
-
|
|
5964
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5965
|
-
|
|
5966
|
-
---
|
|
5967
|
-
##### Function: renewActionBatch
|
|
5968
|
-
|
|
5969
|
-
```ts
|
|
5970
|
-
export async function renewActionBatch(storage: StorageProvider, auth: AuthId, batchId: string): Promise<RenewActionBatchResult>
|
|
5971
|
-
```
|
|
5972
|
-
|
|
5973
|
-
See also: [AuthId](./client.md#interface-authid), [RenewActionBatchResult](./client.md#interface-renewactionbatchresult), [StorageProvider](./storage.md#class-storageprovider)
|
|
5974
|
-
|
|
5975
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5976
|
-
|
|
5977
|
-
---
|
|
5978
|
-
##### Function: repeatableRandom
|
|
5979
|
-
|
|
5980
|
-
```ts
|
|
5981
|
-
export function repeatableRandom(randomVals?: number[]): () => number
|
|
5982
|
-
```
|
|
5983
|
-
|
|
5984
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5985
|
-
|
|
5986
|
-
---
|
|
5987
|
-
##### Function: restoreInputsToSpendable
|
|
5988
|
-
|
|
5989
|
-
```ts
|
|
5990
|
-
export async function restoreInputsToSpendable(storage: StorageProvider, transitions: SpentInputTransition[]): Promise<void>
|
|
5991
|
-
```
|
|
5992
|
-
|
|
5993
|
-
See also: [SpentInputTransition](./storage.md#interface-spentinputtransition), [StorageProvider](./storage.md#class-storageprovider)
|
|
5994
|
-
|
|
5995
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5996
|
-
|
|
5997
|
-
---
|
|
5998
|
-
##### Function: reviewStatus
|
|
5999
|
-
|
|
6000
|
-
Looks for unpropagated state:
|
|
6001
|
-
|
|
6002
|
-
1. set transactions to 'failed' if not already failed and provenTxReq with matching txid has status of 'invalid'.
|
|
6003
|
-
2. sets outputs to spendable true, spentBy undefined if spentBy is a terminal failed transaction.
|
|
6004
|
-
3. sets outputs generated by terminal failed transactions to spendable false, spentBy undefined.
|
|
6005
|
-
4. sets transactions to 'completed' if provenTx with matching txid exists and current provenTxId is null.
|
|
6006
|
-
|
|
6007
|
-
```ts
|
|
6008
|
-
export async function reviewStatus(storage: StorageKnex, args: {
|
|
6009
|
-
agedLimit: Date;
|
|
6010
|
-
trx?: TrxToken;
|
|
6011
|
-
}): Promise<{
|
|
6012
|
-
log: string;
|
|
6013
|
-
}>
|
|
6014
|
-
```
|
|
6015
|
-
|
|
6016
|
-
See also: [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
|
|
6017
|
-
|
|
6018
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6019
|
-
|
|
6020
|
-
---
|
|
6021
|
-
##### Function: reviewStatusIdb
|
|
6022
|
-
|
|
6023
|
-
Looks for unpropagated state:
|
|
6024
|
-
|
|
6025
|
-
1. set transactions to 'failed' if not already failed and provenTxReq with matching txid has status of 'invalid'.
|
|
6026
|
-
2. sets outputs to spendable true, spentBy undefined if spentBy is a terminal failed transaction.
|
|
6027
|
-
3. sets outputs generated by terminal failed transactions to spendable false, spentBy undefined.
|
|
6028
|
-
|
|
6029
|
-
```ts
|
|
6030
|
-
export async function reviewStatusIdb(storage: StorageIdb, args: {
|
|
6031
|
-
agedLimit: Date;
|
|
6032
|
-
trx?: sdk.TrxToken;
|
|
6033
|
-
}): Promise<{
|
|
6034
|
-
log: string;
|
|
6035
|
-
}>
|
|
6036
|
-
```
|
|
6037
|
-
|
|
6038
|
-
See also: [StorageIdb](./storage.md#class-storageidb), [TrxToken](./client.md#interface-trxtoken)
|
|
6039
|
-
|
|
6040
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6041
|
-
|
|
6042
|
-
---
|
|
6043
|
-
##### Function: selectCanonicalChange
|
|
6044
|
-
|
|
6045
|
-
Pure exact / least-over / largest-under change selection policy.
|
|
6046
|
-
|
|
6047
|
-
```ts
|
|
6048
|
-
export function selectCanonicalChange<T extends CanonicalFundingCandidate>(outputs: T[], targetSatoshis: number, exactSatoshis?: number): T | undefined
|
|
6049
|
-
```
|
|
6050
|
-
|
|
6051
|
-
See also: [CanonicalFundingCandidate](./storage.md#interface-canonicalfundingcandidate)
|
|
6052
|
-
|
|
6053
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6054
|
-
|
|
6055
|
-
---
|
|
6056
|
-
##### Function: setDisableDoubleSpendCheckForTest
|
|
6057
|
-
|
|
6058
|
-
```ts
|
|
6059
|
-
export function setDisableDoubleSpendCheckForTest(v: boolean)
|
|
6060
|
-
```
|
|
6061
|
-
|
|
6062
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6063
|
-
|
|
6064
|
-
---
|
|
6065
|
-
##### Function: shareReqsWithWorld
|
|
6066
|
-
|
|
6067
|
-
```ts
|
|
6068
|
-
export async function shareReqsWithWorld(storage: StorageProvider, userId: number, txids: string[], isDelayed: boolean, r?: GetReqsAndBeefResult, logger?: WalletLoggerInterface): Promise<{
|
|
6069
|
-
swr: SendWithResult[];
|
|
6070
|
-
ndr: ReviewActionResult[] | undefined;
|
|
6071
|
-
}>
|
|
6072
|
-
```
|
|
6073
|
-
|
|
6074
|
-
See also: [GetReqsAndBeefResult](./storage.md#interface-getreqsandbeefresult), [ReviewActionResult](./client.md#interface-reviewactionresult), [StorageProvider](./storage.md#class-storageprovider), [logger](./client.md#variable-logger)
|
|
6075
|
-
|
|
6076
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6077
|
-
|
|
6078
|
-
---
|
|
6079
|
-
##### Function: stringifyJsonRpc
|
|
6080
|
-
|
|
6081
|
-
```ts
|
|
6082
|
-
export function stringifyJsonRpc(value: unknown, binary: boolean): string
|
|
6083
|
-
```
|
|
6084
|
-
|
|
6085
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6086
|
-
|
|
6087
|
-
---
|
|
6088
|
-
##### Function: tableAuthSessionToPeerSession
|
|
6089
|
-
|
|
6090
|
-
```ts
|
|
6091
|
-
export function tableAuthSessionToPeerSession(row: TableAuthSession): PeerSession
|
|
6092
|
-
```
|
|
6093
|
-
|
|
6094
|
-
See also: [TableAuthSession](./storage.md#interface-tableauthsession)
|
|
6095
|
-
|
|
6096
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6097
|
-
|
|
6098
|
-
---
|
|
6099
|
-
##### Function: transactionInputSize
|
|
6100
|
-
|
|
6101
|
-
```ts
|
|
6102
|
-
export function transactionInputSize(scriptSize: number): number
|
|
6103
|
-
```
|
|
6104
|
-
|
|
6105
|
-
Returns
|
|
6106
|
-
|
|
6107
|
-
serialized byte length a transaction input
|
|
6108
|
-
|
|
6109
|
-
Argument Details
|
|
6110
|
-
|
|
6111
|
-
+ **scriptSize**
|
|
6112
|
-
+ byte length of input script
|
|
6113
|
-
|
|
6114
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6115
|
-
|
|
6116
|
-
---
|
|
6117
|
-
##### Function: transactionOutputSize
|
|
6118
|
-
|
|
6119
|
-
```ts
|
|
6120
|
-
export function transactionOutputSize(scriptSize: number): number
|
|
6121
|
-
```
|
|
6122
|
-
|
|
6123
|
-
Returns
|
|
6124
|
-
|
|
6125
|
-
serialized byte length a transaction output
|
|
6126
|
-
|
|
6127
|
-
Argument Details
|
|
6128
|
-
|
|
6129
|
-
+ **scriptSize**
|
|
6130
|
-
+ byte length of output script
|
|
6131
|
-
|
|
6132
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6133
|
-
|
|
6134
|
-
---
|
|
6135
|
-
##### Function: transactionSize
|
|
6136
|
-
|
|
6137
|
-
Compute the serialized binary transaction size in bytes
|
|
6138
|
-
given the number of inputs and outputs,
|
|
6139
|
-
and the size of each script.
|
|
6140
|
-
|
|
6141
|
-
```ts
|
|
6142
|
-
export function transactionSize(inputs: number[], outputs: number[]): number
|
|
6143
|
-
```
|
|
6144
|
-
|
|
6145
|
-
Returns
|
|
6146
|
-
|
|
6147
|
-
total transaction size in bytes
|
|
6148
|
-
|
|
6149
|
-
Argument Details
|
|
6150
|
-
|
|
6151
|
-
+ **inputs**
|
|
6152
|
-
+ array of input script lengths, in bytes
|
|
6153
|
-
+ **outputs**
|
|
6154
|
-
+ array of output script lengths, in bytes
|
|
6155
|
-
|
|
6156
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6157
|
-
|
|
6158
|
-
---
|
|
6159
|
-
##### Function: updateReqsFromAggregateResults
|
|
6160
|
-
|
|
6161
|
-
For each txid in submitted `txids`:
|
|
6162
|
-
|
|
6163
|
-
Based on its aggregate status, and whether broadcast happening in background (isDelayed) or immediately (!isDelayed),
|
|
6164
|
-
and iff current req.status is not 'unproven' or 'completed':
|
|
6165
|
-
|
|
6166
|
-
'success':
|
|
6167
|
-
req.status => 'unmined', tx.status => 'unproven'
|
|
6168
|
-
'doubleSpend':
|
|
6169
|
-
req.status => 'doubleSpend', tx.status => 'failed'
|
|
6170
|
-
'invalidTx':
|
|
6171
|
-
req.status => 'invalid', tx.status => 'failed'
|
|
6172
|
-
'serviceError':
|
|
6173
|
-
increment req.attempts
|
|
6174
|
-
|
|
6175
|
-
```ts
|
|
6176
|
-
export async function updateReqsFromAggregateResults(txids: string[], r: PostReqsToNetworkResult, apbrs: Record<string, AggregatePostBeefTxResult>, storage: StorageProvider, services?: sdk.WalletServices, trx?: sdk.TrxToken, logger?: WalletLoggerInterface): Promise<void>
|
|
6177
|
-
```
|
|
6178
|
-
|
|
6179
|
-
See also: [AggregatePostBeefTxResult](./storage.md#interface-aggregatepostbeeftxresult), [PostReqsToNetworkResult](./storage.md#interface-postreqstonetworkresult), [StorageProvider](./storage.md#class-storageprovider), [TrxToken](./client.md#interface-trxtoken), [WalletServices](./client.md#interface-walletservices), [logger](./client.md#variable-logger)
|
|
6180
|
-
|
|
6181
|
-
Argument Details
|
|
6182
|
-
|
|
6183
|
-
+ **services**
|
|
6184
|
-
+ if valid, doubleSpend results will be verified (but only if not within a trx. e.g. trx must be undefined)
|
|
6185
|
-
|
|
6186
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6187
|
-
|
|
6188
|
-
---
|
|
6189
|
-
##### Function: upgradeActionBatchStoresV2
|
|
6190
|
-
|
|
6191
|
-
Internal, non-synchronized action-batch state added in schema version 2.
|
|
6192
|
-
|
|
6193
|
-
```ts
|
|
6194
|
-
export function upgradeActionBatchStoresV2(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6195
|
-
```
|
|
6196
|
-
|
|
6197
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6198
|
-
|
|
6199
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6200
|
-
|
|
6201
|
-
---
|
|
6202
|
-
##### Function: upgradeAllStoresV1
|
|
6203
|
-
|
|
6204
|
-
Upgrade handler for every store that existed at schema version 1.
|
|
6205
|
-
|
|
6206
|
-
```ts
|
|
6207
|
-
export function upgradeAllStoresV1(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6208
|
-
```
|
|
6209
|
-
|
|
6210
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6211
|
-
|
|
6212
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6213
|
-
|
|
6214
|
-
---
|
|
6215
|
-
##### Function: upgradeCertificateFields
|
|
6216
|
-
|
|
6217
|
-
```ts
|
|
6218
|
-
export function upgradeCertificateFields(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6219
|
-
```
|
|
6220
|
-
|
|
6221
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6222
|
-
|
|
6223
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6224
|
-
|
|
6225
|
-
---
|
|
6226
|
-
##### Function: upgradeCertificates
|
|
6227
|
-
|
|
6228
|
-
```ts
|
|
6229
|
-
export function upgradeCertificates(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6230
|
-
```
|
|
6231
|
-
|
|
6232
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6233
|
-
|
|
6234
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6235
|
-
|
|
6236
|
-
---
|
|
6237
|
-
##### Function: upgradeCommissions
|
|
6238
|
-
|
|
6239
|
-
```ts
|
|
6240
|
-
export function upgradeCommissions(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6241
|
-
```
|
|
6242
|
-
|
|
6243
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6244
|
-
|
|
6245
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6246
|
-
|
|
6247
|
-
---
|
|
6248
|
-
##### Function: upgradeMonitorEvents
|
|
6249
|
-
|
|
6250
|
-
```ts
|
|
6251
|
-
export function upgradeMonitorEvents(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6252
|
-
```
|
|
6253
|
-
|
|
6254
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6255
|
-
|
|
6256
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6257
|
-
|
|
6258
|
-
---
|
|
6259
|
-
##### Function: upgradeOutputBaskets
|
|
6260
|
-
|
|
6261
|
-
```ts
|
|
6262
|
-
export function upgradeOutputBaskets(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6263
|
-
```
|
|
6264
|
-
|
|
6265
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6266
|
-
|
|
6267
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6268
|
-
|
|
6269
|
-
---
|
|
6270
|
-
##### Function: upgradeOutputTags
|
|
6271
|
-
|
|
6272
|
-
```ts
|
|
6273
|
-
export function upgradeOutputTags(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6274
|
-
```
|
|
6275
|
-
|
|
6276
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6277
|
-
|
|
6278
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6279
|
-
|
|
6280
|
-
---
|
|
6281
|
-
##### Function: upgradeOutputTagsMap
|
|
6282
|
-
|
|
6283
|
-
```ts
|
|
6284
|
-
export function upgradeOutputTagsMap(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6285
|
-
```
|
|
6286
|
-
|
|
6287
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6288
|
-
|
|
6289
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6290
|
-
|
|
6291
|
-
---
|
|
6292
|
-
##### Function: upgradeOutputs
|
|
6293
|
-
|
|
6294
|
-
```ts
|
|
6295
|
-
export function upgradeOutputs(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6296
|
-
```
|
|
6297
|
-
|
|
6298
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6299
|
-
|
|
6300
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6301
|
-
|
|
6302
|
-
---
|
|
6303
|
-
##### Function: upgradeProvenTxReqs
|
|
6304
|
-
|
|
6305
|
-
```ts
|
|
6306
|
-
export function upgradeProvenTxReqs(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6307
|
-
```
|
|
6308
|
-
|
|
6309
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6310
|
-
|
|
6311
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6312
|
-
|
|
6313
|
-
---
|
|
6314
|
-
##### Function: upgradeProvenTxs
|
|
6315
|
-
|
|
6316
|
-
```ts
|
|
6317
|
-
export function upgradeProvenTxs(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6318
|
-
```
|
|
6319
|
-
|
|
6320
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6321
|
-
|
|
6322
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6323
|
-
|
|
6324
|
-
---
|
|
6325
|
-
##### Function: upgradeSyncStates
|
|
6326
|
-
|
|
6327
|
-
```ts
|
|
6328
|
-
export function upgradeSyncStates(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6329
|
-
```
|
|
6330
|
-
|
|
6331
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6332
|
-
|
|
6333
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6334
|
-
|
|
6335
|
-
---
|
|
6336
|
-
##### Function: upgradeTransactions
|
|
6337
|
-
|
|
6338
|
-
```ts
|
|
6339
|
-
export function upgradeTransactions(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6340
|
-
```
|
|
6341
|
-
|
|
6342
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6343
|
-
|
|
6344
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6345
|
-
|
|
6346
|
-
---
|
|
6347
|
-
##### Function: upgradeTxLabels
|
|
6348
|
-
|
|
6349
|
-
```ts
|
|
6350
|
-
export function upgradeTxLabels(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6351
|
-
```
|
|
6352
|
-
|
|
6353
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6354
|
-
|
|
6355
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6356
|
-
|
|
6357
|
-
---
|
|
6358
|
-
##### Function: upgradeTxLabelsMap
|
|
6359
|
-
|
|
6360
|
-
```ts
|
|
6361
|
-
export function upgradeTxLabelsMap(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6362
|
-
```
|
|
6363
|
-
|
|
6364
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6365
|
-
|
|
6366
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6367
|
-
|
|
6368
|
-
---
|
|
6369
|
-
##### Function: upgradeUsers
|
|
6370
|
-
|
|
6371
|
-
```ts
|
|
6372
|
-
export function upgradeUsers(db: IDBPDatabase<StorageIdbSchema>): void
|
|
6373
|
-
```
|
|
6374
|
-
|
|
6375
|
-
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
6376
|
-
|
|
6377
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6378
|
-
|
|
6379
|
-
---
|
|
6380
|
-
##### Function: validateActionBatchInlinePayload
|
|
6381
|
-
|
|
6382
|
-
```ts
|
|
6383
|
-
export function validateActionBatchInlinePayload(manifest: ActionBatchManifest): void
|
|
6384
|
-
```
|
|
6385
|
-
|
|
6386
|
-
See also: [ActionBatchManifest](./client.md#interface-actionbatchmanifest)
|
|
6387
|
-
|
|
6388
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6389
|
-
|
|
6390
|
-
---
|
|
6391
|
-
##### Function: validateDate
|
|
6392
|
-
|
|
6393
|
-
Shared entity-validation helpers used by both client-side storage remoting
|
|
6394
|
-
(StorageClientBase / StorageMobile) and the server-side StorageServer.
|
|
6395
|
-
|
|
6396
|
-
These helpers normalise records returned from remote calls or database queries:
|
|
6397
|
-
- Coerce date strings / timestamps to `Date` objects.
|
|
6398
|
-
- Replace `null` values with `undefined`.
|
|
6399
|
-
- Replace `Uint8Array` / `Buffer` values with plain `number[]` arrays.
|
|
6400
|
-
|
|
6401
|
-
```ts
|
|
6402
|
-
export function validateDate(date: Date | string | number): Date
|
|
6403
|
-
```
|
|
6404
|
-
|
|
6405
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6406
|
-
|
|
6407
|
-
---
|
|
6408
|
-
##### Function: validateEntities
|
|
6409
|
-
|
|
6410
|
-
Force uniform behaviour across database engines.
|
|
6411
|
-
Use to process all arrays of records with timestamps retrieved from database.
|
|
6412
|
-
|
|
6413
|
-
```ts
|
|
6414
|
-
export function validateEntities<T extends EntityTimeStamp>(entities: T[], dateFields?: string[]): T[]
|
|
6415
|
-
```
|
|
6416
|
-
|
|
6417
|
-
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
6418
|
-
|
|
6419
|
-
Returns
|
|
6420
|
-
|
|
6421
|
-
input `entities` array with contained values validated.
|
|
6422
|
-
|
|
6423
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6424
|
-
|
|
6425
|
-
---
|
|
6426
|
-
##### Function: validateEntity
|
|
6427
|
-
|
|
6428
|
-
Force uniform behaviour across database engines.
|
|
6429
|
-
Use to process all individual records with timestamps retrieved from database.
|
|
6430
|
-
|
|
6431
|
-
```ts
|
|
6432
|
-
export function validateEntity<T extends EntityTimeStamp>(entity: T, dateFields?: string[]): T
|
|
6433
|
-
```
|
|
6434
|
-
|
|
6435
|
-
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
6436
|
-
|
|
6437
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6438
|
-
|
|
6439
|
-
---
|
|
6440
|
-
##### Function: validateGenerateChangeSdkParams
|
|
6441
|
-
|
|
6442
|
-
```ts
|
|
6443
|
-
export function validateGenerateChangeSdkParams(params: GenerateChangeSdkParams): ValidateGenerateChangeSdkParamsResult
|
|
6444
|
-
```
|
|
6445
|
-
|
|
6446
|
-
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams), [ValidateGenerateChangeSdkParamsResult](./storage.md#interface-validategeneratechangesdkparamsresult)
|
|
6447
|
-
|
|
6448
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6449
|
-
|
|
6450
|
-
---
|
|
6451
|
-
##### Function: validateGenerateChangeSdkResult
|
|
6452
|
-
|
|
6453
|
-
```ts
|
|
6454
|
-
export function validateGenerateChangeSdkResult(params: GenerateChangeSdkParams, r: GenerateChangeSdkResult): {
|
|
6455
|
-
ok: boolean;
|
|
6456
|
-
log: string;
|
|
6457
|
-
}
|
|
6458
|
-
```
|
|
6459
|
-
|
|
6460
|
-
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams), [GenerateChangeSdkResult](./storage.md#interface-generatechangesdkresult)
|
|
6461
|
-
|
|
6462
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6463
|
-
|
|
6464
|
-
---
|
|
6465
|
-
##### Function: validateManifestActions
|
|
6466
|
-
|
|
6467
|
-
```ts
|
|
6468
|
-
export async function validateManifestActions(storage: StorageProvider, batch: TableActionBatch, manifest: ActionBatchManifest): Promise<{
|
|
6469
|
-
actions: ValidatedBatchAction[];
|
|
6470
|
-
dependencyBeef: number[];
|
|
6471
|
-
}>
|
|
6472
|
-
```
|
|
6473
|
-
|
|
6474
|
-
See also: [ActionBatchManifest](./client.md#interface-actionbatchmanifest), [StorageProvider](./storage.md#class-storageprovider), [TableActionBatch](./storage.md#interface-tableactionbatch), [ValidatedBatchAction](./storage.md#interface-validatedbatchaction)
|
|
6475
|
-
|
|
6476
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6477
|
-
|
|
6478
|
-
---
|
|
6479
|
-
##### Function: validateStorageFeeModel
|
|
6480
|
-
|
|
6481
|
-
```ts
|
|
6482
|
-
export function validateStorageFeeModel(v?: StorageFeeModel): StorageFeeModel
|
|
5147
|
+
export function validateStorageFeeModel(v?: StorageFeeModel): StorageFeeModel
|
|
6483
5148
|
```
|
|
6484
5149
|
|
|
6485
5150
|
See also: [StorageFeeModel](./client.md#interface-storagefeemodel)
|
|
6486
5151
|
|
|
6487
5152
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6488
5153
|
|
|
6489
|
-
---
|
|
6490
|
-
##### Function: validateSyncChunkEntities
|
|
6491
|
-
|
|
6492
|
-
Validate all entity arrays within a `SyncChunk` received from a remote storage call.
|
|
6493
|
-
Normalises timestamps, nulls, and binary fields in-place.
|
|
6494
|
-
|
|
6495
|
-
```ts
|
|
6496
|
-
export function validateSyncChunkEntities(r: SyncChunk): SyncChunk
|
|
6497
|
-
```
|
|
6498
|
-
|
|
6499
|
-
See also: [SyncChunk](./client.md#interface-syncchunk)
|
|
6500
|
-
|
|
6501
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6502
|
-
|
|
6503
5154
|
---
|
|
6504
5155
|
##### Function: varUintSize
|
|
6505
5156
|
|
|
@@ -6509,13 +5160,7 @@ Returns the byte size required to encode number as Bitcoin VarUint
|
|
|
6509
5160
|
export function varUintSize(val: number): 1 | 3 | 5 | 9 {
|
|
6510
5161
|
if (val < 0)
|
|
6511
5162
|
throw new WERR_INVALID_PARAMETER("varUint", "non-negative");
|
|
6512
|
-
|
|
6513
|
-
return 1;
|
|
6514
|
-
if (val <= 65535)
|
|
6515
|
-
return 3;
|
|
6516
|
-
if (val <= 4294967295)
|
|
6517
|
-
return 5;
|
|
6518
|
-
return 9;
|
|
5163
|
+
return val <= 252 ? 1 : val <= 65535 ? 3 : val <= 4294967295 ? 5 : 9;
|
|
6519
5164
|
}
|
|
6520
5165
|
```
|
|
6521
5166
|
|
|
@@ -6528,7 +5173,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6528
5173
|
|
|
6529
5174
|
| |
|
|
6530
5175
|
| --- |
|
|
6531
|
-
| [ActionBatchStatus](#type-actionbatchstatus) |
|
|
6532
5176
|
| [DBType](#type-dbtype) |
|
|
6533
5177
|
| [EntityStorage](#type-entitystorage) |
|
|
6534
5178
|
| [PostReqsToNetworkDetailsStatus](#type-postreqstonetworkdetailsstatus) |
|
|
@@ -6537,15 +5181,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6537
5181
|
|
|
6538
5182
|
---
|
|
6539
5183
|
|
|
6540
|
-
##### Type: ActionBatchStatus
|
|
6541
|
-
|
|
6542
|
-
```ts
|
|
6543
|
-
export type ActionBatchStatus = "active" | "prepared" | "committed" | "aborted" | "expired"
|
|
6544
|
-
```
|
|
6545
|
-
|
|
6546
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6547
|
-
|
|
6548
|
-
---
|
|
6549
5184
|
##### Type: DBType
|
|
6550
5185
|
|
|
6551
5186
|
```ts
|
|
@@ -6588,159 +5223,18 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6588
5223
|
---
|
|
6589
5224
|
#### Variables
|
|
6590
5225
|
|
|
6591
|
-
| |
|
|
6592
|
-
| --- |
|
|
6593
|
-
| [
|
|
6594
|
-
| [
|
|
6595
|
-
| [
|
|
6596
|
-
| [
|
|
6597
|
-
| [
|
|
6598
|
-
| [ACTION_BATCH_MAX_INLINE_BYTES](#variable-action_batch_max_inline_bytes) | [managedChangeOutputFields](#variable-managedchangeoutputfields) |
|
|
6599
|
-
| [ACTION_BATCH_MAX_LOGICAL_BLOB_BYTES](#variable-action_batch_max_logical_blob_bytes) | [maxChangeOutputsPerTransaction](#variable-maxchangeoutputspertransaction) |
|
|
6600
|
-
| [ACTION_BATCH_MAX_RESERVATION_EXTENSION_OUTPUTS](#variable-action_batch_max_reservation_extension_outputs) | [maxPossibleSatoshis](#variable-maxpossiblesatoshis) |
|
|
6601
|
-
| [AUTH_SESSION_MIGRATION](#variable-auth_session_migration) | [outputColumnsWithoutLockingScript](#variable-outputcolumnswithoutlockingscript) |
|
|
6602
|
-
| [AUTH_SESSION_TABLE](#variable-auth_session_table) | [transactionColumnsWithoutRawTx](#variable-transactioncolumnswithoutrawtx) |
|
|
6603
|
-
| [BINARY_ENCODING](#variable-binary_encoding) | |
|
|
6604
|
-
|
|
6605
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6606
|
-
|
|
6607
|
-
---
|
|
6608
|
-
|
|
6609
|
-
##### Variable: ACTION_BATCH_HARD_LIFETIME_MS
|
|
6610
|
-
|
|
6611
|
-
```ts
|
|
6612
|
-
ACTION_BATCH_HARD_LIFETIME_MS = 60 * 60 * 1000
|
|
6613
|
-
```
|
|
6614
|
-
|
|
6615
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6616
|
-
|
|
6617
|
-
---
|
|
6618
|
-
##### Variable: ACTION_BATCH_LEASE_MS
|
|
6619
|
-
|
|
6620
|
-
```ts
|
|
6621
|
-
ACTION_BATCH_LEASE_MS = 15 * 60 * 1000
|
|
6622
|
-
```
|
|
6623
|
-
|
|
6624
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6625
|
-
|
|
6626
|
-
---
|
|
6627
|
-
##### Variable: ACTION_BATCH_MAX_BLOB_BYTES
|
|
6628
|
-
|
|
6629
|
-
```ts
|
|
6630
|
-
ACTION_BATCH_MAX_BLOB_BYTES = 8 * 1024 * 1024
|
|
6631
|
-
```
|
|
6632
|
-
|
|
6633
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6634
|
-
|
|
6635
|
-
---
|
|
6636
|
-
##### Variable: ACTION_BATCH_MAX_CHUNKS_PER_BLOB
|
|
6637
|
-
|
|
6638
|
-
```ts
|
|
6639
|
-
ACTION_BATCH_MAX_CHUNKS_PER_BLOB = 64
|
|
6640
|
-
```
|
|
6641
|
-
|
|
6642
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6643
|
-
|
|
6644
|
-
---
|
|
6645
|
-
##### Variable: ACTION_BATCH_MAX_CONCURRENT_UPLOADS
|
|
6646
|
-
|
|
6647
|
-
```ts
|
|
6648
|
-
ACTION_BATCH_MAX_CONCURRENT_UPLOADS = 4
|
|
6649
|
-
```
|
|
6650
|
-
|
|
6651
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6652
|
-
|
|
6653
|
-
---
|
|
6654
|
-
##### Variable: ACTION_BATCH_MAX_INLINE_BYTES
|
|
6655
|
-
|
|
6656
|
-
```ts
|
|
6657
|
-
ACTION_BATCH_MAX_INLINE_BYTES = 4 * 1024 * 1024
|
|
6658
|
-
```
|
|
6659
|
-
|
|
6660
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6661
|
-
|
|
6662
|
-
---
|
|
6663
|
-
##### Variable: ACTION_BATCH_MAX_LOGICAL_BLOB_BYTES
|
|
6664
|
-
|
|
6665
|
-
```ts
|
|
6666
|
-
ACTION_BATCH_MAX_LOGICAL_BLOB_BYTES = 64 * 1024 * 1024
|
|
6667
|
-
```
|
|
6668
|
-
|
|
6669
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6670
|
-
|
|
6671
|
-
---
|
|
6672
|
-
##### Variable: ACTION_BATCH_MAX_RESERVATION_EXTENSION_OUTPUTS
|
|
6673
|
-
|
|
6674
|
-
```ts
|
|
6675
|
-
ACTION_BATCH_MAX_RESERVATION_EXTENSION_OUTPUTS = 64
|
|
6676
|
-
```
|
|
6677
|
-
|
|
6678
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6679
|
-
|
|
6680
|
-
---
|
|
6681
|
-
##### Variable: AUTH_SESSION_MIGRATION
|
|
6682
|
-
|
|
6683
|
-
```ts
|
|
6684
|
-
AUTH_SESSION_MIGRATION = "2026-07-14-001 add shared auth sessions"
|
|
6685
|
-
```
|
|
6686
|
-
|
|
6687
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6688
|
-
|
|
6689
|
-
---
|
|
6690
|
-
##### Variable: AUTH_SESSION_TABLE
|
|
6691
|
-
|
|
6692
|
-
```ts
|
|
6693
|
-
AUTH_SESSION_TABLE = "auth_sessions"
|
|
6694
|
-
```
|
|
6695
|
-
|
|
6696
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6697
|
-
|
|
6698
|
-
---
|
|
6699
|
-
##### Variable: BINARY_ENCODING
|
|
6700
|
-
|
|
6701
|
-
```ts
|
|
6702
|
-
BINARY_ENCODING = "base64"
|
|
6703
|
-
```
|
|
6704
|
-
|
|
6705
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6706
|
-
|
|
6707
|
-
---
|
|
6708
|
-
##### Variable: BINARY_ENCODING_HEADER
|
|
6709
|
-
|
|
6710
|
-
```ts
|
|
6711
|
-
BINARY_ENCODING_HEADER = "X-BSV-Binary-Encoding"
|
|
6712
|
-
```
|
|
6713
|
-
|
|
6714
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6715
|
-
|
|
6716
|
-
---
|
|
6717
|
-
##### Variable: BINARY_REQUEST_ENCODING_HEADER
|
|
6718
|
-
|
|
6719
|
-
```ts
|
|
6720
|
-
BINARY_REQUEST_ENCODING_HEADER = "X-BSV-Binary-Request-Encoding"
|
|
6721
|
-
```
|
|
6722
|
-
|
|
6723
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6724
|
-
|
|
6725
|
-
---
|
|
6726
|
-
##### Variable: DEFAULT_AUTH_SESSION_TTL_MS
|
|
6727
|
-
|
|
6728
|
-
```ts
|
|
6729
|
-
DEFAULT_AUTH_SESSION_TTL_MS = 24 * 60 * 60 * 1000
|
|
6730
|
-
```
|
|
5226
|
+
| |
|
|
5227
|
+
| --- |
|
|
5228
|
+
| [getLabelToSpecOp](#variable-getlabeltospecop) |
|
|
5229
|
+
| [maxChangeOutputsPerTransaction](#variable-maxchangeoutputspertransaction) |
|
|
5230
|
+
| [maxPossibleSatoshis](#variable-maxpossiblesatoshis) |
|
|
5231
|
+
| [outputColumnsWithoutLockingScript](#variable-outputcolumnswithoutlockingscript) |
|
|
5232
|
+
| [transactionColumnsWithoutRawTx](#variable-transactioncolumnswithoutrawtx) |
|
|
6731
5233
|
|
|
6732
5234
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6733
5235
|
|
|
6734
5236
|
---
|
|
6735
|
-
##### Variable: MONITOR_CREATED_AT_INDEX_MIGRATION
|
|
6736
|
-
|
|
6737
|
-
```ts
|
|
6738
|
-
MONITOR_CREATED_AT_INDEX_MIGRATION = "2026-07-14-002 add monitor created index"
|
|
6739
|
-
```
|
|
6740
|
-
|
|
6741
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6742
5237
|
|
|
6743
|
-
---
|
|
6744
5238
|
##### Variable: getLabelToSpecOp
|
|
6745
5239
|
|
|
6746
5240
|
```ts
|
|
@@ -6750,37 +5244,14 @@ getLabelToSpecOp: () => Record<string, ListActionsSpecOp> = () => {
|
|
|
6750
5244
|
name: "noSendActions",
|
|
6751
5245
|
labelsToIntercept: ["abort"],
|
|
6752
5246
|
setStatusFilter: () => ["nosend"],
|
|
6753
|
-
postProcess: async (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs:
|
|
6754
|
-
if (
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
if (candidateTxids.length > 0) {
|
|
6760
|
-
const services = s.getServices();
|
|
6761
|
-
try {
|
|
6762
|
-
const r = await services.getStatusForTxids(candidateTxids);
|
|
6763
|
-
if (r.status === "success") {
|
|
6764
|
-
for (const result of r.results) {
|
|
6765
|
-
if (result.status === "mined" || result.status === "known") {
|
|
6766
|
-
protectedTxids.add(result.txid);
|
|
6767
|
-
}
|
|
6768
|
-
}
|
|
5247
|
+
postProcess: async (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction>[]): Promise<void> => {
|
|
5248
|
+
if (specOpLabels.indexOf("abort") >= 0) {
|
|
5249
|
+
for (const tx of txs) {
|
|
5250
|
+
if (tx.status === "nosend") {
|
|
5251
|
+
await s.abortAction(auth, { reference: tx.reference! });
|
|
5252
|
+
tx.status = "failed";
|
|
6769
5253
|
}
|
|
6770
5254
|
}
|
|
6771
|
-
catch {
|
|
6772
|
-
}
|
|
6773
|
-
}
|
|
6774
|
-
for (const tx of txs) {
|
|
6775
|
-
if (tx.status !== "nosend")
|
|
6776
|
-
continue;
|
|
6777
|
-
if (tx.txid && protectedTxids.has(tx.txid)) {
|
|
6778
|
-
continue;
|
|
6779
|
-
}
|
|
6780
|
-
const result = await s.abortAction(auth, { reference: tx.reference! });
|
|
6781
|
-
if (result.aborted) {
|
|
6782
|
-
tx.status = "failed";
|
|
6783
|
-
}
|
|
6784
5255
|
}
|
|
6785
5256
|
}
|
|
6786
5257
|
},
|
|
@@ -6788,8 +5259,8 @@ getLabelToSpecOp: () => Record<string, ListActionsSpecOp> = () => {
|
|
|
6788
5259
|
name: "failedActions",
|
|
6789
5260
|
labelsToIntercept: ["unfail"],
|
|
6790
5261
|
setStatusFilter: () => ["failed"],
|
|
6791
|
-
postProcess: async (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs:
|
|
6792
|
-
if (specOpLabels.
|
|
5262
|
+
postProcess: async (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction>[]): Promise<void> => {
|
|
5263
|
+
if (specOpLabels.indexOf("unfail") >= 0) {
|
|
6793
5264
|
for (const tx of txs) {
|
|
6794
5265
|
if (tx.status === "failed") {
|
|
6795
5266
|
await s.updateTransaction(tx.transactionId!, { status: "unfail" });
|
|
@@ -6806,20 +5277,6 @@ See also: [AuthId](./client.md#interface-authid), [ListActionsSpecOp](./storage.
|
|
|
6806
5277
|
|
|
6807
5278
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6808
5279
|
|
|
6809
|
-
---
|
|
6810
|
-
##### Variable: managedChangeOutputFields
|
|
6811
|
-
|
|
6812
|
-
```ts
|
|
6813
|
-
managedChangeOutputFields = {
|
|
6814
|
-
type: "P2PKH",
|
|
6815
|
-
change: true,
|
|
6816
|
-
providedBy: "storage",
|
|
6817
|
-
purpose: "change"
|
|
6818
|
-
} as const
|
|
6819
|
-
```
|
|
6820
|
-
|
|
6821
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6822
|
-
|
|
6823
5280
|
---
|
|
6824
5281
|
##### Variable: maxChangeOutputsPerTransaction
|
|
6825
5282
|
|