@bopen-io/wallet-toolbox 2.6.2-brc153.5 → 2.15.0-bopen.1

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 (886) hide show
  1. package/CHANGELOG.md +789 -1
  2. package/LICENSES/Open-BSV-License-4-wallet-pre-2026.txt +28 -0
  3. package/README.md +889 -14
  4. package/THIRD_PARTY_NOTICES.md +35 -0
  5. package/docs/README.md +44 -31
  6. package/docs/action-batch-planning.md +80 -37
  7. package/docs/client.md +11241 -2525
  8. package/docs/identity-verification.md +218 -0
  9. package/docs/local-first-chaintracks.md +129 -0
  10. package/docs/managed-change-liquidity.md +258 -0
  11. package/docs/managed-change-policy.md +14 -1
  12. package/docs/monitor.md +411 -85
  13. package/docs/no-send-expiry.md +167 -0
  14. package/docs/prepared-beef.md +197 -0
  15. package/docs/services.md +5163 -2157
  16. package/docs/setup.md +153 -57
  17. package/docs/storage.md +5051 -851
  18. package/docs/sync-transfer.md +144 -0
  19. package/docs/wab-shamir.md +5 -1
  20. package/docs/wallet.md +10202 -10670
  21. package/out/src/CWIStyleWalletManager.d.ts +39 -31
  22. package/out/src/CWIStyleWalletManager.d.ts.map +1 -1
  23. package/out/src/CWIStyleWalletManager.js +309 -258
  24. package/out/src/CWIStyleWalletManager.js.map +1 -1
  25. package/out/src/Setup.d.ts +24 -0
  26. package/out/src/Setup.d.ts.map +1 -1
  27. package/out/src/Setup.js +30 -2
  28. package/out/src/Setup.js.map +1 -1
  29. package/out/src/SetupClient.d.ts +3 -0
  30. package/out/src/SetupClient.d.ts.map +1 -1
  31. package/out/src/SetupClient.js +1 -0
  32. package/out/src/SetupClient.js.map +1 -1
  33. package/out/src/SetupWallet.d.ts +3 -0
  34. package/out/src/SetupWallet.d.ts.map +1 -1
  35. package/out/src/ShamirWalletManager.d.ts.map +1 -1
  36. package/out/src/ShamirWalletManager.js +34 -19
  37. package/out/src/ShamirWalletManager.js.map +1 -1
  38. package/out/src/SimpleWalletManager.d.ts.map +1 -1
  39. package/out/src/SimpleWalletManager.js +7 -6
  40. package/out/src/SimpleWalletManager.js.map +1 -1
  41. package/out/src/Wallet.d.ts +54 -14
  42. package/out/src/Wallet.d.ts.map +1 -1
  43. package/out/src/Wallet.js +216 -114
  44. package/out/src/Wallet.js.map +1 -1
  45. package/out/src/WalletAuthenticationManager.d.ts +32 -0
  46. package/out/src/WalletAuthenticationManager.d.ts.map +1 -1
  47. package/out/src/WalletAuthenticationManager.js +531 -78
  48. package/out/src/WalletAuthenticationManager.js.map +1 -1
  49. package/out/src/WalletLogger.js +1 -1
  50. package/out/src/WalletLogger.js.map +1 -1
  51. package/out/src/WalletPermissionsManager.d.ts +101 -43
  52. package/out/src/WalletPermissionsManager.d.ts.map +1 -1
  53. package/out/src/WalletPermissionsManager.js +897 -414
  54. package/out/src/WalletPermissionsManager.js.map +1 -1
  55. package/out/src/WalletSettingsManager.d.ts +3 -2
  56. package/out/src/WalletSettingsManager.d.ts.map +1 -1
  57. package/out/src/WalletSettingsManager.js +143 -8
  58. package/out/src/WalletSettingsManager.js.map +1 -1
  59. package/out/src/entropy/EntropyCollector.d.ts.map +1 -1
  60. package/out/src/entropy/EntropyCollector.js +3 -2
  61. package/out/src/entropy/EntropyCollector.js.map +1 -1
  62. package/out/src/fundWalletP2PKH.d.ts.map +1 -1
  63. package/out/src/fundWalletP2PKH.js +143 -44
  64. package/out/src/fundWalletP2PKH.js.map +1 -1
  65. package/out/src/index.client.d.ts +6 -0
  66. package/out/src/index.client.d.ts.map +1 -1
  67. package/out/src/index.client.js +16 -1
  68. package/out/src/index.client.js.map +1 -1
  69. package/out/src/index.mobile.d.ts +7 -0
  70. package/out/src/index.mobile.d.ts.map +1 -1
  71. package/out/src/index.mobile.js +17 -1
  72. package/out/src/index.mobile.js.map +1 -1
  73. package/out/src/mockchain/MockChainTracker.d.ts.map +1 -1
  74. package/out/src/mockchain/MockChainTracker.js +5 -5
  75. package/out/src/mockchain/MockChainTracker.js.map +1 -1
  76. package/out/src/mockchain/MockServices.d.ts +2 -0
  77. package/out/src/mockchain/MockServices.d.ts.map +1 -1
  78. package/out/src/mockchain/MockServices.js +54 -14
  79. package/out/src/mockchain/MockServices.js.map +1 -1
  80. package/out/src/monitor/Monitor.d.ts +51 -0
  81. package/out/src/monitor/Monitor.d.ts.map +1 -1
  82. package/out/src/monitor/Monitor.js +282 -41
  83. package/out/src/monitor/Monitor.js.map +1 -1
  84. package/out/src/monitor/MonitorDaemon.d.ts +2 -0
  85. package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
  86. package/out/src/monitor/MonitorDaemon.js +73 -17
  87. package/out/src/monitor/MonitorDaemon.js.map +1 -1
  88. package/out/src/monitor/monitorValidation.d.ts +12 -0
  89. package/out/src/monitor/monitorValidation.d.ts.map +1 -0
  90. package/out/src/monitor/monitorValidation.js +133 -0
  91. package/out/src/monitor/monitorValidation.js.map +1 -0
  92. package/out/src/monitor/tasks/TaskArcSSE.d.ts +6 -1
  93. package/out/src/monitor/tasks/TaskArcSSE.d.ts.map +1 -1
  94. package/out/src/monitor/tasks/TaskArcSSE.js +117 -74
  95. package/out/src/monitor/tasks/TaskArcSSE.js.map +1 -1
  96. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +5 -0
  97. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
  98. package/out/src/monitor/tasks/TaskCheckForProofs.js +29 -24
  99. package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
  100. package/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -1
  101. package/out/src/monitor/tasks/TaskCheckNoSends.js +11 -3
  102. package/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -1
  103. package/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -1
  104. package/out/src/monitor/tasks/TaskFailAbandoned.js +9 -4
  105. package/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -1
  106. package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -1
  107. package/out/src/monitor/tasks/TaskNewHeader.js +3 -1
  108. package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -1
  109. package/out/src/monitor/tasks/TaskNoSendExpiry.d.ts +19 -0
  110. package/out/src/monitor/tasks/TaskNoSendExpiry.d.ts.map +1 -0
  111. package/out/src/monitor/tasks/TaskNoSendExpiry.js +47 -0
  112. package/out/src/monitor/tasks/TaskNoSendExpiry.js.map +1 -0
  113. package/out/src/monitor/tasks/TaskReconcilePendingTransactions.d.ts +27 -0
  114. package/out/src/monitor/tasks/TaskReconcilePendingTransactions.d.ts.map +1 -0
  115. package/out/src/monitor/tasks/TaskReconcilePendingTransactions.js +242 -0
  116. package/out/src/monitor/tasks/TaskReconcilePendingTransactions.js.map +1 -0
  117. package/out/src/monitor/tasks/TaskReorg.d.ts.map +1 -1
  118. package/out/src/monitor/tasks/TaskReorg.js +4 -4
  119. package/out/src/monitor/tasks/TaskReorg.js.map +1 -1
  120. package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts.map +1 -1
  121. package/out/src/monitor/tasks/TaskReviewDoubleSpends.js +31 -9
  122. package/out/src/monitor/tasks/TaskReviewDoubleSpends.js.map +1 -1
  123. package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts +18 -1
  124. package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts.map +1 -1
  125. package/out/src/monitor/tasks/TaskReviewProvenTxs.js +99 -21
  126. package/out/src/monitor/tasks/TaskReviewProvenTxs.js.map +1 -1
  127. package/out/src/monitor/tasks/TaskReviewUtxos.d.ts +33 -6
  128. package/out/src/monitor/tasks/TaskReviewUtxos.d.ts.map +1 -1
  129. package/out/src/monitor/tasks/TaskReviewUtxos.js +189 -13
  130. package/out/src/monitor/tasks/TaskReviewUtxos.js.map +1 -1
  131. package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
  132. package/out/src/monitor/tasks/TaskSendWaiting.js +52 -11
  133. package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
  134. package/out/src/monitor/tasks/TaskUnFail.d.ts +1 -0
  135. package/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -1
  136. package/out/src/monitor/tasks/TaskUnFail.js +26 -8
  137. package/out/src/monitor/tasks/TaskUnFail.js.map +1 -1
  138. package/out/src/monitor/tasks/index.all.d.ts +2 -0
  139. package/out/src/monitor/tasks/index.all.d.ts.map +1 -1
  140. package/out/src/monitor/tasks/index.all.js +2 -0
  141. package/out/src/monitor/tasks/index.all.js.map +1 -1
  142. package/out/src/sdk/ActionBatch.interfaces.d.ts +23 -0
  143. package/out/src/sdk/ActionBatch.interfaces.d.ts.map +1 -1
  144. package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -1
  145. package/out/src/sdk/PrivilegedKeyManager.js +3 -2
  146. package/out/src/sdk/PrivilegedKeyManager.js.map +1 -1
  147. package/out/src/sdk/WERR_errors.d.ts +23 -0
  148. package/out/src/sdk/WERR_errors.d.ts.map +1 -1
  149. package/out/src/sdk/WERR_errors.js +51 -7
  150. package/out/src/sdk/WERR_errors.js.map +1 -1
  151. package/out/src/sdk/WalletError.d.ts.map +1 -1
  152. package/out/src/sdk/WalletError.js +7 -21
  153. package/out/src/sdk/WalletError.js.map +1 -1
  154. package/out/src/sdk/WalletErrorFromJson.d.ts.map +1 -1
  155. package/out/src/sdk/WalletErrorFromJson.js +121 -3
  156. package/out/src/sdk/WalletErrorFromJson.js.map +1 -1
  157. package/out/src/sdk/WalletServices.interfaces.d.ts +45 -2
  158. package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
  159. package/out/src/sdk/WalletStorage.interfaces.d.ts +87 -4
  160. package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
  161. package/out/src/sdk/types.d.ts +3 -2
  162. package/out/src/sdk/types.d.ts.map +1 -1
  163. package/out/src/sdk/types.js +3 -2
  164. package/out/src/sdk/types.js.map +1 -1
  165. package/out/src/services/ServiceCollection.js +2 -2
  166. package/out/src/services/ServiceCollection.js.map +1 -1
  167. package/out/src/services/Services.d.ts +5 -0
  168. package/out/src/services/Services.d.ts.map +1 -1
  169. package/out/src/services/Services.js +346 -120
  170. package/out/src/services/Services.js.map +1 -1
  171. package/out/src/services/chaintracker/BHServiceClient.d.ts +21 -4
  172. package/out/src/services/chaintracker/BHServiceClient.d.ts.map +1 -1
  173. package/out/src/services/chaintracker/BHServiceClient.js +269 -66
  174. package/out/src/services/chaintracker/BHServiceClient.js.map +1 -1
  175. package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts +25 -3
  176. package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -1
  177. package/out/src/services/chaintracker/ChaintracksChainTracker.js +188 -53
  178. package/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -1
  179. package/out/src/services/chaintracker/LocalChainTracker.d.ts +122 -0
  180. package/out/src/services/chaintracker/LocalChainTracker.d.ts.map +1 -0
  181. package/out/src/services/chaintracker/LocalChainTracker.js +465 -0
  182. package/out/src/services/chaintracker/LocalChainTracker.js.map +1 -0
  183. package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts.map +1 -1
  184. package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.js +59 -7
  185. package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.js.map +1 -1
  186. package/out/src/services/chaintracker/chaintracks/Api/BulkFileDataCacheApi.d.ts +48 -0
  187. package/out/src/services/chaintracker/chaintracks/Api/BulkFileDataCacheApi.d.ts.map +1 -0
  188. package/out/src/services/chaintracker/chaintracks/Api/BulkFileDataCacheApi.js +3 -0
  189. package/out/src/services/chaintracker/chaintracks/Api/BulkFileDataCacheApi.js.map +1 -0
  190. package/out/src/services/chaintracker/chaintracks/Api/BulkFileDataValidatorApi.d.ts +70 -0
  191. package/out/src/services/chaintracker/chaintracks/Api/BulkFileDataValidatorApi.d.ts.map +1 -0
  192. package/out/src/services/chaintracker/chaintracks/Api/BulkFileDataValidatorApi.js +21 -0
  193. package/out/src/services/chaintracker/chaintracks/Api/BulkFileDataValidatorApi.js.map +1 -0
  194. package/out/src/services/chaintracker/chaintracks/Api/ChaintracksApi.d.ts +6 -0
  195. package/out/src/services/chaintracker/chaintracks/Api/ChaintracksApi.d.ts.map +1 -1
  196. package/out/src/services/chaintracker/chaintracks/Api/ChaintracksClientApi.d.ts +53 -0
  197. package/out/src/services/chaintracker/chaintracks/Api/ChaintracksClientApi.d.ts.map +1 -1
  198. package/out/src/services/chaintracker/chaintracks/Api/ChaintracksFetchApi.d.ts +9 -2
  199. package/out/src/services/chaintracker/chaintracks/Api/ChaintracksFetchApi.d.ts.map +1 -1
  200. package/out/src/services/chaintracker/chaintracks/Api/ChaintracksStorageApi.d.ts +9 -0
  201. package/out/src/services/chaintracker/chaintracks/Api/ChaintracksStorageApi.d.ts.map +1 -1
  202. package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts +28 -3
  203. package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts.map +1 -1
  204. package/out/src/services/chaintracker/chaintracks/Chaintracks.js +282 -64
  205. package/out/src/services/chaintracker/chaintracks/Chaintracks.js.map +1 -1
  206. package/out/src/services/chaintracker/chaintracks/ChaintracksService.d.ts +16 -0
  207. package/out/src/services/chaintracker/chaintracks/ChaintracksService.d.ts.map +1 -1
  208. package/out/src/services/chaintracker/chaintracks/ChaintracksService.js +150 -26
  209. package/out/src/services/chaintracker/chaintracks/ChaintracksService.js.map +1 -1
  210. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts +30 -1
  211. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -1
  212. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +348 -30
  213. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -1
  214. package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.d.ts +32 -1
  215. package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.d.ts.map +1 -1
  216. package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.js +378 -44
  217. package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.js.map +1 -1
  218. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.d.ts.map +1 -1
  219. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js +28 -3
  220. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js.map +1 -1
  221. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.d.ts.map +1 -1
  222. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.js +33 -9
  223. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.js.map +1 -1
  224. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.d.ts.map +1 -1
  225. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.js.map +1 -1
  226. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorChaintracks.d.ts.map +1 -1
  227. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorChaintracks.js +4 -2
  228. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorChaintracks.js.map +1 -1
  229. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.d.ts +2 -0
  230. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.d.ts.map +1 -1
  231. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js +17 -4
  232. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js.map +1 -1
  233. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.d.ts +2 -0
  234. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.d.ts.map +1 -1
  235. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.js +40 -20
  236. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainWs.js.map +1 -1
  237. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.d.ts.map +1 -1
  238. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js +14 -0
  239. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js.map +1 -1
  240. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.d.ts +6 -0
  241. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.d.ts.map +1 -1
  242. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.js +56 -9
  243. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.js.map +1 -1
  244. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.d.ts.map +1 -1
  245. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.js +6 -3
  246. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorTeranodeP2P.js.map +1 -1
  247. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts +4 -0
  248. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts.map +1 -1
  249. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js +27 -9
  250. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js.map +1 -1
  251. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.d.ts +8 -0
  252. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.d.ts.map +1 -1
  253. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.js +49 -5
  254. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainWs.js.map +1 -1
  255. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts +1 -1
  256. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts.map +1 -1
  257. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js +90 -21
  258. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js.map +1 -1
  259. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts +3 -1
  260. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts.map +1 -1
  261. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js +185 -38
  262. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js.map +1 -1
  263. package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.d.ts.map +1 -1
  264. package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js +59 -6
  265. package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js.map +1 -1
  266. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.d.ts +2 -0
  267. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.d.ts.map +1 -1
  268. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.js +89 -39
  269. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksKnexMigrations.js.map +1 -1
  270. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts +10 -0
  271. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts.map +1 -1
  272. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js +230 -28
  273. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js.map +1 -1
  274. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.d.ts +2 -1
  275. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.d.ts.map +1 -1
  276. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js +265 -96
  277. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js.map +1 -1
  278. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts +8 -1
  279. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts.map +1 -1
  280. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js +248 -87
  281. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js.map +1 -1
  282. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts +3 -0
  283. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts.map +1 -1
  284. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js +121 -35
  285. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js.map +1 -1
  286. package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.d.ts +8 -0
  287. package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.d.ts.map +1 -1
  288. package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.js +6 -3
  289. package/out/src/services/chaintracker/chaintracks/configureChaintracksIngestors.js.map +1 -1
  290. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.d.ts.map +1 -1
  291. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js.map +1 -1
  292. package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.d.ts.map +1 -1
  293. package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.js.map +1 -1
  294. package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.d.ts.map +1 -1
  295. package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.js.map +1 -1
  296. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.d.ts.map +1 -1
  297. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js +1 -7
  298. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js.map +1 -1
  299. package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.d.ts.map +1 -1
  300. package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.js +1 -7
  301. package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.js.map +1 -1
  302. package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.d.ts.map +1 -1
  303. package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.js +1 -7
  304. package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.js.map +1 -1
  305. package/out/src/services/chaintracker/chaintracks/index.all.d.ts +3 -0
  306. package/out/src/services/chaintracker/chaintracks/index.all.d.ts.map +1 -1
  307. package/out/src/services/chaintracker/chaintracks/index.all.js +3 -0
  308. package/out/src/services/chaintracker/chaintracks/index.all.js.map +1 -1
  309. package/out/src/services/chaintracker/chaintracks/index.mobile.d.ts +5 -0
  310. package/out/src/services/chaintracker/chaintracks/index.mobile.d.ts.map +1 -1
  311. package/out/src/services/chaintracker/chaintracks/index.mobile.js +5 -0
  312. package/out/src/services/chaintracker/chaintracks/index.mobile.js.map +1 -1
  313. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataCacheFs.d.ts +51 -0
  314. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataCacheFs.d.ts.map +1 -0
  315. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataCacheFs.js +394 -0
  316. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataCacheFs.js.map +1 -0
  317. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts +45 -1
  318. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts.map +1 -1
  319. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js +733 -166
  320. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js.map +1 -1
  321. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.d.ts.map +1 -1
  322. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.js +17 -1
  323. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.js.map +1 -1
  324. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataValidator.worker.d.ts +32 -0
  325. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataValidator.worker.d.ts.map +1 -0
  326. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataValidator.worker.js +40 -0
  327. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataValidator.worker.js.map +1 -0
  328. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.d.ts.map +1 -1
  329. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js +99 -30
  330. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js.map +1 -1
  331. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts +3 -1
  332. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts.map +1 -1
  333. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js +23 -15
  334. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js.map +1 -1
  335. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts +38 -4
  336. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts.map +1 -1
  337. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js +191 -47
  338. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js.map +1 -1
  339. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.d.ts +2 -1
  340. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.d.ts.map +1 -1
  341. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.js +57 -11
  342. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.js.map +1 -1
  343. package/out/src/services/chaintracker/chaintracks/util/DurableFileBulkFileDownloadBudget.d.ts +48 -0
  344. package/out/src/services/chaintracker/chaintracks/util/DurableFileBulkFileDownloadBudget.d.ts.map +1 -0
  345. package/out/src/services/chaintracker/chaintracks/util/DurableFileBulkFileDownloadBudget.js +280 -0
  346. package/out/src/services/chaintracker/chaintracks/util/DurableFileBulkFileDownloadBudget.js.map +1 -0
  347. package/out/src/services/chaintracker/chaintracks/util/FixedWindowBulkFileDownloadBudget.d.ts +30 -0
  348. package/out/src/services/chaintracker/chaintracks/util/FixedWindowBulkFileDownloadBudget.d.ts.map +1 -0
  349. package/out/src/services/chaintracker/chaintracks/util/FixedWindowBulkFileDownloadBudget.js +57 -0
  350. package/out/src/services/chaintracker/chaintracks/util/FixedWindowBulkFileDownloadBudget.js.map +1 -0
  351. package/out/src/services/chaintracker/chaintracks/util/HeightRange.d.ts.map +1 -1
  352. package/out/src/services/chaintracker/chaintracks/util/HeightRange.js.map +1 -1
  353. package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.d.ts +14 -0
  354. package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.d.ts.map +1 -0
  355. package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.js +148 -0
  356. package/out/src/services/chaintracker/chaintracks/util/InlineBulkFileDataValidator.js.map +1 -0
  357. package/out/src/services/chaintracker/chaintracks/util/NodeBulkFileDataValidator.d.ts +41 -0
  358. package/out/src/services/chaintracker/chaintracks/util/NodeBulkFileDataValidator.d.ts.map +1 -0
  359. package/out/src/services/chaintracker/chaintracks/util/NodeBulkFileDataValidator.js +271 -0
  360. package/out/src/services/chaintracker/chaintracks/util/NodeBulkFileDataValidator.js.map +1 -0
  361. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts +3 -0
  362. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts.map +1 -1
  363. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.js +15 -0
  364. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.js.map +1 -1
  365. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts +17 -4
  366. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts.map +1 -1
  367. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js +362 -105
  368. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js.map +1 -1
  369. package/out/src/services/chaintracker/chaintracks/util/safeDiagnostic.d.ts +4 -0
  370. package/out/src/services/chaintracker/chaintracks/util/safeDiagnostic.d.ts.map +1 -0
  371. package/out/src/services/chaintracker/chaintracks/util/safeDiagnostic.js +33 -0
  372. package/out/src/services/chaintracker/chaintracks/util/safeDiagnostic.js.map +1 -0
  373. package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.d.ts.map +1 -1
  374. package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.js.map +1 -1
  375. package/out/src/services/chaintracker/index.all.d.ts +1 -0
  376. package/out/src/services/chaintracker/index.all.d.ts.map +1 -1
  377. package/out/src/services/chaintracker/index.all.js +1 -0
  378. package/out/src/services/chaintracker/index.all.js.map +1 -1
  379. package/out/src/services/chaintracker/index.client.d.ts +1 -0
  380. package/out/src/services/chaintracker/index.client.d.ts.map +1 -1
  381. package/out/src/services/chaintracker/index.client.js +1 -0
  382. package/out/src/services/chaintracker/index.client.js.map +1 -1
  383. package/out/src/services/chaintracker/index.mobile.d.ts +1 -0
  384. package/out/src/services/chaintracker/index.mobile.d.ts.map +1 -1
  385. package/out/src/services/chaintracker/index.mobile.js +1 -0
  386. package/out/src/services/chaintracker/index.mobile.js.map +1 -1
  387. package/out/src/services/classifyOutputUtxo.d.ts +25 -0
  388. package/out/src/services/classifyOutputUtxo.d.ts.map +1 -0
  389. package/out/src/services/classifyOutputUtxo.js +96 -0
  390. package/out/src/services/classifyOutputUtxo.js.map +1 -0
  391. package/out/src/services/createDefaultWalletServicesOptions.d.ts +16 -3
  392. package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -1
  393. package/out/src/services/createDefaultWalletServicesOptions.js +38 -8
  394. package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -1
  395. package/out/src/services/fiatRateValidation.d.ts +12 -0
  396. package/out/src/services/fiatRateValidation.d.ts.map +1 -0
  397. package/out/src/services/fiatRateValidation.js +138 -0
  398. package/out/src/services/fiatRateValidation.js.map +1 -0
  399. package/out/src/services/getCanonicalMerklePath.d.ts +15 -0
  400. package/out/src/services/getCanonicalMerklePath.d.ts.map +1 -0
  401. package/out/src/services/getCanonicalMerklePath.js +90 -0
  402. package/out/src/services/getCanonicalMerklePath.js.map +1 -0
  403. package/out/src/services/providers/ARC.d.ts +3 -16
  404. package/out/src/services/providers/ARC.d.ts.map +1 -1
  405. package/out/src/services/providers/ARC.js +36 -37
  406. package/out/src/services/providers/ARC.js.map +1 -1
  407. package/out/src/services/providers/ArcSSEClient.d.ts +38 -23
  408. package/out/src/services/providers/ArcSSEClient.d.ts.map +1 -1
  409. package/out/src/services/providers/ArcSSEClient.js +384 -63
  410. package/out/src/services/providers/ArcSSEClient.js.map +1 -1
  411. package/out/src/services/providers/Arcade.d.ts +11 -1
  412. package/out/src/services/providers/Arcade.d.ts.map +1 -1
  413. package/out/src/services/providers/Arcade.js +111 -33
  414. package/out/src/services/providers/Arcade.js.map +1 -1
  415. package/out/src/services/providers/Bitails.d.ts +3 -0
  416. package/out/src/services/providers/Bitails.d.ts.map +1 -1
  417. package/out/src/services/providers/Bitails.js +79 -12
  418. package/out/src/services/providers/Bitails.js.map +1 -1
  419. package/out/src/services/providers/SdkWhatsOnChain.d.ts +8 -2
  420. package/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -1
  421. package/out/src/services/providers/SdkWhatsOnChain.js +83 -10
  422. package/out/src/services/providers/SdkWhatsOnChain.js.map +1 -1
  423. package/out/src/services/providers/WhatsOnChain.d.ts +3 -0
  424. package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -1
  425. package/out/src/services/providers/WhatsOnChain.js +221 -69
  426. package/out/src/services/providers/WhatsOnChain.js.map +1 -1
  427. package/out/src/services/providers/arcProviderConfig.d.ts +27 -0
  428. package/out/src/services/providers/arcProviderConfig.d.ts.map +1 -0
  429. package/out/src/services/providers/arcProviderConfig.js +83 -0
  430. package/out/src/services/providers/arcProviderConfig.js.map +1 -0
  431. package/out/src/services/providers/arcTxDataValidation.d.ts +4 -0
  432. package/out/src/services/providers/arcTxDataValidation.d.ts.map +1 -0
  433. package/out/src/services/providers/arcTxDataValidation.js +92 -0
  434. package/out/src/services/providers/arcTxDataValidation.js.map +1 -0
  435. package/out/src/services/providers/arcadeStatus.d.ts +18 -0
  436. package/out/src/services/providers/arcadeStatus.d.ts.map +1 -0
  437. package/out/src/services/providers/arcadeStatus.js +56 -0
  438. package/out/src/services/providers/arcadeStatus.js.map +1 -0
  439. package/out/src/services/providers/exchangeRates.d.ts +3 -3
  440. package/out/src/services/providers/exchangeRates.d.ts.map +1 -1
  441. package/out/src/services/providers/exchangeRates.js +153 -226
  442. package/out/src/services/providers/exchangeRates.js.map +1 -1
  443. package/out/src/services/providers/getBeefForTxid.d.ts.map +1 -1
  444. package/out/src/services/providers/getBeefForTxid.js.map +1 -1
  445. package/out/src/services/providers/whatsOnChainHelpers.d.ts +2 -2
  446. package/out/src/services/providers/whatsOnChainHelpers.d.ts.map +1 -1
  447. package/out/src/services/providers/whatsOnChainHelpers.js +11 -8
  448. package/out/src/services/providers/whatsOnChainHelpers.js.map +1 -1
  449. package/out/src/services/validateMerklePathResult.d.ts +30 -0
  450. package/out/src/services/validateMerklePathResult.d.ts.map +1 -0
  451. package/out/src/services/validateMerklePathResult.js +272 -0
  452. package/out/src/services/validateMerklePathResult.js.map +1 -0
  453. package/out/src/services/validatePostBeefResult.d.ts +17 -0
  454. package/out/src/services/validatePostBeefResult.d.ts.map +1 -0
  455. package/out/src/services/validatePostBeefResult.js +334 -0
  456. package/out/src/services/validatePostBeefResult.js.map +1 -0
  457. package/out/src/services/validateRawTxResult.d.ts +6 -0
  458. package/out/src/services/validateRawTxResult.d.ts.map +1 -0
  459. package/out/src/services/validateRawTxResult.js +77 -0
  460. package/out/src/services/validateRawTxResult.js.map +1 -0
  461. package/out/src/services/validateScriptHashHistoryResult.d.ts +5 -0
  462. package/out/src/services/validateScriptHashHistoryResult.d.ts.map +1 -0
  463. package/out/src/services/validateScriptHashHistoryResult.js +99 -0
  464. package/out/src/services/validateScriptHashHistoryResult.js.map +1 -0
  465. package/out/src/services/validateStatusForTxidsResult.d.ts +8 -0
  466. package/out/src/services/validateStatusForTxidsResult.d.ts.map +1 -0
  467. package/out/src/services/validateStatusForTxidsResult.js +181 -0
  468. package/out/src/services/validateStatusForTxidsResult.js.map +1 -0
  469. package/out/src/services/validateUtxoStatusResult.d.ts +6 -0
  470. package/out/src/services/validateUtxoStatusResult.d.ts.map +1 -0
  471. package/out/src/services/validateUtxoStatusResult.js +126 -0
  472. package/out/src/services/validateUtxoStatusResult.js.map +1 -0
  473. package/out/src/signer/actionBatch/ActionBatchPlanner.d.ts +3 -2
  474. package/out/src/signer/actionBatch/ActionBatchPlanner.d.ts.map +1 -1
  475. package/out/src/signer/actionBatch/ActionBatchPlanner.js +29 -6
  476. package/out/src/signer/actionBatch/ActionBatchPlanner.js.map +1 -1
  477. package/out/src/signer/actionBatch/ActionBatchWorkspace.d.ts +8 -5
  478. package/out/src/signer/actionBatch/ActionBatchWorkspace.d.ts.map +1 -1
  479. package/out/src/signer/actionBatch/ActionBatchWorkspace.js +186 -73
  480. package/out/src/signer/actionBatch/ActionBatchWorkspace.js.map +1 -1
  481. package/out/src/signer/actionBatch/actionBatchBootstrap.d.ts +2 -2
  482. package/out/src/signer/actionBatch/actionBatchBootstrap.d.ts.map +1 -1
  483. package/out/src/signer/actionBatch/actionBatchBootstrap.js +3 -3
  484. package/out/src/signer/actionBatch/actionBatchBootstrap.js.map +1 -1
  485. package/out/src/signer/methods/acquireDirectCertificate.d.ts +3 -2
  486. package/out/src/signer/methods/acquireDirectCertificate.d.ts.map +1 -1
  487. package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
  488. package/out/src/signer/methods/buildSignableTransaction.d.ts +6 -5
  489. package/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -1
  490. package/out/src/signer/methods/buildSignableTransaction.js +6 -11
  491. package/out/src/signer/methods/buildSignableTransaction.js.map +1 -1
  492. package/out/src/signer/methods/createAction.d.ts +4 -3
  493. package/out/src/signer/methods/createAction.d.ts.map +1 -1
  494. package/out/src/signer/methods/createAction.js +3 -1
  495. package/out/src/signer/methods/createAction.js.map +1 -1
  496. package/out/src/signer/methods/createNoSendExpiryAction.d.ts +7 -0
  497. package/out/src/signer/methods/createNoSendExpiryAction.d.ts.map +1 -0
  498. package/out/src/signer/methods/createNoSendExpiryAction.js +254 -0
  499. package/out/src/signer/methods/createNoSendExpiryAction.js.map +1 -0
  500. package/out/src/signer/methods/internalizeAction.d.ts.map +1 -1
  501. package/out/src/signer/methods/internalizeAction.js +9 -5
  502. package/out/src/signer/methods/internalizeAction.js.map +1 -1
  503. package/out/src/signer/methods/proveCertificate.d.ts +3 -2
  504. package/out/src/signer/methods/proveCertificate.d.ts.map +1 -1
  505. package/out/src/signer/methods/proveCertificate.js.map +1 -1
  506. package/out/src/signer/methods/signAction.d.ts.map +1 -1
  507. package/out/src/signer/methods/signAction.js +12 -2
  508. package/out/src/signer/methods/signAction.js.map +1 -1
  509. package/out/src/signer/methods/verifyUnlockScripts.d.ts.map +1 -1
  510. package/out/src/signer/methods/verifyUnlockScripts.js +12 -17
  511. package/out/src/signer/methods/verifyUnlockScripts.js.map +1 -1
  512. package/out/src/storage/StorageIdb.d.ts +11 -3
  513. package/out/src/storage/StorageIdb.d.ts.map +1 -1
  514. package/out/src/storage/StorageIdb.js +134 -44
  515. package/out/src/storage/StorageIdb.js.map +1 -1
  516. package/out/src/storage/StorageKnex.d.ts +71 -7
  517. package/out/src/storage/StorageKnex.d.ts.map +1 -1
  518. package/out/src/storage/StorageKnex.js +616 -262
  519. package/out/src/storage/StorageKnex.js.map +1 -1
  520. package/out/src/storage/StorageProvider.d.ts +41 -10
  521. package/out/src/storage/StorageProvider.d.ts.map +1 -1
  522. package/out/src/storage/StorageProvider.js +397 -107
  523. package/out/src/storage/StorageProvider.js.map +1 -1
  524. package/out/src/storage/StorageReader.d.ts +9 -3
  525. package/out/src/storage/StorageReader.d.ts.map +1 -1
  526. package/out/src/storage/StorageReader.js +21 -43
  527. package/out/src/storage/StorageReader.js.map +1 -1
  528. package/out/src/storage/StorageReaderWriter.d.ts +4 -0
  529. package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
  530. package/out/src/storage/StorageReaderWriter.js +68 -38
  531. package/out/src/storage/StorageReaderWriter.js.map +1 -1
  532. package/out/src/storage/StorageSyncReader.d.ts +1 -1
  533. package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
  534. package/out/src/storage/StorageSyncReader.js +3 -36
  535. package/out/src/storage/StorageSyncReader.js.map +1 -1
  536. package/out/src/storage/WalletStorageManager.d.ts +31 -6
  537. package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
  538. package/out/src/storage/WalletStorageManager.js +166 -75
  539. package/out/src/storage/WalletStorageManager.js.map +1 -1
  540. package/out/src/storage/adminServer/adminServer.d.ts +3 -1
  541. package/out/src/storage/adminServer/adminServer.d.ts.map +1 -1
  542. package/out/src/storage/adminServer/adminServer.js +41 -90
  543. package/out/src/storage/adminServer/adminServer.js.map +1 -1
  544. package/out/src/storage/adminServer/adminUi.d.ts.map +1 -1
  545. package/out/src/storage/adminServer/adminUi.js +32 -9
  546. package/out/src/storage/adminServer/adminUi.js.map +1 -1
  547. package/out/src/storage/adminServer/reqReviewQuery.d.ts +41 -0
  548. package/out/src/storage/adminServer/reqReviewQuery.d.ts.map +1 -0
  549. package/out/src/storage/adminServer/reqReviewQuery.js +67 -0
  550. package/out/src/storage/adminServer/reqReviewQuery.js.map +1 -0
  551. package/out/src/storage/adminServer/reviewUtxos.d.ts +27 -0
  552. package/out/src/storage/adminServer/reviewUtxos.d.ts.map +1 -0
  553. package/out/src/storage/adminServer/reviewUtxos.js +62 -0
  554. package/out/src/storage/adminServer/reviewUtxos.js.map +1 -0
  555. package/out/src/storage/idbHelpers.d.ts.map +1 -1
  556. package/out/src/storage/idbHelpers.js +14 -2
  557. package/out/src/storage/idbHelpers.js.map +1 -1
  558. package/out/src/storage/index.all.d.ts +4 -0
  559. package/out/src/storage/index.all.d.ts.map +1 -1
  560. package/out/src/storage/index.all.js +4 -0
  561. package/out/src/storage/index.all.js.map +1 -1
  562. package/out/src/storage/index.client.d.ts +1 -0
  563. package/out/src/storage/index.client.d.ts.map +1 -1
  564. package/out/src/storage/index.client.js +1 -0
  565. package/out/src/storage/index.client.js.map +1 -1
  566. package/out/src/storage/index.mobile.d.ts +1 -0
  567. package/out/src/storage/index.mobile.d.ts.map +1 -1
  568. package/out/src/storage/index.mobile.js +1 -0
  569. package/out/src/storage/index.mobile.js.map +1 -1
  570. package/out/src/storage/knexPostgres.d.ts +16 -0
  571. package/out/src/storage/knexPostgres.d.ts.map +1 -0
  572. package/out/src/storage/knexPostgres.js +34 -0
  573. package/out/src/storage/knexPostgres.js.map +1 -0
  574. package/out/src/storage/methods/ListActionsSpecOp.d.ts +2 -2
  575. package/out/src/storage/methods/ListActionsSpecOp.d.ts.map +1 -1
  576. package/out/src/storage/methods/ListActionsSpecOp.js.map +1 -1
  577. package/out/src/storage/methods/ListOutputsSpecOp.d.ts +7 -4
  578. package/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +1 -1
  579. package/out/src/storage/methods/ListOutputsSpecOp.js +5 -44
  580. package/out/src/storage/methods/ListOutputsSpecOp.js.map +1 -1
  581. package/out/src/storage/methods/actionBatch.d.ts +9 -2
  582. package/out/src/storage/methods/actionBatch.d.ts.map +1 -1
  583. package/out/src/storage/methods/actionBatch.js +260 -67
  584. package/out/src/storage/methods/actionBatch.js.map +1 -1
  585. package/out/src/storage/methods/actionBatchBlobs.d.ts +2 -0
  586. package/out/src/storage/methods/actionBatchBlobs.d.ts.map +1 -1
  587. package/out/src/storage/methods/actionBatchBlobs.js +47 -26
  588. package/out/src/storage/methods/actionBatchBlobs.js.map +1 -1
  589. package/out/src/storage/methods/actionBatchValidation.d.ts.map +1 -1
  590. package/out/src/storage/methods/actionBatchValidation.js +22 -30
  591. package/out/src/storage/methods/actionBatchValidation.js.map +1 -1
  592. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +7 -2
  593. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
  594. package/out/src/storage/methods/attemptToPostReqsToNetwork.js +59 -110
  595. package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
  596. package/out/src/storage/methods/availableManagedChange.d.ts +8 -1
  597. package/out/src/storage/methods/availableManagedChange.d.ts.map +1 -1
  598. package/out/src/storage/methods/availableManagedChange.js.map +1 -1
  599. package/out/src/storage/methods/createAction.d.ts +60 -3
  600. package/out/src/storage/methods/createAction.d.ts.map +1 -1
  601. package/out/src/storage/methods/createAction.js +390 -105
  602. package/out/src/storage/methods/createAction.js.map +1 -1
  603. package/out/src/storage/methods/generateChange.d.ts +15 -5
  604. package/out/src/storage/methods/generateChange.d.ts.map +1 -1
  605. package/out/src/storage/methods/generateChange.js +187 -27
  606. package/out/src/storage/methods/generateChange.js.map +1 -1
  607. package/out/src/storage/methods/getBeefForTransaction.js +5 -7
  608. package/out/src/storage/methods/getBeefForTransaction.js.map +1 -1
  609. package/out/src/storage/methods/getSyncChunk.d.ts.map +1 -1
  610. package/out/src/storage/methods/getSyncChunk.js +42 -11
  611. package/out/src/storage/methods/getSyncChunk.js.map +1 -1
  612. package/out/src/storage/methods/internalizeAction.d.ts +3 -3
  613. package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
  614. package/out/src/storage/methods/internalizeAction.js +171 -133
  615. package/out/src/storage/methods/internalizeAction.js.map +1 -1
  616. package/out/src/storage/methods/listActionsIdb.d.ts +3 -2
  617. package/out/src/storage/methods/listActionsIdb.d.ts.map +1 -1
  618. package/out/src/storage/methods/listActionsIdb.js +2 -2
  619. package/out/src/storage/methods/listActionsIdb.js.map +1 -1
  620. package/out/src/storage/methods/listActionsKnex.d.ts +3 -2
  621. package/out/src/storage/methods/listActionsKnex.d.ts.map +1 -1
  622. package/out/src/storage/methods/listActionsKnex.js +21 -11
  623. package/out/src/storage/methods/listActionsKnex.js.map +1 -1
  624. package/out/src/storage/methods/listCertificates.d.ts +3 -2
  625. package/out/src/storage/methods/listCertificates.d.ts.map +1 -1
  626. package/out/src/storage/methods/listCertificates.js.map +1 -1
  627. package/out/src/storage/methods/listOutputsIdb.d.ts +3 -2
  628. package/out/src/storage/methods/listOutputsIdb.d.ts.map +1 -1
  629. package/out/src/storage/methods/listOutputsIdb.js +25 -18
  630. package/out/src/storage/methods/listOutputsIdb.js.map +1 -1
  631. package/out/src/storage/methods/listOutputsKnex.d.ts +3 -2
  632. package/out/src/storage/methods/listOutputsKnex.d.ts.map +1 -1
  633. package/out/src/storage/methods/listOutputsKnex.js +31 -30
  634. package/out/src/storage/methods/listOutputsKnex.js.map +1 -1
  635. package/out/src/storage/methods/managedChangePolicy.d.ts +44 -0
  636. package/out/src/storage/methods/managedChangePolicy.d.ts.map +1 -0
  637. package/out/src/storage/methods/managedChangePolicy.js +58 -0
  638. package/out/src/storage/methods/managedChangePolicy.js.map +1 -0
  639. package/out/src/storage/methods/maxPossibleSatoshis.d.ts +13 -0
  640. package/out/src/storage/methods/maxPossibleSatoshis.d.ts.map +1 -0
  641. package/out/src/storage/methods/maxPossibleSatoshis.js +16 -0
  642. package/out/src/storage/methods/maxPossibleSatoshis.js.map +1 -0
  643. package/out/src/storage/methods/noSendExpiry.d.ts +11 -0
  644. package/out/src/storage/methods/noSendExpiry.d.ts.map +1 -0
  645. package/out/src/storage/methods/noSendExpiry.js +359 -0
  646. package/out/src/storage/methods/noSendExpiry.js.map +1 -0
  647. package/out/src/storage/methods/noSendExpiryLifecycle.d.ts +14 -0
  648. package/out/src/storage/methods/noSendExpiryLifecycle.d.ts.map +1 -0
  649. package/out/src/storage/methods/noSendExpiryLifecycle.js +691 -0
  650. package/out/src/storage/methods/noSendExpiryLifecycle.js.map +1 -0
  651. package/out/src/storage/methods/preparedBeef.d.ts +104 -0
  652. package/out/src/storage/methods/preparedBeef.d.ts.map +1 -0
  653. package/out/src/storage/methods/preparedBeef.js +524 -0
  654. package/out/src/storage/methods/preparedBeef.js.map +1 -0
  655. package/out/src/storage/methods/processAction.d.ts.map +1 -1
  656. package/out/src/storage/methods/processAction.js +144 -32
  657. package/out/src/storage/methods/processAction.js.map +1 -1
  658. package/out/src/storage/methods/purgeData.d.ts.map +1 -1
  659. package/out/src/storage/methods/purgeData.js +18 -3
  660. package/out/src/storage/methods/purgeData.js.map +1 -1
  661. package/out/src/storage/methods/reconcileFailedTransactionInputs.d.ts +32 -0
  662. package/out/src/storage/methods/reconcileFailedTransactionInputs.d.ts.map +1 -0
  663. package/out/src/storage/methods/reconcileFailedTransactionInputs.js +142 -0
  664. package/out/src/storage/methods/reconcileFailedTransactionInputs.js.map +1 -0
  665. package/out/src/storage/methods/reviewStatus.js +4 -4
  666. package/out/src/storage/methods/reviewStatus.js.map +1 -1
  667. package/out/src/storage/methods/reviewStatusIdb.d.ts +1 -1
  668. package/out/src/storage/methods/reviewStatusIdb.d.ts.map +1 -1
  669. package/out/src/storage/methods/reviewStatusIdb.js.map +1 -1
  670. package/out/src/storage/methods/reviewUtxoOutputs.d.ts +38 -0
  671. package/out/src/storage/methods/reviewUtxoOutputs.d.ts.map +1 -0
  672. package/out/src/storage/methods/reviewUtxoOutputs.js +197 -0
  673. package/out/src/storage/methods/reviewUtxoOutputs.js.map +1 -0
  674. package/out/src/storage/methods/validateSyncProof.d.ts +32 -0
  675. package/out/src/storage/methods/validateSyncProof.d.ts.map +1 -0
  676. package/out/src/storage/methods/validateSyncProof.js +139 -0
  677. package/out/src/storage/methods/validateSyncProof.js.map +1 -0
  678. package/out/src/storage/portable/index.d.ts.map +1 -1
  679. package/out/src/storage/portable/index.js +63 -27
  680. package/out/src/storage/portable/index.js.map +1 -1
  681. package/out/src/storage/remoting/BinaryJson.d.ts +11 -0
  682. package/out/src/storage/remoting/BinaryJson.d.ts.map +1 -1
  683. package/out/src/storage/remoting/BinaryJson.js +94 -8
  684. package/out/src/storage/remoting/BinaryJson.js.map +1 -1
  685. package/out/src/storage/remoting/KnexPaymentReplayStore.d.ts.map +1 -1
  686. package/out/src/storage/remoting/KnexPaymentReplayStore.js +1 -0
  687. package/out/src/storage/remoting/KnexPaymentReplayStore.js.map +1 -1
  688. package/out/src/storage/remoting/KnexSessionManager.d.ts +26 -2
  689. package/out/src/storage/remoting/KnexSessionManager.d.ts.map +1 -1
  690. package/out/src/storage/remoting/KnexSessionManager.js +221 -40
  691. package/out/src/storage/remoting/KnexSessionManager.js.map +1 -1
  692. package/out/src/storage/remoting/KnexSyncTransferStore.d.ts +26 -0
  693. package/out/src/storage/remoting/KnexSyncTransferStore.d.ts.map +1 -0
  694. package/out/src/storage/remoting/KnexSyncTransferStore.js +222 -0
  695. package/out/src/storage/remoting/KnexSyncTransferStore.js.map +1 -0
  696. package/out/src/storage/remoting/StorageClient.d.ts +6 -1
  697. package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
  698. package/out/src/storage/remoting/StorageClient.js +65 -8
  699. package/out/src/storage/remoting/StorageClient.js.map +1 -1
  700. package/out/src/storage/remoting/StorageClientBase.d.ts +57 -10
  701. package/out/src/storage/remoting/StorageClientBase.d.ts.map +1 -1
  702. package/out/src/storage/remoting/StorageClientBase.js +372 -9
  703. package/out/src/storage/remoting/StorageClientBase.js.map +1 -1
  704. package/out/src/storage/remoting/StorageMobile.d.ts +5 -0
  705. package/out/src/storage/remoting/StorageMobile.d.ts.map +1 -1
  706. package/out/src/storage/remoting/StorageMobile.js +13 -11
  707. package/out/src/storage/remoting/StorageMobile.js.map +1 -1
  708. package/out/src/storage/remoting/StorageServer.d.ts +27 -5
  709. package/out/src/storage/remoting/StorageServer.d.ts.map +1 -1
  710. package/out/src/storage/remoting/StorageServer.js +243 -33
  711. package/out/src/storage/remoting/StorageServer.js.map +1 -1
  712. package/out/src/storage/remoting/SyncTransfer.d.ts +29 -0
  713. package/out/src/storage/remoting/SyncTransfer.d.ts.map +1 -0
  714. package/out/src/storage/remoting/SyncTransfer.js +153 -0
  715. package/out/src/storage/remoting/SyncTransfer.js.map +1 -0
  716. package/out/src/storage/remoting/entityValidationHelpers.d.ts.map +1 -1
  717. package/out/src/storage/remoting/entityValidationHelpers.js +35 -0
  718. package/out/src/storage/remoting/entityValidationHelpers.js.map +1 -1
  719. package/out/src/storage/remoting/syncChunkBinary.d.ts +4 -0
  720. package/out/src/storage/remoting/syncChunkBinary.d.ts.map +1 -0
  721. package/out/src/storage/remoting/syncChunkBinary.js +38 -0
  722. package/out/src/storage/remoting/syncChunkBinary.js.map +1 -0
  723. package/out/src/storage/remoting/validateRpcSyncProofs.d.ts +5 -0
  724. package/out/src/storage/remoting/validateRpcSyncProofs.d.ts.map +1 -0
  725. package/out/src/storage/remoting/validateRpcSyncProofs.js +82 -0
  726. package/out/src/storage/remoting/validateRpcSyncProofs.js.map +1 -0
  727. package/out/src/storage/schema/KnexMigrations.d.ts +13 -2
  728. package/out/src/storage/schema/KnexMigrations.d.ts.map +1 -1
  729. package/out/src/storage/schema/KnexMigrations.js +334 -43
  730. package/out/src/storage/schema/KnexMigrations.js.map +1 -1
  731. package/out/src/storage/schema/StorageIdbSchema.d.ts +3 -0
  732. package/out/src/storage/schema/StorageIdbSchema.d.ts.map +1 -1
  733. package/out/src/storage/schema/entities/EntityOutput.d.ts.map +1 -1
  734. package/out/src/storage/schema/entities/EntityOutput.js +24 -4
  735. package/out/src/storage/schema/entities/EntityOutput.js.map +1 -1
  736. package/out/src/storage/schema/entities/EntityOutputBasket.d.ts.map +1 -1
  737. package/out/src/storage/schema/entities/EntityOutputBasket.js +5 -2
  738. package/out/src/storage/schema/entities/EntityOutputBasket.js.map +1 -1
  739. package/out/src/storage/schema/entities/EntityProvenTx.d.ts +4 -1
  740. package/out/src/storage/schema/entities/EntityProvenTx.d.ts.map +1 -1
  741. package/out/src/storage/schema/entities/EntityProvenTx.js +125 -41
  742. package/out/src/storage/schema/entities/EntityProvenTx.js.map +1 -1
  743. package/out/src/storage/schema/entities/EntityProvenTxReq.js +1 -1
  744. package/out/src/storage/schema/entities/EntityProvenTxReq.js.map +1 -1
  745. package/out/src/storage/schema/entities/EntitySyncState.d.ts +4 -2
  746. package/out/src/storage/schema/entities/EntitySyncState.d.ts.map +1 -1
  747. package/out/src/storage/schema/entities/EntitySyncState.js +12 -6
  748. package/out/src/storage/schema/entities/EntitySyncState.js.map +1 -1
  749. package/out/src/storage/schema/entities/EntityTransaction.d.ts +26 -0
  750. package/out/src/storage/schema/entities/EntityTransaction.d.ts.map +1 -1
  751. package/out/src/storage/schema/entities/EntityTransaction.js +221 -21
  752. package/out/src/storage/schema/entities/EntityTransaction.js.map +1 -1
  753. package/out/src/storage/schema/tables/TableCertificate.d.ts +1 -1
  754. package/out/src/storage/schema/tables/TableCertificate.d.ts.map +1 -1
  755. package/out/src/storage/schema/tables/TableCertificateField.d.ts +1 -1
  756. package/out/src/storage/schema/tables/TableCertificateField.d.ts.map +1 -1
  757. package/out/src/storage/schema/tables/TableCommission.d.ts +1 -1
  758. package/out/src/storage/schema/tables/TableCommission.d.ts.map +1 -1
  759. package/out/src/storage/schema/tables/TableMonitorEvent.d.ts +1 -1
  760. package/out/src/storage/schema/tables/TableMonitorEvent.d.ts.map +1 -1
  761. package/out/src/storage/schema/tables/TableOutput.d.ts +1 -1
  762. package/out/src/storage/schema/tables/TableOutput.d.ts.map +1 -1
  763. package/out/src/storage/schema/tables/TableOutputBasket.d.ts +1 -1
  764. package/out/src/storage/schema/tables/TableOutputBasket.d.ts.map +1 -1
  765. package/out/src/storage/schema/tables/TableOutputTag.d.ts +1 -1
  766. package/out/src/storage/schema/tables/TableOutputTag.d.ts.map +1 -1
  767. package/out/src/storage/schema/tables/TableOutputTagMap.d.ts +1 -1
  768. package/out/src/storage/schema/tables/TableOutputTagMap.d.ts.map +1 -1
  769. package/out/src/storage/schema/tables/TablePreparedBeef.interfaces.d.ts +23 -0
  770. package/out/src/storage/schema/tables/TablePreparedBeef.interfaces.d.ts.map +1 -0
  771. package/out/src/storage/schema/tables/TablePreparedBeef.interfaces.js +3 -0
  772. package/out/src/storage/schema/tables/TablePreparedBeef.interfaces.js.map +1 -0
  773. package/out/src/storage/schema/tables/TableProvenTx.d.ts +1 -1
  774. package/out/src/storage/schema/tables/TableProvenTx.d.ts.map +1 -1
  775. package/out/src/storage/schema/tables/TableProvenTxReq.d.ts +1 -1
  776. package/out/src/storage/schema/tables/TableProvenTxReq.d.ts.map +1 -1
  777. package/out/src/storage/schema/tables/TableSettings.d.ts +2 -2
  778. package/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -1
  779. package/out/src/storage/schema/tables/TableSyncState.d.ts +1 -1
  780. package/out/src/storage/schema/tables/TableSyncState.d.ts.map +1 -1
  781. package/out/src/storage/schema/tables/TableTransaction.d.ts +17 -1
  782. package/out/src/storage/schema/tables/TableTransaction.d.ts.map +1 -1
  783. package/out/src/storage/schema/tables/TableTransaction.js +14 -1
  784. package/out/src/storage/schema/tables/TableTransaction.js.map +1 -1
  785. package/out/src/storage/schema/tables/TableTxLabel.d.ts +1 -1
  786. package/out/src/storage/schema/tables/TableTxLabel.d.ts.map +1 -1
  787. package/out/src/storage/schema/tables/TableTxLabelMap.d.ts +1 -1
  788. package/out/src/storage/schema/tables/TableTxLabelMap.d.ts.map +1 -1
  789. package/out/src/storage/schema/tables/TableUser.d.ts +1 -1
  790. package/out/src/storage/schema/tables/TableUser.d.ts.map +1 -1
  791. package/out/src/storage/sync/StorageMySQLDojoReader.d.ts.map +1 -1
  792. package/out/src/storage/sync/StorageMySQLDojoReader.js +8 -7
  793. package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
  794. package/out/src/storage/sync/SyncPageBudget.d.ts +8 -0
  795. package/out/src/storage/sync/SyncPageBudget.d.ts.map +1 -0
  796. package/out/src/storage/sync/SyncPageBudget.js +24 -0
  797. package/out/src/storage/sync/SyncPageBudget.js.map +1 -0
  798. package/out/src/storage/sync/syncCheckpoint.d.ts +4 -0
  799. package/out/src/storage/sync/syncCheckpoint.d.ts.map +1 -0
  800. package/out/src/storage/sync/syncCheckpoint.js +49 -0
  801. package/out/src/storage/sync/syncCheckpoint.js.map +1 -0
  802. package/out/src/utility/Argon2idBackend.d.ts +36 -0
  803. package/out/src/utility/Argon2idBackend.d.ts.map +1 -0
  804. package/out/src/utility/Argon2idBackend.js +60 -0
  805. package/out/src/utility/Argon2idBackend.js.map +1 -0
  806. package/out/src/utility/actionBatchDigest.d.ts.map +1 -1
  807. package/out/src/utility/actionBatchDigest.js +9 -7
  808. package/out/src/utility/actionBatchDigest.js.map +1 -1
  809. package/out/src/utility/actionBatchPack.d.ts.map +1 -1
  810. package/out/src/utility/actionBatchPack.js +7 -12
  811. package/out/src/utility/actionBatchPack.js.map +1 -1
  812. package/out/src/utility/beefForTxids.d.ts +12 -3
  813. package/out/src/utility/beefForTxids.d.ts.map +1 -1
  814. package/out/src/utility/beefForTxids.js +69 -21
  815. package/out/src/utility/beefForTxids.js.map +1 -1
  816. package/out/src/utility/brc153ReferenceLabels.d.ts +16 -0
  817. package/out/src/utility/brc153ReferenceLabels.d.ts.map +1 -1
  818. package/out/src/utility/brc153ReferenceLabels.js +20 -5
  819. package/out/src/utility/brc153ReferenceLabels.js.map +1 -1
  820. package/out/src/utility/brc177NoSendExpiry.d.ts +34 -0
  821. package/out/src/utility/brc177NoSendExpiry.d.ts.map +1 -0
  822. package/out/src/utility/brc177NoSendExpiry.js +81 -0
  823. package/out/src/utility/brc177NoSendExpiry.js.map +1 -0
  824. package/out/src/utility/canonicalizeAtomicBeef.d.ts +12 -0
  825. package/out/src/utility/canonicalizeAtomicBeef.d.ts.map +1 -0
  826. package/out/src/utility/canonicalizeAtomicBeef.js +23 -0
  827. package/out/src/utility/canonicalizeAtomicBeef.js.map +1 -0
  828. package/out/src/utility/exactActionSpend.d.ts +9 -0
  829. package/out/src/utility/exactActionSpend.d.ts.map +1 -0
  830. package/out/src/utility/exactActionSpend.js +26 -0
  831. package/out/src/utility/exactActionSpend.js.map +1 -0
  832. package/out/src/utility/hashWasm.d.ts +1 -1
  833. package/out/src/utility/hashWasm.d.ts.map +1 -1
  834. package/out/src/utility/hashWasm.js +83 -1
  835. package/out/src/utility/hashWasm.js.map +1 -1
  836. package/out/src/utility/identityUtils.d.ts +44 -4
  837. package/out/src/utility/identityUtils.d.ts.map +1 -1
  838. package/out/src/utility/identityUtils.js +523 -61
  839. package/out/src/utility/identityUtils.js.map +1 -1
  840. package/out/src/utility/index.all.d.ts +2 -0
  841. package/out/src/utility/index.all.d.ts.map +1 -1
  842. package/out/src/utility/index.all.js +2 -0
  843. package/out/src/utility/index.all.js.map +1 -1
  844. package/out/src/utility/index.client.d.ts +2 -0
  845. package/out/src/utility/index.client.d.ts.map +1 -1
  846. package/out/src/utility/index.client.js +2 -0
  847. package/out/src/utility/index.client.js.map +1 -1
  848. package/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -1
  849. package/out/src/utility/parseTxScriptOffsets.js +1 -19
  850. package/out/src/utility/parseTxScriptOffsets.js.map +1 -1
  851. package/out/src/utility/tscProofToMerklePath.d.ts.map +1 -1
  852. package/out/src/utility/tscProofToMerklePath.js +35 -4
  853. package/out/src/utility/tscProofToMerklePath.js.map +1 -1
  854. package/out/src/utility/utilityHelpers.d.ts +1 -1
  855. package/out/src/utility/utilityHelpers.d.ts.map +1 -1
  856. package/out/src/utility/utilityHelpers.js +10 -7
  857. package/out/src/utility/utilityHelpers.js.map +1 -1
  858. package/out/src/utility/utilityHelpers.noBuffer.d.ts.map +1 -1
  859. package/out/src/utility/utilityHelpers.noBuffer.js +6 -6
  860. package/out/src/utility/utilityHelpers.noBuffer.js.map +1 -1
  861. package/out/src/utility/verifyOverlayOutput.d.ts +12 -0
  862. package/out/src/utility/verifyOverlayOutput.d.ts.map +1 -0
  863. package/out/src/utility/verifyOverlayOutput.js +22 -0
  864. package/out/src/utility/verifyOverlayOutput.js.map +1 -0
  865. package/out/src/utility/walletResultGuards.d.ts +14 -0
  866. package/out/src/utility/walletResultGuards.d.ts.map +1 -0
  867. package/out/src/utility/walletResultGuards.js +28 -0
  868. package/out/src/utility/walletResultGuards.js.map +1 -0
  869. package/out/src/wab-client/WABClient.d.ts +4 -17
  870. package/out/src/wab-client/WABClient.d.ts.map +1 -1
  871. package/out/src/wab-client/WABClient.js +35 -12
  872. package/out/src/wab-client/WABClient.js.map +1 -1
  873. package/out/src/wab-client/WABResponseValidation.d.ts +48 -0
  874. package/out/src/wab-client/WABResponseValidation.d.ts.map +1 -0
  875. package/out/src/wab-client/WABResponseValidation.js +321 -0
  876. package/out/src/wab-client/WABResponseValidation.js.map +1 -0
  877. package/out/src/wab-client/WABTransport.d.ts +17 -23
  878. package/out/src/wab-client/WABTransport.d.ts.map +1 -1
  879. package/out/src/wab-client/WABTransport.js +130 -142
  880. package/out/src/wab-client/WABTransport.js.map +1 -1
  881. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts +8 -0
  882. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts.map +1 -1
  883. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js +3 -2
  884. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -1
  885. package/package.json +35 -30
  886. package/docs/open-rpc/index.html +0 -46
