@bsv/wallet-toolbox 2.1.24 → 3.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (918) hide show
  1. package/CHANGELOG.md +2 -7
  2. package/docs/CREATEACTION_BLOCKERS.md +391 -0
  3. package/docs/CUTOVER_RUNBOOK.md +95 -0
  4. package/docs/REQUIREMENTS_COMPLIANCE.md +157 -0
  5. package/docs/ROLLOUT_PLAN.md +273 -0
  6. package/docs/SESSION_HANDOFF.md +298 -0
  7. package/docs/STORAGE_METHOD_WIRING.md +176 -0
  8. package/docs/client.md +3765 -1325
  9. package/docs/monitor.md +255 -33
  10. package/docs/services.md +304 -280
  11. package/docs/setup.md +24 -24
  12. package/docs/storage.md +2775 -243
  13. package/docs/v3-upgrade/index.html +911 -0
  14. package/docs/wallet.md +4956 -9455
  15. package/out/src/CWIStyleWalletManager.d.ts +33 -7
  16. package/out/src/CWIStyleWalletManager.d.ts.map +1 -1
  17. package/out/src/CWIStyleWalletManager.js +281 -313
  18. package/out/src/CWIStyleWalletManager.js.map +1 -1
  19. package/out/src/Setup.d.ts +6 -6
  20. package/out/src/Setup.d.ts.map +1 -1
  21. package/out/src/Setup.js +5 -5
  22. package/out/src/Setup.js.map +1 -1
  23. package/out/src/SetupClient.d.ts +6 -6
  24. package/out/src/SetupClient.d.ts.map +1 -1
  25. package/out/src/SetupClient.js +5 -5
  26. package/out/src/SetupClient.js.map +1 -1
  27. package/out/src/SetupWallet.d.ts.map +1 -1
  28. package/out/src/ShamirWalletManager.d.ts +3 -3
  29. package/out/src/ShamirWalletManager.d.ts.map +1 -1
  30. package/out/src/ShamirWalletManager.js +6 -6
  31. package/out/src/ShamirWalletManager.js.map +1 -1
  32. package/out/src/SimpleWalletManager.d.ts +12 -2
  33. package/out/src/SimpleWalletManager.d.ts.map +1 -1
  34. package/out/src/SimpleWalletManager.js +46 -30
  35. package/out/src/SimpleWalletManager.js.map +1 -1
  36. package/out/src/Wallet.d.ts +1 -1
  37. package/out/src/Wallet.d.ts.map +1 -1
  38. package/out/src/Wallet.js +102 -100
  39. package/out/src/Wallet.js.map +1 -1
  40. package/out/src/WalletAuthenticationManager.d.ts +1 -1
  41. package/out/src/WalletAuthenticationManager.d.ts.map +1 -1
  42. package/out/src/WalletAuthenticationManager.js +3 -3
  43. package/out/src/WalletAuthenticationManager.js.map +1 -1
  44. package/out/src/WalletLogger.d.ts.map +1 -1
  45. package/out/src/WalletLogger.js +16 -8
  46. package/out/src/WalletLogger.js.map +1 -1
  47. package/out/src/WalletPermissionsManager.d.ts +89 -18
  48. package/out/src/WalletPermissionsManager.d.ts.map +1 -1
  49. package/out/src/WalletPermissionsManager.js +656 -870
  50. package/out/src/WalletPermissionsManager.js.map +1 -1
  51. package/out/src/WalletSettingsManager.d.ts +2 -2
  52. package/out/src/WalletSettingsManager.d.ts.map +1 -1
  53. package/out/src/WalletSettingsManager.js.map +1 -1
  54. package/out/src/__tests/CWIStyleWalletManager.test.js +6 -6
  55. package/out/src/__tests/CWIStyleWalletManager.test.js.map +1 -1
  56. package/out/src/__tests/WalletPermissionsManager.checks.test.js.map +1 -1
  57. package/out/src/__tests/WalletPermissionsManager.encryption.test.js +8 -8
  58. package/out/src/__tests/WalletPermissionsManager.encryption.test.js.map +1 -1
  59. package/out/src/__tests/WalletPermissionsManager.fixtures.d.ts +0 -2
  60. package/out/src/__tests/WalletPermissionsManager.fixtures.d.ts.map +1 -1
  61. package/out/src/__tests/WalletPermissionsManager.fixtures.js +6 -18
  62. package/out/src/__tests/WalletPermissionsManager.fixtures.js.map +1 -1
  63. package/out/src/__tests/WalletPermissionsManager.flows.test.js.map +1 -1
  64. package/out/src/__tests/WalletPermissionsManager.pmodules.test.js +7 -7
  65. package/out/src/__tests/WalletPermissionsManager.pmodules.test.js.map +1 -1
  66. package/out/src/__tests/WalletPermissionsManager.tokens.test.js +1 -1
  67. package/out/src/__tests/WalletPermissionsManager.tokens.test.js.map +1 -1
  68. package/out/src/entropy/EntropyCollector.d.ts +1 -1
  69. package/out/src/entropy/EntropyCollector.d.ts.map +1 -1
  70. package/out/src/entropy/EntropyCollector.js +3 -3
  71. package/out/src/entropy/EntropyCollector.js.map +1 -1
  72. package/out/src/fundWalletP2PKH.d.ts +2 -2
  73. package/out/src/fundWalletP2PKH.d.ts.map +1 -1
  74. package/out/src/fundWalletP2PKH.js +11 -10
  75. package/out/src/fundWalletP2PKH.js.map +1 -1
  76. package/out/src/mockchain/MockChainMigrations.d.ts +3 -3
  77. package/out/src/mockchain/MockChainMigrations.d.ts.map +1 -1
  78. package/out/src/mockchain/MockChainMigrations.js.map +1 -1
  79. package/out/src/mockchain/MockChainStorage.d.ts.map +1 -1
  80. package/out/src/mockchain/MockChainStorage.js +5 -5
  81. package/out/src/mockchain/MockChainStorage.js.map +1 -1
  82. package/out/src/mockchain/MockChainTracker.d.ts.map +1 -1
  83. package/out/src/mockchain/MockChainTracker.js +10 -10
  84. package/out/src/mockchain/MockChainTracker.js.map +1 -1
  85. package/out/src/mockchain/MockMiner.d.ts.map +1 -1
  86. package/out/src/mockchain/MockMiner.js +3 -3
  87. package/out/src/mockchain/MockMiner.js.map +1 -1
  88. package/out/src/mockchain/MockServices.d.ts +9 -0
  89. package/out/src/mockchain/MockServices.d.ts.map +1 -1
  90. package/out/src/mockchain/MockServices.js +195 -238
  91. package/out/src/mockchain/MockServices.js.map +1 -1
  92. package/out/src/mockchain/merkleTree.d.ts.map +1 -1
  93. package/out/src/mockchain/merkleTree.js +21 -12
  94. package/out/src/mockchain/merkleTree.js.map +1 -1
  95. package/out/src/monitor/LeasedMonitorTask.d.ts +43 -0
  96. package/out/src/monitor/LeasedMonitorTask.d.ts.map +1 -0
  97. package/out/src/monitor/LeasedMonitorTask.js +89 -0
  98. package/out/src/monitor/LeasedMonitorTask.js.map +1 -0
  99. package/out/src/monitor/Monitor.d.ts +24 -0
  100. package/out/src/monitor/Monitor.d.ts.map +1 -1
  101. package/out/src/monitor/Monitor.js +63 -75
  102. package/out/src/monitor/Monitor.js.map +1 -1
  103. package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
  104. package/out/src/monitor/MonitorDaemon.js +24 -23
  105. package/out/src/monitor/MonitorDaemon.js.map +1 -1
  106. package/out/src/monitor/V7LeasedTask.d.ts +43 -0
  107. package/out/src/monitor/V7LeasedTask.d.ts.map +1 -0
  108. package/out/src/monitor/V7LeasedTask.js +89 -0
  109. package/out/src/monitor/V7LeasedTask.js.map +1 -0
  110. package/out/src/monitor/__test/MonitorDaemon.man.test.js.map +1 -1
  111. package/out/src/monitor/index.all.d.ts +1 -0
  112. package/out/src/monitor/index.all.d.ts.map +1 -1
  113. package/out/src/monitor/index.all.js +1 -0
  114. package/out/src/monitor/index.all.js.map +1 -1
  115. package/out/src/monitor/tasks/TaskArcSSE.d.ts +2 -2
  116. package/out/src/monitor/tasks/TaskArcSSE.d.ts.map +1 -1
  117. package/out/src/monitor/tasks/TaskArcSSE.js +10 -23
  118. package/out/src/monitor/tasks/TaskArcSSE.js.map +1 -1
  119. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +4 -2
  120. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
  121. package/out/src/monitor/tasks/TaskCheckForProofs.js +83 -16
  122. package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
  123. package/out/src/monitor/tasks/TaskCheckNoSends.d.ts +1 -1
  124. package/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -1
  125. package/out/src/monitor/tasks/TaskCheckNoSends.js +1 -2
  126. package/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -1
  127. package/out/src/monitor/tasks/TaskClock.d.ts +1 -1
  128. package/out/src/monitor/tasks/TaskClock.d.ts.map +1 -1
  129. package/out/src/monitor/tasks/TaskClock.js +0 -1
  130. package/out/src/monitor/tasks/TaskClock.js.map +1 -1
  131. package/out/src/monitor/tasks/TaskFailAbandoned.d.ts +1 -1
  132. package/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -1
  133. package/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -1
  134. package/out/src/monitor/tasks/TaskMineBlock.d.ts +1 -1
  135. package/out/src/monitor/tasks/TaskMineBlock.d.ts.map +1 -1
  136. package/out/src/monitor/tasks/TaskMineBlock.js.map +1 -1
  137. package/out/src/monitor/tasks/TaskMonitorCallHistory.d.ts +1 -1
  138. package/out/src/monitor/tasks/TaskMonitorCallHistory.d.ts.map +1 -1
  139. package/out/src/monitor/tasks/TaskMonitorCallHistory.js +1 -1
  140. package/out/src/monitor/tasks/TaskMonitorCallHistory.js.map +1 -1
  141. package/out/src/monitor/tasks/TaskNewHeader.d.ts +2 -2
  142. package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -1
  143. package/out/src/monitor/tasks/TaskNewHeader.js +7 -5
  144. package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -1
  145. package/out/src/monitor/tasks/TaskPurge.d.ts +1 -1
  146. package/out/src/monitor/tasks/TaskPurge.d.ts.map +1 -1
  147. package/out/src/monitor/tasks/TaskPurge.js.map +1 -1
  148. package/out/src/monitor/tasks/TaskReorg.d.ts +1 -1
  149. package/out/src/monitor/tasks/TaskReorg.d.ts.map +1 -1
  150. package/out/src/monitor/tasks/TaskReorg.js +2 -2
  151. package/out/src/monitor/tasks/TaskReorg.js.map +1 -1
  152. package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts +1 -1
  153. package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts.map +1 -1
  154. package/out/src/monitor/tasks/TaskReviewDoubleSpends.js +10 -10
  155. package/out/src/monitor/tasks/TaskReviewDoubleSpends.js.map +1 -1
  156. package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts +1 -1
  157. package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts.map +1 -1
  158. package/out/src/monitor/tasks/TaskReviewProvenTxs.js +2 -2
  159. package/out/src/monitor/tasks/TaskReviewProvenTxs.js.map +1 -1
  160. package/out/src/monitor/tasks/TaskReviewStatus.d.ts +1 -1
  161. package/out/src/monitor/tasks/TaskReviewStatus.d.ts.map +1 -1
  162. package/out/src/monitor/tasks/TaskReviewStatus.js.map +1 -1
  163. package/out/src/monitor/tasks/TaskReviewUtxos.d.ts +1 -1
  164. package/out/src/monitor/tasks/TaskReviewUtxos.d.ts.map +1 -1
  165. package/out/src/monitor/tasks/TaskReviewUtxos.js.map +1 -1
  166. package/out/src/monitor/tasks/TaskSendWaiting.d.ts +1 -1
  167. package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
  168. package/out/src/monitor/tasks/TaskSendWaiting.js +4 -5
  169. package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
  170. package/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts +1 -1
  171. package/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts.map +1 -1
  172. package/out/src/monitor/tasks/TaskSyncWhenIdle.js +1 -4
  173. package/out/src/monitor/tasks/TaskSyncWhenIdle.js.map +1 -1
  174. package/out/src/monitor/tasks/TaskUnFail.d.ts +1 -1
  175. package/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -1
  176. package/out/src/monitor/tasks/TaskUnFail.js +13 -15
  177. package/out/src/monitor/tasks/TaskUnFail.js.map +1 -1
  178. package/out/src/monitor/tasks/WalletMonitorTask.d.ts.map +1 -1
  179. package/out/src/monitor/tasks/WalletMonitorTask.js +3 -1
  180. package/out/src/monitor/tasks/WalletMonitorTask.js.map +1 -1
  181. package/out/src/monitor/tasks/__tests/TaskArcSSE.test.js.map +1 -1
  182. package/out/src/monitor/tasks/__tests/TaskReviewDoubleSpends.test.js.map +1 -1
  183. package/out/src/monitor/tasks/__tests/TaskReviewProvenTxs.test.js.map +1 -1
  184. package/out/src/monitor/tasks/__tests/TaskReviewUtxos.test.js.map +1 -1
  185. package/out/src/monitor/tasks/__tests/TaskSendWaiting.test.js.map +1 -1
  186. package/out/src/sdk/CertOpsWallet.d.ts +3 -3
  187. package/out/src/sdk/CertOpsWallet.d.ts.map +1 -1
  188. package/out/src/sdk/PrivilegedKeyManager.d.ts +3 -3
  189. package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -1
  190. package/out/src/sdk/PrivilegedKeyManager.js +26 -21
  191. package/out/src/sdk/PrivilegedKeyManager.js.map +1 -1
  192. package/out/src/sdk/WERR_errors.d.ts.map +1 -1
  193. package/out/src/sdk/WERR_errors.js +5 -5
  194. package/out/src/sdk/WERR_errors.js.map +1 -1
  195. package/out/src/sdk/WalletError.d.ts +1 -1
  196. package/out/src/sdk/WalletError.d.ts.map +1 -1
  197. package/out/src/sdk/WalletError.js +10 -3
  198. package/out/src/sdk/WalletError.js.map +1 -1
  199. package/out/src/sdk/WalletErrorFromJson.d.ts.map +1 -1
  200. package/out/src/sdk/WalletErrorFromJson.js +1 -3
  201. package/out/src/sdk/WalletErrorFromJson.js.map +1 -1
  202. package/out/src/sdk/WalletServices.interfaces.d.ts +19 -19
  203. package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
  204. package/out/src/sdk/WalletStorage.interfaces.d.ts +59 -59
  205. package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
  206. package/out/src/sdk/__test/CertificateLifeCycle.test.js +3 -3
  207. package/out/src/sdk/__test/CertificateLifeCycle.test.js.map +1 -1
  208. package/out/src/sdk/__test/WalletError.test.js +4 -4
  209. package/out/src/sdk/__test/WalletError.test.js.map +1 -1
  210. package/out/src/sdk/types.d.ts +36 -4
  211. package/out/src/sdk/types.d.ts.map +1 -1
  212. package/out/src/sdk/types.js +53 -4
  213. package/out/src/sdk/types.js.map +1 -1
  214. package/out/src/services/ServiceCollection.d.ts +6 -6
  215. package/out/src/services/ServiceCollection.d.ts.map +1 -1
  216. package/out/src/services/ServiceCollection.js +3 -4
  217. package/out/src/services/ServiceCollection.js.map +1 -1
  218. package/out/src/services/Services.d.ts +5 -0
  219. package/out/src/services/Services.d.ts.map +1 -1
  220. package/out/src/services/Services.js +174 -182
  221. package/out/src/services/Services.js.map +1 -1
  222. package/out/src/services/__tests/ARC.man.test.js.map +1 -1
  223. package/out/src/services/__tests/ARC.timeout.man.test.js +3 -3
  224. package/out/src/services/__tests/ARC.timeout.man.test.js.map +1 -1
  225. package/out/src/services/__tests/ArcGorillaPool.man.test.js.map +1 -1
  226. package/out/src/services/__tests/bitrails.test.js +3 -2
  227. package/out/src/services/__tests/bitrails.test.js.map +1 -1
  228. package/out/src/services/__tests/getFiatExchangeRate.test.js.map +1 -1
  229. package/out/src/services/__tests/postBeef.test.js.map +1 -1
  230. package/out/src/services/chaintracker/BHServiceClient.d.ts.map +1 -1
  231. package/out/src/services/chaintracker/BHServiceClient.js +7 -7
  232. package/out/src/services/chaintracker/BHServiceClient.js.map +1 -1
  233. package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -1
  234. package/out/src/services/chaintracker/ChaintracksChainTracker.js +5 -5
  235. package/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -1
  236. package/out/src/services/chaintracker/__tests/ChaintracksChainTracker.test.js +2 -2
  237. package/out/src/services/chaintracker/__tests/ChaintracksChainTracker.test.js.map +1 -1
  238. package/out/src/services/chaintracker/__tests/ChaintracksServiceClient.test.js +1 -1
  239. package/out/src/services/chaintracker/__tests/ChaintracksServiceClient.test.js.map +1 -1
  240. package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts +5 -3
  241. package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts.map +1 -1
  242. package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.js.map +1 -1
  243. package/out/src/services/chaintracker/chaintracks/Api/BulkStorageApi.d.ts.map +1 -1
  244. package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts +20 -10
  245. package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts.map +1 -1
  246. package/out/src/services/chaintracker/chaintracks/Chaintracks.js +228 -221
  247. package/out/src/services/chaintracker/chaintracks/Chaintracks.js.map +1 -1
  248. package/out/src/services/chaintracker/chaintracks/ChaintracksService.d.ts +1 -1
  249. package/out/src/services/chaintracker/chaintracks/ChaintracksService.d.ts.map +1 -1
  250. package/out/src/services/chaintracker/chaintracks/ChaintracksService.js +5 -22
  251. package/out/src/services/chaintracker/chaintracks/ChaintracksService.js.map +1 -1
  252. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -1
  253. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +9 -10
  254. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -1
  255. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.d.ts.map +1 -1
  256. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js +1 -1
  257. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js.map +1 -1
  258. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.d.ts +1 -2
  259. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.d.ts.map +1 -1
  260. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.js +3 -3
  261. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.js.map +1 -1
  262. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.d.ts.map +1 -1
  263. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.js.map +1 -1
  264. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.d.ts.map +1 -1
  265. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js +3 -3
  266. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js.map +1 -1
  267. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.d.ts.map +1 -1
  268. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.js.map +1 -1
  269. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.d.ts.map +1 -1
  270. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js +1 -1
  271. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js.map +1 -1
  272. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.d.ts.map +1 -1
  273. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.js +1 -8
  274. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.js.map +1 -1
  275. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts.map +1 -1
  276. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js +2 -2
  277. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js.map +1 -1
  278. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.d.ts.map +1 -1
  279. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.js.map +1 -1
  280. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts +2 -2
  281. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts.map +1 -1
  282. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js +6 -39
  283. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js.map +1 -1
  284. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts +3 -3
  285. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts.map +1 -1
  286. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js +8 -6
  287. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js.map +1 -1
  288. package/out/src/services/chaintracker/chaintracks/Ingest/__tests/BulkIngestorCDNBabbage.test.js +2 -1
  289. package/out/src/services/chaintracker/chaintracks/Ingest/__tests/BulkIngestorCDNBabbage.test.js.map +1 -1
  290. package/out/src/services/chaintracker/chaintracks/Ingest/__tests/LiveIngestorWhatsOnChainPoll.test.js +4 -3
  291. package/out/src/services/chaintracker/chaintracks/Ingest/__tests/LiveIngestorWhatsOnChainPoll.test.js.map +1 -1
  292. package/out/src/services/chaintracker/chaintracks/Ingest/__tests/WhatsOnChainServices.man.test.js +11 -10
  293. package/out/src/services/chaintracker/chaintracks/Ingest/__tests/WhatsOnChainServices.man.test.js.map +1 -1
  294. package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.d.ts.map +1 -1
  295. package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js +9 -16
  296. package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js.map +1 -1
  297. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.d.ts +3 -3
  298. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.d.ts.map +1 -1
  299. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.js +13 -13
  300. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.js.map +1 -1
  301. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts.map +1 -1
  302. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js +34 -22
  303. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js.map +1 -1
  304. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.d.ts.map +1 -1
  305. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js +31 -30
  306. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js.map +1 -1
  307. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts +1 -2
  308. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts.map +1 -1
  309. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js +25 -22
  310. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js.map +1 -1
  311. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageMemory.d.ts.map +1 -1
  312. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageMemory.js +0 -21
  313. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageMemory.js.map +1 -1
  314. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts +2 -2
  315. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts.map +1 -1
  316. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js +11 -10
  317. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js.map +1 -1
  318. package/out/src/services/chaintracker/chaintracks/Storage/__tests/ChaintracksStorageIdb.test.js +2 -1
  319. package/out/src/services/chaintracker/chaintracks/Storage/__tests/ChaintracksStorageIdb.test.js.map +1 -1
  320. package/out/src/services/chaintracker/chaintracks/__tests/Chaintracks.test.js +8 -7
  321. package/out/src/services/chaintracker/chaintracks/__tests/Chaintracks.test.js.map +1 -1
  322. package/out/src/services/chaintracker/chaintracks/__tests/ChaintracksCDN.man.test.js +6 -5
  323. package/out/src/services/chaintracker/chaintracks/__tests/ChaintracksCDN.man.test.js.map +1 -1
  324. package/out/src/services/chaintracker/chaintracks/__tests/ChaintracksClientApi.test.js +10 -9
  325. package/out/src/services/chaintracker/chaintracks/__tests/ChaintracksClientApi.test.js.map +1 -1
  326. package/out/src/services/chaintracker/chaintracks/__tests/LocalCdnServer.d.ts +1 -1
  327. package/out/src/services/chaintracker/chaintracks/__tests/LocalCdnServer.d.ts.map +1 -1
  328. package/out/src/services/chaintracker/chaintracks/__tests/LocalCdnServer.js +14 -17
  329. package/out/src/services/chaintracker/chaintracks/__tests/LocalCdnServer.js.map +1 -1
  330. package/out/src/services/chaintracker/chaintracks/__tests/createIdbChaintracks.test.js +3 -2
  331. package/out/src/services/chaintracker/chaintracks/__tests/createIdbChaintracks.test.js.map +1 -1
  332. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.d.ts.map +1 -1
  333. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js.map +1 -1
  334. package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.d.ts.map +1 -1
  335. package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.js +6 -8
  336. package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.js.map +1 -1
  337. package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.d.ts.map +1 -1
  338. package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.js.map +1 -1
  339. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.d.ts.map +1 -1
  340. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js.map +1 -1
  341. package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.d.ts.map +1 -1
  342. package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.js.map +1 -1
  343. package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.d.ts.map +1 -1
  344. package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.js.map +1 -1
  345. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts +6 -1
  346. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts.map +1 -1
  347. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js +247 -227
  348. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js.map +1 -1
  349. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.d.ts.map +1 -1
  350. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.js +8 -7
  351. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.js.map +1 -1
  352. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.d.ts.map +1 -1
  353. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js +35 -25
  354. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js.map +1 -1
  355. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts +5 -5
  356. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts.map +1 -1
  357. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js +13 -11
  358. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js.map +1 -1
  359. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts +0 -1
  360. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts.map +1 -1
  361. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js.map +1 -1
  362. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.d.ts +2 -2
  363. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.d.ts.map +1 -1
  364. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.js +13 -13
  365. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.js.map +1 -1
  366. package/out/src/services/chaintracker/chaintracks/util/HeightRange.d.ts.map +1 -1
  367. package/out/src/services/chaintracker/chaintracks/util/HeightRange.js +21 -13
  368. package/out/src/services/chaintracker/chaintracks/util/HeightRange.js.map +1 -1
  369. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts +2 -2
  370. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts.map +1 -1
  371. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.js.map +1 -1
  372. package/out/src/services/chaintracker/chaintracks/util/__tests/BulkFileDataManager.test.js +11 -11
  373. package/out/src/services/chaintracker/chaintracks/util/__tests/BulkFileDataManager.test.js.map +1 -1
  374. package/out/src/services/chaintracker/chaintracks/util/__tests/ChaintracksFetch.test.js +1 -1
  375. package/out/src/services/chaintracker/chaintracks/util/__tests/ChaintracksFetch.test.js.map +1 -1
  376. package/out/src/services/chaintracker/chaintracks/util/__tests/SingleWriterMultiReaderLock.test.js +2 -2
  377. package/out/src/services/chaintracker/chaintracks/util/__tests/SingleWriterMultiReaderLock.test.js.map +1 -1
  378. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts +1 -1
  379. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts.map +1 -1
  380. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js +28 -24
  381. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js.map +1 -1
  382. package/out/src/services/chaintracker/chaintracks/util/dirtyHashes.d.ts.map +1 -1
  383. package/out/src/services/chaintracker/chaintracks/util/dirtyHashes.js.map +1 -1
  384. package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.d.ts.map +1 -1
  385. package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.js +9 -10
  386. package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.js.map +1 -1
  387. package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -1
  388. package/out/src/services/createDefaultWalletServicesOptions.js +3 -3
  389. package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -1
  390. package/out/src/services/providers/ARC.d.ts.map +1 -1
  391. package/out/src/services/providers/ARC.js +7 -14
  392. package/out/src/services/providers/ARC.js.map +1 -1
  393. package/out/src/services/providers/ArcSSEClient.d.ts.map +1 -1
  394. package/out/src/services/providers/ArcSSEClient.js +1 -1
  395. package/out/src/services/providers/ArcSSEClient.js.map +1 -1
  396. package/out/src/services/providers/Bitails.d.ts.map +1 -1
  397. package/out/src/services/providers/Bitails.js +17 -17
  398. package/out/src/services/providers/Bitails.js.map +1 -1
  399. package/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -1
  400. package/out/src/services/providers/SdkWhatsOnChain.js.map +1 -1
  401. package/out/src/services/providers/WhatsOnChain.d.ts +2 -0
  402. package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -1
  403. package/out/src/services/providers/WhatsOnChain.js +109 -233
  404. package/out/src/services/providers/WhatsOnChain.js.map +1 -1
  405. package/out/src/services/providers/__tests/ArcSSEClient.test.js.map +1 -1
  406. package/out/src/services/providers/exchangeRates.d.ts.map +1 -1
  407. package/out/src/services/providers/exchangeRates.js +3 -3
  408. package/out/src/services/providers/exchangeRates.js.map +1 -1
  409. package/out/src/services/providers/getBeefForTxid.d.ts +1 -1
  410. package/out/src/services/providers/getBeefForTxid.d.ts.map +1 -1
  411. package/out/src/services/providers/getBeefForTxid.js.map +1 -1
  412. package/out/src/services/providers/whatsOnChainHelpers.d.ts +68 -0
  413. package/out/src/services/providers/whatsOnChainHelpers.d.ts.map +1 -0
  414. package/out/src/services/providers/whatsOnChainHelpers.js +147 -0
  415. package/out/src/services/providers/whatsOnChainHelpers.js.map +1 -0
  416. package/out/src/signer/WalletSigner.d.ts.map +1 -1
  417. package/out/src/signer/WalletSigner.js.map +1 -1
  418. package/out/src/signer/methods/acquireDirectCertificate.js +1 -1
  419. package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
  420. package/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -1
  421. package/out/src/signer/methods/buildSignableTransaction.js +21 -13
  422. package/out/src/signer/methods/buildSignableTransaction.js.map +1 -1
  423. package/out/src/signer/methods/completeSignedTransaction.d.ts.map +1 -1
  424. package/out/src/signer/methods/completeSignedTransaction.js +20 -21
  425. package/out/src/signer/methods/completeSignedTransaction.js.map +1 -1
  426. package/out/src/signer/methods/createAction.d.ts.map +1 -1
  427. package/out/src/signer/methods/createAction.js +8 -7
  428. package/out/src/signer/methods/createAction.js.map +1 -1
  429. package/out/src/signer/methods/internalizeAction.d.ts.map +1 -1
  430. package/out/src/signer/methods/internalizeAction.js +8 -6
  431. package/out/src/signer/methods/internalizeAction.js.map +1 -1
  432. package/out/src/signer/methods/proveCertificate.js +1 -1
  433. package/out/src/signer/methods/signAction.d.ts.map +1 -1
  434. package/out/src/signer/methods/signAction.js +8 -10
  435. package/out/src/signer/methods/signAction.js.map +1 -1
  436. package/out/src/storage/StorageIdb.d.ts +16 -1
  437. package/out/src/storage/StorageIdb.d.ts.map +1 -1
  438. package/out/src/storage/StorageIdb.js +544 -1224
  439. package/out/src/storage/StorageIdb.js.map +1 -1
  440. package/out/src/storage/StorageKnex.d.ts +143 -3
  441. package/out/src/storage/StorageKnex.d.ts.map +1 -1
  442. package/out/src/storage/StorageKnex.js +829 -222
  443. package/out/src/storage/StorageKnex.js.map +1 -1
  444. package/out/src/storage/StorageProvider.d.ts +124 -1
  445. package/out/src/storage/StorageProvider.d.ts.map +1 -1
  446. package/out/src/storage/StorageProvider.js +316 -186
  447. package/out/src/storage/StorageProvider.js.map +1 -1
  448. package/out/src/storage/StorageReader.d.ts.map +1 -1
  449. package/out/src/storage/StorageReader.js +8 -7
  450. package/out/src/storage/StorageReader.js.map +1 -1
  451. package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
  452. package/out/src/storage/StorageReaderWriter.js +32 -32
  453. package/out/src/storage/StorageReaderWriter.js.map +1 -1
  454. package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
  455. package/out/src/storage/StorageSyncReader.js +3 -3
  456. package/out/src/storage/StorageSyncReader.js.map +1 -1
  457. package/out/src/storage/WalletStorageManager.d.ts +3 -0
  458. package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
  459. package/out/src/storage/WalletStorageManager.js +83 -73
  460. package/out/src/storage/WalletStorageManager.js.map +1 -1
  461. package/out/src/storage/__test/StorageIdb.test.js +1 -1
  462. package/out/src/storage/__test/WalletStorageManager.test.js +1 -1
  463. package/out/src/storage/__test/WalletStorageManager.test.js.map +1 -1
  464. package/out/src/storage/__test/adminStats.man.test.js +1 -1
  465. package/out/src/storage/__test/adminStats.man.test.js.map +1 -1
  466. package/out/src/storage/__test/findStaleMerkleRoots.test.js.map +1 -1
  467. package/out/src/storage/__test/findStaleMerkleRootsKnex.test.js.map +1 -1
  468. package/out/src/storage/__test/getBeefForTransaction.test.js +1 -1
  469. package/out/src/storage/__test/getBeefForTransaction.test.js.map +1 -1
  470. package/out/src/storage/adminServer/adminServer.d.ts +1 -1
  471. package/out/src/storage/adminServer/adminServer.d.ts.map +1 -1
  472. package/out/src/storage/adminServer/adminServer.js +12 -12
  473. package/out/src/storage/adminServer/adminServer.js.map +1 -1
  474. package/out/src/storage/adminServer/adminUi.d.ts.map +1 -1
  475. package/out/src/storage/idbHelpers.d.ts +47 -0
  476. package/out/src/storage/idbHelpers.d.ts.map +1 -0
  477. package/out/src/storage/idbHelpers.js +417 -0
  478. package/out/src/storage/idbHelpers.js.map +1 -0
  479. package/out/src/storage/methods/ListActionsSpecOp.d.ts +6 -1
  480. package/out/src/storage/methods/ListActionsSpecOp.d.ts.map +1 -1
  481. package/out/src/storage/methods/ListActionsSpecOp.js +28 -2
  482. package/out/src/storage/methods/ListActionsSpecOp.js.map +1 -1
  483. package/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +1 -1
  484. package/out/src/storage/methods/ListOutputsSpecOp.js +8 -11
  485. package/out/src/storage/methods/ListOutputsSpecOp.js.map +1 -1
  486. package/out/src/storage/methods/__test/GenerateChange/generateChangeSdk.test.js +3 -3
  487. package/out/src/storage/methods/__test/GenerateChange/generateChangeSdk.test.js.map +1 -1
  488. package/out/src/storage/methods/__test/offsetKey.test.js +1 -1
  489. package/out/src/storage/methods/__test/offsetKey.test.js.map +1 -1
  490. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +83 -0
  491. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
  492. package/out/src/storage/methods/attemptToPostReqsToNetwork.js +338 -63
  493. package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
  494. package/out/src/storage/methods/createAction.d.ts.map +1 -1
  495. package/out/src/storage/methods/createAction.js +251 -274
  496. package/out/src/storage/methods/createAction.js.map +1 -1
  497. package/out/src/storage/methods/generateChange.d.ts.map +1 -1
  498. package/out/src/storage/methods/generateChange.js +99 -80
  499. package/out/src/storage/methods/generateChange.js.map +1 -1
  500. package/out/src/storage/methods/getBeefForTransaction.js +15 -13
  501. package/out/src/storage/methods/getBeefForTransaction.js.map +1 -1
  502. package/out/src/storage/methods/getSyncChunk.d.ts.map +1 -1
  503. package/out/src/storage/methods/getSyncChunk.js +4 -3
  504. package/out/src/storage/methods/getSyncChunk.js.map +1 -1
  505. package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
  506. package/out/src/storage/methods/internalizeAction.js +213 -56
  507. package/out/src/storage/methods/internalizeAction.js.map +1 -1
  508. package/out/src/storage/methods/listActionsIdb.d.ts.map +1 -1
  509. package/out/src/storage/methods/listActionsIdb.js +85 -110
  510. package/out/src/storage/methods/listActionsIdb.js.map +1 -1
  511. package/out/src/storage/methods/listActionsKnex.d.ts +50 -1
  512. package/out/src/storage/methods/listActionsKnex.d.ts.map +1 -1
  513. package/out/src/storage/methods/listActionsKnex.js +256 -169
  514. package/out/src/storage/methods/listActionsKnex.js.map +1 -1
  515. package/out/src/storage/methods/listCertificates.d.ts +1 -1
  516. package/out/src/storage/methods/listCertificates.d.ts.map +1 -1
  517. package/out/src/storage/methods/listCertificates.js +7 -7
  518. package/out/src/storage/methods/listCertificates.js.map +1 -1
  519. package/out/src/storage/methods/listOutputsIdb.d.ts.map +1 -1
  520. package/out/src/storage/methods/listOutputsIdb.js +24 -27
  521. package/out/src/storage/methods/listOutputsIdb.js.map +1 -1
  522. package/out/src/storage/methods/listOutputsKnex.d.ts +1 -1
  523. package/out/src/storage/methods/listOutputsKnex.d.ts.map +1 -1
  524. package/out/src/storage/methods/listOutputsKnex.js +78 -32
  525. package/out/src/storage/methods/listOutputsKnex.js.map +1 -1
  526. package/out/src/storage/methods/offsetKey.d.ts +1 -1
  527. package/out/src/storage/methods/offsetKey.d.ts.map +1 -1
  528. package/out/src/storage/methods/offsetKey.js +3 -5
  529. package/out/src/storage/methods/offsetKey.js.map +1 -1
  530. package/out/src/storage/methods/processAction.d.ts +0 -11
  531. package/out/src/storage/methods/processAction.d.ts.map +1 -1
  532. package/out/src/storage/methods/processAction.js +168 -93
  533. package/out/src/storage/methods/processAction.js.map +1 -1
  534. package/out/src/storage/methods/purgeData.d.ts +1 -1
  535. package/out/src/storage/methods/purgeData.d.ts.map +1 -1
  536. package/out/src/storage/methods/purgeData.js +54 -27
  537. package/out/src/storage/methods/purgeData.js.map +1 -1
  538. package/out/src/storage/methods/purgeDataIdb.d.ts.map +1 -1
  539. package/out/src/storage/methods/purgeDataIdb.js +1 -1
  540. package/out/src/storage/methods/purgeDataIdb.js.map +1 -1
  541. package/out/src/storage/methods/reviewStatus.d.ts +1 -1
  542. package/out/src/storage/methods/reviewStatus.d.ts.map +1 -1
  543. package/out/src/storage/methods/reviewStatus.js +35 -18
  544. package/out/src/storage/methods/reviewStatus.js.map +1 -1
  545. package/out/src/storage/methods/reviewStatusIdb.d.ts +1 -1
  546. package/out/src/storage/methods/reviewStatusIdb.d.ts.map +1 -1
  547. package/out/src/storage/methods/reviewStatusIdb.js.map +1 -1
  548. package/out/src/storage/methods/utils.Buffer.d.ts.map +1 -1
  549. package/out/src/storage/methods/utils.Buffer.js.map +1 -1
  550. package/out/src/storage/methods/utils.d.ts.map +1 -1
  551. package/out/src/storage/methods/utils.js +7 -1
  552. package/out/src/storage/methods/utils.js.map +1 -1
  553. package/out/src/storage/remoting/StorageClient.d.ts +4 -270
  554. package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
  555. package/out/src/storage/remoting/StorageClient.js +16 -423
  556. package/out/src/storage/remoting/StorageClient.js.map +1 -1
  557. package/out/src/storage/remoting/StorageClientBase.d.ts +289 -0
  558. package/out/src/storage/remoting/StorageClientBase.d.ts.map +1 -0
  559. package/out/src/storage/remoting/StorageClientBase.js +375 -0
  560. package/out/src/storage/remoting/StorageClientBase.js.map +1 -0
  561. package/out/src/storage/remoting/StorageMobile.d.ts +7 -275
  562. package/out/src/storage/remoting/StorageMobile.d.ts.map +1 -1
  563. package/out/src/storage/remoting/StorageMobile.js +12 -421
  564. package/out/src/storage/remoting/StorageMobile.js.map +1 -1
  565. package/out/src/storage/remoting/StorageServer.d.ts +11 -8
  566. package/out/src/storage/remoting/StorageServer.d.ts.map +1 -1
  567. package/out/src/storage/remoting/StorageServer.js +51 -102
  568. package/out/src/storage/remoting/StorageServer.js.map +1 -1
  569. package/out/src/storage/remoting/__test/StorageClient.man.test.js +6 -6
  570. package/out/src/storage/remoting/__test/StorageClient.man.test.js.map +1 -1
  571. package/out/src/storage/remoting/__test/StorageClient.test.js +8 -8
  572. package/out/src/storage/remoting/__test/StorageClient.test.js.map +1 -1
  573. package/out/src/storage/remoting/__tests__/entityValidationHelpers.test.d.ts +2 -0
  574. package/out/src/storage/remoting/__tests__/entityValidationHelpers.test.d.ts.map +1 -0
  575. package/out/src/storage/remoting/__tests__/entityValidationHelpers.test.js +268 -0
  576. package/out/src/storage/remoting/__tests__/entityValidationHelpers.test.js.map +1 -0
  577. package/out/src/storage/remoting/entityValidationHelpers.d.ts +29 -0
  578. package/out/src/storage/remoting/entityValidationHelpers.d.ts.map +1 -0
  579. package/out/src/storage/remoting/entityValidationHelpers.js +91 -0
  580. package/out/src/storage/remoting/entityValidationHelpers.js.map +1 -0
  581. package/out/src/storage/schema/KnexMigrations.d.ts +3 -3
  582. package/out/src/storage/schema/KnexMigrations.d.ts.map +1 -1
  583. package/out/src/storage/schema/KnexMigrations.js +160 -9
  584. package/out/src/storage/schema/KnexMigrations.js.map +1 -1
  585. package/out/src/storage/schema/StorageIdbSchema.d.ts +43 -2
  586. package/out/src/storage/schema/StorageIdbSchema.d.ts.map +1 -1
  587. package/out/src/storage/schema/__tests/backfill.runner.test.d.ts +2 -0
  588. package/out/src/storage/schema/__tests/backfill.runner.test.d.ts.map +1 -0
  589. package/out/src/storage/schema/__tests/backfill.runner.test.js +148 -0
  590. package/out/src/storage/schema/__tests/backfill.runner.test.js.map +1 -0
  591. package/out/src/storage/schema/__tests/backfill.test.d.ts +2 -0
  592. package/out/src/storage/schema/__tests/backfill.test.d.ts.map +1 -0
  593. package/out/src/storage/schema/__tests/backfill.test.js +96 -0
  594. package/out/src/storage/schema/__tests/backfill.test.js.map +1 -0
  595. package/out/src/storage/schema/__tests/processingFsm.test.d.ts +2 -0
  596. package/out/src/storage/schema/__tests/processingFsm.test.d.ts.map +1 -0
  597. package/out/src/storage/schema/__tests/processingFsm.test.js +42 -0
  598. package/out/src/storage/schema/__tests/processingFsm.test.js.map +1 -0
  599. package/out/src/storage/schema/__tests/processingFsmLegacyMapping.test.d.ts +2 -0
  600. package/out/src/storage/schema/__tests/processingFsmLegacyMapping.test.d.ts.map +1 -0
  601. package/out/src/storage/schema/__tests/processingFsmLegacyMapping.test.js +82 -0
  602. package/out/src/storage/schema/__tests/processingFsmLegacyMapping.test.js.map +1 -0
  603. package/out/src/storage/schema/__tests/spendabilityRule.test.d.ts +2 -0
  604. package/out/src/storage/schema/__tests/spendabilityRule.test.d.ts.map +1 -0
  605. package/out/src/storage/schema/__tests/spendabilityRule.test.js +29 -0
  606. package/out/src/storage/schema/__tests/spendabilityRule.test.js.map +1 -0
  607. package/out/src/storage/schema/__tests/v7Backfill.runner.test.d.ts +2 -0
  608. package/out/src/storage/schema/__tests/v7Backfill.runner.test.d.ts.map +1 -0
  609. package/out/src/storage/schema/__tests/v7Backfill.runner.test.js +148 -0
  610. package/out/src/storage/schema/__tests/v7Backfill.runner.test.js.map +1 -0
  611. package/out/src/storage/schema/__tests/v7Backfill.test.d.ts +2 -0
  612. package/out/src/storage/schema/__tests/v7Backfill.test.d.ts.map +1 -0
  613. package/out/src/storage/schema/__tests/v7Backfill.test.js +96 -0
  614. package/out/src/storage/schema/__tests/v7Backfill.test.js.map +1 -0
  615. package/out/src/storage/schema/__tests/v7Fsm.test.d.ts +2 -0
  616. package/out/src/storage/schema/__tests/v7Fsm.test.d.ts.map +1 -0
  617. package/out/src/storage/schema/__tests/v7Fsm.test.js +42 -0
  618. package/out/src/storage/schema/__tests/v7Fsm.test.js.map +1 -0
  619. package/out/src/storage/schema/__tests/v7FsmLegacyMapping.test.d.ts +2 -0
  620. package/out/src/storage/schema/__tests/v7FsmLegacyMapping.test.d.ts.map +1 -0
  621. package/out/src/storage/schema/__tests/v7FsmLegacyMapping.test.js +77 -0
  622. package/out/src/storage/schema/__tests/v7FsmLegacyMapping.test.js.map +1 -0
  623. package/out/src/storage/schema/__tests/v7Spendability.test.d.ts +2 -0
  624. package/out/src/storage/schema/__tests/v7Spendability.test.d.ts.map +1 -0
  625. package/out/src/storage/schema/__tests/v7Spendability.test.js +29 -0
  626. package/out/src/storage/schema/__tests/v7Spendability.test.js.map +1 -0
  627. package/out/src/storage/schema/backfill.d.ts +35 -0
  628. package/out/src/storage/schema/backfill.d.ts.map +1 -0
  629. package/out/src/storage/schema/backfill.idb.d.ts +32 -0
  630. package/out/src/storage/schema/backfill.idb.d.ts.map +1 -0
  631. package/out/src/storage/schema/backfill.idb.js +95 -0
  632. package/out/src/storage/schema/backfill.idb.js.map +1 -0
  633. package/out/src/storage/schema/backfill.js +150 -0
  634. package/out/src/storage/schema/backfill.js.map +1 -0
  635. package/out/src/storage/schema/backfill.knex.d.ts +32 -0
  636. package/out/src/storage/schema/backfill.knex.d.ts.map +1 -0
  637. package/out/src/storage/schema/backfill.knex.js +240 -0
  638. package/out/src/storage/schema/backfill.knex.js.map +1 -0
  639. package/out/src/storage/schema/backfill.runner.d.ts +63 -0
  640. package/out/src/storage/schema/backfill.runner.d.ts.map +1 -0
  641. package/out/src/storage/schema/backfill.runner.js +64 -0
  642. package/out/src/storage/schema/backfill.runner.js.map +1 -0
  643. package/out/src/storage/schema/coinbaseMaturityBackfill.d.ts +25 -0
  644. package/out/src/storage/schema/coinbaseMaturityBackfill.d.ts.map +1 -0
  645. package/out/src/storage/schema/coinbaseMaturityBackfill.js +75 -0
  646. package/out/src/storage/schema/coinbaseMaturityBackfill.js.map +1 -0
  647. package/out/src/storage/schema/entities/EntityBase.d.ts.map +1 -1
  648. package/out/src/storage/schema/entities/EntityBase.js.map +1 -1
  649. package/out/src/storage/schema/entities/EntityCertificate.d.ts.map +1 -1
  650. package/out/src/storage/schema/entities/EntityCertificate.js +5 -4
  651. package/out/src/storage/schema/entities/EntityCertificate.js.map +1 -1
  652. package/out/src/storage/schema/entities/EntityCertificateField.d.ts.map +1 -1
  653. package/out/src/storage/schema/entities/EntityCertificateField.js +5 -7
  654. package/out/src/storage/schema/entities/EntityCertificateField.js.map +1 -1
  655. package/out/src/storage/schema/entities/EntityCommission.d.ts.map +1 -1
  656. package/out/src/storage/schema/entities/EntityCommission.js +6 -8
  657. package/out/src/storage/schema/entities/EntityCommission.js.map +1 -1
  658. package/out/src/storage/schema/entities/EntityOutput.d.ts.map +1 -1
  659. package/out/src/storage/schema/entities/EntityOutput.js +21 -24
  660. package/out/src/storage/schema/entities/EntityOutput.js.map +1 -1
  661. package/out/src/storage/schema/entities/EntityOutputBasket.d.ts.map +1 -1
  662. package/out/src/storage/schema/entities/EntityOutputBasket.js +6 -6
  663. package/out/src/storage/schema/entities/EntityOutputBasket.js.map +1 -1
  664. package/out/src/storage/schema/entities/EntityOutputTag.d.ts.map +1 -1
  665. package/out/src/storage/schema/entities/EntityOutputTag.js +2 -2
  666. package/out/src/storage/schema/entities/EntityOutputTag.js.map +1 -1
  667. package/out/src/storage/schema/entities/EntityOutputTagMap.d.ts.map +1 -1
  668. package/out/src/storage/schema/entities/EntityOutputTagMap.js +4 -6
  669. package/out/src/storage/schema/entities/EntityOutputTagMap.js.map +1 -1
  670. package/out/src/storage/schema/entities/EntityProvenTx.d.ts +3 -3
  671. package/out/src/storage/schema/entities/EntityProvenTx.d.ts.map +1 -1
  672. package/out/src/storage/schema/entities/EntityProvenTx.js +22 -23
  673. package/out/src/storage/schema/entities/EntityProvenTx.js.map +1 -1
  674. package/out/src/storage/schema/entities/EntityProvenTxReq.d.ts +9 -0
  675. package/out/src/storage/schema/entities/EntityProvenTxReq.d.ts.map +1 -1
  676. package/out/src/storage/schema/entities/EntityProvenTxReq.js +116 -68
  677. package/out/src/storage/schema/entities/EntityProvenTxReq.js.map +1 -1
  678. package/out/src/storage/schema/entities/EntitySyncState.d.ts.map +1 -1
  679. package/out/src/storage/schema/entities/EntitySyncState.js +19 -18
  680. package/out/src/storage/schema/entities/EntitySyncState.js.map +1 -1
  681. package/out/src/storage/schema/entities/EntityTransaction.d.ts.map +1 -1
  682. package/out/src/storage/schema/entities/EntityTransaction.js +25 -26
  683. package/out/src/storage/schema/entities/EntityTransaction.js.map +1 -1
  684. package/out/src/storage/schema/entities/EntityTxLabel.d.ts.map +1 -1
  685. package/out/src/storage/schema/entities/EntityTxLabel.js +2 -2
  686. package/out/src/storage/schema/entities/EntityTxLabel.js.map +1 -1
  687. package/out/src/storage/schema/entities/EntityTxLabelMap.d.ts.map +1 -1
  688. package/out/src/storage/schema/entities/EntityTxLabelMap.js +4 -6
  689. package/out/src/storage/schema/entities/EntityTxLabelMap.js.map +1 -1
  690. package/out/src/storage/schema/entities/EntityUser.d.ts.map +1 -1
  691. package/out/src/storage/schema/entities/EntityUser.js +3 -3
  692. package/out/src/storage/schema/entities/EntityUser.js.map +1 -1
  693. package/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -1
  694. package/out/src/storage/schema/entities/MergeEntity.js +6 -6
  695. package/out/src/storage/schema/entities/MergeEntity.js.map +1 -1
  696. package/out/src/storage/schema/entities/__tests/CertificateFieldTests.test.js +1 -1
  697. package/out/src/storage/schema/entities/__tests/CertificateFieldTests.test.js.map +1 -1
  698. package/out/src/storage/schema/entities/__tests/CertificateTests.test.js.map +1 -1
  699. package/out/src/storage/schema/entities/__tests/CommissionTests.test.js.map +1 -1
  700. package/out/src/storage/schema/entities/__tests/OutputTagMapTests.test.js +3 -3
  701. package/out/src/storage/schema/entities/__tests/OutputTagMapTests.test.js.map +1 -1
  702. package/out/src/storage/schema/entities/__tests/OutputTests.test.js +1 -1
  703. package/out/src/storage/schema/entities/__tests/OutputTests.test.js.map +1 -1
  704. package/out/src/storage/schema/entities/__tests/ProvenTxReqTests.test.js +32 -0
  705. package/out/src/storage/schema/entities/__tests/ProvenTxReqTests.test.js.map +1 -1
  706. package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js +6 -6
  707. package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js.map +1 -1
  708. package/out/src/storage/schema/entities/__tests/TransactionTests.test.js +3 -3
  709. package/out/src/storage/schema/entities/__tests/TransactionTests.test.js.map +1 -1
  710. package/out/src/storage/schema/entities/__tests/stampLogTests.test.js +3 -3
  711. package/out/src/storage/schema/entities/__tests/usersTests.test.js +1 -1
  712. package/out/src/storage/schema/entities/__tests/usersTests.test.js.map +1 -1
  713. package/out/src/storage/schema/monitorLease.d.ts +57 -0
  714. package/out/src/storage/schema/monitorLease.d.ts.map +1 -0
  715. package/out/src/storage/schema/monitorLease.js +101 -0
  716. package/out/src/storage/schema/monitorLease.js.map +1 -0
  717. package/out/src/storage/schema/processingFsm.d.ts +27 -0
  718. package/out/src/storage/schema/processingFsm.d.ts.map +1 -0
  719. package/out/src/storage/schema/processingFsm.js +132 -0
  720. package/out/src/storage/schema/processingFsm.js.map +1 -0
  721. package/out/src/storage/schema/schemaCutover.d.ts +34 -0
  722. package/out/src/storage/schema/schemaCutover.d.ts.map +1 -0
  723. package/out/src/storage/schema/schemaCutover.js +230 -0
  724. package/out/src/storage/schema/schemaCutover.js.map +1 -0
  725. package/out/src/storage/schema/schemaCutoverIdb.d.ts +26 -0
  726. package/out/src/storage/schema/schemaCutoverIdb.d.ts.map +1 -0
  727. package/out/src/storage/schema/schemaCutoverIdb.js +90 -0
  728. package/out/src/storage/schema/schemaCutoverIdb.js.map +1 -0
  729. package/out/src/storage/schema/spendabilityRefresh.d.ts +49 -0
  730. package/out/src/storage/schema/spendabilityRefresh.d.ts.map +1 -0
  731. package/out/src/storage/schema/spendabilityRefresh.js +120 -0
  732. package/out/src/storage/schema/spendabilityRefresh.js.map +1 -0
  733. package/out/src/storage/schema/spendabilityRule.d.ts +45 -0
  734. package/out/src/storage/schema/spendabilityRule.d.ts.map +1 -0
  735. package/out/src/storage/schema/spendabilityRule.js +52 -0
  736. package/out/src/storage/schema/spendabilityRule.js.map +1 -0
  737. package/out/src/storage/schema/tables/TableAction.d.ts +38 -0
  738. package/out/src/storage/schema/tables/TableAction.d.ts.map +1 -0
  739. package/out/src/storage/schema/tables/TableAction.js +3 -0
  740. package/out/src/storage/schema/tables/TableAction.js.map +1 -0
  741. package/out/src/storage/schema/tables/TableCertificate.d.ts +2 -1
  742. package/out/src/storage/schema/tables/TableCertificate.d.ts.map +1 -1
  743. package/out/src/storage/schema/tables/TableCertificateField.d.ts +1 -1
  744. package/out/src/storage/schema/tables/TableCertificateField.d.ts.map +1 -1
  745. package/out/src/storage/schema/tables/TableChainTip.d.ts +17 -0
  746. package/out/src/storage/schema/tables/TableChainTip.d.ts.map +1 -0
  747. package/out/src/storage/schema/tables/TableChainTip.js +3 -0
  748. package/out/src/storage/schema/tables/TableChainTip.js.map +1 -0
  749. package/out/src/storage/schema/tables/TableCommission.d.ts +1 -1
  750. package/out/src/storage/schema/tables/TableCommission.d.ts.map +1 -1
  751. package/out/src/storage/schema/tables/TableMonitorEvent.d.ts +1 -1
  752. package/out/src/storage/schema/tables/TableMonitorEvent.d.ts.map +1 -1
  753. package/out/src/storage/schema/tables/TableMonitorLease.d.ts +23 -0
  754. package/out/src/storage/schema/tables/TableMonitorLease.d.ts.map +1 -0
  755. package/out/src/storage/schema/tables/TableMonitorLease.js +3 -0
  756. package/out/src/storage/schema/tables/TableMonitorLease.js.map +1 -0
  757. package/out/src/storage/schema/tables/TableOutput.d.ts +10 -2
  758. package/out/src/storage/schema/tables/TableOutput.d.ts.map +1 -1
  759. package/out/src/storage/schema/tables/TableOutput.js +1 -1
  760. package/out/src/storage/schema/tables/TableOutput.js.map +1 -1
  761. package/out/src/storage/schema/tables/TableOutputBasket.d.ts +1 -1
  762. package/out/src/storage/schema/tables/TableOutputBasket.d.ts.map +1 -1
  763. package/out/src/storage/schema/tables/TableOutputTag.d.ts +1 -1
  764. package/out/src/storage/schema/tables/TableOutputTag.d.ts.map +1 -1
  765. package/out/src/storage/schema/tables/TableOutputTagMap.d.ts +1 -1
  766. package/out/src/storage/schema/tables/TableOutputTagMap.d.ts.map +1 -1
  767. package/out/src/storage/schema/tables/TableProvenTx.d.ts +1 -1
  768. package/out/src/storage/schema/tables/TableProvenTx.d.ts.map +1 -1
  769. package/out/src/storage/schema/tables/TableProvenTxReq.d.ts +24 -1
  770. package/out/src/storage/schema/tables/TableProvenTxReq.d.ts.map +1 -1
  771. package/out/src/storage/schema/tables/TableSettings.d.ts +1 -1
  772. package/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -1
  773. package/out/src/storage/schema/tables/TableSyncState.d.ts +1 -1
  774. package/out/src/storage/schema/tables/TableSyncState.d.ts.map +1 -1
  775. package/out/src/storage/schema/tables/TableTransaction.d.ts +1 -1
  776. package/out/src/storage/schema/tables/TableTransaction.d.ts.map +1 -1
  777. package/out/src/storage/schema/tables/TableTransactionNew.d.ts +50 -0
  778. package/out/src/storage/schema/tables/TableTransactionNew.d.ts.map +1 -0
  779. package/out/src/storage/schema/tables/TableTransactionNew.js +3 -0
  780. package/out/src/storage/schema/tables/TableTransactionNew.js.map +1 -0
  781. package/out/src/storage/schema/tables/TableTransactionV7.d.ts +50 -0
  782. package/out/src/storage/schema/tables/TableTransactionV7.d.ts.map +1 -0
  783. package/out/src/storage/schema/tables/TableTransactionV7.js +3 -0
  784. package/out/src/storage/schema/tables/TableTransactionV7.js.map +1 -0
  785. package/out/src/storage/schema/tables/TableTxAudit.d.ts +26 -0
  786. package/out/src/storage/schema/tables/TableTxAudit.d.ts.map +1 -0
  787. package/out/src/storage/schema/tables/TableTxAudit.js +3 -0
  788. package/out/src/storage/schema/tables/TableTxAudit.js.map +1 -0
  789. package/out/src/storage/schema/tables/TableTxLabel.d.ts +1 -1
  790. package/out/src/storage/schema/tables/TableTxLabel.d.ts.map +1 -1
  791. package/out/src/storage/schema/tables/TableTxLabelMap.d.ts +1 -1
  792. package/out/src/storage/schema/tables/TableTxLabelMap.d.ts.map +1 -1
  793. package/out/src/storage/schema/tables/TableUser.d.ts +1 -1
  794. package/out/src/storage/schema/tables/TableUser.d.ts.map +1 -1
  795. package/out/src/storage/schema/tables/index.d.ts +5 -0
  796. package/out/src/storage/schema/tables/index.d.ts.map +1 -1
  797. package/out/src/storage/schema/tables/index.js +5 -0
  798. package/out/src/storage/schema/tables/index.js.map +1 -1
  799. package/out/src/storage/schema/transactionCrud.d.ts +41 -0
  800. package/out/src/storage/schema/transactionCrud.d.ts.map +1 -0
  801. package/out/src/storage/schema/transactionCrud.js +205 -0
  802. package/out/src/storage/schema/transactionCrud.js.map +1 -0
  803. package/out/src/storage/schema/transactionService.d.ts +315 -0
  804. package/out/src/storage/schema/transactionService.d.ts.map +1 -0
  805. package/out/src/storage/schema/transactionService.js +783 -0
  806. package/out/src/storage/schema/transactionService.js.map +1 -0
  807. package/out/src/storage/schema/txAudit.d.ts +33 -0
  808. package/out/src/storage/schema/txAudit.d.ts.map +1 -0
  809. package/out/src/storage/schema/txAudit.js +64 -0
  810. package/out/src/storage/schema/txAudit.js.map +1 -0
  811. package/out/src/storage/schema/v7Backfill.d.ts +35 -0
  812. package/out/src/storage/schema/v7Backfill.d.ts.map +1 -0
  813. package/out/src/storage/schema/v7Backfill.idb.d.ts +32 -0
  814. package/out/src/storage/schema/v7Backfill.idb.d.ts.map +1 -0
  815. package/out/src/storage/schema/v7Backfill.idb.js +95 -0
  816. package/out/src/storage/schema/v7Backfill.idb.js.map +1 -0
  817. package/out/src/storage/schema/v7Backfill.js +150 -0
  818. package/out/src/storage/schema/v7Backfill.js.map +1 -0
  819. package/out/src/storage/schema/v7Backfill.knex.d.ts +32 -0
  820. package/out/src/storage/schema/v7Backfill.knex.d.ts.map +1 -0
  821. package/out/src/storage/schema/v7Backfill.knex.js +240 -0
  822. package/out/src/storage/schema/v7Backfill.knex.js.map +1 -0
  823. package/out/src/storage/schema/v7Backfill.runner.d.ts +63 -0
  824. package/out/src/storage/schema/v7Backfill.runner.d.ts.map +1 -0
  825. package/out/src/storage/schema/v7Backfill.runner.js +64 -0
  826. package/out/src/storage/schema/v7Backfill.runner.js.map +1 -0
  827. package/out/src/storage/schema/v7CoinbaseMaturityBackfill.d.ts +25 -0
  828. package/out/src/storage/schema/v7CoinbaseMaturityBackfill.d.ts.map +1 -0
  829. package/out/src/storage/schema/v7CoinbaseMaturityBackfill.js +75 -0
  830. package/out/src/storage/schema/v7CoinbaseMaturityBackfill.js.map +1 -0
  831. package/out/src/storage/schema/v7Crud.d.ts +41 -0
  832. package/out/src/storage/schema/v7Crud.d.ts.map +1 -0
  833. package/out/src/storage/schema/v7Crud.js +205 -0
  834. package/out/src/storage/schema/v7Crud.js.map +1 -0
  835. package/out/src/storage/schema/v7Cutover.d.ts +34 -0
  836. package/out/src/storage/schema/v7Cutover.d.ts.map +1 -0
  837. package/out/src/storage/schema/v7Cutover.js +223 -0
  838. package/out/src/storage/schema/v7Cutover.js.map +1 -0
  839. package/out/src/storage/schema/v7CutoverIdb.d.ts +26 -0
  840. package/out/src/storage/schema/v7CutoverIdb.d.ts.map +1 -0
  841. package/out/src/storage/schema/v7CutoverIdb.js +90 -0
  842. package/out/src/storage/schema/v7CutoverIdb.js.map +1 -0
  843. package/out/src/storage/schema/v7Fsm.d.ts +27 -0
  844. package/out/src/storage/schema/v7Fsm.d.ts.map +1 -0
  845. package/out/src/storage/schema/v7Fsm.js +124 -0
  846. package/out/src/storage/schema/v7Fsm.js.map +1 -0
  847. package/out/src/storage/schema/v7MonitorLease.d.ts +57 -0
  848. package/out/src/storage/schema/v7MonitorLease.d.ts.map +1 -0
  849. package/out/src/storage/schema/v7MonitorLease.js +101 -0
  850. package/out/src/storage/schema/v7MonitorLease.js.map +1 -0
  851. package/out/src/storage/schema/v7Service.d.ts +305 -0
  852. package/out/src/storage/schema/v7Service.d.ts.map +1 -0
  853. package/out/src/storage/schema/v7Service.js +757 -0
  854. package/out/src/storage/schema/v7Service.js.map +1 -0
  855. package/out/src/storage/schema/v7Spendability.d.ts +45 -0
  856. package/out/src/storage/schema/v7Spendability.d.ts.map +1 -0
  857. package/out/src/storage/schema/v7Spendability.js +52 -0
  858. package/out/src/storage/schema/v7Spendability.js.map +1 -0
  859. package/out/src/storage/schema/v7SpendabilityRefresh.d.ts +49 -0
  860. package/out/src/storage/schema/v7SpendabilityRefresh.d.ts.map +1 -0
  861. package/out/src/storage/schema/v7SpendabilityRefresh.js +111 -0
  862. package/out/src/storage/schema/v7SpendabilityRefresh.js.map +1 -0
  863. package/out/src/storage/schema/v7TxAudit.d.ts +33 -0
  864. package/out/src/storage/schema/v7TxAudit.d.ts.map +1 -0
  865. package/out/src/storage/schema/v7TxAudit.js +64 -0
  866. package/out/src/storage/schema/v7TxAudit.js.map +1 -0
  867. package/out/src/storage/storageProviderHelpers.d.ts +34 -0
  868. package/out/src/storage/storageProviderHelpers.d.ts.map +1 -0
  869. package/out/src/storage/storageProviderHelpers.js +100 -0
  870. package/out/src/storage/storageProviderHelpers.js.map +1 -0
  871. package/out/src/storage/sync/StorageMySQLDojoReader.d.ts +1 -2
  872. package/out/src/storage/sync/StorageMySQLDojoReader.d.ts.map +1 -1
  873. package/out/src/storage/sync/StorageMySQLDojoReader.js +37 -32
  874. package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
  875. package/out/src/utility/Format.d.ts.map +1 -1
  876. package/out/src/utility/Format.js +11 -9
  877. package/out/src/utility/Format.js.map +1 -1
  878. package/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -1
  879. package/out/src/utility/ScriptTemplateBRC29.js +2 -1
  880. package/out/src/utility/ScriptTemplateBRC29.js.map +1 -1
  881. package/out/src/utility/aggregateResults.d.ts +1 -1
  882. package/out/src/utility/aggregateResults.d.ts.map +1 -1
  883. package/out/src/utility/aggregateResults.js +2 -2
  884. package/out/src/utility/aggregateResults.js.map +1 -1
  885. package/out/src/utility/brc114ActionTimeLabels.d.ts +2 -2
  886. package/out/src/utility/brc114ActionTimeLabels.d.ts.map +1 -1
  887. package/out/src/utility/brc114ActionTimeLabels.js +16 -9
  888. package/out/src/utility/brc114ActionTimeLabels.js.map +1 -1
  889. package/out/src/utility/identityUtils.js +1 -1
  890. package/out/src/utility/identityUtils.js.map +1 -1
  891. package/out/src/utility/parseTxScriptOffsets.d.ts +4 -4
  892. package/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -1
  893. package/out/src/utility/parseTxScriptOffsets.js.map +1 -1
  894. package/out/src/utility/stampLog.d.ts.map +1 -1
  895. package/out/src/utility/stampLog.js +7 -5
  896. package/out/src/utility/stampLog.js.map +1 -1
  897. package/out/src/utility/tscProofToMerklePath.d.ts.map +1 -1
  898. package/out/src/utility/tscProofToMerklePath.js +1 -1
  899. package/out/src/utility/tscProofToMerklePath.js.map +1 -1
  900. package/out/src/utility/utilityHelpers.buffer.d.ts +5 -3
  901. package/out/src/utility/utilityHelpers.buffer.d.ts.map +1 -1
  902. package/out/src/utility/utilityHelpers.buffer.js.map +1 -1
  903. package/out/src/utility/utilityHelpers.d.ts +1 -2
  904. package/out/src/utility/utilityHelpers.d.ts.map +1 -1
  905. package/out/src/utility/utilityHelpers.js +10 -10
  906. package/out/src/utility/utilityHelpers.js.map +1 -1
  907. package/out/src/utility/utilityHelpers.noBuffer.d.ts +7 -3
  908. package/out/src/utility/utilityHelpers.noBuffer.d.ts.map +1 -1
  909. package/out/src/utility/utilityHelpers.noBuffer.js +3 -3
  910. package/out/src/utility/utilityHelpers.noBuffer.js.map +1 -1
  911. package/out/src/wab-client/WABClient.d.ts +1 -1
  912. package/out/src/wab-client/WABClient.d.ts.map +1 -1
  913. package/out/src/wab-client/WABClient.js +12 -12
  914. package/out/src/wab-client/WABClient.js.map +1 -1
  915. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts.map +1 -1
  916. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js +3 -3
  917. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -1
  918. package/package.json +28 -21
