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

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