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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/docs/CREATEACTION_BLOCKERS.md +391 -0
  2. package/docs/CUTOVER_RUNBOOK.md +95 -0
  3. package/docs/REQUIREMENTS_COMPLIANCE.md +157 -0
  4. package/docs/ROLLOUT_PLAN.md +273 -0
  5. package/docs/SESSION_HANDOFF.md +298 -0
  6. package/docs/STORAGE_METHOD_WIRING.md +176 -0
  7. package/docs/client.md +3765 -1325
  8. package/docs/monitor.md +255 -33
  9. package/docs/services.md +304 -280
  10. package/docs/setup.md +24 -24
  11. package/docs/storage.md +2783 -251
  12. package/docs/v3-upgrade/index.html +911 -0
  13. package/docs/wallet.md +4956 -9455
  14. package/out/src/Wallet.d.ts.map +1 -1
  15. package/out/src/Wallet.js.map +1 -1
  16. package/out/src/WalletLogger.d.ts.map +1 -1
  17. package/out/src/WalletLogger.js.map +1 -1
  18. package/out/src/__tests/CWIStyleWalletManager.test.js.map +1 -1
  19. package/out/src/__tests/WalletPermissionsManager.fixtures.d.ts.map +1 -1
  20. package/out/src/__tests/WalletPermissionsManager.fixtures.js.map +1 -1
  21. package/out/src/entropy/EntropyCollector.d.ts.map +1 -1
  22. package/out/src/entropy/EntropyCollector.js.map +1 -1
  23. package/out/src/monitor/LeasedMonitorTask.d.ts +43 -0
  24. package/out/src/monitor/LeasedMonitorTask.d.ts.map +1 -0
  25. package/out/src/monitor/LeasedMonitorTask.js +89 -0
  26. package/out/src/monitor/LeasedMonitorTask.js.map +1 -0
  27. package/out/src/monitor/Monitor.d.ts +7 -0
  28. package/out/src/monitor/Monitor.d.ts.map +1 -1
  29. package/out/src/monitor/Monitor.js +7 -0
  30. package/out/src/monitor/Monitor.js.map +1 -1
  31. package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
  32. package/out/src/monitor/MonitorDaemon.js.map +1 -1
  33. package/out/src/monitor/V7LeasedTask.d.ts +43 -0
  34. package/out/src/monitor/V7LeasedTask.d.ts.map +1 -0
  35. package/out/src/monitor/V7LeasedTask.js +89 -0
  36. package/out/src/monitor/V7LeasedTask.js.map +1 -0
  37. package/out/src/monitor/index.all.d.ts +1 -0
  38. package/out/src/monitor/index.all.d.ts.map +1 -1
  39. package/out/src/monitor/index.all.js +1 -0
  40. package/out/src/monitor/index.all.js.map +1 -1
  41. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +2 -0
  42. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
  43. package/out/src/monitor/tasks/TaskCheckForProofs.js +55 -0
  44. package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
  45. package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
  46. package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
  47. package/out/src/sdk/WalletStorage.interfaces.d.ts +59 -59
  48. package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
  49. package/out/src/sdk/types.d.ts +32 -0
  50. package/out/src/sdk/types.d.ts.map +1 -1
  51. package/out/src/sdk/types.js +50 -1
  52. package/out/src/sdk/types.js.map +1 -1
  53. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts.map +1 -1
  54. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js.map +1 -1
  55. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts.map +1 -1
  56. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js.map +1 -1
  57. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.d.ts.map +1 -1
  58. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageKnex.js.map +1 -1
  59. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.d.ts.map +1 -1
  60. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js.map +1 -1
  61. package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.d.ts.map +1 -1
  62. package/out/src/services/chaintracker/chaintracks/createDefaultKnexChaintracksOptions.js.map +1 -1
  63. package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.d.ts.map +1 -1
  64. package/out/src/services/chaintracker/chaintracks/createDefaultNoDbChaintracksOptions.js.map +1 -1
  65. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.d.ts.map +1 -1
  66. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js.map +1 -1
  67. package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.d.ts.map +1 -1
  68. package/out/src/services/chaintracker/chaintracks/createKnexChaintracks.js.map +1 -1
  69. package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.d.ts.map +1 -1
  70. package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.js.map +1 -1
  71. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.d.ts.map +1 -1
  72. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js.map +1 -1
  73. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.d.ts.map +1 -1
  74. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFs.js.map +1 -1
  75. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts.map +1 -1
  76. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.js.map +1 -1
  77. package/out/src/services/chaintracker/chaintracks/util/__tests/SingleWriterMultiReaderLock.test.js.map +1 -1
  78. package/out/src/storage/StorageIdb.d.ts.map +1 -1
  79. package/out/src/storage/StorageIdb.js +10 -5
  80. package/out/src/storage/StorageIdb.js.map +1 -1
  81. package/out/src/storage/StorageKnex.d.ts +133 -3
  82. package/out/src/storage/StorageKnex.d.ts.map +1 -1
  83. package/out/src/storage/StorageKnex.js +691 -94
  84. package/out/src/storage/StorageKnex.js.map +1 -1
  85. package/out/src/storage/StorageProvider.d.ts +114 -1
  86. package/out/src/storage/StorageProvider.d.ts.map +1 -1
  87. package/out/src/storage/StorageProvider.js +164 -4
  88. package/out/src/storage/StorageProvider.js.map +1 -1
  89. package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
  90. package/out/src/storage/WalletStorageManager.js.map +1 -1
  91. package/out/src/storage/idbHelpers.d.ts +5 -0
  92. package/out/src/storage/idbHelpers.d.ts.map +1 -1
  93. package/out/src/storage/idbHelpers.js +42 -0
  94. package/out/src/storage/idbHelpers.js.map +1 -1
  95. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
  96. package/out/src/storage/methods/attemptToPostReqsToNetwork.js +116 -4
  97. package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
  98. package/out/src/storage/methods/createAction.d.ts.map +1 -1
  99. package/out/src/storage/methods/createAction.js +22 -5
  100. package/out/src/storage/methods/createAction.js.map +1 -1
  101. package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
  102. package/out/src/storage/methods/internalizeAction.js +172 -5
  103. package/out/src/storage/methods/internalizeAction.js.map +1 -1
  104. package/out/src/storage/methods/listActionsKnex.d.ts +49 -0
  105. package/out/src/storage/methods/listActionsKnex.d.ts.map +1 -1
  106. package/out/src/storage/methods/listActionsKnex.js +179 -69
  107. package/out/src/storage/methods/listActionsKnex.js.map +1 -1
  108. package/out/src/storage/methods/listOutputsKnex.d.ts.map +1 -1
  109. package/out/src/storage/methods/listOutputsKnex.js +51 -4
  110. package/out/src/storage/methods/listOutputsKnex.js.map +1 -1
  111. package/out/src/storage/methods/processAction.d.ts.map +1 -1
  112. package/out/src/storage/methods/processAction.js +82 -14
  113. package/out/src/storage/methods/processAction.js.map +1 -1
  114. package/out/src/storage/methods/purgeData.d.ts.map +1 -1
  115. package/out/src/storage/methods/purgeData.js +22 -14
  116. package/out/src/storage/methods/purgeData.js.map +1 -1
  117. package/out/src/storage/methods/reviewStatus.d.ts.map +1 -1
  118. package/out/src/storage/methods/reviewStatus.js +18 -9
  119. package/out/src/storage/methods/reviewStatus.js.map +1 -1
  120. package/out/src/storage/schema/KnexMigrations.d.ts.map +1 -1
  121. package/out/src/storage/schema/KnexMigrations.js +134 -0
  122. package/out/src/storage/schema/KnexMigrations.js.map +1 -1
  123. package/out/src/storage/schema/StorageIdbSchema.d.ts +43 -2
  124. package/out/src/storage/schema/StorageIdbSchema.d.ts.map +1 -1
  125. package/out/src/storage/schema/__tests/backfill.runner.test.d.ts +2 -0
  126. package/out/src/storage/schema/__tests/backfill.runner.test.d.ts.map +1 -0
  127. package/out/src/storage/schema/__tests/backfill.runner.test.js +148 -0
  128. package/out/src/storage/schema/__tests/backfill.runner.test.js.map +1 -0
  129. package/out/src/storage/schema/__tests/backfill.test.d.ts +2 -0
  130. package/out/src/storage/schema/__tests/backfill.test.d.ts.map +1 -0
  131. package/out/src/storage/schema/__tests/backfill.test.js +96 -0
  132. package/out/src/storage/schema/__tests/backfill.test.js.map +1 -0
  133. package/out/src/storage/schema/__tests/processingFsm.test.d.ts +2 -0
  134. package/out/src/storage/schema/__tests/processingFsm.test.d.ts.map +1 -0
  135. package/out/src/storage/schema/__tests/processingFsm.test.js +42 -0
  136. package/out/src/storage/schema/__tests/processingFsm.test.js.map +1 -0
  137. package/out/src/storage/schema/__tests/processingFsmLegacyMapping.test.d.ts +2 -0
  138. package/out/src/storage/schema/__tests/processingFsmLegacyMapping.test.d.ts.map +1 -0
  139. package/out/src/storage/schema/__tests/processingFsmLegacyMapping.test.js +82 -0
  140. package/out/src/storage/schema/__tests/processingFsmLegacyMapping.test.js.map +1 -0
  141. package/out/src/storage/schema/__tests/spendabilityRule.test.d.ts +2 -0
  142. package/out/src/storage/schema/__tests/spendabilityRule.test.d.ts.map +1 -0
  143. package/out/src/storage/schema/__tests/spendabilityRule.test.js +29 -0
  144. package/out/src/storage/schema/__tests/spendabilityRule.test.js.map +1 -0
  145. package/out/src/storage/schema/__tests/v7FsmLegacyMapping.test.d.ts +2 -0
  146. package/out/src/storage/schema/__tests/v7FsmLegacyMapping.test.d.ts.map +1 -0
  147. package/out/src/storage/schema/__tests/v7FsmLegacyMapping.test.js +77 -0
  148. package/out/src/storage/schema/__tests/v7FsmLegacyMapping.test.js.map +1 -0
  149. package/out/src/storage/schema/backfill.d.ts +35 -0
  150. package/out/src/storage/schema/backfill.d.ts.map +1 -0
  151. package/out/src/storage/schema/backfill.idb.d.ts +32 -0
  152. package/out/src/storage/schema/backfill.idb.d.ts.map +1 -0
  153. package/out/src/storage/schema/backfill.idb.js +95 -0
  154. package/out/src/storage/schema/backfill.idb.js.map +1 -0
  155. package/out/src/storage/schema/backfill.js +150 -0
  156. package/out/src/storage/schema/backfill.js.map +1 -0
  157. package/out/src/storage/schema/backfill.knex.d.ts +32 -0
  158. package/out/src/storage/schema/backfill.knex.d.ts.map +1 -0
  159. package/out/src/storage/schema/backfill.knex.js +240 -0
  160. package/out/src/storage/schema/backfill.knex.js.map +1 -0
  161. package/out/src/storage/schema/backfill.runner.d.ts +63 -0
  162. package/out/src/storage/schema/backfill.runner.d.ts.map +1 -0
  163. package/out/src/storage/schema/backfill.runner.js +64 -0
  164. package/out/src/storage/schema/backfill.runner.js.map +1 -0
  165. package/out/src/storage/schema/coinbaseMaturityBackfill.d.ts +25 -0
  166. package/out/src/storage/schema/coinbaseMaturityBackfill.d.ts.map +1 -0
  167. package/out/src/storage/schema/coinbaseMaturityBackfill.js +75 -0
  168. package/out/src/storage/schema/coinbaseMaturityBackfill.js.map +1 -0
  169. package/out/src/storage/schema/monitorLease.d.ts +57 -0
  170. package/out/src/storage/schema/monitorLease.d.ts.map +1 -0
  171. package/out/src/storage/schema/monitorLease.js +101 -0
  172. package/out/src/storage/schema/monitorLease.js.map +1 -0
  173. package/out/src/storage/schema/processingFsm.d.ts +27 -0
  174. package/out/src/storage/schema/processingFsm.d.ts.map +1 -0
  175. package/out/src/storage/schema/processingFsm.js +132 -0
  176. package/out/src/storage/schema/processingFsm.js.map +1 -0
  177. package/out/src/storage/schema/schemaCutover.d.ts +34 -0
  178. package/out/src/storage/schema/schemaCutover.d.ts.map +1 -0
  179. package/out/src/storage/schema/schemaCutover.js +230 -0
  180. package/out/src/storage/schema/schemaCutover.js.map +1 -0
  181. package/out/src/storage/schema/schemaCutoverIdb.d.ts +26 -0
  182. package/out/src/storage/schema/schemaCutoverIdb.d.ts.map +1 -0
  183. package/out/src/storage/schema/schemaCutoverIdb.js +90 -0
  184. package/out/src/storage/schema/schemaCutoverIdb.js.map +1 -0
  185. package/out/src/storage/schema/spendabilityRefresh.d.ts +49 -0
  186. package/out/src/storage/schema/spendabilityRefresh.d.ts.map +1 -0
  187. package/out/src/storage/schema/spendabilityRefresh.js +120 -0
  188. package/out/src/storage/schema/spendabilityRefresh.js.map +1 -0
  189. package/out/src/storage/schema/spendabilityRule.d.ts +45 -0
  190. package/out/src/storage/schema/spendabilityRule.d.ts.map +1 -0
  191. package/out/src/storage/schema/spendabilityRule.js +52 -0
  192. package/out/src/storage/schema/spendabilityRule.js.map +1 -0
  193. package/out/src/storage/schema/tables/TableAction.d.ts +3 -3
  194. package/out/src/storage/schema/tables/TableAction.d.ts.map +1 -1
  195. package/out/src/storage/schema/tables/TableChainTip.d.ts +1 -1
  196. package/out/src/storage/schema/tables/TableMonitorLease.d.ts +1 -1
  197. package/out/src/storage/schema/tables/TableOutput.d.ts +7 -0
  198. package/out/src/storage/schema/tables/TableOutput.d.ts.map +1 -1
  199. package/out/src/storage/schema/tables/TableOutput.js.map +1 -1
  200. package/out/src/storage/schema/tables/TableTransactionNew.d.ts +50 -0
  201. package/out/src/storage/schema/tables/TableTransactionNew.d.ts.map +1 -0
  202. package/out/src/storage/schema/tables/TableTransactionNew.js +3 -0
  203. package/out/src/storage/schema/tables/TableTransactionNew.js.map +1 -0
  204. package/out/src/storage/schema/tables/TableTxAudit.d.ts +1 -1
  205. package/out/src/storage/schema/tables/index.d.ts +5 -0
  206. package/out/src/storage/schema/tables/index.d.ts.map +1 -1
  207. package/out/src/storage/schema/tables/index.js +5 -0
  208. package/out/src/storage/schema/tables/index.js.map +1 -1
  209. package/out/src/storage/schema/transactionCrud.d.ts +41 -0
  210. package/out/src/storage/schema/transactionCrud.d.ts.map +1 -0
  211. package/out/src/storage/schema/transactionCrud.js +205 -0
  212. package/out/src/storage/schema/transactionCrud.js.map +1 -0
  213. package/out/src/storage/schema/transactionService.d.ts +315 -0
  214. package/out/src/storage/schema/transactionService.d.ts.map +1 -0
  215. package/out/src/storage/schema/transactionService.js +783 -0
  216. package/out/src/storage/schema/transactionService.js.map +1 -0
  217. package/out/src/storage/schema/txAudit.d.ts +33 -0
  218. package/out/src/storage/schema/txAudit.d.ts.map +1 -0
  219. package/out/src/storage/schema/txAudit.js +64 -0
  220. package/out/src/storage/schema/txAudit.js.map +1 -0
  221. package/out/src/storage/schema/v7Backfill.d.ts.map +1 -1
  222. package/out/src/storage/schema/v7Backfill.js +4 -1
  223. package/out/src/storage/schema/v7Backfill.js.map +1 -1
  224. package/out/src/storage/schema/v7Backfill.runner.d.ts.map +1 -1
  225. package/out/src/storage/schema/v7Backfill.runner.js +3 -1
  226. package/out/src/storage/schema/v7Backfill.runner.js.map +1 -1
  227. package/out/src/storage/schema/v7CoinbaseMaturityBackfill.d.ts +25 -0
  228. package/out/src/storage/schema/v7CoinbaseMaturityBackfill.d.ts.map +1 -0
  229. package/out/src/storage/schema/v7CoinbaseMaturityBackfill.js +75 -0
  230. package/out/src/storage/schema/v7CoinbaseMaturityBackfill.js.map +1 -0
  231. package/out/src/storage/schema/v7Crud.d.ts +5 -3
  232. package/out/src/storage/schema/v7Crud.d.ts.map +1 -1
  233. package/out/src/storage/schema/v7Crud.js +11 -9
  234. package/out/src/storage/schema/v7Crud.js.map +1 -1
  235. package/out/src/storage/schema/v7Cutover.d.ts +34 -0
  236. package/out/src/storage/schema/v7Cutover.d.ts.map +1 -0
  237. package/out/src/storage/schema/v7Cutover.js +223 -0
  238. package/out/src/storage/schema/v7Cutover.js.map +1 -0
  239. package/out/src/storage/schema/v7CutoverIdb.d.ts +26 -0
  240. package/out/src/storage/schema/v7CutoverIdb.d.ts.map +1 -0
  241. package/out/src/storage/schema/v7CutoverIdb.js +90 -0
  242. package/out/src/storage/schema/v7CutoverIdb.js.map +1 -0
  243. package/out/src/storage/schema/v7Fsm.d.ts.map +1 -1
  244. package/out/src/storage/schema/v7Fsm.js +22 -6
  245. package/out/src/storage/schema/v7Fsm.js.map +1 -1
  246. package/out/src/storage/schema/v7Service.d.ts +305 -0
  247. package/out/src/storage/schema/v7Service.d.ts.map +1 -0
  248. package/out/src/storage/schema/v7Service.js +757 -0
  249. package/out/src/storage/schema/v7Service.js.map +1 -0
  250. package/out/src/storage/schema/v7SpendabilityRefresh.d.ts +49 -0
  251. package/out/src/storage/schema/v7SpendabilityRefresh.d.ts.map +1 -0
  252. package/out/src/storage/schema/v7SpendabilityRefresh.js +111 -0
  253. package/out/src/storage/schema/v7SpendabilityRefresh.js.map +1 -0
  254. package/out/src/storage/storageProviderHelpers.js +1 -1
  255. package/out/src/storage/storageProviderHelpers.js.map +1 -1
  256. package/out/src/utility/Format.js.map +1 -1
  257. package/package.json +7 -4