package/docs/services.md CHANGED
@@ -23,25 +23,26 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
23
23
 
24
24
  | | | |
25
25
  | --- | --- | --- |
26
- | [ArcConfig](#interface-arcconfig) | [ChaintracksChainTrackerOptions](#interface-chaintrackschaintrackeroptions) | [ChaintracksStorageMemoryOptions](#interface-chaintracksstoragememoryoptions) |
27
- | [ArcMinerGetTxData](#interface-arcminergettxdata) | [ChaintracksClientApi](#interface-chaintracksclientapi) | [ChaintracksStorageNoDbOptions](#interface-chaintracksstoragenodboptions) |
28
- | [ArcSSEClientOptions](#interface-arcsseclientoptions) | [ChaintracksFetchApi](#interface-chaintracksfetchapi) | [ChaintracksStorageQueryApi](#interface-chaintracksstoragequeryapi) |
29
- | [ArcSSEEvent](#interface-arcsseevent) | [ChaintracksFsApi](#interface-chaintracksfsapi) | [ChaintracksWritableFileApi](#interface-chaintrackswritablefileapi) |
30
- | [BitailsConfig](#interface-bitailsconfig) | [ChaintracksInfoApi](#interface-chaintracksinfoapi) | [ExchangeRatesIoApi](#interface-exchangeratesioapi) |
31
- | [BitailsMerkleProof](#interface-bitailsmerkleproof) | [ChaintracksIngestorParams](#interface-chaintracksingestorparams) | [GetHeaderByteFileLinksResult](#interface-getheaderbytefilelinksresult) |
32
- | [BulkFileDataManagerMergeResult](#interface-bulkfiledatamanagermergeresult) | [ChaintracksManagementApi](#interface-chaintracksmanagementapi) | [HeightRangeApi](#interface-heightrangeapi) |
33
- | [BulkFileDataManagerOptions](#interface-bulkfiledatamanageroptions) | [ChaintracksOptions](#interface-chaintracksoptions) | [HeightRanges](#interface-heightranges) |
34
- | [BulkHeaderFileInfo](#interface-bulkheaderfileinfo) | [ChaintracksPackageInfoApi](#interface-chaintrackspackageinfoapi) | [LiveBlockHeader](#interface-liveblockheader) |
35
- | [BulkHeaderFilesInfo](#interface-bulkheaderfilesinfo) | [ChaintracksReadableFileApi](#interface-chaintracksreadablefileapi) | [LiveIngestorApi](#interface-liveingestorapi) |
36
- | [BulkIngestorApi](#interface-bulkingestorapi) | [ChaintracksServiceClientOptions](#interface-chaintracksserviceclientoptions) | [LiveIngestorBaseOptions](#interface-liveingestorbaseoptions) |
37
- | [BulkIngestorBaseOptions](#interface-bulkingestorbaseoptions) | [ChaintracksServiceOptions](#interface-chaintracksserviceoptions) | [LiveIngestorWhatsOnChainOptions](#interface-liveingestorwhatsonchainoptions) |
38
- | [BulkIngestorCDNOptions](#interface-bulkingestorcdnoptions) | [ChaintracksStorageApi](#interface-chaintracksstorageapi) | [ServiceCall](#interface-servicecall) |
39
- | [BulkIngestorWhatsOnChainOptions](#interface-bulkingestorwhatsonchainoptions) | [ChaintracksStorageBaseOptions](#interface-chaintracksstoragebaseoptions) | [ServiceToCall](#interface-servicetocall) |
40
- | [BulkStorageApi](#interface-bulkstorageapi) | [ChaintracksStorageBulkFileApi](#interface-chaintracksstoragebulkfileapi) | [WhatsOnChainServicesOptions](#interface-whatsonchainservicesoptions) |
41
- | [BulkStorageBaseOptions](#interface-bulkstoragebaseoptions) | [ChaintracksStorageIdbOptions](#interface-chaintracksstorageidboptions) | [WocChainInfo](#interface-wocchaininfo) |
42
- | [BulkSyncResult](#interface-bulksyncresult) | [ChaintracksStorageIdbSchema](#interface-chaintracksstorageidbschema) | [WocGetHeaderByteFileLinks](#interface-wocgetheaderbytefilelinks) |
43
- | [ChaintracksApi](#interface-chaintracksapi) | [ChaintracksStorageIngestApi](#interface-chaintracksstorageingestapi) | [WocGetHeadersHeader](#interface-wocgetheadersheader) |
44
- | [ChaintracksAppendableFileApi](#interface-chaintracksappendablefileapi) | [ChaintracksStorageKnexOptions](#interface-chaintracksstorageknexoptions) | [WocHeader](#interface-wocheader) |
26
+ | [ArcConfig](#interface-arcconfig) | [ChaintracksClientApi](#interface-chaintracksclientapi) | [ChaintracksStorageQueryApi](#interface-chaintracksstoragequeryapi) |
27
+ | [ArcMinerGetTxData](#interface-arcminergettxdata) | [ChaintracksFetchApi](#interface-chaintracksfetchapi) | [ChaintracksWritableFileApi](#interface-chaintrackswritablefileapi) |
28
+ | [ArcSSEClientOptions](#interface-arcsseclientoptions) | [ChaintracksFsApi](#interface-chaintracksfsapi) | [ExchangeRatesIoApi](#interface-exchangeratesioapi) |
29
+ | [ArcSSEEvent](#interface-arcsseevent) | [ChaintracksInfoApi](#interface-chaintracksinfoapi) | [GetHeaderByteFileLinksResult](#interface-getheaderbytefilelinksresult) |
30
+ | [BitailsConfig](#interface-bitailsconfig) | [ChaintracksIngestorParams](#interface-chaintracksingestorparams) | [HeightRangeApi](#interface-heightrangeapi) |
31
+ | [BitailsMerkleProof](#interface-bitailsmerkleproof) | [ChaintracksManagementApi](#interface-chaintracksmanagementapi) | [HeightRanges](#interface-heightranges) |
32
+ | [BulkFileDataManagerMergeResult](#interface-bulkfiledatamanagermergeresult) | [ChaintracksOptions](#interface-chaintracksoptions) | [LiveBlockHeader](#interface-liveblockheader) |
33
+ | [BulkFileDataManagerOptions](#interface-bulkfiledatamanageroptions) | [ChaintracksPackageInfoApi](#interface-chaintrackspackageinfoapi) | [LiveIngestorApi](#interface-liveingestorapi) |
34
+ | [BulkHeaderFileInfo](#interface-bulkheaderfileinfo) | [ChaintracksReadableFileApi](#interface-chaintracksreadablefileapi) | [LiveIngestorBaseOptions](#interface-liveingestorbaseoptions) |
35
+ | [BulkHeaderFilesInfo](#interface-bulkheaderfilesinfo) | [ChaintracksServiceClientOptions](#interface-chaintracksserviceclientoptions) | [LiveIngestorWhatsOnChainOptions](#interface-liveingestorwhatsonchainoptions) |
36
+ | [BulkIngestorApi](#interface-bulkingestorapi) | [ChaintracksServiceOptions](#interface-chaintracksserviceoptions) | [MerklePathNote](#interface-merklepathnote) |
37
+ | [BulkIngestorBaseOptions](#interface-bulkingestorbaseoptions) | [ChaintracksStorageApi](#interface-chaintracksstorageapi) | [ScriptHashHistoryResponse](#interface-scripthashhistoryresponse) |
38
+ | [BulkIngestorCDNOptions](#interface-bulkingestorcdnoptions) | [ChaintracksStorageBaseOptions](#interface-chaintracksstoragebaseoptions) | [ServiceCall](#interface-servicecall) |
39
+ | [BulkIngestorWhatsOnChainOptions](#interface-bulkingestorwhatsonchainoptions) | [ChaintracksStorageBulkFileApi](#interface-chaintracksstoragebulkfileapi) | [ServiceToCall](#interface-servicetocall) |
40
+ | [BulkStorageApi](#interface-bulkstorageapi) | [ChaintracksStorageIdbOptions](#interface-chaintracksstorageidboptions) | [StopListenerToken](#interface-stoplistenertoken) |
41
+ | [BulkStorageBaseOptions](#interface-bulkstoragebaseoptions) | [ChaintracksStorageIdbSchema](#interface-chaintracksstorageidbschema) | [WhatsOnChainServicesOptions](#interface-whatsonchainservicesoptions) |
42
+ | [BulkSyncResult](#interface-bulksyncresult) | [ChaintracksStorageIngestApi](#interface-chaintracksstorageingestapi) | [WocChainInfo](#interface-wocchaininfo) |
43
+ | [ChaintracksApi](#interface-chaintracksapi) | [ChaintracksStorageKnexOptions](#interface-chaintracksstorageknexoptions) | [WocGetHeaderByteFileLinks](#interface-wocgetheaderbytefilelinks) |
44
+ | [ChaintracksAppendableFileApi](#interface-chaintracksappendablefileapi) | [ChaintracksStorageMemoryOptions](#interface-chaintracksstoragememoryoptions) | [WocGetHeadersHeader](#interface-wocgetheadersheader) |
45
+ | [ChaintracksChainTrackerOptions](#interface-chaintrackschaintrackeroptions) | [ChaintracksStorageNoDbOptions](#interface-chaintracksstoragenodboptions) | [WocHeader](#interface-wocheader) |
45
46
 
46
47
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
47
48
 
@@ -2504,6 +2505,46 @@ userAgent: string
2504
2505
 
2505
2506
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2506
2507
 
2508
+ ---
2509
+ ##### Interface: MerklePathNote
2510
+
2511
+ ```ts
2512
+ export interface MerklePathNote {
2513
+ what: MerklePathNoteWhat;
2514
+ name: string;
2515
+ status?: number;
2516
+ statusText?: string;
2517
+ target?: string;
2518
+ code?: string;
2519
+ description?: string;
2520
+ [key: string]: boolean | string | number | undefined;
2521
+ }
2522
+ ```
2523
+
2524
+ See also: [MerklePathNoteWhat](./services.md#type-merklepathnotewhat)
2525
+
2526
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2527
+
2528
+ ---
2529
+ ##### Interface: ScriptHashHistoryResponse
2530
+
2531
+ ```ts
2532
+ export interface ScriptHashHistoryResponse {
2533
+ ok: boolean;
2534
+ status: number;
2535
+ statusText: string;
2536
+ data?: {
2537
+ result: Array<{
2538
+ tx_hash: string;
2539
+ height?: number;
2540
+ }>;
2541
+ error?: string;
2542
+ };
2543
+ }
2544
+ ```
2545
+
2546
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2547
+
2507
2548
  ---
2508
2549
  ##### Interface: ServiceCall
2509
2550
 
@@ -2574,6 +2615,17 @@ See also: [ServiceCall](./services.md#interface-servicecall)
2574
2615
 
2575
2616
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2576
2617
 
2618
+ ---
2619
+ ##### Interface: StopListenerToken
2620
+
2621
+ ```ts
2622
+ export interface StopListenerToken {
2623
+ stop: (() => void) | undefined;
2624
+ }
2625
+ ```
2626
+
2627
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2628
+
2577
2629
  ---
2578
2630
  ##### Interface: WhatsOnChainServicesOptions
2579
2631
 
@@ -3164,7 +3216,7 @@ export class BulkFilesReaderFs extends BulkFilesReader {
3164
3216
  constructor(public fs: ChaintracksFsApi, files: BulkHeaderFileFs[], range?: HeightRange, maxBufferSize?: number)
3165
3217
  static async fromFs(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string, range?: HeightRange, maxBufferSize?: number): Promise<BulkFilesReaderFs>
3166
3218
  static async writeEmptyJsonFile(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string): Promise<string>
3167
- static async readJsonFile(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string, failToEmptyRange: boolean = true): Promise<BulkHeaderFilesInfo>
3219
+ static async readJsonFile(fs: ChaintracksFsApi, rootFolder: string, jsonFilename: string, failToEmptyRange = true): Promise<BulkHeaderFilesInfo>
3168
3220
  }
3169
3221
  ```
3170
3222
 
@@ -3200,19 +3252,19 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
3200
3252
 
3201
3253
  ```ts
3202
3254
  export abstract class BulkHeaderFile implements BulkHeaderFileInfo {
3203
- chain?: Chain | undefined;
3255
+ chain?: Chain;
3204
3256
  count: number;
3205
- data?: Uint8Array<ArrayBufferLike> | undefined;
3257
+ data?: Uint8Array<ArrayBufferLike>;
3206
3258
  fileHash: string | null;
3207
- fileId?: number | undefined;
3259
+ fileId?: number;
3208
3260
  fileName: string;
3209
3261
  firstHeight: number;
3210
3262
  lastChainWork: string;
3211
3263
  lastHash: string | null;
3212
3264
  prevChainWork: string;
3213
3265
  prevHash: string;
3214
- sourceUrl?: string | undefined;
3215
- validated?: boolean | undefined;
3266
+ sourceUrl?: string;
3267
+ validated?: boolean;
3216
3268
  constructor(info: BulkHeaderFileInfo)
3217
3269
  abstract readDataFromFile(length: number, offset: number): Promise<Uint8Array | undefined>;
3218
3270
  get heightRange(): HeightRange
@@ -3509,7 +3561,7 @@ export class BulkIngestorWhatsOnChainCdn extends BulkIngestorBase {
3509
3561
  }
3510
3562
  ```
3511
3563
 
3512
- See also: [BlockHeader](./client.md#interface-blockheader), [BulkIngestorBase](./services.md#class-bulkingestorbase), [BulkIngestorWhatsOnChainOptions](./services.md#interface-bulkingestorwhatsonchainoptions), [Chain](./client.md#type-chain), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges), [StopListenerToken](./services.md#type-stoplistenertoken), [WhatsOnChainServices](./services.md#class-whatsonchainservices)
3564
+ See also: [BlockHeader](./client.md#interface-blockheader), [BulkIngestorBase](./services.md#class-bulkingestorbase), [BulkIngestorWhatsOnChainOptions](./services.md#interface-bulkingestorwhatsonchainoptions), [Chain](./client.md#type-chain), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges), [StopListenerToken](./services.md#interface-stoplistenertoken), [WhatsOnChainServices](./services.md#class-whatsonchainservices)
3513
3565
 
3514
3566
  ###### Method createBulkIngestorWhatsOnChainOptions
3515
3567
 
@@ -3540,7 +3592,7 @@ export class BulkIngestorWhatsOnChainWs extends BulkIngestorBase {
3540
3592
  }
3541
3593
  ```
3542
3594
 
3543
- See also: [BlockHeader](./client.md#interface-blockheader), [BulkIngestorBase](./services.md#class-bulkingestorbase), [BulkIngestorWhatsOnChainOptions](./services.md#interface-bulkingestorwhatsonchainoptions), [Chain](./client.md#type-chain), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges), [StopListenerToken](./services.md#type-stoplistenertoken), [WhatsOnChainServices](./services.md#class-whatsonchainservices)
3595
+ See also: [BlockHeader](./client.md#interface-blockheader), [BulkIngestorBase](./services.md#class-bulkingestorbase), [BulkIngestorWhatsOnChainOptions](./services.md#interface-bulkingestorwhatsonchainoptions), [Chain](./client.md#type-chain), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges), [StopListenerToken](./services.md#interface-stoplistenertoken), [WhatsOnChainServices](./services.md#class-whatsonchainservices)
3544
3596
 
3545
3597
  ###### Method createBulkIngestorWhatsOnChainOptions
3546
3598
 
@@ -3623,45 +3675,17 @@ export class Chaintracks implements ChaintracksManagementApi {
3623
3675
  let after = before;
3624
3676
  let added = HeightRange.empty;
3625
3677
  const maxSyncRounds = Math.max(1, this.bulkIngestors.length * 2);
3626
- let done = false;
3627
- for (let round = 1; !done && round <= maxSyncRounds; round++) {
3628
- let bulkSyncError: WalletError | undefined;
3629
- let roundMadeProgress = false;
3630
- let roundHadSuccess = false;
3631
- for (const bulk of this.bulkIngestors) {
3632
- try {
3633
- const beforeBulkMax = before.bulk.maxHeight;
3634
- const beforeLiveRange = HeightRange.from(newLiveHeaders);
3635
- const r = await bulk.synchronize(presentHeight, before, newLiveHeaders);
3636
- roundHadSuccess = true;
3637
- newLiveHeaders = r.liveHeaders;
3638
- after = await this.storage.getAvailableHeightRanges();
3639
- added = after.bulk.above(before.bulk);
3640
- const afterLiveRange = HeightRange.from(newLiveHeaders);
3641
- if (after.bulk.maxHeight > beforeBulkMax || afterLiveRange.maxHeight > beforeLiveRange.maxHeight) {
3642
- roundMadeProgress = true;
3643
- }
3644
- before = after;
3645
- this.log(`Bulk Ingestor: ${added.length} added with ${newLiveHeaders.length} live headers from ${bulk.constructor.name}`);
3646
- if (r.done) {
3647
- done = true;
3648
- break;
3649
- }
3650
- }
3651
- catch (eu: unknown) {
3652
- const e = (bulkSyncError = WalletError.fromUnknown(eu));
3653
- this.log(`bulk sync error: ${e.message}`);
3654
- if (!this.available)
3655
- break;
3656
- }
3657
- }
3658
- if (!this.available && bulkSyncError && !roundHadSuccess) {
3659
- this.startupError = bulkSyncError;
3678
+ for (let round = 1; round <= maxSyncRounds; round++) {
3679
+ const result = await this.runBulkSyncRound(before, presentHeight, newLiveHeaders);
3680
+ after = result.after;
3681
+ newLiveHeaders = result.newLiveHeaders;
3682
+ added = after.bulk.above(before.bulk);
3683
+ before = after;
3684
+ if (this.startupError != null)
3660
3685
  break;
3661
- }
3662
- if (done)
3686
+ if (result.done)
3663
3687
  break;
3664
- if (!roundMadeProgress) {
3688
+ if (!result.madeProgress) {
3665
3689
  this.log(`Bulk sync stalled after round ${round}. Deferring further bulk sync attempts to continue live header processing.`);
3666
3690
  break;
3667
3691
  }
@@ -3669,7 +3693,7 @@ export class Chaintracks implements ChaintracksManagementApi {
3669
3693
  this.log(`Bulk sync paused after ${maxSyncRounds} rounds to avoid runaway retries. Will retry in a later sync cycle.`);
3670
3694
  }
3671
3695
  }
3672
- if (!this.startupError) {
3696
+ if (this.startupError == null) {
3673
3697
  this.liveHeaders.unshift(...newLiveHeaders);
3674
3698
  added = after.bulk.above(initialRanges.bulk);
3675
3699
  this.log(`syncBulkStorage done
@@ -3680,151 +3704,32 @@ export class Chaintracks implements ChaintracksManagementApi {
3680
3704
  `);
3681
3705
  }
3682
3706
  }
3683
- private async mainThreadShiftLiveHeaders(): Promise<void> {
3684
- this.stopMainThread = false;
3685
- let lastSyncCheck = Date.now();
3686
- let lastBulkSync = Date.now();
3687
- const cdnSyncRepeatMsecs = 24 * 60 * 60 * 1000;
3688
- const syncCheckRepeatMsecs = 30 * 60 * 1000;
3689
- while (!this.stopMainThread) {
3690
- try {
3691
- const now = Date.now();
3692
- lastSyncCheck = now;
3693
- const presentHeight = await this.getPresentHeight();
3694
- const before = await this.storage.getAvailableHeightRanges();
3695
- let skipBulkSync = !before.live.isEmpty && before.live.maxHeight >= presentHeight - this.addLiveRecursionLimit / 2;
3696
- if (skipBulkSync && now - lastBulkSync > cdnSyncRepeatMsecs) {
3697
- skipBulkSync = false;
3698
- }
3699
- this.log(`Chaintracks Update Services: Bulk Header Sync Review
3707
+ private async runBulkSyncIfNeeded(now: number, lastBulkSync: number, cdnSyncRepeatMsecs: number): Promise<number> {
3708
+ const presentHeight = await this.getPresentHeight();
3709
+ const before = await this.storage.getAvailableHeightRanges();
3710
+ let skipBulkSync = !before.live.isEmpty && before.live.maxHeight >= presentHeight - this.addLiveRecursionLimit / 2;
3711
+ if (skipBulkSync && now - lastBulkSync > cdnSyncRepeatMsecs)
3712
+ skipBulkSync = false;
3713
+ this.log(`Chaintracks Update Services: Bulk Header Sync Review
3700
3714
  presentHeight=${presentHeight} addLiveRecursionLimit=${this.addLiveRecursionLimit}
3701
3715
  Before synchronize: bulk ${before.bulk}, live ${before.live}
3702
3716
  ${skipBulkSync ? "Skipping" : "Starting"} syncBulkStorage.
3703
3717
  `);
3704
- if (!skipBulkSync) {
3705
- lastBulkSync = now;
3706
- if (this.available)
3707
- await this.syncBulkStorage(presentHeight, before);
3708
- else
3709
- await this.syncBulkStorageNoLock(presentHeight, before);
3710
- if (this.startupError)
3711
- throw this.startupError;
3712
- }
3713
- let count = 0;
3714
- let liveHeaderDupes = 0;
3715
- let needSyncCheck = false;
3716
- for (; !needSyncCheck && !this.stopMainThread;) {
3717
- let header = this.liveHeaders.shift();
3718
- if (header) {
3719
- let recursions = this.addLiveRecursionLimit;
3720
- for (; !needSyncCheck && !this.stopMainThread;) {
3721
- const ihr = await this.addLiveHeader(header);
3722
- if (this.invalidInsertHeaderResult(ihr)) {
3723
- this.log(`Ignoring liveHeader ${header.height} ${header.hash} due to invalid insert result.`);
3724
- needSyncCheck = true;
3725
- }
3726
- else if (ihr.noPrev) {
3727
- if (recursions-- <= 0) {
3728
- this.log(`Ignoring liveHeader ${header.height} ${header.hash} addLiveRecursionLimit=${this.addLiveRecursionLimit} exceeded.`);
3729
- needSyncCheck = true;
3730
- }
3731
- else {
3732
- const hash = header.previousHash;
3733
- const prevHeader = await this.getMissingBlockHeader(hash);
3734
- if (!prevHeader) {
3735
- this.log(`Ignoring liveHeader ${header.height} ${header.hash} failed to find previous header by hash ${asString(hash)}`);
3736
- needSyncCheck = true;
3737
- }
3738
- else {
3739
- this.liveHeaders.unshift(header);
3740
- header = prevHeader;
3741
- }
3742
- }
3743
- }
3744
- else {
3745
- if (this.subscriberCallbacksEnabled)
3746
- this.log(`addLiveHeader ${header.height}${ihr.added ? " added" : ""}${ihr.dupe ? " dupe" : ""}${ihr.isActiveTip ? " isActiveTip" : ""}${ihr.reorgDepth ? " reorg depth " + ihr.reorgDepth : ""}${ihr.noPrev ? " noPrev" : ""}${ihr.noActiveAncestor || ihr.noTip || ihr.badPrev ? " error" : ""}`);
3747
- if (ihr.dupe) {
3748
- liveHeaderDupes++;
3749
- }
3750
- if (ihr.added) {
3751
- count++;
3752
- }
3753
- break;
3754
- }
3755
- }
3756
- }
3757
- else {
3758
- const bheader = this.baseHeaders.shift();
3759
- if (bheader) {
3760
- const prev = await this.storage.findLiveHeaderForBlockHash(bheader.previousHash);
3761
- if (!prev) {
3762
- this.log(`Ignoring header with unknown previousHash ${bheader.previousHash} in live storage.`);
3763
- }
3764
- else {
3765
- const header: BlockHeader = {
3766
- ...bheader,
3767
- height: prev.height + 1,
3768
- hash: blockHash(bheader)
3769
- };
3770
- const ihr = await this.addLiveHeader(header);
3771
- if (this.invalidInsertHeaderResult(ihr)) {
3772
- this.log(`Ignoring invalid baseHeader ${header.height} ${header.hash}.`);
3773
- }
3774
- else {
3775
- if (this.subscriberCallbacksEnabled)
3776
- this.log(`addBaseHeader ${header.height}${ihr.added ? " added" : ""}${ihr.dupe ? " dupe" : ""}${ihr.isActiveTip ? " isActiveTip" : ""}${ihr.reorgDepth ? " reorg depth " + ihr.reorgDepth : ""}${ihr.noPrev ? " noPrev" : ""}${ihr.noActiveAncestor || ihr.noTip || ihr.badPrev ? " error" : ""}`);
3777
- if (ihr.added) {
3778
- count++;
3779
- }
3780
- }
3781
- }
3782
- }
3783
- else {
3784
- if (count > 0) {
3785
- if (liveHeaderDupes > 0) {
3786
- this.log(`${liveHeaderDupes} duplicate headers ignored.`);
3787
- liveHeaderDupes = 0;
3788
- }
3789
- const updated = await this.storage.getAvailableHeightRanges();
3790
- this.log(`After adding ${count} live headers
3791
- After live: bulk ${updated.bulk}, live ${updated.live}
3792
- `);
3793
- count = 0;
3794
- }
3795
- if (!this.subscriberCallbacksEnabled) {
3796
- const live = await this.storage.findLiveHeightRange();
3797
- if (!live.isEmpty) {
3798
- this.subscriberCallbacksEnabled = true;
3799
- this.log(`listening at height of ${live.maxHeight}`);
3800
- }
3801
- }
3802
- if (!this.available) {
3803
- this.available = true;
3804
- }
3805
- needSyncCheck = Date.now() - lastSyncCheck > syncCheckRepeatMsecs;
3806
- if (!needSyncCheck)
3807
- await wait(1000);
3808
- }
3809
- }
3810
- }
3811
- }
3812
- catch (eu: unknown) {
3813
- const e = WalletError.fromUnknown(eu);
3814
- if (!this.available) {
3815
- this.startupError = e;
3816
- this.stopMainThread = true;
3817
- }
3818
- else {
3819
- this.log(`Error occurred during chaintracks main thread processing: ${e.stack || e.message}`);
3820
- }
3821
- }
3718
+ if (!skipBulkSync) {
3719
+ if (this.available)
3720
+ await this.syncBulkStorage(presentHeight, before);
3721
+ else
3722
+ await this.syncBulkStorageNoLock(presentHeight, before);
3723
+ if (this.startupError != null)
3724
+ throw this.startupError;
3725
+ return now;
3822
3726
  }
3727
+ return lastBulkSync;
3823
3728
  }
3824
3729
  }
3825
3730
  ```
3826
3731
 
3827
- See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [ChaintracksFsApi](./services.md#interface-chaintracksfsapi), [ChaintracksInfoApi](./services.md#interface-chaintracksinfoapi), [ChaintracksManagementApi](./services.md#interface-chaintracksmanagementapi), [ChaintracksOptions](./services.md#interface-chaintracksoptions), [HeaderListener](./services.md#type-headerlistener), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges), [LiveBlockHeader](./services.md#interface-liveblockheader), [ReorgListener](./services.md#type-reorglistener), [Services](./services.md#class-services), [WalletError](./client.md#class-walleterror), [asString](./client.md#function-asstring), [blockHash](./services.md#function-blockhash), [wait](./client.md#function-wait)
3732
+ See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [ChaintracksFsApi](./services.md#interface-chaintracksfsapi), [ChaintracksInfoApi](./services.md#interface-chaintracksinfoapi), [ChaintracksManagementApi](./services.md#interface-chaintracksmanagementapi), [ChaintracksOptions](./services.md#interface-chaintracksoptions), [HeaderListener](./services.md#type-headerlistener), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges), [LiveBlockHeader](./services.md#interface-liveblockheader), [ReorgListener](./services.md#type-reorglistener), [Services](./services.md#class-services)
3828
3733
 
3829
3734
  ###### Method addHeader
3830
3735
 
@@ -3884,7 +3789,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
3884
3789
 
3885
3790
  ```ts
3886
3791
  export class ChaintracksAppendableFile extends ChaintracksReadableFile implements ChaintracksAppendableFileApi {
3887
- foldersEnsured: boolean = false;
3792
+ foldersEnsured = false;
3888
3793
  static async openAsAppendable(path: string): Promise<ChaintracksAppendableFile>
3889
3794
  async ensureFoldersExist(): Promise<void>
3890
3795
  async append(data: Uint8Array): Promise<void>
@@ -3922,7 +3827,6 @@ using the
3922
3827
  ```ts
3923
3828
  export class ChaintracksFetch implements ChaintracksFetchApi {
3924
3829
  httpClient: HttpClient = defaultHttpClient();
3925
- constructor()
3926
3830
  async download(url: string): Promise<Uint8Array>
3927
3831
  async fetchJson<R>(url: string): Promise<R>
3928
3832
  pathJoin(baseUrl: string, subpath: string): string
@@ -4025,9 +3929,9 @@ export class ChaintracksServiceClient implements ChaintracksClientApi {
4025
3929
  static createChaintracksServiceClientOptions(): ChaintracksServiceClientOptions
4026
3930
  options: ChaintracksServiceClientOptions;
4027
3931
  constructor(public chain: Chain, public serviceUrl: string, options?: ChaintracksServiceClientOptions)
4028
- subscribeHeaders(listener: HeaderListener): Promise<string>
4029
- subscribeReorgs(listener: ReorgListener): Promise<string>
4030
- unsubscribe(subscriptionId: string): Promise<boolean>
3932
+ async subscribeHeaders(listener: HeaderListener): Promise<string>
3933
+ async subscribeReorgs(listener: ReorgListener): Promise<string>
3934
+ async unsubscribe(subscriptionId: string): Promise<boolean>
4031
3935
  async currentHeight(): Promise<number>
4032
3936
  async isValidRootForHeight(root: string, height: number): Promise<boolean>
4033
3937
  async getJsonOrUndefined<T>(path: string): Promise<T | undefined>
@@ -4067,8 +3971,8 @@ export abstract class ChaintracksStorageBase implements ChaintracksStorageQueryA
4067
3971
  reorgHeightThreshold: number;
4068
3972
  bulkMigrationChunkSize: number;
4069
3973
  batchInsertLimit: number;
4070
- isAvailable: boolean = false;
4071
- hasMigrated: boolean = false;
3974
+ isAvailable = false;
3975
+ hasMigrated = false;
4072
3976
  bulkManager: BulkFileDataManager;
4073
3977
  constructor(options: ChaintracksStorageBaseOptions)
4074
3978
  async shutdown(): Promise<void>
@@ -4235,8 +4139,8 @@ export class ChaintracksStorageKnex extends ChaintracksStorageBase implements Ch
4235
4139
  static createStorageKnexOptions(chain: Chain, knex?: Knex): ChaintracksStorageKnexOptions
4236
4140
  knex: Knex;
4237
4141
  _dbtype?: DBType;
4238
- bulkFilesTableName: string = "bulk_files";
4239
- headerTableName: string = `live_headers`;
4142
+ bulkFilesTableName = "bulk_files";
4143
+ headerTableName = "live_headers";
4240
4144
  constructor(options: ChaintracksStorageKnexOptions)
4241
4145
  get dbtype(): DBType
4242
4146
  override async shutdown(): Promise<void>
@@ -4293,14 +4197,14 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
4293
4197
 
4294
4198
  ```ts
4295
4199
  export class ChaintracksStorageNoDb extends ChaintracksStorageBase {
4296
- static mainData: ChaintracksNoDbData = {
4200
+ static readonly mainData: ChaintracksNoDbData = {
4297
4201
  chain: "main",
4298
4202
  liveHeaders: new Map<number, LiveBlockHeader>(),
4299
4203
  maxHeaderId: 0,
4300
4204
  tipHeaderId: 0,
4301
4205
  hashToHeaderId: new Map<string, number>()
4302
4206
  };
4303
- static testData: ChaintracksNoDbData = {
4207
+ static readonly testData: ChaintracksNoDbData = {
4304
4208
  chain: "test",
4305
4209
  liveHeaders: new Map<number, LiveBlockHeader>(),
4306
4210
  maxHeaderId: 0,
@@ -4338,7 +4242,7 @@ export class ChaintracksWritableFile implements ChaintracksWritableFileApi {
4338
4242
  path: string;
4339
4243
  parsedPath: Path.ParsedPath;
4340
4244
  f: fs.FileHandle;
4341
- foldersEnsured: boolean = false;
4245
+ foldersEnsured = false;
4342
4246
  static async openAsWritable(path: string): Promise<ChaintracksWritableFile>
4343
4247
  async close(): Promise<void>
4344
4248
  async ensureFoldersExist(): Promise<void>
@@ -4599,7 +4503,7 @@ export class LiveIngestorWhatsOnChainPoll extends LiveIngestorBase {
4599
4503
  static createLiveIngestorWhatsOnChainOptions(chain: Chain): LiveIngestorWhatsOnChainOptions
4600
4504
  idleWait: number;
4601
4505
  woc: WhatsOnChainServices;
4602
- done: boolean = false;
4506
+ done = false;
4603
4507
  constructor(options: LiveIngestorWhatsOnChainOptions)
4604
4508
  async getHeaderByHash(hash: string): Promise<BlockHeader | undefined>
4605
4509
  async startListening(liveHeaders: BlockHeader[]): Promise<void>
@@ -4628,7 +4532,7 @@ export class LiveIngestorWhatsOnChainWs extends LiveIngestorBase {
4628
4532
  }
4629
4533
  ```
4630
4534
 
4631
- See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [LiveIngestorBase](./services.md#class-liveingestorbase), [LiveIngestorWhatsOnChainOptions](./services.md#interface-liveingestorwhatsonchainoptions), [StopListenerToken](./services.md#type-stoplistenertoken), [WhatsOnChainServices](./services.md#class-whatsonchainservices)
4535
+ See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [LiveIngestorBase](./services.md#class-liveingestorbase), [LiveIngestorWhatsOnChainOptions](./services.md#interface-liveingestorwhatsonchainoptions), [StopListenerToken](./services.md#interface-stoplistenertoken), [WhatsOnChainServices](./services.md#class-whatsonchainservices)
4632
4536
 
4633
4537
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
4634
4538
 
@@ -4672,27 +4576,27 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
4672
4576
 
4673
4577
  ```ts
4674
4578
  export class ServiceCollection<T> {
4675
- services: {
4579
+ services: Array<{
4676
4580
  name: string;
4677
4581
  service: T;
4678
- }[];
4582
+ }>;
4679
4583
  _index: number;
4680
4584
  readonly since: Date;
4681
4585
  _historyByProvider: Record<string, ProviderCallHistory> = {};
4682
- constructor(public serviceName: string, services?: {
4586
+ constructor(public serviceName: string, services?: Array<{
4683
4587
  name: string;
4684
4588
  service: T;
4685
- }[])
4589
+ }>)
4686
4590
  add(s: {
4687
4591
  name: string;
4688
4592
  service: T;
4689
- }): ServiceCollection<T>
4593
+ }): this
4690
4594
  remove(name: string): void
4691
4595
  get name()
4692
4596
  get service()
4693
4597
  getServiceToCall(i: number): ServiceToCall<T>
4694
4598
  get serviceToCall(): ServiceToCall<T>
4695
- get allServicesToCall(): ServiceToCall<T>[]
4599
+ get allServicesToCall(): Array<ServiceToCall<T>>
4696
4600
  moveServiceToLast(stc: ServiceToCall<T>)
4697
4601
  get allServices()
4698
4602
  get count()
@@ -4793,7 +4697,7 @@ export class Services implements WalletServices {
4793
4697
  }
4794
4698
  ```
4795
4699
 
4796
- See also: [ARC](./services.md#class-arc), [Bitails](./services.md#class-bitails), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatCurrencyCode](./client.md#type-fiatcurrencycode), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetScriptHashHistoryService](./client.md#type-getscripthashhistoryservice), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetStatusForTxidsService](./client.md#type-getstatusfortxidsservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [ServiceCollection](./services.md#class-servicecollection), [ServicesCallHistory](./client.md#type-servicescallhistory), [TableOutput](./storage.md#interface-tableoutput), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain), [getBeefForTxid](./services.md#function-getbeeffortxid), [logger](./client.md#variable-logger)
4700
+ See also: [ARC](./services.md#class-arc), [Bitails](./services.md#class-bitails), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatCurrencyCode](./client.md#type-fiatcurrencycode), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetScriptHashHistoryService](./client.md#type-getscripthashhistoryservice), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetStatusForTxidsService](./client.md#type-getstatusfortxidsservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [ServiceCollection](./services.md#class-servicecollection), [ServicesCallHistory](./client.md#interface-servicescallhistory), [TableOutput](./storage.md#interface-tableoutput), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain), [getBeefForTxid](./services.md#function-getbeeffortxid), [logger](./client.md#variable-logger)
4797
4701
 
4798
4702
  ###### Property postBeefUntilSuccessSoftTimeoutMaxMs
4799
4703
 
@@ -5001,9 +4905,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5001
4905
  ```ts
5002
4906
  export class WhatsOnChainServices {
5003
4907
  static createWhatsOnChainServicesOptions(chain: Chain): WhatsOnChainServicesOptions
5004
- static chainInfo: (WocChainInfo | undefined)[] = [];
5005
- static chainInfoTime: (Date | undefined)[] = [];
5006
- static chainInfoMsecs: number[] = [];
4908
+ static readonly chainInfo: Array<WocChainInfo | undefined> = [];
4909
+ static readonly chainInfoTime: Array<Date | undefined> = [];
4910
+ static readonly chainInfoMsecs: number[] = [];
5007
4911
  chain: Chain;
5008
4912
  woc: WhatsOnChain;
5009
4913
  constructor(public options: WhatsOnChainServicesOptions)
@@ -5036,26 +4940,28 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5036
4940
 
5037
4941
  | | | |
5038
4942
  | --- | --- | --- |
5039
- | [WocHeadersBulkListener](#function-wocheadersbulklistener) | [createNoDbChaintracks](#function-createnodbchaintracks) | [serializeBaseBlockHeaders](#function-serializebaseblockheaders) |
5040
- | [WocHeadersBulkListener_test](#function-wocheadersbulklistener_test) | [deserializeBaseBlockHeader](#function-deserializebaseblockheader) | [sha256HashOfBinaryFile](#function-sha256hashofbinaryfile) |
5041
- | [WocHeadersLiveListener](#function-wocheaderslivelistener) | [deserializeBaseBlockHeaders](#function-deserializebaseblockheaders) | [subWork](#function-subwork) |
5042
- | [WocHeadersLiveListener_test](#function-wocheaderslivelistener_test) | [deserializeBlockHeader](#function-deserializeblockheader) | [swapByteOrder](#function-swapbyteorder) |
5043
- | [addWork](#function-addwork) | [deserializeBlockHeaders](#function-deserializeblockheaders) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) |
5044
- | [arcDefaultUrl](#function-arcdefaulturl) | [genesisBuffer](#function-genesisbuffer) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) |
5045
- | [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [genesisHeader](#function-genesisheader) | [updateExchangeratesapi](#function-updateexchangeratesapi) |
5046
- | [blockHash](#function-blockhash) | [getBeefForTxid](#function-getbeeffortxid) | [validBulkHeaderFilesByFileHash](#function-validbulkheaderfilesbyfilehash) |
5047
- | [buildChaintracksOptionsWithIngestors](#function-buildchaintracksoptionswithingestors) | [getExchangeRatesIo](#function-getexchangeratesio) | [validateAgainstDirtyHashes](#function-validateagainstdirtyhashes) |
5048
- | [convertBitsToTarget](#function-convertbitstotarget) | [getWhatsOnChainBlockHeaderByHash](#function-getwhatsonchainblockheaderbyhash) | [validateBufferOfHeaders](#function-validatebufferofheaders) |
5049
- | [convertBitsToWork](#function-convertbitstowork) | [isBaseBlockHeader](#function-isbaseblockheader) | [validateBulkFileData](#function-validatebulkfiledata) |
5050
- | [convertBufferToUint32](#function-convertbuffertouint32) | [isBlockHeader](#function-isblockheader) | [validateGenesisHeader](#function-validategenesisheader) |
5051
- | [convertUint32ToBuffer](#function-convertuint32tobuffer) | [isKnownValidBulkHeaderFile](#function-isknownvalidbulkheaderfile) | [validateHeaderDifficulty](#function-validateheaderdifficulty) |
5052
- | [convertWocToBlockHeaderHex](#function-convertwoctoblockheaderhex) | [isLive](#function-islive) | [validateHeaderFormat](#function-validateheaderformat) |
5053
- | [createDefaultIdbChaintracksOptions](#function-createdefaultidbchaintracksoptions) | [isLiveBlockHeader](#function-isliveblockheader) | [validateScriptHash](#function-validatescripthash) |
5054
- | [createDefaultKnexChaintracksOptions](#function-createdefaultknexchaintracksoptions) | [isMoreWork](#function-ismorework) | [wocGetHeadersHeaderToBlockHeader](#function-wocgetheadersheadertoblockheader) |
5055
- | [createDefaultNoDbChaintracksOptions](#function-createdefaultnodbchaintracksoptions) | [readUInt32BE](#function-readuint32be) | [workBNtoBuffer](#function-workbntobuffer) |
5056
- | [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [readUInt32LE](#function-readuint32le) | [writeUInt32BE](#function-writeuint32be) |
5057
- | [createIdbChaintracks](#function-createidbchaintracks) | [selectBulkHeaderFiles](#function-selectbulkheaderfiles) | [writeUInt32LE](#function-writeuint32le) |
5058
- | [createKnexChaintracks](#function-createknexchaintracks) | [serializeBaseBlockHeader](#function-serializebaseblockheader) | |
4943
+ | [WocHeadersBulkListener](#function-wocheadersbulklistener) | [deserializeBaseBlockHeader](#function-deserializebaseblockheader) | [readUInt32LE](#function-readuint32le) |
4944
+ | [WocHeadersBulkListener_test](#function-wocheadersbulklistener_test) | [deserializeBaseBlockHeaders](#function-deserializebaseblockheaders) | [selectBulkHeaderFiles](#function-selectbulkheaderfiles) |
4945
+ | [WocHeadersLiveListener](#function-wocheaderslivelistener) | [deserializeBlockHeader](#function-deserializeblockheader) | [serializeBaseBlockHeader](#function-serializebaseblockheader) |
4946
+ | [WocHeadersLiveListener_test](#function-wocheaderslivelistener_test) | [deserializeBlockHeaders](#function-deserializeblockheaders) | [serializeBaseBlockHeaders](#function-serializebaseblockheaders) |
4947
+ | [addWork](#function-addwork) | [genesisBuffer](#function-genesisbuffer) | [sha256HashOfBinaryFile](#function-sha256hashofbinaryfile) |
4948
+ | [arcDefaultUrl](#function-arcdefaulturl) | [genesisHeader](#function-genesisheader) | [subWork](#function-subwork) |
4949
+ | [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [getBeefForTxid](#function-getbeeffortxid) | [swapByteOrder](#function-swapbyteorder) |
4950
+ | [blockHash](#function-blockhash) | [getExchangeRatesIo](#function-getexchangeratesio) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) |
4951
+ | [buildChaintracksOptionsWithIngestors](#function-buildchaintracksoptionswithingestors) | [getWhatsOnChainBlockHeaderByHash](#function-getwhatsonchainblockheaderbyhash) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) |
4952
+ | [classifyMerklePathResponse](#function-classifymerklepathresponse) | [handlePostRawTxErrorResponse](#function-handlepostrawtxerrorresponse) | [updateExchangeratesapi](#function-updateexchangeratesapi) |
4953
+ | [convertBitsToTarget](#function-convertbitstotarget) | [handleScriptHashHistoryCatch](#function-handlescripthashhistorycatch) | [validBulkHeaderFilesByFileHash](#function-validbulkheaderfilesbyfilehash) |
4954
+ | [convertBitsToWork](#function-convertbitstowork) | [handleScriptHashHistoryResponse](#function-handlescripthashhistoryresponse) | [validateAgainstDirtyHashes](#function-validateagainstdirtyhashes) |
4955
+ | [convertBufferToUint32](#function-convertbuffertouint32) | [handleUtxoConnReset](#function-handleutxoconnreset) | [validateBufferOfHeaders](#function-validatebufferofheaders) |
4956
+ | [convertUint32ToBuffer](#function-convertuint32tobuffer) | [isBaseBlockHeader](#function-isbaseblockheader) | [validateBulkFileData](#function-validatebulkfiledata) |
4957
+ | [convertWocToBlockHeaderHex](#function-convertwoctoblockheaderhex) | [isBlockHeader](#function-isblockheader) | [validateGenesisHeader](#function-validategenesisheader) |
4958
+ | [createDefaultIdbChaintracksOptions](#function-createdefaultidbchaintracksoptions) | [isKnownValidBulkHeaderFile](#function-isknownvalidbulkheaderfile) | [validateHeaderDifficulty](#function-validateheaderdifficulty) |
4959
+ | [createDefaultKnexChaintracksOptions](#function-createdefaultknexchaintracksoptions) | [isLive](#function-islive) | [validateHeaderFormat](#function-validateheaderformat) |
4960
+ | [createDefaultNoDbChaintracksOptions](#function-createdefaultnodbchaintracksoptions) | [isLiveBlockHeader](#function-isliveblockheader) | [validateScriptHash](#function-validatescripthash) |
4961
+ | [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [isMoreWork](#function-ismorework) | [wocGetHeadersHeaderToBlockHeader](#function-wocgetheadersheadertoblockheader) |
4962
+ | [createIdbChaintracks](#function-createidbchaintracks) | [makeMerklePathNote](#function-makemerklepathnote) | [workBNtoBuffer](#function-workbntobuffer) |
4963
+ | [createKnexChaintracks](#function-createknexchaintracks) | [populateUtxoDetails](#function-populateutxodetails) | [writeUInt32BE](#function-writeuint32be) |
4964
+ | [createNoDbChaintracks](#function-createnodbchaintracks) | [readUInt32BE](#function-readuint32be) | [writeUInt32LE](#function-writeuint32le) |
5059
4965
 
5060
4966
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5061
4967
 
@@ -5069,7 +4975,7 @@ High speed WebSocket based based old block header listener
5069
4975
  export async function WocHeadersBulkListener(fromHeight: number, toHeight: number, enqueue: (header: BlockHeader) => void, error: (code: number, message: string) => boolean, stop: StopListenerToken, chain: Chain, logger: (...args: any[]) => void = () => { }, idleWait = 5000): Promise<boolean>
5070
4976
  ```
5071
4977
 
5072
- See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#type-stoplistenertoken), [logger](./client.md#variable-logger)
4978
+ See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#interface-stoplistenertoken), [logger](./client.md#variable-logger)
5073
4979
 
5074
4980
  Returns
5075
4981
 
@@ -5124,7 +5030,7 @@ High speed WebSocket based based new block header listener
5124
5030
  export async function WocHeadersLiveListener(enqueue: (header: BlockHeader) => void, error: (code: number, message: string) => boolean, stop: StopListenerToken, chain: Chain, logger: (...args: any[]) => void, idleWait = 100000): Promise<boolean>
5125
5031
  ```
5126
5032
 
5127
- See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#type-stoplistenertoken), [logger](./client.md#variable-logger)
5033
+ See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#interface-stoplistenertoken), [logger](./client.md#variable-logger)
5128
5034
 
5129
5035
  Returns
5130
5036
 
@@ -5233,6 +5139,20 @@ See also: [ChaintracksIngestorParams](./services.md#interface-chaintracksingesto
5233
5139
 
5234
5140
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5235
5141
 
5142
+ ---
5143
+ ##### Function: classifyMerklePathResponse
5144
+
5145
+ Classify a non-OK status response for getMerklePath.
5146
+
5147
+ Returns `'retry'` when the request was rate-limited and the caller should retry,
5148
+ `'notFound'` for 404, `'badStatus'` for other non-200 codes.
5149
+
5150
+ ```ts
5151
+ export function classifyMerklePathResponse(status: number, statusText: string, retry: number): "retry" | "notFound" | "badStatus" | "ok"
5152
+ ```
5153
+
5154
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5155
+
5236
5156
  ---
5237
5157
  ##### Function: convertBitsToTarget
5238
5158
 
@@ -5340,7 +5260,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5340
5260
  ##### Function: createDefaultIdbChaintracksOptions
5341
5261
 
5342
5262
  ```ts
5343
- export function createDefaultIdbChaintracksOptions(chain: Chain, whatsonchainApiKey: string = "", maxPerFile: number = 100000, maxRetained: number = 2, fetch?: ChaintracksFetchApi, cdnUrl: string = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold: number = 2000, reorgHeightThreshold: number = 400, bulkMigrationChunkSize: number = 500, batchInsertLimit: number = 400, addLiveRecursionLimit: number = 36): ChaintracksOptions
5263
+ export function createDefaultIdbChaintracksOptions(chain: Chain, whatsonchainApiKey = "", maxPerFile = 100000, maxRetained = 2, fetch?: ChaintracksFetchApi, cdnUrl = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold = 2000, reorgHeightThreshold = 400, bulkMigrationChunkSize = 500, batchInsertLimit = 400, addLiveRecursionLimit = 36): ChaintracksOptions
5344
5264
  ```
5345
5265
 
5346
5266
  See also: [Chain](./client.md#type-chain), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [ChaintracksOptions](./services.md#interface-chaintracksoptions)
@@ -5351,7 +5271,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5351
5271
  ##### Function: createDefaultKnexChaintracksOptions
5352
5272
 
5353
5273
  ```ts
5354
- export function createDefaultKnexChaintracksOptions(chain: Chain, rootFolder: string = "./data/", knexConfig?: Knex.Config, whatsonchainApiKey: string = "", maxPerFile: number = 100000, maxRetained: number = 2, fetch?: ChaintracksFetchApi, cdnUrl: string = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold: number = 2000, reorgHeightThreshold: number = 400, bulkMigrationChunkSize: number = 500, batchInsertLimit: number = 400, addLiveRecursionLimit: number = 36): ChaintracksOptions
5274
+ export function createDefaultKnexChaintracksOptions(chain: Chain, rootFolder = "./data/", knexConfig?: Knex.Config, whatsonchainApiKey = "", maxPerFile = 100000, maxRetained = 2, fetch?: ChaintracksFetchApi, cdnUrl = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold = 2000, reorgHeightThreshold = 400, bulkMigrationChunkSize = 500, batchInsertLimit = 400, addLiveRecursionLimit = 36): ChaintracksOptions
5355
5275
  ```
5356
5276
 
5357
5277
  See also: [Chain](./client.md#type-chain), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [ChaintracksOptions](./services.md#interface-chaintracksoptions)
@@ -5367,7 +5287,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5367
5287
  ##### Function: createDefaultNoDbChaintracksOptions
5368
5288
 
5369
5289
  ```ts
5370
- export function createDefaultNoDbChaintracksOptions(chain: Chain, whatsonchainApiKey: string = "", maxPerFile: number = 100000, maxRetained: number = 2, fetch?: ChaintracksFetchApi, cdnUrl: string = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold: number = 2000, reorgHeightThreshold: number = 400, bulkMigrationChunkSize: number = 500, batchInsertLimit: number = 400, addLiveRecursionLimit: number = 36): ChaintracksOptions
5290
+ export function createDefaultNoDbChaintracksOptions(chain: Chain, whatsonchainApiKey = "", maxPerFile = 100000, maxRetained = 2, fetch?: ChaintracksFetchApi, cdnUrl = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold = 2000, reorgHeightThreshold = 400, bulkMigrationChunkSize = 500, batchInsertLimit = 400, addLiveRecursionLimit = 36): ChaintracksOptions
5371
5291
  ```
5372
5292
 
5373
5293
  See also: [Chain](./client.md#type-chain), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [ChaintracksOptions](./services.md#interface-chaintracksoptions)
@@ -5389,7 +5309,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5389
5309
  ##### Function: createIdbChaintracks
5390
5310
 
5391
5311
  ```ts
5392
- export async function createIdbChaintracks(chain: Chain, whatsonchainApiKey: string = "", maxPerFile: number = 100000, maxRetained: number = 2, fetch?: ChaintracksFetchApi, cdnUrl: string = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold: number = 2000, reorgHeightThreshold: number = 400, bulkMigrationChunkSize: number = 500, batchInsertLimit: number = 400, addLiveRecursionLimit: number = 36): Promise<{
5312
+ export async function createIdbChaintracks(chain: Chain, whatsonchainApiKey = "", maxPerFile = 100000, maxRetained = 2, fetch?: ChaintracksFetchApi, cdnUrl = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold = 2000, reorgHeightThreshold = 400, bulkMigrationChunkSize = 500, batchInsertLimit = 400, addLiveRecursionLimit = 36): Promise<{
5393
5313
  chain: Chain;
5394
5314
  maxPerFile: number;
5395
5315
  fetch: ChaintracksFetchApi;
@@ -5407,7 +5327,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5407
5327
  ##### Function: createKnexChaintracks
5408
5328
 
5409
5329
  ```ts
5410
- export async function createKnexChaintracks(chain: Chain, rootFolder: string = "./data/", knexConfig?: Knex.Config, whatsonchainApiKey: string = "", maxPerFile: number = 100000, maxRetained: number = 2, fetch?: ChaintracksFetchApi, cdnUrl: string = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold: number = 2000, reorgHeightThreshold: number = 400, bulkMigrationChunkSize: number = 500, batchInsertLimit: number = 400, addLiveRecursionLimit: number = 36): Promise<{
5330
+ export async function createKnexChaintracks(chain: Chain, rootFolder = "./data/", knexConfig?: Knex.Config, whatsonchainApiKey = "", maxPerFile = 100000, maxRetained = 2, fetch?: ChaintracksFetchApi, cdnUrl = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold = 2000, reorgHeightThreshold = 400, bulkMigrationChunkSize = 500, batchInsertLimit = 400, addLiveRecursionLimit = 36): Promise<{
5411
5331
  chain: Chain;
5412
5332
  maxPerFile: number;
5413
5333
  fetch: ChaintracksFetchApi;
@@ -5425,7 +5345,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5425
5345
  ##### Function: createNoDbChaintracks
5426
5346
 
5427
5347
  ```ts
5428
- export async function createNoDbChaintracks(chain: Chain, whatsonchainApiKey: string = "", maxPerFile: number = 100000, maxRetained: number = 2, fetch?: ChaintracksFetchApi, cdnUrl: string = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold: number = 2000, reorgHeightThreshold: number = 400, bulkMigrationChunkSize: number = 500, batchInsertLimit: number = 400, addLiveRecursionLimit: number = 36): Promise<{
5348
+ export async function createNoDbChaintracks(chain: Chain, whatsonchainApiKey = "", maxPerFile = 100000, maxRetained = 2, fetch?: ChaintracksFetchApi, cdnUrl = "https://cdn.projectbabbage.com/blockheaders/", liveHeightThreshold = 2000, reorgHeightThreshold = 400, bulkMigrationChunkSize = 500, batchInsertLimit = 400, addLiveRecursionLimit = 36): Promise<{
5429
5349
  chain: Chain;
5430
5350
  maxPerFile: number;
5431
5351
  fetch: ChaintracksFetchApi;
@@ -5478,7 +5398,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5478
5398
  ##### Function: deserializeBlockHeader
5479
5399
 
5480
5400
  ```ts
5481
- export function deserializeBlockHeader(buffer: number[] | Uint8Array, offset = 0, height: number): BlockHeader
5401
+ export function deserializeBlockHeader(buffer: number[] | Uint8Array, height: number, offset = 0): BlockHeader
5482
5402
  ```
5483
5403
 
5484
5404
  See also: [BlockHeader](./client.md#interface-blockheader)
@@ -5543,7 +5463,7 @@ export function genesisHeader(chain: Chain): BlockHeader {
5543
5463
  hash: "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"
5544
5464
  };
5545
5465
  case "mock":
5546
- throw new Error(`genesisHeader does not support 'mock' chain. Mock chain generates its own genesis block.`);
5466
+ throw new Error("genesisHeader does not support 'mock' chain. Mock chain generates its own genesis block.");
5547
5467
  }
5548
5468
  }
5549
5469
  ```
@@ -5585,18 +5505,82 @@ See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#
5585
5505
 
5586
5506
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5587
5507
 
5508
+ ---
5509
+ ##### Function: handlePostRawTxErrorResponse
5510
+
5511
+ Classify an error-status WoC response and mutate `r` accordingly.
5512
+
5513
+ ```ts
5514
+ export function handlePostRawTxErrorResponse(r: PostTxResultForTxid, nne: () => Record<string, unknown>, response: {
5515
+ data?: unknown;
5516
+ statusText?: unknown;
5517
+ status?: unknown;
5518
+ ok?: boolean;
5519
+ }): void
5520
+ ```
5521
+
5522
+ See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
5523
+
5524
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5525
+
5526
+ ---
5527
+ ##### Function: handleScriptHashHistoryCatch
5528
+
5529
+ Decide whether a caught error is retryable for script-hash history calls.
5530
+ If not retryable, sets `r.error` and returns false.
5531
+
5532
+ ```ts
5533
+ export function handleScriptHashHistoryCatch(r: GetScriptHashHistoryResult, error_: unknown, url: string, methodName: string, retry: number, maxRetry: number): boolean
5534
+ ```
5535
+
5536
+ See also: [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult)
5537
+
5538
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5539
+
5540
+ ---
5541
+ ##### Function: handleScriptHashHistoryResponse
5542
+
5543
+ Inspect a WoC script-hash history response and update `r` in-place.
5544
+
5545
+ Returns:
5546
+ - `'continue'` — rate-limited, caller should retry
5547
+ - `'return'` — done, caller should return `r`
5548
+ - `'ok'` — response was successful, continue parsing
5549
+
5550
+ ```ts
5551
+ export function handleScriptHashHistoryResponse(r: GetScriptHashHistoryResult, response: ScriptHashHistoryResponse, methodName: string, retry: number): "continue" | "return" | "ok"
5552
+ ```
5553
+
5554
+ See also: [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [ScriptHashHistoryResponse](./services.md#interface-scripthashhistoryresponse)
5555
+
5556
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5557
+
5558
+ ---
5559
+ ##### Function: handleUtxoConnReset
5560
+
5561
+ Decide whether the ECONNRESET error is retryable and, if not, set `r.error`.
5562
+ Returns true when the caller should retry, false when it should return.
5563
+
5564
+ ```ts
5565
+ export function handleUtxoConnReset(r: GetUtxoStatusResult, error_: unknown, url: string, retry: number, maxRetry: number): boolean
5566
+ ```
5567
+
5568
+ See also: [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
5569
+
5570
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5571
+
5588
5572
  ---
5589
5573
  ##### Function: isBaseBlockHeader
5590
5574
 
5591
5575
  Type guard function.
5592
5576
 
5593
5577
  ```ts
5594
- export function isBaseBlockHeader(header: BaseBlockHeader | BlockHeader | LiveBlockHeader): header is BaseBlockHeader {
5578
+ export function isBaseBlockHeader(header: AnyBlockHeader): header is BaseBlockHeader {
5595
5579
  return typeof header.previousHash === "string";
5596
5580
  }
5597
5581
  ```
5598
5582
 
5599
- See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
5583
+ See also: [AnyBlockHeader](./services.md#type-anyblockheader), [BaseBlockHeader](./client.md#interface-baseblockheader)
5600
5584
 
5601
5585
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5602
5586
 
@@ -5606,12 +5590,12 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5606
5590
  Type guard function.
5607
5591
 
5608
5592
  ```ts
5609
- export function isBlockHeader(header: BaseBlockHeader | BlockHeader | LiveBlockHeader): header is LiveBlockHeader {
5593
+ export function isBlockHeader(header: AnyBlockHeader): header is LiveBlockHeader {
5610
5594
  return "height" in header && typeof header.previousHash === "string";
5611
5595
  }
5612
5596
  ```
5613
5597
 
5614
- See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
5598
+ See also: [AnyBlockHeader](./services.md#type-anyblockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
5615
5599
 
5616
5600
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5617
5601
 
@@ -5638,17 +5622,16 @@ The following properties must match:
5638
5622
 
5639
5623
  ```ts
5640
5624
  export function isKnownValidBulkHeaderFile(vbf: BulkHeaderFileInfo): boolean {
5641
- if (!vbf || !vbf.fileHash)
5625
+ if (!vbf?.fileHash)
5642
5626
  return false;
5643
5627
  const bf = validBulkHeaderFilesByFileHash()[vbf.fileHash];
5644
- if (!bf ||
5645
- bf.firstHeight !== vbf.firstHeight ||
5646
- bf.count !== vbf.count ||
5647
- bf.prevChainWork !== vbf.prevChainWork ||
5648
- bf.prevHash !== vbf.prevHash ||
5649
- bf.lastChainWork !== vbf.lastChainWork ||
5650
- bf.lastHash !== vbf.lastHash ||
5651
- bf.chain !== vbf.chain) {
5628
+ if (bf?.firstHeight !== vbf.firstHeight ||
5629
+ bf?.count !== vbf.count ||
5630
+ bf?.prevChainWork !== vbf.prevChainWork ||
5631
+ bf?.prevHash !== vbf.prevHash ||
5632
+ bf?.lastChainWork !== vbf.lastChainWork ||
5633
+ bf?.lastHash !== vbf.lastHash ||
5634
+ bf?.chain !== vbf.chain) {
5652
5635
  return false;
5653
5636
  }
5654
5637
  return true;
@@ -5684,12 +5667,12 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5684
5667
  Type guard function.
5685
5668
 
5686
5669
  ```ts
5687
- export function isLiveBlockHeader(header: BaseBlockHeader | BlockHeader | LiveBlockHeader): header is LiveBlockHeader {
5670
+ export function isLiveBlockHeader(header: AnyBlockHeader): header is LiveBlockHeader {
5688
5671
  return "chainwork" in header && typeof header.previousHash === "string";
5689
5672
  }
5690
5673
  ```
5691
5674
 
5692
- See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
5675
+ See also: [AnyBlockHeader](./services.md#type-anyblockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
5693
5676
 
5694
5677
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5695
5678
 
@@ -5704,6 +5687,35 @@ export function isMoreWork(work1: string, work2: string): boolean
5704
5687
 
5705
5688
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5706
5689
 
5690
+ ---
5691
+ ##### Function: makeMerklePathNote
5692
+
5693
+ ```ts
5694
+ export function makeMerklePathNote(what: MerklePathNoteWhat, name: string, extra: Partial<MerklePathNote> = {}): MerklePathNote
5695
+ ```
5696
+
5697
+ See also: [MerklePathNote](./services.md#interface-merklepathnote), [MerklePathNoteWhat](./services.md#type-merklepathnotewhat)
5698
+
5699
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5700
+
5701
+ ---
5702
+ ##### Function: populateUtxoDetails
5703
+
5704
+ Populate UTXO details from a WoC result array
5705
+
5706
+ ```ts
5707
+ export function populateUtxoDetails(r: GetUtxoStatusResult, result: Array<{
5708
+ tx_hash: string;
5709
+ value: number;
5710
+ height: number;
5711
+ tx_pos: number;
5712
+ }>, outpoint?: string): void
5713
+ ```
5714
+
5715
+ See also: [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
5716
+
5717
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5718
+
5707
5719
  ---
5708
5720
  ##### Function: readUInt32BE
5709
5721
 
@@ -5751,7 +5763,7 @@ export function serializeBaseBlockHeader(header: BaseBlockHeader, buffer?: numbe
5751
5763
  writer.writeUInt32LE(header.bits);
5752
5764
  writer.writeUInt32LE(header.nonce);
5753
5765
  const data = writer.toArray();
5754
- if (buffer) {
5766
+ if (buffer != null) {
5755
5767
  offset ||= 0;
5756
5768
  for (let i = 0; i < data.length; i++) {
5757
5769
  if (offset + i >= buffer.length) {
@@ -6104,17 +6116,31 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
6104
6116
 
6105
6117
  | |
6106
6118
  | --- |
6119
+ | [AnyBlockHeader](#type-anyblockheader) |
6107
6120
  | [EnqueueHandler](#type-enqueuehandler) |
6108
6121
  | [ErrorHandler](#type-errorhandler) |
6109
6122
  | [HeaderListener](#type-headerlistener) |
6110
6123
  | [InsertHeaderResult](#type-insertheaderresult) |
6124
+ | [MerklePathNoteWhat](#type-merklepathnotewhat) |
6111
6125
  | [ReorgListener](#type-reorglistener) |
6112
- | [StopListenerToken](#type-stoplistenertoken) |
6113
6126
 
6114
6127
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
6115
6128
 
6116
6129
  ---
6117
6130
 
6131
+ ##### Type: AnyBlockHeader
6132
+
6133
+ Union of all block header variants
6134
+
6135
+ ```ts
6136
+ export type AnyBlockHeader = BaseBlockHeader | BlockHeader | LiveBlockHeader
6137
+ ```
6138
+
6139
+ See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
6140
+
6141
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
6142
+
6143
+ ---
6118
6144
  ##### Type: EnqueueHandler
6119
6145
 
6120
6146
  ```ts
@@ -6170,25 +6196,23 @@ See also: [LiveBlockHeader](./services.md#interface-liveblockheader)
6170
6196
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
6171
6197
 
6172
6198
  ---
6173
- ##### Type: ReorgListener
6199
+ ##### Type: MerklePathNoteWhat
6174
6200
 
6175
6201
  ```ts
6176
- export type ReorgListener = (depth: number, oldTip: BlockHeader, newTip: BlockHeader, deactivatedHeaders?: BlockHeader[]) => void
6202
+ export type MerklePathNoteWhat = "getMerklePathRetry" | "getMerklePathNotFound" | "getMerklePathBadStatus" | "getMerklePathNoData" | "getMerklePathSuccess" | "getMerklePathNoHeader" | "getMerklePathError" | "getMerklePathInternal"
6177
6203
  ```
6178
6204
 
6179
- See also: [BlockHeader](./client.md#interface-blockheader)
6180
-
6181
6205
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
6182
6206
 
6183
6207
  ---
6184
- ##### Type: StopListenerToken
6208
+ ##### Type: ReorgListener
6185
6209
 
6186
6210
  ```ts
6187
- export type StopListenerToken = {
6188
- stop: (() => void) | undefined;
6189
- }
6211
+ export type ReorgListener = (depth: number, oldTip: BlockHeader, newTip: BlockHeader, deactivatedHeaders?: BlockHeader[]) => void
6190
6212
  ```
6191
6213
 
6214
+ See also: [BlockHeader](./client.md#interface-blockheader)
6215
+
6192
6216
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
6193
6217
 
6194
6218
  ---