package/README.md CHANGED
@@ -6,12 +6,152 @@
6
6
 
7
7
  A [BRC-100](https://github.com/bitcoin-sv/BRCs/blob/master/wallet/0100.md) conforming wallet implementation for the BSV blockchain, built on the [BSV SDK](https://bsv-blockchain.github.io/ts-stack/packages/sdk/). Provides persistent storage, protocol-based key derivation, transaction monitoring, chain tracking, and signing — everything needed to build wallet-powered applications on BSV.
8
8
 
9
+ ## Backup and recovery: keep both keys and wallet data
10
+
11
+ **A root key or seed alone is not a complete BRC-100 wallet backup.** Users
12
+ need recoverable key material **and** wallet records, including derivation
13
+ metadata, transactions and basketed outputs. A database copy or BRC-39 file
14
+ preserves data; it does not replace root-key recovery. Wallet-manager snapshots
15
+ can contain keys and must be protected as secrets, but are not storage backups.
16
+
17
+ Wallet builders must provide both recovery paths, explain what their product
18
+ backs up, and test restoration after device or storage-provider loss. Storage
19
+ replication helps availability but does not replace versioned, independently
20
+ accessible backups and a tested restore procedure.
21
+
22
+ - [Wallet backup and recovery](https://bsv-blockchain.github.io/ts-stack/guides/wallet-backup-recovery/) — recovery inventory, product/operator responsibilities and user guidance.
23
+ - [BRC-38/39 integration](https://bsv-blockchain.github.io/ts-stack/guides/wallet-data-portability/) — current export/import APIs, provider constraints, restore versus merge and limits.
24
+ - [Recovery drill and checklist](https://bsv-blockchain.github.io/ts-stack/guides/wallet-recovery-drill/) — clean-device recovery, negative tests and evidence template.
25
+ - [AI-agent implementation brief](https://bsv-blockchain.github.io/ts-stack/guides/wallet-recovery-agent-brief/) — source-grounded task and review guidance.
26
+
27
+ These guides cover the recovery design. The measurements below describe
28
+ specific tests and do not establish that every wallet product has complete
29
+ key-and-data disaster recovery.
30
+
31
+ ## Backup and sync: tested results
32
+
33
+ **Live E2E testing used a large wallet in the native desktop client**, covering
34
+ complete local copies, restart recovery, and repeat sync. Transfer size and oversized-record recovery were
35
+ measured separately with synthetic fixtures. The latest proof-recovery follow-up
36
+ has synthetic HTTP and read-only source-data validation; its live full-backup
37
+ retest is pending.
38
+
39
+ | Test | Verified result |
40
+ | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
+ | Full native desktop restores | **Two complete copies; identical entity counts.** Second run: **12m 50s vs 16m 30s (22.3% less time)**. |
42
+ | Retained local backup | Completed after cancellation, a connectivity pause, and restart recovery; all **12 entity-store counts preserved** on another restart. |
43
+ | Local reads and repeat sync | Transaction/output reads passed; sampled transaction bytes matched; repeat sync made **0 inserts, 0 updates**. |
44
+ | Transfer size | **62.7% smaller** encoded byte payload in a synthetic fixture. |
45
+ | Oversized single record | **7 MiB restored in real browser IndexedDB**, matching SHA-256; interrupted upload resumed, corrupt download rejected, repeat sync unchanged. |
46
+ | Automated integration | Authenticated HTTP backup/restore, interrupted pages, lost acknowledgements, binary byte round-trips, user isolation, and legacy compatibility covered. |
47
+
48
+ Timing compares successive candidates, not a controlled comparison against upstream
49
+ `main`. Byte verification was sampled, not database-wide. See
50
+ [test methods and limits](#sync-performance-and-recovery) for details.
51
+
52
+ ### SQLite migration recovery
53
+
54
+ SQLite migration handling introduced in 2.13.2 runs migration DDL and the migration
55
+ journal update transactionally. Foreign-key enforcement is disabled before the
56
+ migration transaction for table rebuilds and restored after success or failure.
57
+ Failed migrations can be retried after reopening the database without partial
58
+ schema objects from that attempt. MySQL's existing transaction configuration
59
+ is unchanged.
60
+
61
+ This prevents future partial migrations. It does not automatically repair a
62
+ store already left with unjournaled schema objects by an older version. Preserve
63
+ the database and verified backups and reconcile the exact schema and migration
64
+ journal before recovery; do not delete journal rows or wallet data blindly.
65
+
66
+ ### Postgres storage
67
+
68
+ `StorageKnex` runs on Postgres through the knex `pg` client. Install `pg` in the
69
+ application. Settings report `dbtype: 'Postgres'`; remote clients older than
70
+ this release reject that value.
71
+
72
+ node-postgres returns int8 (bigint columns, counts) as strings by default.
73
+ `StorageKnex` sets a parser on each connection its knex acquires so these come
74
+ back as numbers, as with mysql2 and better-sqlite3. The process-wide `pg.types`
75
+ defaults are not changed. `Setup.createPostgresKnex(connectionJson, database)`
76
+ creates a knex with the same parser installed.
77
+
78
+ Postgres migrations run one at a time. Migrations that add indexes to existing
79
+ tables run outside a transaction and use `CREATE INDEX CONCURRENTLY`, so writes
80
+ continue while an index is built. `MonitorDaemon` takes a `postgresConnection`
81
+ (JSON node-postgres config). `ChaintracksStorageKnex` does not support Postgres.
82
+
83
+ Set `RUNPOSTGRES=1` and `POSTGRES_CONNECTION` (JSON node-postgres connection
84
+ config) to include Postgres in the Knex test suites. Test databases are created
85
+ on that server as needed.
86
+
9
87
  ## Overview
10
88
 
11
89
  The Wallet Toolbox is the reference implementation of the BRC-100 wallet interface. It connects the BSV SDK's cryptographic primitives to real storage backends, network services, and signing flows so that application developers don't have to wire these layers together themselves.
12
90
 
13
91
  BSV Desktop and BSV Browser are the BSV Association reference wallet applications built around this interface. Vendor distributions, including Babbage's Metanet Desktop / Metanet Explorer and Hudos Browser, can implement the same BRC-100 interface against their own product packaging and service defaults.
14
92
 
93
+ ### Local contact trust
94
+
95
+ Applications may install a `ContactSource` on `WalletArgs` to resolve identities from the user's
96
+ local contacts before querying the certificate overlay. Installing that source is an explicit
97
+ personal trust-policy decision: a saved contact is locally authoritative in the same sense as a
98
+ self-signed certificate or locally installed trust anchor. Its default infinite trust means “the
99
+ user's independent validation overrides third-party trust thresholds,” not “an external certifier
100
+ proved this identity.”
101
+
102
+ The authority is scoped to the wallet user who saved the identity-key association and to that
103
+ wallet's local labels and metadata. Authentication or encryption of the contact store proves that
104
+ the wallet retained the user's decision; it does not independently prove the real-world identity,
105
+ and the infinite-trust value must not be exported as a universal claim for other users.
106
+
107
+ Contact results retain the discovery result shape for compatibility, but default to type `contact`
108
+ and carry empty serial, signature, and revocation-outpoint fields. Consumers must not present those
109
+ fields as third-party certification. Connect `ContactSource` only to local, authenticated storage
110
+ whose records the user has deliberately saved or validated; never populate it directly from
111
+ unauthenticated network data. Pass `forceRefresh: true` to identity discovery when the application
112
+ specifically needs to bypass local contact authority and query the overlay.
113
+
114
+ ### Fiat exchange-rate trust boundary
115
+
116
+ Wallet Toolbox treats exchange-rate providers and custom service adapters as
117
+ untrusted financial inputs. Rates must use the supported currency codes, be
118
+ finite, positive, and bounded, use USD base with an exact USD rate of 1, and
119
+ carry a valid timestamp no more than five minutes in the future. Malformed or
120
+ missing requested rates are never merged into the wallet cache.
121
+
122
+ The default provider transport accepts only credential-free public HTTPS,
123
+ pins validated DNS answers in Node.js, rejects redirects and private/special
124
+ addresses, and enforces a 15-second deadline plus a 256 KiB response limit.
125
+ `fiatExchangeRatesFetch` is an explicitly trusted escape hatch for tests or
126
+ controlled local development; production applications should retain the
127
+ default transport.
128
+
129
+ ### ARC and Arcade provider configuration
130
+
131
+ ARC-compatible broadcaster configuration is snapshotted when the provider is
132
+ constructed. API keys, callback tokens, deployment IDs, callback URLs, and
133
+ custom headers therefore keep the exact reviewed values even if the caller
134
+ later mutates its configuration object. Custom headers must be a plain
135
+ accessor-free own-data map with valid HTTP token names and bounded string
136
+ values; inherited fields and getters are rejected without being used.
137
+
138
+ The provider URL and an injected `httpClient` remain explicit application or
139
+ operator trust decisions. Do not derive them from transaction, peer, or other
140
+ untrusted input. Reconstruct the provider to rotate credentials or headers;
141
+ mutating the original configuration object does not change a live provider.
142
+
143
+ ### Importing legacy P2PKH outputs
144
+
145
+ `Setup.fundWalletFromP2PKHOutpoints` and its client equivalent validate each
146
+ canonical outpoint, fetched transaction ID, P2PKH ownership script, atomic
147
+ signing target, and final wallet transaction before reporting success. Provider
148
+ downloads are deadline-bound, redirect-free, and size-bounded; recursive BEEF
149
+ construction also limits depth, graph size, aggregate source bytes, and the
150
+ number of requested outpoints. If an application already has authenticated
151
+ BEEF, pass it explicitly to avoid relying on public transaction-data services.
152
+ Do not accept a wallet result that omits the transaction bytes needed for this
153
+ binding.
154
+
15
155
  ### What's Inside
16
156
 
17
157
  | Module | Description |
@@ -26,19 +166,352 @@ BSV Desktop and BSV Browser are the BSV Association reference wallet application
26
166
  | **MockChain** | In-memory blockchain for testing — mock mining, UTXO tracking, and merkle proof generation without a network |
27
167
  | **Entropy** | `EntropyCollector` gathers mouse/touch entropy for high-quality randomness in browser environments |
28
168
 
169
+ Durable permission grants queue their internal token transaction for delayed
170
+ broadcast, so permission approval does not inherit network-broadcast latency.
171
+ The funding planner prefers settled change and uses queued permission ancestry
172
+ only as a last resort, keeping the application path fast without hiding funds.
173
+
174
+ Permission-token basket membership and tags are discovery hints, not authority.
175
+ Before using a stored token, the manager binds it to its exact BEEF outpoint and
176
+ one-satoshi output, verifies the canonical PushDrop field signature and locally
177
+ derived locking key, strictly decodes every signed grant field, and rechecks the
178
+ requested filters against that signed content. Unsigned, foreign-wallet,
179
+ substituted, malformed, or mislabeled rows grant no permission. Token issuance,
180
+ renewal, coalescing, and revocation also bind every requested input and output to
181
+ the final wallet transaction; a partial-action reference never authorizes a
182
+ different transaction. When the underlying Wallet Toolbox signer adds a storage
183
+ service charge, its exact wallet-funded amount is carried locally into the
184
+ spending check so the charge is visible and counted in authorization. This
185
+ metadata is deliberately not a BRC-100 wire extension. Since 2.14.1, it lives in a
186
+ shared local WeakMap rather than on the public result object, preserving exact
187
+ accounting across separately loaded bundles while allowing strict binary result
188
+ validation. Upgrade the wallet host and permission manager together. If an older
189
+ host reports a result-serialization failure, check its transaction history before
190
+ retrying: the wallet may already have created or completed the action.
191
+
192
+ Permission modules may transform calls with `onRequest` and `onResponse`, or
193
+ own a P-scheme's semantics with the optional `handleRequest(request, next)`
194
+ hook. A semantic handler can return the normal BRC-100 result directly; if it
195
+ needs the underlying wallet operation, `next` is guarded so it can be invoked
196
+ at most once. Existing transformation-only modules remain compatible. The
197
+ standalone `@bsv/ecpm-permission-module` demonstrates this extension by
198
+ implementing `p ecpm` point multiplication through `getPublicKey`, without a
199
+ new BRC-100 method or wire message.
200
+
201
+ Immediate actions prefer completed, then unproven, then sending change. A
202
+ pathological settled plan is compared with pending alternatives by exact
203
+ serialized BEEF plus transaction bytes; queued ancestry is used only when it is
204
+ necessary or smaller. Pending change is never withheld, so queued
205
+ work cannot strand the balance behind a large reserved input.
206
+
207
+ `sendWith` transaction IDs form one atomic broadcast set: the wallet never
208
+ silently slices that set into separately submitted groups. A set is limited to
209
+ 1,000 unique transactions, including a transaction created or signed by the
210
+ current call. Oversized or noncanonical requests are rejected before storage
211
+ commit. The background monitor bounds both discovery and re-expansion of older
212
+ queued batches; an oversized legacy batch is skipped as a whole and reported
213
+ for operator recovery rather than partially broadcast.
214
+
215
+ `Setup.makeEnv()` returns a development `.env` template containing newly
216
+ generated private keys but never prints it. Callers must deliberately write the
217
+ returned text to a protected local file and must not route it through ordinary
218
+ application, CI, or shared terminal logs.
219
+
29
220
  ### Packages
30
221
 
31
222
  The toolbox publishes three npm packages from this repo:
32
223
 
33
224
  - **[`@bsv/wallet-toolbox`](https://www.npmjs.com/package/@bsv/wallet-toolbox)** — Full package with all storage backends (SQLite, MySQL, IndexedDB, remote)
34
225
  - **[`@bsv/wallet-toolbox-client`](https://www.npmjs.com/package/@bsv/wallet-toolbox-client)** — Browser build; excludes Node-only backends (Knex/SQLite/MySQL)
35
- - **[`@bsv/wallet-toolbox-mobile`](https://www.npmjs.com/package/@bsv/wallet-toolbox-mobile)** — Mobile build; IndexedDB and remote storage only
226
+ - **[`@bsv/wallet-toolbox-mobile`](https://www.npmjs.com/package/@bsv/wallet-toolbox-mobile)** — Mobile build; remote wallet storage plus portable local ChainTracks components and adapter contracts
227
+
228
+ ### Sync performance and recovery
229
+
230
+ Sync pages start at 64 records and adapt after successful commits toward a
231
+ five-second page budget. Proof-bearing pages cap growth at 128 records; cheap
232
+ metadata pages can grow to 1,000, while provider byte/item ceilings still apply.
233
+ The server checks at most eight proofs concurrently and waits for all started
234
+ checks to settle on failure before rejecting the page. Every proof still passes
235
+ transaction, Merkle path, active-root and active-header validation before a merge.
236
+ An authenticated HTTP regression covers 250 synthetic proofs and confirms that
237
+ an invalid follow-up page cannot change the committed checkpoint. Stale proofs
238
+ can be reconciled through another provider, but only after the replacement passes
239
+ the same transaction, membership and active-chain checks. Transaction bytes,
240
+ wallet references and source cursor timestamps are preserved. Corrected destination
241
+ proofs receive a fresh local timestamp for incremental replication. Unverifiable replacements
242
+ stop the page with a recovery message; no record is silently skipped.
243
+
244
+ A read-only deployment-host sample of 250 proofs took 42.6 seconds with sequential
245
+ validation and 5.58 seconds with bounded concurrency, with the same 250 root and
246
+ 250 header checks. This measures validation only, not full-copy throughput.
247
+ Timeouts remain possible during dependency outages; writes are never blindly
248
+ replayed, and resumed sync rereads durable destination progress.
249
+
250
+ The adaptive page controller and optional validated-proof lookup add a small
251
+ client bundle cost. The [artifact measurements and limits](./docs/sync-transfer.md#artifact-cost-requiring-review)
252
+ include the combined upstream security fixes. These are explicit feature costs;
253
+ the RPC validation coordinator remains excluded from browser/mobile bundles.
254
+
255
+ The transfer extension is an **unpublished 2.13.0 candidate**. Published 2.12.0
256
+ has no record-transfer methods. Check exact build provenance and authenticated
257
+ runtime capabilities, not a version label alone. An oversized record on a legacy
258
+ source cannot be rescued by upgrading only its destination; upgrade the source
259
+ before retrying. Records exceeding the negotiated 64 MiB frame limit fail safely
260
+ without being skipped or advancing their checkpoint.
261
+
262
+ Large individual records can use the negotiated
263
+ [bounded transfer protocol](./docs/sync-transfer.md), with durable staging,
264
+ integrity verification and checkpoint replay protection. Its authenticated
265
+ HTTP/SQLite/IndexedDB regression exercises a 7 MiB binary record, an interrupted
266
+ upload across client/server restart, a lost part acknowledgement, corrupted
267
+ download rejection and a verified restore followed by an unchanged resync.
268
+ The current frame limit is 64 MiB; legacy providers must be upgraded to use it.
269
+ It also passes with a one-second delay on every authenticated transport send;
270
+ that models added latency, not a measured bandwidth limit or a real mobile network.
271
+ These synthetic regressions are separate from the large-wallet timing evidence above.
272
+
273
+ Wallet storage replication applies each received page and its durable sync
274
+ checkpoint in one provider transaction. IndexedDB and Knex therefore avoid
275
+ per-record transaction startup, and a failed page rolls back without advancing
276
+ the checkpoint. Sources fill each bounded page with adaptive, size-aware reads,
277
+ and Knex storage adds user-scoped proof lookup indexes. Clients may set
278
+ `includeTotals` on a sync-chunk request to receive optional source record totals
279
+ for exact progress reporting. Older providers ignore the hint, and totals are
280
+ not counted unless requested. New clients also send the writer-local sync-state
281
+ identifier selected during provider registration. New providers use it to
282
+ disambiguate legacy duplicate checkpoints, while either side remains compatible
283
+ with older protocol peers. When a provider rejects a sync page because its
284
+ serialized RPC response exceeds the service ceiling, remote clients retry the
285
+ read-only request with a smaller chunk budget and remember the working limit
286
+ for the rest of the session.
287
+
288
+ Knex storage keeps one sync state per user and source storage identity, enforced
289
+ by a unique index. Concurrent registrations of the same source return the row the
290
+ first caller inserted.
291
+
292
+ Output synchronization requires a local mapping for every non-null source basket
293
+ ID. A missing mapping rejects the page so its transaction and checkpoint can roll
294
+ back; retry after transferring the missing basket. Newer source updates apply
295
+ basket changes, including explicit removal. Same-time or older updates preserve
296
+ local relinquishment. Previously unbasketed records require a verified newer
297
+ source update to repair; no heuristic rewrites existing wallet state.
298
+
299
+ `StorageKnex.getRawTxOfKnownValidTransaction()` can read a cold store while the
300
+ caller holds a transaction, including SQLite's single-connection pool. Settings
301
+ are read through that transaction without entering the shared cache or starting
302
+ prepared-BEEF background work; ordinary `makeAvailable()` remains the explicit
303
+ store-wide startup operation. An absent optional `inputBEEF` does not prevent
304
+ returning stored raw transaction bytes.
305
+
306
+ IndexedDB schema version 6 adds a non-unique transaction-ID/user index. Sync
307
+ identity lookups, commissions, and relation maps use selective indexes or exact
308
+ keys instead of scanning the growing wallet for each row. Proof batch checks
309
+ resolve requested transaction IDs through the existing index, preserving primary-key
310
+ ordering, pagination, and proof-validation rules. Existing bytes and
311
+ legacy duplicate transaction IDs are preserved. Databases upgrade automatically;
312
+ older clients that open schema version 5 cannot reopen an upgraded database, so
313
+ keep a compatible client when retaining a local backup.
314
+
315
+ Updated servers advertise `syncCheckpointVersion: 1` in runtime settings.
316
+ Compatible clients fetch a compact checkpoint once, then use the checkpoint
317
+ returned by each committed page. The complete ID mapping remains durable on
318
+ the writer and is no longer downloaded before every page. Older providers use
319
+ the existing full-state path; authentication, gateway, and malformed checkpoint
320
+ errors remain failures rather than compatibility fallbacks. A retry starts
321
+ from the writer's durable checkpoint. `includeNextCheckpoint` is optional, and
322
+ legacy requests retain their existing response shape.
323
+
324
+ When a reader negotiates binary JSON, large schema-defined sync byte fields
325
+ are encoded as base64 instead of decimal number arrays. Legacy readers retain
326
+ the existing arrays; unrelated numeric fields are never reinterpreted as bytes.
327
+ Clients with `binaryRequests: true` use the same compact representation for
328
+ sync uploads after the server negotiates binary request support. The default
329
+ request setting is unchanged.
330
+ Binary JSON parsing preserves the existing marker and escaping rules while
331
+ avoiding a JavaScript reviver callback for every scalar byte. The SDK also
332
+ prevents certificate work or session recovery from dispatching another request
333
+ after the caller's authentication deadline has expired. This does not cancel a
334
+ write already received by a server or automatically replay failed writes.
335
+
336
+ Run the authenticated candidate-provider sync benchmark with:
337
+
338
+ ```sh
339
+ pnpm bench:storage-sync
340
+ ```
341
+
342
+ Set `WALLET_TOOLBOX_BENCH_MYSQL=true`, `MYSQL_CONNECTION`, and optionally
343
+ `WALLET_TOOLBOX_BENCH_MYSQL_DATABASE` to exercise the same fixture through a
344
+ MySQL-backed provider. The benchmark reports HTTP p50/p95 latency and the
345
+ source-query limits used to fill a 250-record page; it is observational rather
346
+ than a cross-machine latency SLA. It also compares the old reviver with the
347
+ current parser on identical synthetic data and measures checkpoint size. On
348
+ one local Node 24 run, a 1 MiB numeric-array fixture (3.74 MB of JSON) measured
349
+ 501.2 ms versus 10.1 ms median parsing time across nine alternating samples.
350
+ A synthetic 50,000-entry mapping occupied 678,850 bytes; its compact checkpoint
351
+ occupied 432 bytes. These are CPU and payload measurements, not a claim of the
352
+ same end-to-end network speedup. Encoding the synthetic byte field through
353
+ the negotiated sync codec reduced its JSON payload from 3,743,771 to 1,398,163
354
+ bytes (62.7%).
355
+
356
+ Retained integration tests cover authenticated HTTP backup and complete restore
357
+ into a fresh IndexedDB store, multipage progression, no-change resync,
358
+ interruption/resume, user isolation, malformed checkpoints, and legacy-provider
359
+ fallback. Live deployment results must be reported separately with the tested
360
+ revision and scope; a partial page sample is not a full restore verification.
361
+
362
+ A native desktop integration run against candidate runtime
363
+ `a88d18abf14b75a3227016bfd947d5a08b3ee236` completed a full remote-to-local
364
+ copy in 769.5 seconds, compared with 990.3 seconds for the preceding candidate
365
+ run with identical entity counts. Remote reads took 619.2 seconds, local writes
366
+ 146.0 seconds, and measurement 4.1 seconds. Proof-page writes fell from 75.7 to
367
+ 9.8 seconds after indexed preflight lookup. These are sequential observations,
368
+ not a controlled full-wallet comparison against upstream main. The all-state
369
+ 100 ms timer probe reported p95 delay of 908 ms; foreground focus was not recorded,
370
+ so this does not establish foreground UI latency. Separate 90-second native
371
+ foreground probes during a retained backup measured p95 delays of 5 ms for
372
+ transactions, 8 ms for outputs, 10 ms for heavier output pages, and 5 ms for
373
+ proof requests. Their maxima were 60, 51, 298, and 62 ms respectively; these
374
+ samples are not a whole-copy latency guarantee. The retained-backup test also
375
+ verified cancellation at a page boundary and automatic checkpoint recovery after
376
+ a full native app restart. Development testing required refreshing Vite's cached
377
+ linked dependencies to load the candidate schema consistently. See
378
+ [PR486](https://github.com/bsv-blockchain/ts-stack/pull/486) for final integration
379
+ completion and release evidence. Personal deployment and wallet details are
380
+ retained privately, outside this repository.
381
+
382
+ `listOutputs` reports `totalOutputs` as the full matching result count on every
383
+ page for both Knex and IndexedDB storage, including short final pages and pages
384
+ requested at or past the end of the result set.
385
+
386
+ ### UMP account continuity and phone changes
387
+
388
+ Argon2id password derivation uses a proven-ready host backend when one is
389
+ registered with `registerArgon2idBackend`. This lets React Native applications
390
+ perform the memory-hard operation asynchronously in native code. Browser and
391
+ Node runtimes prefer `hash-wasm`; when WebAssembly is unavailable, Wallet
392
+ Toolbox falls back to an asynchronously yielding JavaScript implementation
393
+ with the same parameters and output. Existing UMP v3 tokens remain
394
+ interoperable and do not need migration; users do not need to enable a device
395
+ or browser setting. A selected host backend is authoritative, so a derivation
396
+ error or malformed output is surfaced instead of silently changing
397
+ implementations. The existing `hash-wasm`-compatible utility export retains its
398
+ full input and output contract; requests with `secret`, non-binary output, or
399
+ non-`Uint8Array` input remain on `hash-wasm` rather than being reinterpreted by
400
+ a backend with narrower capabilities. Registration and unregistration are also
401
+ exported from the mobile and client package roots. Concurrent cold calls share
402
+ one background preload attempt; later calls can retry after it settles. Hosts
403
+ must make preload/readiness checks reentrant and cache permanent failures or
404
+ apply retry backoff. Unrelated `hash-wasm` errors propagate even when the
405
+ WebAssembly global is absent. Native and JavaScript results both pass the same
406
+ byte-type and exact-length validation.
407
+
408
+ `WalletAuthenticationManager` accepts an optional `umpTokenOutpoint` in the
409
+ backward-compatible WAB authentication response. Normal verified lookup and
410
+ lineage resolution always run first. The WAB pin is considered only when those
411
+ checks leave multiple valid UMP tokens, and only when the pinned outpoint is
412
+ present in the verified candidates. A pin cannot introduce an outpoint that the
413
+ wallet did not independently retrieve and validate.
414
+
415
+ UMP renewal consumes only the exact canonical predecessor returned for its
416
+ outpoint. Its signed fields, presentation/recovery hashes, and locally derived
417
+ admin-token locking key are verified before the old token is signed. The manager
418
+ locates the predecessor at its actual input index and accepts the completed
419
+ action only when it preserves every authorized input and output, contains one
420
+ exact one-satoshi replacement token, and reports the transaction's real ID.
421
+
422
+ WAB faucet funding is subject to the same action-completion binding. The faucet
423
+ response must contain the exact declared Atomic BEEF target and output zero must
424
+ commit to the supplied nonzero R-puzzle scalar. The manager signs that outpoint
425
+ at its actual wallet input index and sends the fee-adjusted balance only to an
426
+ explicit BRC-29 output derived for the authenticated wallet. That output's exact
427
+ script and bounded amount are authorized before signing; an unrequested wallet
428
+ output cannot consume the faucet input. The signed action is staged locally,
429
+ labeled, and recorded in a recovery basket before broadcast. A retry recovers
430
+ and internalizes that exact transaction, or recognizes its already-internalized
431
+ managed output, instead of authorizing a second destination. Missing, reordered,
432
+ substituted, ambiguous, or result-only transactions fail closed.
433
+
434
+ New WAB registrations are interruption-safe across the off-chain/on-chain
435
+ boundary. A WAB that advertises `registrationStatus: "pending"` lets a verified
436
+ retry reuse the stored presentation key when a clean UMP lookup confirms that
437
+ publication has not happened. After publishing the UMP token, the manager
438
+ finalizes WAB idempotently. A lost finalization response is non-fatal: the next
439
+ verified login finds the published token and repairs the pending state. Missing
440
+ or invalid lifecycle metadata remains fail-closed for established accounts, and
441
+ older WAB servers and clients retain their existing wire behavior.
442
+
443
+ Authenticated applications can verify a phone number and roll the presentation
444
+ key, including when the user enters the same phone number:
445
+
446
+ ```ts
447
+ await manager.startPhoneNumberChange('+12065550100')
448
+ await manager.completePhoneNumberChange(code)
449
+ await platformKeyStore.storeSecret('wallet-snapshot', manager.saveSnapshot())
450
+ ```
451
+
452
+ The completion call first stages the verified phone association and new key in
453
+ WAB while retaining the current presentation key, then publishes the UMP update
454
+ that consumes the current token, and finally promotes the staged WAB key. A
455
+ transient publish or finalization failure can be retried without duplicating
456
+ completed work. If the app restarts between phases, a later verified login
457
+ receives both current and pending keys and selects the one backed by the
458
+ verified UMP token before idempotently finalizing. Repeating phone verification
459
+ also resumes an unpublished staged change without committing another key.
460
+ Persist the snapshot immediately after success. Deploy the compatible overlay
461
+ topic and WAB schema/routes before enabling this UI.
462
+
463
+ ### Snapshot security
464
+
465
+ `CWIStyleWalletManager` and `SimpleWalletManager` snapshots contain wallet root
466
+ key material and intentionally embed the key needed to restore that material.
467
+ Encryption protects their internal representation, but it does not make the
468
+ snapshot safe to disclose: **access to a snapshot is access to the wallet**.
469
+ Store the complete snapshot as a secret in an OS Keychain, hardware-backed
470
+ keystore, or comparably trusted storage. Do not put snapshots in ordinary
471
+ localStorage/AsyncStorage, logs, analytics, crash reports, unprotected backups,
472
+ clipboard data, or cloud sync. If a snapshot may have escaped trusted storage,
473
+ treat the wallet credentials as compromised and rotate them; deleting one copy
474
+ does not revoke other copies.
475
+
476
+ Remote `StorageClient` and credential-bearing Arcade SSE endpoints require
477
+ HTTPS. Plain HTTP is accepted only for explicit loopback hosts during local
478
+ development. Arcade SSE dependency debug logging remains disabled because its
479
+ request URL and headers carry wallet callback credentials.
480
+
481
+ Remote storage responses must also complete BRC-103 mutual authentication;
482
+ ordinary HTTP fallback responses are rejected. Without an explicit
483
+ `serverIdentityKey`, the first authenticated server identity reached through
484
+ the configured HTTPS endpoint is authoritative for that client instance and
485
+ cannot change during its lifetime. Applications that independently provision
486
+ or validate the server key should pass it as `serverIdentityKey` to pin the
487
+ expected peer from the first response. In either mode, the
488
+ `storageIdentityKey` returned by the authenticated `makeAvailable()` response
489
+ is authoritative for that client instance. It may be distinct from the server
490
+ transport identity; applications that independently provision it can pin it
491
+ with the separate `storageIdentityKey` option. JSON-RPC responses are accepted
492
+ only when their version and request ID match and they contain exactly one of
493
+ `result` or `error`.
494
+
495
+ Certificate signatures fail closed at every wallet trust boundary. Direct and
496
+ issuer-mediated acquisition require an affirmative certifier-signature result
497
+ before storage, and identity discovery verifies each untrusted overlay
498
+ certificate before decryption or trust scoring.
499
+
500
+ BRC-100 originators may include a numeric port for compatibility, including
501
+ local-development ports. Permission and administrator authority is deliberately
502
+ scoped to the normalized lowercase hostname: all ports on one hostname are the
503
+ same originator. Existing authenticated permission tokens that recorded a port
504
+ are discovered through a bounded compatibility lookup and compared by hostname.
36
505
 
37
506
  ### ChainTracks sources and networks
38
507
 
39
- Wallet services do not require a WhatsOnChain key for ChainTracks. Mainnet,
40
- testnet, and TerraTestNet use the public Arcade/go-chaintracks v2 HTTP and SSE
41
- surfaces by default. Bulk batches still pass through local serialization, hash,
508
+ Wallet services do not require a WhatsOnChain key for ChainTracks. Node
509
+ runtimes on mainnet, testnet, and TerraTestNet use the public
510
+ Arcade/go-chaintracks v2 HTTP and SSE surfaces by default. Browser and webview
511
+ runtimes on mainnet/testnet temporarily select the legacy CORS-enabled service
512
+ until the v2 edge serves CORS and OPTIONS; `Services.getHeight` also falls back
513
+ to WhatsOnChain on those networks if ChainTracks is unavailable. Bulk batches
514
+ still pass through local serialization, hash,
42
515
  continuity, and genesis checks; providers are tried in priority order; and a
43
516
  synchronized tracker can continue serving its last-good checked data during a
44
517
  provider outage. WhatsOnChain remains a mainnet/testnet fallback and anonymous
@@ -53,14 +526,270 @@ go-chaintracks client; existing legacy v1 URLs and explicit clients remain
53
526
  compatible. Browser and mobile distributions expose the same fetch/SSE client
54
527
  without Node `Buffer` or filesystem dependencies.
55
528
 
56
- Arcade is the browser-safe HTTPS/SSE gateway for Teranode-backed header data.
57
- Direct Teranode P2P is not included in browser/mobile artifacts.
529
+ The configured ChainTracks endpoint remains the authority for the selected
530
+ chain view. Its transport bytes are not trusted blindly: JSON and binary reads
531
+ remain under one deadline and fixed byte ceilings, redirects are rejected, SSE
532
+ events have byte and idle-time limits, and every returned header is canonical,
533
+ proof-of-work-valid, and bound to the requested network, height, or hash before
534
+ use. Binary batches must be exact 80-byte linked sequences. The additive
535
+ `GoChaintracksServiceClientOptions` limits can be lowered for constrained hosts.
536
+ Live metadata is accepted only as a complete record with positive local
537
+ identities. Reorganization deactivation lists are bounded by their declared
538
+ depth, start at the old tip, contain no duplicates, and form one descending
539
+ linked chain before wallet monitor callbacks receive them. Remote diagnostic
540
+ text is reduced to bounded single-line output. The monitor repeats these checks
541
+ at its own trust boundary for custom event adapters, requires every configured
542
+ chain source to match the wallet network, and retains at most 4,096 unique
543
+ deactivated headers by default. `MonitorOptions.maxQueuedDeactivatedHeaders`
544
+ can lower that ceiling. Prepared-proof invalidations are coalesced and drained
545
+ during teardown; partial event subscriptions and rejected application
546
+ callbacks are contained and reported through bounded monitor events.
547
+ The legacy `BHServiceClient` applies the same endpoint, whole-body deadline,
548
+ byte, range, hash, linkage, and proof-of-work checks. Its historical public
549
+ `cache` property remains for source compatibility but is diagnostic only:
550
+ neither callers nor old or rejected roots can make it authoritative, and every
551
+ Merkle-root verdict resolves the current canonical header again so
552
+ reorganizations remain visible.
553
+ Local ChainTracks instances also validate and copy submitted headers, ignore
554
+ duplicate pending submissions, and retain at most 4,096 by default; the live
555
+ SSE adapter applies the same default queue ceiling. Construction rejects
556
+ unsupported networks, unsafe recursion/queue limits, and malformed ingestor
557
+ collections. Library logging is silent by default; applications that need
558
+ operational output must provide the existing optional `logging` callback.
559
+ Startup methods await initialization and surface failures; a failed attempt can
560
+ be retried, while `destroy()` drains sources and releases storage even if the
561
+ instance never became available. Header and reorganization subscriptions are
562
+ bounded, deleted on unsubscribe, and receive isolated snapshots so one listener
563
+ cannot alter another listener's event.
564
+
565
+ Local persistence treats both stored metadata and adapter calls as integrity
566
+ boundaries. Memory-backed trackers are instance-isolated; IndexedDB and Knex
567
+ require one active tip and one active header per height, reject nonconsecutive
568
+ parent links, bound ancestor walks, and fail closed on malformed state. Knex
569
+ serializes tip mutation with an internal transaction lock row. Run every
570
+ ChainTracks Knex migration before serving traffic. On MySQL, the migration
571
+ changes hex identifiers to `VARCHAR(64)` and cached header bytes to `LONGBLOB`;
572
+ because the former `VARBINARY(32)` representation could irreversibly truncate
573
+ live identifiers, the derived live-header cache is cleared and rebuilt from
574
+ authenticated bulk data during that migration.
575
+
576
+ To downgrade to code that predates the repair migration, first stop every
577
+ ChainTracks writer and take a verified database backup together with the
578
+ authenticated bulk-header data needed to rebuild the live cache. Using the
579
+ current `ChaintracksKnexMigrations` source, run a targeted `knex.migrate.down`
580
+ for only
581
+ `2026-09-17-001 repair MySQL live-header encodings and bulk blob`. Its `down`
582
+ is intentionally a schema no-op: it removes that migration's ledger entry but
583
+ must leave the repaired `VARCHAR(64)` identifier columns, `LONGBLOB` bulk data,
584
+ the `chaintracks_state` lock row, and authenticated bulk files intact. Validate
585
+ that retained schema and data against the older code in a non-production copy
586
+ before starting it. Never roll down the initial migration, recreate the tables,
587
+ or convert the identifiers back to truncating `VARBINARY(32)` columns.
588
+
589
+ Bulk-file additions and extensions reach durable storage before becoming
590
+ visible in memory. Reconciliation and any replacement spanning multiple files
591
+ commit atomically in the built-in Knex and IndexedDB adapters, preserve stored
592
+ bytes omitted from an update, and restore the prior manager state on failure.
593
+ Custom `ChaintracksStorageBulkFileApi` implementations remain source compatible,
594
+ but must implement the additive `replaceBulkFiles` method before the manager
595
+ will perform a multi-file replacement; this fail-closed rule prevents a restart
596
+ from observing gaps or overlapping stale rows.
597
+
598
+ WhatsOnChain is authoritative only when an application deliberately enables it
599
+ as a fallback chain source. URLs returned by its resource manifest are not
600
+ local/operator configuration: they are treated as untrusted locators and must
601
+ remain credential-free public HTTPS. Node downloads resolve, approve, and pin a
602
+ public address into the TLS connection; browser downloads retain HTTPS,
603
+ redirect, CORS, deadline, and byte controls. Resource manifests, recent-header
604
+ JSON, binary files, and legacy WebSocket frames are bounded and strictly
605
+ validated. WebSocket history is admitted in ordered chunks, live queues are
606
+ capped, and every candidate header is canonical and proof-of-work-valid before
607
+ its declared target can affect chain-work selection.
608
+
609
+ Browser, mobile, and Node applications can instead make a persisted local
610
+ ChainTracks instance their primary SDK `ChainTracker`. Immutable checkpoint
611
+ assets are read through `BulkFileDataCacheApi` before any network request;
612
+ downloaded objects are length-, SHA-256-, linkage-, chain-work-, genesis-, and
613
+ proof-of-work-validated before use. Stale present-height reads return the
614
+ last-good value immediately while one coalesced refresh runs in the background.
615
+ Node services can inject `NodeBulkFileDataValidator` to transfer complete-object
616
+ verification through a bounded worker pool; browser and mobile builds retain
617
+ the portable `InlineBulkFileDataValidator`. Filesystem deployments can combine
618
+ the content-addressed, quarantining `BulkFileDataCacheFs` with
619
+ `DurableFileBulkFileDownloadBudget`, which flushes a conservative reservation
620
+ before every physical attempt, serializes replicas through the shared state
621
+ file, and preserves the allowance across restarts. A crash-abandoned
622
+ `<stateFile>.lock` is deliberately not reclaimed automatically: after proving
623
+ that no writer is active, an operator must remove that narrow lock directory or
624
+ choose a fresh ledger path. Cache files are read only up to their advertised
625
+ size plus one rejection byte and writes must match the advertised SHA-256.
626
+ Cache replacement, promotion, and quarantine are serialized through a
627
+ per-object `<digest>.headers.lock` directory with the same fail-closed,
628
+ operator-confirmed abandoned-lock procedure. Callers may release or reuse their
629
+ input buffers immediately because the cache snapshots identity metadata and
630
+ bytes before waiting for that lock.
631
+ `LocalChainTracker` reserves remote clients
632
+ for explicit remote-only mode, local exceptions, and quorum-backed consistency
633
+ or recovery checks. See
634
+ [Local-first ChainTracks](./docs/local-first-chaintracks.md) for packaging,
635
+ background synchronization, migration, and advanced-settings requirements.
636
+
637
+ Legacy filesystem import/export is restricted to path-free manifest and data
638
+ filenames beneath the caller-selected root. A missing manifest is created only
639
+ for a definite not-found error; permission, size, parse, and integrity failures
640
+ remain visible. Local files must form a contiguous genesis-anchored chain and
641
+ all reads, writes, reader buffers, and queued lock operations are bounded.
642
+
643
+ Arcade is the HTTPS/SSE gateway for Teranode-backed header data. Its v2 edge
644
+ must allow browser origins and OPTIONS before browser defaults can use it;
645
+ direct Teranode P2P is not included in browser/mobile artifacts.
646
+
647
+ TTN wallets also register
648
+ `https://arcade-v2-ttn-us-1.bsvblockchain.tech` as their first broadcast and
649
+ Merkle-proof provider. Mainnet and testnet Arcade broadcasting remains opt-in.
650
+ Pass an explicit `arcadeUrl` to override the TTN endpoint or an empty string to
651
+ disable it. TTN overlay lookups use the separate `teratestnet` resolver preset
652
+ and never fall back to testnet discovery.
653
+
654
+ ### Broadcast rejection and monitor reconciliation
655
+
656
+ When Arcade is configured, Wallet Toolbox consumes Arcade's status code and
657
+ validator detail instead of treating every `REJECTED` event alike. Retryable
658
+ parent and locktime conditions stay pending. Terminal validator failures fail
659
+ the request, and explicit missing-input or conflict evidence also quarantines
660
+ every wallet-owned copy of the consumed input in the same storage transaction.
661
+ That quarantine uses Arcade's positive rejection evidence and does not require
662
+ WhatsOnChain or another UTXO explorer.
663
+
664
+ Arcade is also registered as a transaction-status provider, so monitor review
665
+ continues on networks without WhatsOnChain. A scheduled bounded pass revisits
666
+ pending requests after their immutable creation-age threshold and applies
667
+ durable Arcade lifecycle verdicts that may have arrived while SSE was
668
+ disconnected, including `SEEN_IN_ORPHAN_MEMPOOL`. Routine proof checks may
669
+ refresh diagnostic timestamps without postponing that review. A descendant of
670
+ a locally terminal parent is also failed from that storage evidence; the failed
671
+ parent output remains quarantined while unrelated inputs are released for
672
+ reuse. Mined/known evidence takes precedence over a stale rejection. Provider
673
+ absence and provider errors are treated as inconclusive, never as proof that an
674
+ output was spent.
675
+ After an input conflict has been recorded, a later cached accepted/seen label
676
+ cannot restore the failed transaction; recovery requires a mined status and a
677
+ Merkle proof validated by the configured chain tracker. Arcade SSE events are
678
+ acknowledged in order only after their storage update and cursor persistence
679
+ succeed, so a transient storage failure is retried instead of skipped.
680
+ The SSE client validates and owns every status record, retains at most 64 events
681
+ and 4 MiB by default, and enforces a 256 KiB ceiling per event. The additive
682
+ `maxEventBytes`, `maxPendingEvents`, and `maxPendingBytes` options may lower
683
+ those limits. A malformed, excessive, or failed event closes the stream and
684
+ prevents queued successors from advancing beyond the last durable cursor.
685
+ Client logging is silent unless `log` is supplied, and transport errors never
686
+ forward credential-bearing EventSource objects. Monitor startup awaits its
687
+ ChainTracks subscriptions and retries transient setup failures; removal and
688
+ teardown close Arcade SSE before storage is destroyed. Monitor operational
689
+ logging is likewise opt-in through `MonitorOptions.logging`.
690
+
691
+ ### Transaction-status authentication
692
+
693
+ Transaction-status providers are untrusted observations, not permission to
694
+ change an arbitrary wallet transaction. Every result is copied and accepted
695
+ only when its txid is one of the exact requested ids and its depth agrees with
696
+ `mined`, `known`, or `unknown`. Terminal and input-conflict evidence is allowed
697
+ only on an internally consistent unknown lifecycle result. Competing txids and
698
+ diagnostics are bounded, and the durable provider name comes from local
699
+ configuration rather than the remote response.
700
+
701
+ A malformed provider response is recorded as that provider's failure and the
702
+ service tries the next configured source. Arcade additionally binds the whole
703
+ `GET /tx/{txid}` response to the request before interpreting lifecycle or proof
704
+ fields. Provider errors and omitted results remain unknown; they never become
705
+ mined, known, terminal, or input-conflict evidence by default.
706
+
707
+ ### Raw transaction acquisition
708
+
709
+ Raw-transaction providers must return an accessor-free result whose declared
710
+ txid exactly matches the request. Transaction data is accepted only as a
711
+ nonempty dense byte array no larger than 32 MiB, copied before hashing, and
712
+ returned as wallet-owned bytes. The computed transaction hash must still match
713
+ the request. Provider attribution comes from local configuration, and an
714
+ invalid result is discarded before the next provider is tried.
715
+
716
+ ### Merkle-proof authentication
717
+
718
+ Wallet proof providers are untrusted inputs. An ordinary `getMerklePath`
719
+ success is accepted only when a bounded, copied path contains an explicit leaf
720
+ for the requested transaction, computes the supplied header's Merkle root at
721
+ the same height, and the complete header resolves through the wallet's
722
+ proof-of-work-valid chain service. The monitor independently asks its configured
723
+ ChainTracks source to affirm that root and height before persisting proof state
724
+ or restoring a failed transaction. Raw transaction bytes must also hash to the
725
+ same txid.
726
+
727
+ Custom ordinary proof providers must return both a `MerklePath` and complete
728
+ `BlockHeader`; a path-only result is treated as unavailable. The additive
729
+ `getValidatedMerklePath` compatibility hook still permits a path-only custom
730
+ provider when its caller-supplied validator independently resolves and
731
+ authenticates the header. No proof-provider response, mined status label, or
732
+ non-null path alone is authority to release wallet funds.
733
+
734
+ Every configured proof provider is treated as untrusted. Wallet Toolbox checks
735
+ transaction membership, header/root agreement, and the active ChainTracks root
736
+ before a proof can be persisted; a stale orphan proof is rejected and the next
737
+ provider is tried. The lagged proven-transaction review retains unresolved
738
+ reorg heights and bounds retry work per run while its forward cursor continues,
739
+ so temporary provider lag cannot turn one failed repair attempt into a
740
+ permanent checkpoint skip. Failed retries rotate behind waiting heights, and
741
+ temporarily ineligible heights remain queued when the chain tip retreats.
742
+ Compound proofs may mark multiple transactions; validation checks membership
743
+ of the requested transaction. No consumer or database migration is required.
744
+
745
+ Invalid-change review applies the same positive-evidence rule. Only an
746
+ explicit successful `isUtxo: false` result is considered spent; a provider
747
+ error, rate limit, timeout, missing provider, missing script, or malformed
748
+ response is unknown. Read-only scans return the conclusive picture plus the
749
+ unknown count. Direct destructive release remains all-or-nothing: any unknown
750
+ throws `WERR_UTXO_REVIEW_INCONCLUSIVE` before mutation. The authenticated
751
+ Monitor Admin tool instead uses 20-output pages (four provider calls in flight,
752
+ five-second per-output review deadline) and may explicitly release the
753
+ positively spent subset while retaining and reporting unknowns. Each confirmed
754
+ spent output is rechecked for ownership and allocation state under the write
755
+ lock, and every release or blocked release records bounded audit evidence.
756
+
757
+ Provider responses are copied as accessor-free data, capped at 4,096 detail
758
+ rows, and bound to the requested outpoint whenever details are supplied. A
759
+ configured UTXO provider remains a locally chosen operational oracle: these
760
+ structural checks prevent response confusion but do not turn non-membership
761
+ claims into cryptographic proofs. Whole-wallet compatibility reviews stop
762
+ before provider work when more than 10,000 candidates would be inspected;
763
+ operators should use the bounded Monitor Admin pages for larger wallets. Manual
764
+ review inputs require canonical compressed identity keys and exact modes,
765
+ booleans, page sizes, and offsets. A release rechecks the exact user, txid,
766
+ vout, value, basket, and allocation state under the write lock.
767
+
768
+ Transaction-history and broadcast providers are locally selected operational
769
+ oracles, but their response objects are never trusted as wallet-owned state.
770
+ Script-history observations are bound to the exact normalized script hash and
771
+ endianness, copied into a dense 4,096-entry maximum, and checked for canonical
772
+ transaction IDs, safe heights, duplicates, and conflicts. WhatsOnChain calls
773
+ have a 30-second whole-request deadline by default; the additive
774
+ `requestTimeoutMsecs` option may be set from 1 through 3,600,000 milliseconds.
775
+
776
+ Broadcast accepts at most 1,000 unique requested transactions in a 64 MiB BEEF.
777
+ Each provider receives its own strict reparse and copied txid list. Results must
778
+ contain exactly one invariant-consistent entry for each request; provider names
779
+ come from local registration, competing transactions and diagnostics are
780
+ bounded, and raw transaction, BEEF, endpoint, and txid-list diagnostics are not
781
+ retained. In `UntilSuccess` mode, malformed, throwing, or soft-timed-out
782
+ providers remain inconclusive and the next provider is tried. A provider's
783
+ double-spend assertion becomes terminal only when the wallet independently
784
+ gets conclusive spent evidence for at least one exact input; an unavailable or
785
+ unknown UTXO oracle cannot quarantine funds by itself.
58
786
 
59
787
  Core ChainTracks factories accept a final source-options argument when an
60
788
  application must override the defaults. Set `disableChaintracks`, `disableCdn`,
61
789
  or `disableWhatsOnChain` to `true` to opt out of an automatic source, or pass an
62
- explicit `chaintracks` client to retain an existing deployment topology. All
63
- earlier positional arguments remain unchanged.
790
+ explicit `chaintracks` client to retain an existing deployment topology. The
791
+ same options accept a `bulkFileCache` and `bulkFileDownloadBudget`; all earlier
792
+ positional arguments remain unchanged.
64
793
 
65
794
  ## Getting Started
66
795
 
@@ -107,6 +836,11 @@ historical BRC-100 shape across plain JSON bridges; parse it with
107
836
  `Transaction.fromAtomicBEEF(result.tx)`. The `AtomicBEEF` type and binary Wallet
108
837
  Wire transports also support `Uint8Array`.
109
838
 
839
+ `internalizeAction` accepts canonical BRC-95 envelopes and legacy envelopes
840
+ that contain unrelated BEEF branches. The wallet restricts either form to the
841
+ declared transaction and its recursive dependencies before independently
842
+ validating every transaction, proof, and BRC-29 payment output.
843
+
110
844
  ## Documentation
111
845
 
112
846
  [Full API documentation](https://bsv-blockchain.github.io/wallet-toolbox) is available on GitHub Pages.
@@ -115,12 +849,36 @@ See [Managed change, sweeping, and recovery](./docs/managed-change-policy.md)
115
849
  for the default-basket invariant, automatic funding policy, and supported
116
850
  `internalizeAction` repair paths.
117
851
 
852
+ See [Managed-change liquidity policy](./docs/managed-change-liquidity.md) for
853
+ the 144-output / 5,000-satoshi defaults, gradual legacy-wallet migration,
854
+ pending-parent policy, exact BEEF comparison, operator tuning, action-batch
855
+ alignment, monitoring, and rollout guidance.
856
+
857
+ See [Prepared BEEF (COOK)](./docs/prepared-beef.md) for the opt-in Knex cache
858
+ that creates an exact, verified proof closure once and keeps it ready for a
859
+ future `createAction`. Reads, writes, and bounded backfill are separately
860
+ controlled and default off; cache misses and failures retain the canonical
861
+ BEEF builder.
862
+
118
863
  See [In-memory action batch planning](./docs/action-batch-planning.md) for
119
864
  capability-negotiated `noSend` planning, compact manifests, compressed binary
120
865
  pack transport, atomic commit, compatibility behavior, and retained benchmarks.
121
866
 
867
+ See [Expiring `noSend` actions](./docs/no-send-expiry.md) for the built-in
868
+ BRC-111 `p nosend expiry` module, exact label forms, prefunding, durable
869
+ Node/browser/mobile monitoring, storage coordination, and proof-based race
870
+ resolution.
871
+
122
872
  ### `createAction` performance telemetry
123
873
 
874
+ Wallet Storage treats `inputBEEF` as proof data for the inputs declared in the
875
+ action. Remote clients retain only those input transactions and their recursive
876
+ proof dependencies before request serialization, reducing transfer and parsing
877
+ work. The server repeats the same pruning before verification and persistence
878
+ as a trust-boundary defense for old, custom, or malicious clients. Structurally
879
+ valid but unrelated branches are ignored; malformed BEEF and incomplete or
880
+ invalid proof data for a declared input remain errors.
881
+
124
882
  With the optional SDK telemetry sink enabled, legacy `createAction` reports
125
883
  bounded-cardinality spans for input validation, record/output persistence,
126
884
  funding candidate selection, fee-aware planning, atomic input claiming, input
@@ -132,7 +890,7 @@ The planner uses the same exact / least-over / largest-under selection policy
132
890
  as the historical allocator, but proves economic sufficiency before writing a
133
891
  transaction and claims every selected input in one database transaction. Knex
134
892
  storage automatically adds a composite funding-selection index on migration;
135
- IndexedDB schema version 3 adds corresponding user/basket and outpoint indexes
893
+ IndexedDB schema version 4 adds corresponding user/basket and outpoint indexes
136
894
  and resolves transaction-status eligibility in one indexed pass.
137
895
 
138
896
  The retained fragmented-funding benchmark is runnable with:
@@ -142,6 +900,13 @@ pnpm bench:create-action-funding
142
900
  pnpm bench:create-action-beef
143
901
  ```
144
902
 
903
+ The proof-bearing benchmark includes a prepared-BEEF cohort and asserts that a
904
+ prepared hit does not invoke the canonical BEEF builder. A representative
905
+ local SQLite one-input run reported 8.04 ms on the cold canonical path and
906
+ 4.39 ms on the prepared path. Local timings are noise-bound; the intended
907
+ production measurement is the authenticated remote/MySQL cohort, where
908
+ repeated proof reconstruction has materially higher cost.
909
+
145
910
  Against unmodified commit `c212b5ee7`, a representative 102-input SQLite plan
146
911
  fell from 622 queries, 102 database transactions, and 107.3 ms to 17 queries,
147
912
  one transaction, and 8.8 ms. Query and transaction counts remain flat when the
@@ -183,7 +948,10 @@ await storage.makeAvailable()
183
948
  const sessionManager = new KnexSessionManager(storage.knex, {
184
949
  ttlMs: 24 * 60 * 60 * 1000,
185
950
  // Optional. Set to 0 when every authenticated use must update the row.
186
- touchIntervalMs: 60 * 1000
951
+ touchIntervalMs: 60 * 1000,
952
+ // Optional global and per-identity rolling bounds for unsigned claims.
953
+ maxInitialRequestNonces: 100_000,
954
+ maxInitialRequestNoncesPerIdentity: 100_000
187
955
  })
188
956
 
189
957
  const server = new StorageServer(storage, {
@@ -197,6 +965,8 @@ const server = new StorageServer(storage, {
197
965
  preAuthRateLimit: { limit: 300, windowMs: 60_000 },
198
966
  // Per-identity before payment/RPC work (default 1,000/minute).
199
967
  rateLimit: { limit: 1_000, windowMs: 60_000 },
968
+ // Bound database/cursor work caused by list and sync offsets.
969
+ maxRpcListOffset: 1_000_000,
200
970
  // Public CORS is the default. Supply exact origins to opt into a whitelist.
201
971
  allowedOrigins: process.env.WALLET_ALLOWED_ORIGINS?.split(','),
202
972
  // Optional CSP/security-header overrides for an embedding deployment.
@@ -208,6 +978,33 @@ const server = new StorageServer(storage, {
208
978
  server.start()
209
979
  ```
210
980
 
981
+ Run `storage.migrate(...)` before enabling this manager on any replica. The
982
+ additive `2026-09-16-001 add auth message replay claims` migration creates the
983
+ `auth_message_nonces` uniqueness table used to atomically consume every signed
984
+ BRC-103 message nonce and identity-scoped initial-request nonce across replicas.
985
+ Missing the migration causes authentication processing to fail closed. All
986
+ replicas must share this table; a per-process or per-replica table does not
987
+ provide replay protection during load-balanced routing.
988
+
989
+ Signed per-session nonce claims fail closed at their configured bound and are
990
+ retained across sliding TTL extensions for the full active session. Unsigned
991
+ initial-request claims instead use global and per-identity rolling windows: when
992
+ either window is full, its oldest claim is evicted. Expired claims are removed
993
+ across identities during admission. This preserves exact replay rejection
994
+ within the configured TTL/cardinality windows without allowing unauthenticated
995
+ nonces to grow storage without bound or disable all future handshakes.
996
+
997
+ Schema migration is an operator-owned server lifecycle step. Authenticated
998
+ remote `StorageClient.migrate(...)` and `destroy()` RPCs are compatibility
999
+ no-ops; wallet tenants cannot run global DDL or close the shared provider.
1000
+
1001
+ The standard resource profile rejects list, find, and sync offsets above
1002
+ 1,000,000 before storage access (`WALLET_STORAGE_RPC_MAX_LIST_OFFSET`). Small
1003
+ and high-throughput profiles default to 100,000 and 10,000,000 respectively.
1004
+ Operators with legitimately larger wallet histories can raise the bound; use
1005
+ `-1` only when all tenants are trusted and the database has an independent
1006
+ workload guard.
1007
+
211
1008
  Shared Knex sessions immediately persist authentication, nonce, identity, and
212
1009
  certificate-state transitions. For an already-authenticated row, the default
213
1010
  manager coalesces only timestamp-only usage touches for up to one minute. This
@@ -238,8 +1035,81 @@ Run `StorageKnex.migrate(...)` before constructing the manager during an
238
1035
  upgrade. `makeAvailable()` validates and loads an already-migrated database; it
239
1036
  does not apply schema changes.
240
1037
 
1038
+ ### Mounting StorageServer in an Express application
1039
+
1040
+ `server.app` is the configured Express application. Mount it in a host
1041
+ application instead of calling `start()`; `port` and `http` are only used by
1042
+ `start()`.
1043
+
1044
+ ```typescript
1045
+ import express from 'express'
1046
+ import { SessionManager } from '@bsv/sdk'
1047
+ import { AuthRequest, createAuthMiddleware } from '@bsv/auth-express-middleware'
1048
+ import { StorageServer } from '@bsv/wallet-toolbox'
1049
+
1050
+ // Use KnexSessionManager when the host runs more than one process.
1051
+ const sessionManager = new SessionManager()
1052
+
1053
+ const storageServer = new StorageServer(storage, {
1054
+ wallet,
1055
+ monetize: false,
1056
+ sessionManager,
1057
+ // Leave GET /, /robots.txt and /healthz to the host.
1058
+ publicRoutes: false,
1059
+ preRpcMiddleware: [
1060
+ async (req, res, next) => {
1061
+ if (await overQuota((req as AuthRequest).auth.identityKey, req.body.method)) {
1062
+ res.status(507).json({ status: 'error', code: 'ERR_QUOTA_EXCEEDED' })
1063
+ return
1064
+ }
1065
+ next()
1066
+ }
1067
+ ]
1068
+ })
1069
+
1070
+ const app = express()
1071
+ app.use('/storage', storageServer.app)
1072
+ app.use(express.json())
1073
+ app.use(createAuthMiddleware({ wallet, sessionManager }))
1074
+ // ...host routes
1075
+ app.listen(8080)
1076
+ ```
1077
+
1078
+ Clients connect with `new StorageClient(wallet, 'https://host.example/storage')`.
1079
+ `AuthFetch` sends the BRC-104 handshake to the origin's `/.well-known/auth`,
1080
+ not to the mount path, so the host must answer it with its own auth middleware
1081
+ using the same `wallet` and the same `sessionManager` as the storage server.
1082
+ Mount the storage server before the host's auth middleware and body parsers;
1083
+ the storage app authenticates and parses its own requests. It keeps its own
1084
+ security headers, CORS, concurrency and rate limits, and inherits the host's
1085
+ `trust proxy` setting unless `trustProxy` is set.
1086
+
1087
+ `preRpcMiddleware` handlers run on JSON-RPC `POST /` requests after
1088
+ authentication, the authenticated rate limit and, when `monetize` is set, the
1089
+ payment middleware. They see `req.auth` and the parsed body. A handler that
1090
+ responds instead of calling `next()` stops the call before dispatch. They do not
1091
+ run on the action batch upload routes.
1092
+
241
1093
  ## Development
242
1094
 
1095
+ ### Overlay identity verification
1096
+
1097
+ Final identity discovery copies bounded resolver receipts, verifies their
1098
+ transaction graph and canonical anchors with the wallet's existing
1099
+ `Services.getChainTracker()`, and then validates the standard subject-signed
1100
+ identity envelope and certificate. The wallet finally re-binds each verified
1101
+ certificate to the requested subject or to every requested public attribute,
1102
+ so a lookup host cannot substitute a different valid identity. Transaction and certificate reuse remain
1103
+ bounded and canonical evidence is rechecked before cached results are used;
1104
+ fresh provider tokens bracket asynchronous anchor checks where the configured
1105
+ tracker supplies them. Invalid candidate evidence is dropped, while typed
1106
+ limit/timeout outcomes propagate to the caller.
1107
+ Direct `identityUtils` callers must supply a canonical `ChainTracker`; missing
1108
+ context or invalid evidence produces no overlay identities. Local contacts
1109
+ retain their separate policy. Inclusion does not establish unspentness or
1110
+ freshness. See [identity verification](docs/identity-verification.md) for
1111
+ current C01/C02/C03 contracts, compatibility characterization, and limits.
1112
+
243
1113
  ```bash
244
1114
  git clone https://github.com/bsv-blockchain/ts-stack.git
245
1115
  cd ts-stack
@@ -261,9 +1131,12 @@ network access, or long runtimes. Files named `*.live.test.ts` are public-networ
261
1131
  checks, also excluded from deterministic PR coverage. Run exactly one governed
262
1132
  suite with `test:manual -- <path>` or `test:live -- <path>` after reviewing
263
1133
  `governance/test-quality/policy.json`; never batch-run operator suites. CI
264
- merges four Wallet Toolbox coverage shards
265
- for reporting; the complete local `test:coverage` run currently measures
266
- 69.12% statements, 59.09% branches, 72.83% functions, and 71.06% lines.
1134
+ merges four Wallet Toolbox coverage shards for reporting. The C01 local
1135
+ `test:coverage --runInBand` run passed 225 suites and 2,188 tests, with one
1136
+ pre-existing skipped test. Its all-files totals were 45.75% statements, 38.86%
1137
+ branches, 42.57% functions, and 45.46% lines; that collection includes imported
1138
+ `out/src` code as well as source files. Use the exact run's coverage report,
1139
+ rather than comparing unlike source-only and combined collections.
267
1140
 
268
1141
  Operational repair, migration, export, and long-running service procedures are
269
1142
  not tests. They live under [`operator/`](./operator/README.md), produce an exact
@@ -312,4 +1185,6 @@ for the full stack-wide policy.
312
1185
 
313
1186
  ## License
314
1187
 
315
- Released under the [Open BSV License](./LICENSE.txt).
1188
+ This package is released under the [Open BSV License Version 6](./LICENSE.txt).
1189
+ The accompanying [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md) and
1190
+ [LICENSES/](./LICENSES/) preserve the package's earlier Open BSV grant.