@@ -0,0 +1,305 @@
1
+ import { Beef } from '@bsv/sdk';
2
+ import { Knex } from 'knex';
3
+ import * as sdk from '../../sdk';
4
+ import { TableAction, TableOutput, TableTransactionV7 } from './tables';
5
+ import { MonitorLeaseClaim, MonitorLeaseRelease, MonitorLeaseRenew, MonitorLeaseResult } from './v7MonitorLease';
6
+ /**
7
+ * High-level service over the V7 storage primitives.
8
+ *
9
+ * Storage methods and the Monitor call into this surface rather than the
10
+ * lower-level CRUD/FSM/audit/lease modules so that:
11
+ * - Every processing transition is audited.
12
+ * - Optimistic concurrency is uniformly enforced.
13
+ * - Chain tip + monitor lease access have one canonical entry point.
14
+ *
15
+ * Construction takes a Knex handle; instances are stateless and cheap to
16
+ * create — typically one per request or per Monitor task tick.
17
+ */
18
+ export declare class V7TransactionService {
19
+ private readonly knex;
20
+ constructor(knex: Knex);
21
+ findByTxid(txid: string): Promise<TableTransactionV7 | undefined>;
22
+ findById(transactionId: number): Promise<TableTransactionV7 | undefined>;
23
+ /**
24
+ * Insert a new V7 transaction row. The row is created in `queued` state
25
+ * unless the caller overrides `processing`.
26
+ */
27
+ create(args: {
28
+ txid: string;
29
+ processing?: sdk.ProcessingStatus;
30
+ rawTx?: number[];
31
+ inputBeef?: number[];
32
+ batch?: string;
33
+ idempotencyKey?: string;
34
+ isCoinbase?: boolean;
35
+ now?: Date;
36
+ }): Promise<TableTransactionV7>;
37
+ /**
38
+ * Transition processing state with optimistic concurrency. Returns
39
+ * `undefined` when the FSM rejects the move OR the row's current state no
40
+ * longer matches `expectedFrom`.
41
+ */
42
+ transition(args: {
43
+ transactionId: number;
44
+ expectedFrom: sdk.ProcessingStatus;
45
+ to: sdk.ProcessingStatus;
46
+ provider?: string;
47
+ providerStatus?: string;
48
+ details?: Record<string, unknown>;
49
+ now?: Date;
50
+ }): Promise<TableTransactionV7 | undefined>;
51
+ /**
52
+ * Record acquisition of a Merkle proof for a transaction. Atomically:
53
+ * - Updates proof columns (height, index, merkle_path, merkle_root, block_hash)
54
+ * - Transitions processing to `proven` from any spendable-class state.
55
+ * - Writes a `proof.acquired` audit row.
56
+ */
57
+ recordProof(args: {
58
+ transactionId: number;
59
+ height: number;
60
+ merkleIndex: number;
61
+ merklePath: number[];
62
+ merkleRoot: string;
63
+ blockHash: string;
64
+ expectedFrom: sdk.ProcessingStatus;
65
+ now?: Date;
66
+ }): Promise<TableTransactionV7 | undefined>;
67
+ findActionForUser(userId: number, transactionId: number): Promise<TableAction | undefined>;
68
+ createAction(args: {
69
+ userId: number;
70
+ transactionId: number;
71
+ reference: string;
72
+ description: string;
73
+ isOutgoing: boolean;
74
+ satoshisDelta: number;
75
+ userNosend?: boolean;
76
+ notifyJson?: string;
77
+ now?: Date;
78
+ }): Promise<number>;
79
+ getChainTip(): Promise<{
80
+ height: number;
81
+ blockHash: string;
82
+ } | undefined>;
83
+ setChainTip(args: {
84
+ height: number;
85
+ blockHash: string;
86
+ merkleRoot?: string;
87
+ now?: Date;
88
+ }): Promise<void>;
89
+ tryClaimLease(claim: MonitorLeaseClaim, now?: Date): Promise<MonitorLeaseResult>;
90
+ renewLease(renew: MonitorLeaseRenew, now?: Date): Promise<MonitorLeaseResult>;
91
+ releaseLease(release: MonitorLeaseRelease): Promise<boolean>;
92
+ /**
93
+ * #1 — Look up an action + its backing transaction by (userId, reference).
94
+ */
95
+ findActionByReference(userId: number, reference: string): Promise<{
96
+ action: TableAction;
97
+ transaction: TableTransactionV7;
98
+ } | undefined>;
99
+ /**
100
+ * #2 — Look up an action + its backing transaction by (userId, txid).
101
+ */
102
+ findActionByUserTxid(userId: number, txid: string): Promise<{
103
+ action: TableAction;
104
+ transaction: TableTransactionV7;
105
+ } | undefined>;
106
+ /**
107
+ * #3 — Upsert: find existing action for (userId, txid) or create both the V7
108
+ * transaction row and the action row.
109
+ */
110
+ findOrCreateActionForTxid(args: {
111
+ userId: number;
112
+ txid: string;
113
+ isOutgoing: boolean;
114
+ description: string;
115
+ satoshisDelta: number;
116
+ reference: string;
117
+ rawTx?: number[];
118
+ inputBeef?: number[];
119
+ processing?: sdk.ProcessingStatus;
120
+ now?: Date;
121
+ }): Promise<{
122
+ action: TableAction;
123
+ transaction: TableTransactionV7;
124
+ isNew: boolean;
125
+ }>;
126
+ /**
127
+ * #4 — Atomically update the satoshisDelta column on an action row.
128
+ */
129
+ updateActionSatoshisDelta(actionId: number, delta: number, now?: Date): Promise<void>;
130
+ /**
131
+ * #5 — Create a V7 transaction row already in `proven` state with all proof
132
+ * columns populated. Useful for internalised transactions that arrive with a
133
+ * Merkle proof (bump) already attached.
134
+ */
135
+ createWithProof(args: {
136
+ txid: string;
137
+ rawTx?: number[];
138
+ inputBeef?: number[];
139
+ height: number;
140
+ merkleIndex: number;
141
+ merklePath: number[];
142
+ merkleRoot: string;
143
+ blockHash: string;
144
+ isCoinbase?: boolean;
145
+ now?: Date;
146
+ }): Promise<TableTransactionV7>;
147
+ /**
148
+ * #6 — Find an existing V7 transaction row for the given txid (suitable for
149
+ * the broadcast queue) or create a new one in `queued` state.
150
+ */
151
+ findOrCreateForBroadcast(args: {
152
+ txid: string;
153
+ rawTx: number[];
154
+ inputBeef?: number[];
155
+ batch?: string;
156
+ processing?: sdk.ProcessingStatus;
157
+ now?: Date;
158
+ }): Promise<{
159
+ transaction: TableTransactionV7;
160
+ isNew: boolean;
161
+ }>;
162
+ /**
163
+ * #7 — Bulk transition: attempt `transition` for each id; collect results.
164
+ * When `expectedFrom` is omitted the current state of each row is used as
165
+ * the expected source (lenient mode — only the FSM is checked).
166
+ */
167
+ transitionMany(args: {
168
+ transactionIds: number[];
169
+ expectedFrom?: sdk.ProcessingStatus;
170
+ to: sdk.ProcessingStatus;
171
+ provider?: string;
172
+ providerStatus?: string;
173
+ details?: Record<string, unknown>;
174
+ now?: Date;
175
+ }): Promise<{
176
+ updated: number[];
177
+ skipped: number[];
178
+ }>;
179
+ /**
180
+ * #8 — Bulk-set the `batch` column for a list of transaction ids.
181
+ * Pass `undefined` to clear the batch tag.
182
+ */
183
+ setBatch(transactionIds: number[], batch: string | undefined, now?: Date): Promise<void>;
184
+ /**
185
+ * #9 — Atomically increment the `attempts` counter for one transaction and
186
+ * write an `attempts.incremented` audit entry.
187
+ */
188
+ incrementAttempts(transactionId: number, now?: Date): Promise<TableTransactionV7 | undefined>;
189
+ /**
190
+ * #10 — Record the outcome of a broadcast attempt. Transitions processing
191
+ * state, updates `wasBroadcast` and `lastProvider*` columns, and writes an
192
+ * audit row.
193
+ */
194
+ recordBroadcastResult(args: {
195
+ transactionId: number;
196
+ txid: string;
197
+ status: sdk.ProcessingStatus;
198
+ provider: string;
199
+ providerStatus?: string;
200
+ wasBroadcast?: boolean;
201
+ details?: Record<string, unknown>;
202
+ now?: Date;
203
+ }): Promise<TableTransactionV7 | undefined>;
204
+ /**
205
+ * #11 — Append a free-form history note to the audit log for a transaction.
206
+ */
207
+ recordHistoryNote(transactionId: number, note: {
208
+ what: string;
209
+ [k: string]: unknown;
210
+ }, now?: Date): Promise<void>;
211
+ /**
212
+ * #12 — For each txid that exists in the V7 transactions table, merge the
213
+ * raw transaction bytes and (where available) the Merkle path into `beef`.
214
+ * Txids not present in V7 are silently skipped.
215
+ */
216
+ mergeBeefForTxids(beef: Beef, txids: string[]): Promise<void>;
217
+ /**
218
+ * #13 — Collect broadcast-readiness info and a populated Beef for a list of
219
+ * txids. Each entry is classified as:
220
+ * - `readyToSend` — queued/sending → still needs broadcast
221
+ * - `alreadySent` — sent/seen/seen_multi/unconfirmed/proven → already on network
222
+ * - `error` — invalid/doubleSpend → terminal failure
223
+ * - `unknown` — not found in V7
224
+ */
225
+ collectReqsAndBeef(txids: string[], extraTxids?: string[]): Promise<{
226
+ beef: Beef;
227
+ details: Array<{
228
+ txid: string;
229
+ status: 'readyToSend' | 'alreadySent' | 'error' | 'unknown';
230
+ reason?: string;
231
+ }>;
232
+ }>;
233
+ /**
234
+ * #14 — Paginated list of actions (per-user transaction views) with optional
235
+ * status and label filters.
236
+ *
237
+ * After the V7 cutover `tx_labels_map.transactionId` references `actions.actionId`
238
+ * (not `transactions.transactionId`).
239
+ */
240
+ listActionsForUser(args: {
241
+ userId: number;
242
+ statusFilter?: sdk.ProcessingStatus[];
243
+ labelIds?: number[];
244
+ labelQueryMode?: 'all' | 'any';
245
+ createdAtFrom?: Date;
246
+ createdAtTo?: Date;
247
+ limit: number;
248
+ offset: number;
249
+ }): Promise<{
250
+ rows: Array<TableAction & {
251
+ txid: string;
252
+ processing: sdk.ProcessingStatus;
253
+ height?: number;
254
+ }>;
255
+ total?: number;
256
+ }>;
257
+ /**
258
+ * #15 — Paginated list of outputs with their backing transaction processing
259
+ * state. Optional filters: basket, tag set, processing state, spent flag.
260
+ */
261
+ listOutputsForUser(args: {
262
+ userId: number;
263
+ basketId?: number;
264
+ tagIds?: number[];
265
+ tagQueryMode?: 'all' | 'any';
266
+ processingFilter: sdk.ProcessingStatus[];
267
+ includeSpent: boolean;
268
+ limit: number;
269
+ offset: number;
270
+ includeLockingScripts?: boolean;
271
+ }): Promise<{
272
+ rows: Array<TableOutput & {
273
+ processing: sdk.ProcessingStatus;
274
+ }>;
275
+ total?: number;
276
+ }>;
277
+ /**
278
+ * Post-cutover helper: rewrite `tx_labels_map.transactionId` rows that were
279
+ * written with the legacy transactionId (before the real txid + actionId were
280
+ * known) so that they now point at the V7 `actions.actionId`.
281
+ *
282
+ * Call this once per new outgoing transaction immediately after
283
+ * `findOrCreateActionForTxid` resolves the actionId.
284
+ *
285
+ * This is a no-op when:
286
+ * - `legacyTransactionId` has no rows in `tx_labels_map` (no labels on the tx)
287
+ * - `legacyTransactionId === actionId` (should not happen in practice but
288
+ * is safe to call anyway)
289
+ */
290
+ repointLabelsToActionId(legacyTransactionId: number, actionId: number, now?: Date): Promise<void>;
291
+ /**
292
+ * After `processAction` creates the V7 `transactions` row, remap
293
+ * `outputs.transactionId` and `outputs.spentBy` from the bridge-period
294
+ * `transactions_legacy.transactionId` to the real V7 `transactions.transactionId`.
295
+ *
296
+ * During `createAction`, new outputs are inserted with `transactionId =
297
+ * legacyTransactionId` (bypassing FK constraints). `listActionsKnex` queries
298
+ * outputs by V7 transactionId, so without this remap the outputs would be
299
+ * invisible to `listActions`.
300
+ *
301
+ * This is a no-op when `legacyTransactionId === v7TransactionId`.
302
+ */
303
+ repointOutputsToV7TransactionId(legacyTransactionId: number, v7TransactionId: number, now?: Date): Promise<void>;
304
+ }
305
+ //# sourceMappingURL=v7Service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v7Service.d.ts","sourceRoot":"","sources":["../../../../src/storage/schema/v7Service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,KAAK,GAAG,MAAM,WAAW,CAAA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