@bsv/wallet-toolbox 1.1.7 → 1.1.9

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 (317) hide show
  1. package/docs/client.md +3872 -1555
  2. package/docs/monitor.md +29 -27
  3. package/docs/services.md +22 -22
  4. package/docs/setup.md +23 -23
  5. package/docs/storage.md +2747 -438
  6. package/docs/wallet.md +3872 -1555
  7. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +4 -4
  8. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
  9. package/out/src/monitor/tasks/TaskCheckForProofs.js +2 -2
  10. package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
  11. package/out/src/monitor/tasks/TaskSendWaiting.d.ts +2 -2
  12. package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
  13. package/out/src/monitor/tasks/TaskSendWaiting.js +2 -2
  14. package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
  15. package/out/src/sdk/StorageSyncReader.d.ts +30 -30
  16. package/out/src/sdk/StorageSyncReader.d.ts.map +1 -1
  17. package/out/src/sdk/StorageSyncReaderWriter.d.ts +60 -60
  18. package/out/src/sdk/StorageSyncReaderWriter.d.ts.map +1 -1
  19. package/out/src/sdk/WalletStorage.interfaces.d.ts +36 -36
  20. package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
  21. package/out/src/signer/methods/acquireDirectCertificate.d.ts.map +1 -1
  22. package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
  23. package/out/src/storage/StorageKnex.d.ts +61 -61
  24. package/out/src/storage/StorageKnex.d.ts.map +1 -1
  25. package/out/src/storage/StorageKnex.js +13 -4
  26. package/out/src/storage/StorageKnex.js.map +1 -1
  27. package/out/src/storage/StorageProvider.d.ts +16 -15
  28. package/out/src/storage/StorageProvider.d.ts.map +1 -1
  29. package/out/src/storage/StorageProvider.js +8 -8
  30. package/out/src/storage/StorageProvider.js.map +1 -1
  31. package/out/src/storage/StorageReader.d.ts +21 -21
  32. package/out/src/storage/StorageReader.d.ts.map +1 -1
  33. package/out/src/storage/StorageReader.js.map +1 -1
  34. package/out/src/storage/StorageReaderWriter.d.ts +60 -60
  35. package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
  36. package/out/src/storage/StorageReaderWriter.js.map +1 -1
  37. package/out/src/storage/StorageSyncReader.d.ts +17 -17
  38. package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
  39. package/out/src/storage/StorageSyncReader.js.map +1 -1
  40. package/out/src/storage/WalletStorageManager.d.ts +9 -9
  41. package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
  42. package/out/src/storage/WalletStorageManager.js +2 -2
  43. package/out/src/storage/WalletStorageManager.js.map +1 -1
  44. package/out/src/storage/index.all.d.ts +2 -2
  45. package/out/src/storage/index.all.d.ts.map +1 -1
  46. package/out/src/storage/index.all.js +3 -3
  47. package/out/src/storage/index.all.js.map +1 -1
  48. package/out/src/storage/index.client.d.ts +2 -2
  49. package/out/src/storage/index.client.d.ts.map +1 -1
  50. package/out/src/storage/index.client.js +2 -25
  51. package/out/src/storage/index.client.js.map +1 -1
  52. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +3 -3
  53. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
  54. package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
  55. package/out/src/storage/methods/createAction.d.ts.map +1 -1
  56. package/out/src/storage/methods/createAction.js +1 -1
  57. package/out/src/storage/methods/createAction.js.map +1 -1
  58. package/out/src/storage/methods/getBeefForTransaction.js +2 -2
  59. package/out/src/storage/methods/getBeefForTransaction.js.map +1 -1
  60. package/out/src/storage/methods/getSyncChunk.d.ts.map +1 -1
  61. package/out/src/storage/methods/getSyncChunk.js.map +1 -1
  62. package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
  63. package/out/src/storage/methods/internalizeAction.js +1 -1
  64. package/out/src/storage/methods/internalizeAction.js.map +1 -1
  65. package/out/src/storage/methods/listActions.js.map +1 -1
  66. package/out/src/storage/methods/listCertificates.d.ts.map +1 -1
  67. package/out/src/storage/methods/listCertificates.js.map +1 -1
  68. package/out/src/storage/methods/listOutputs.js.map +1 -1
  69. package/out/src/storage/methods/processAction.d.ts +4 -4
  70. package/out/src/storage/methods/processAction.d.ts.map +1 -1
  71. package/out/src/storage/methods/processAction.js +2 -2
  72. package/out/src/storage/methods/processAction.js.map +1 -1
  73. package/out/src/storage/methods/purgeData.d.ts.map +1 -1
  74. package/out/src/storage/methods/purgeData.js.map +1 -1
  75. package/out/src/storage/methods/reviewStatus.js.map +1 -1
  76. package/out/src/storage/remoting/StorageClient.d.ts +230 -15
  77. package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
  78. package/out/src/storage/remoting/StorageClient.js +222 -7
  79. package/out/src/storage/remoting/StorageClient.js.map +1 -1
  80. package/out/src/storage/schema/entities/Certificate.d.ts +9 -9
  81. package/out/src/storage/schema/entities/Certificate.d.ts.map +1 -1
  82. package/out/src/storage/schema/entities/Certificate.js +5 -5
  83. package/out/src/storage/schema/entities/Certificate.js.map +1 -1
  84. package/out/src/storage/schema/entities/CertificateField.d.ts +9 -9
  85. package/out/src/storage/schema/entities/CertificateField.d.ts.map +1 -1
  86. package/out/src/storage/schema/entities/CertificateField.js +5 -5
  87. package/out/src/storage/schema/entities/CertificateField.js.map +1 -1
  88. package/out/src/storage/schema/entities/Commission.d.ts +9 -9
  89. package/out/src/storage/schema/entities/Commission.d.ts.map +1 -1
  90. package/out/src/storage/schema/entities/Commission.js +5 -5
  91. package/out/src/storage/schema/entities/Commission.js.map +1 -1
  92. package/out/src/storage/schema/entities/EntityBase.d.ts +1 -1
  93. package/out/src/storage/schema/entities/MergeEntity.d.ts +6 -7
  94. package/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -1
  95. package/out/src/storage/schema/entities/MergeEntity.js.map +1 -1
  96. package/out/src/storage/schema/entities/Output.d.ts +9 -9
  97. package/out/src/storage/schema/entities/Output.d.ts.map +1 -1
  98. package/out/src/storage/schema/entities/Output.js +5 -5
  99. package/out/src/storage/schema/entities/Output.js.map +1 -1
  100. package/out/src/storage/schema/entities/OutputBasket.d.ts +9 -9
  101. package/out/src/storage/schema/entities/OutputBasket.d.ts.map +1 -1
  102. package/out/src/storage/schema/entities/OutputBasket.js +5 -5
  103. package/out/src/storage/schema/entities/OutputBasket.js.map +1 -1
  104. package/out/src/storage/schema/entities/OutputTag.d.ts +9 -9
  105. package/out/src/storage/schema/entities/OutputTag.d.ts.map +1 -1
  106. package/out/src/storage/schema/entities/OutputTag.js +5 -5
  107. package/out/src/storage/schema/entities/OutputTag.js.map +1 -1
  108. package/out/src/storage/schema/entities/OutputTagMap.d.ts +9 -9
  109. package/out/src/storage/schema/entities/OutputTagMap.d.ts.map +1 -1
  110. package/out/src/storage/schema/entities/OutputTagMap.js +5 -5
  111. package/out/src/storage/schema/entities/OutputTagMap.js.map +1 -1
  112. package/out/src/storage/schema/entities/ProvenTx.d.ts +11 -11
  113. package/out/src/storage/schema/entities/ProvenTx.d.ts.map +1 -1
  114. package/out/src/storage/schema/entities/ProvenTx.js +11 -11
  115. package/out/src/storage/schema/entities/ProvenTx.js.map +1 -1
  116. package/out/src/storage/schema/entities/ProvenTxReq.d.ts +19 -19
  117. package/out/src/storage/schema/entities/ProvenTxReq.d.ts.map +1 -1
  118. package/out/src/storage/schema/entities/ProvenTxReq.js +13 -13
  119. package/out/src/storage/schema/entities/ProvenTxReq.js.map +1 -1
  120. package/out/src/storage/schema/entities/SyncState.d.ts +11 -11
  121. package/out/src/storage/schema/entities/SyncState.d.ts.map +1 -1
  122. package/out/src/storage/schema/entities/SyncState.js +27 -27
  123. package/out/src/storage/schema/entities/SyncState.js.map +1 -1
  124. package/out/src/storage/schema/entities/Transaction.d.ts +11 -11
  125. package/out/src/storage/schema/entities/Transaction.d.ts.map +1 -1
  126. package/out/src/storage/schema/entities/Transaction.js +6 -6
  127. package/out/src/storage/schema/entities/Transaction.js.map +1 -1
  128. package/out/src/storage/schema/entities/TxLabel.d.ts +9 -9
  129. package/out/src/storage/schema/entities/TxLabel.d.ts.map +1 -1
  130. package/out/src/storage/schema/entities/TxLabel.js +5 -5
  131. package/out/src/storage/schema/entities/TxLabel.js.map +1 -1
  132. package/out/src/storage/schema/entities/TxLabelMap.d.ts +9 -9
  133. package/out/src/storage/schema/entities/TxLabelMap.d.ts.map +1 -1
  134. package/out/src/storage/schema/entities/TxLabelMap.js +5 -5
  135. package/out/src/storage/schema/entities/TxLabelMap.js.map +1 -1
  136. package/out/src/storage/schema/entities/User.d.ts +9 -9
  137. package/out/src/storage/schema/entities/User.d.ts.map +1 -1
  138. package/out/src/storage/schema/entities/User.js +5 -5
  139. package/out/src/storage/schema/entities/User.js.map +1 -1
  140. package/out/src/storage/schema/entities/__tests/CertificateFieldTests.test.js +20 -307
  141. package/out/src/storage/schema/entities/__tests/CertificateFieldTests.test.js.map +1 -1
  142. package/out/src/storage/schema/entities/__tests/CertificateTests.test.js +17 -158
  143. package/out/src/storage/schema/entities/__tests/CertificateTests.test.js.map +1 -1
  144. package/out/src/storage/schema/entities/__tests/CommissionTests.test.js +23 -309
  145. package/out/src/storage/schema/entities/__tests/CommissionTests.test.js.map +1 -1
  146. package/out/src/storage/schema/entities/__tests/OutputBasketTests.test.js +19 -306
  147. package/out/src/storage/schema/entities/__tests/OutputBasketTests.test.js.map +1 -1
  148. package/out/src/storage/schema/entities/__tests/OutputTagMapTests.test.js +19 -306
  149. package/out/src/storage/schema/entities/__tests/OutputTagMapTests.test.js.map +1 -1
  150. package/out/src/storage/schema/entities/__tests/OutputTagTests.test.js +23 -237
  151. package/out/src/storage/schema/entities/__tests/OutputTagTests.test.js.map +1 -1
  152. package/out/src/storage/schema/entities/__tests/OutputTests.test.js +20 -233
  153. package/out/src/storage/schema/entities/__tests/OutputTests.test.js.map +1 -1
  154. package/out/src/storage/schema/entities/__tests/ProvenTxReqTests.test.js +27 -98
  155. package/out/src/storage/schema/entities/__tests/ProvenTxReqTests.test.js.map +1 -1
  156. package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js +25 -241
  157. package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js.map +1 -1
  158. package/out/src/storage/schema/entities/__tests/SyncStateTests.test.js +38 -112
  159. package/out/src/storage/schema/entities/__tests/SyncStateTests.test.js.map +1 -1
  160. package/out/src/storage/schema/entities/__tests/TransactionTests.test.js +39 -323
  161. package/out/src/storage/schema/entities/__tests/TransactionTests.test.js.map +1 -1
  162. package/out/src/storage/schema/entities/__tests/TxLabelMapTests.test.js +31 -169
  163. package/out/src/storage/schema/entities/__tests/TxLabelMapTests.test.js.map +1 -1
  164. package/out/src/storage/schema/entities/__tests/TxLabelTests.test.js +16 -159
  165. package/out/src/storage/schema/entities/__tests/TxLabelTests.test.js.map +1 -1
  166. package/out/src/storage/schema/entities/__tests/usersTests.test.js +21 -168
  167. package/out/src/storage/schema/entities/__tests/usersTests.test.js.map +1 -1
  168. package/out/src/storage/schema/tables/Certificate.d.ts +4 -4
  169. package/out/src/storage/schema/tables/Certificate.d.ts.map +1 -1
  170. package/out/src/storage/schema/tables/CertificateField.d.ts +1 -1
  171. package/out/src/storage/schema/tables/CertificateField.d.ts.map +1 -1
  172. package/out/src/storage/schema/tables/Commission.d.ts +1 -1
  173. package/out/src/storage/schema/tables/Commission.d.ts.map +1 -1
  174. package/out/src/storage/schema/tables/MonitorEvent.d.ts +1 -1
  175. package/out/src/storage/schema/tables/MonitorEvent.d.ts.map +1 -1
  176. package/out/src/storage/schema/tables/Output.d.ts +5 -5
  177. package/out/src/storage/schema/tables/Output.d.ts.map +1 -1
  178. package/out/src/storage/schema/tables/OutputBasket.d.ts +1 -1
  179. package/out/src/storage/schema/tables/OutputBasket.d.ts.map +1 -1
  180. package/out/src/storage/schema/tables/OutputTag.d.ts +1 -1
  181. package/out/src/storage/schema/tables/OutputTag.d.ts.map +1 -1
  182. package/out/src/storage/schema/tables/OutputTagMap.d.ts +1 -1
  183. package/out/src/storage/schema/tables/OutputTagMap.d.ts.map +1 -1
  184. package/out/src/storage/schema/tables/ProvenTx.d.ts +1 -1
  185. package/out/src/storage/schema/tables/ProvenTx.d.ts.map +1 -1
  186. package/out/src/storage/schema/tables/ProvenTxReq.d.ts +2 -2
  187. package/out/src/storage/schema/tables/ProvenTxReq.d.ts.map +1 -1
  188. package/out/src/storage/schema/tables/SyncState.d.ts +1 -1
  189. package/out/src/storage/schema/tables/SyncState.d.ts.map +1 -1
  190. package/out/src/storage/schema/tables/{Settings.d.ts → TableSettings.d.ts} +2 -2
  191. package/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -0
  192. package/out/src/storage/schema/tables/{Settings.js → TableSettings.js} +1 -1
  193. package/out/src/storage/schema/tables/TableSettings.js.map +1 -0
  194. package/out/src/storage/schema/tables/Transaction.d.ts +1 -1
  195. package/out/src/storage/schema/tables/Transaction.d.ts.map +1 -1
  196. package/out/src/storage/schema/tables/TxLabel.d.ts +1 -1
  197. package/out/src/storage/schema/tables/TxLabel.d.ts.map +1 -1
  198. package/out/src/storage/schema/tables/TxLabelMap.d.ts +1 -1
  199. package/out/src/storage/schema/tables/TxLabelMap.d.ts.map +1 -1
  200. package/out/src/storage/schema/tables/User.d.ts +1 -1
  201. package/out/src/storage/schema/tables/User.d.ts.map +1 -1
  202. package/out/src/storage/schema/tables/index.d.ts +1 -1
  203. package/out/src/storage/schema/tables/index.d.ts.map +1 -1
  204. package/out/src/storage/schema/tables/index.js +1 -1
  205. package/out/src/storage/schema/tables/index.js.map +1 -1
  206. package/out/src/storage/sync/StorageMySQLDojoReader.d.ts +17 -17
  207. package/out/src/storage/sync/StorageMySQLDojoReader.d.ts.map +1 -1
  208. package/out/src/storage/sync/StorageMySQLDojoReader.js +2 -2
  209. package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
  210. package/out/test/Wallet/certificate/listCertificates.test.js.map +1 -1
  211. package/out/test/Wallet/live/walletLive.man.test.js +1 -1
  212. package/out/test/Wallet/live/walletLive.man.test.js.map +1 -1
  213. package/out/test/monitor/Monitor.test.js +7 -7
  214. package/out/test/monitor/Monitor.test.js.map +1 -1
  215. package/out/test/storage/StorageMySQLDojoReader.man.test.js +1 -1
  216. package/out/test/storage/StorageMySQLDojoReader.man.test.js.map +1 -1
  217. package/out/test/storage/insert.test.js.map +1 -1
  218. package/out/test/storage/update.test.js.map +1 -1
  219. package/out/test/storage/update2.test.js.map +1 -1
  220. package/out/test/utils/TestUtilsWalletStorage.d.ts +56 -56
  221. package/out/test/utils/TestUtilsWalletStorage.d.ts.map +1 -1
  222. package/out/test/utils/TestUtilsWalletStorage.js +11 -4
  223. package/out/test/utils/TestUtilsWalletStorage.js.map +1 -1
  224. package/out/test/wallet/action/createActionToGenerateBeefs.man.test.js.map +1 -1
  225. package/out/tsconfig.all.tsbuildinfo +1 -1
  226. package/package.json +2 -2
  227. package/src/monitor/tasks/TaskCheckForProofs.ts +11 -10
  228. package/src/monitor/tasks/TaskSendWaiting.ts +5 -5
  229. package/src/sdk/StorageSyncReader.ts +48 -30
  230. package/src/sdk/StorageSyncReaderWriter.ts +77 -63
  231. package/src/sdk/WalletStorage.interfaces.ts +55 -36
  232. package/src/signer/methods/acquireDirectCertificate.ts +2 -2
  233. package/src/storage/StorageKnex.ts +137 -106
  234. package/src/storage/StorageProvider.ts +43 -30
  235. package/src/storage/StorageReader.ts +37 -21
  236. package/src/storage/StorageReaderWriter.ts +78 -65
  237. package/src/storage/StorageSyncReader.ts +35 -17
  238. package/src/storage/WalletStorageManager.ts +18 -12
  239. package/src/storage/index.all.ts +2 -2
  240. package/src/storage/index.client.ts +2 -2
  241. package/src/storage/methods/attemptToPostReqsToNetwork.ts +3 -3
  242. package/src/storage/methods/createAction.ts +29 -26
  243. package/src/storage/methods/getBeefForTransaction.ts +3 -3
  244. package/src/storage/methods/getSyncChunk.ts +28 -13
  245. package/src/storage/methods/internalizeAction.ts +19 -17
  246. package/src/storage/methods/listActions.ts +5 -5
  247. package/src/storage/methods/listCertificates.ts +2 -2
  248. package/src/storage/methods/listOutputs.ts +5 -5
  249. package/src/storage/methods/processAction.ts +21 -17
  250. package/src/storage/methods/purgeData.ts +17 -11
  251. package/src/storage/methods/reviewStatus.ts +4 -4
  252. package/src/storage/remoting/StorageClient.ts +250 -26
  253. package/src/storage/schema/entities/Certificate.ts +16 -17
  254. package/src/storage/schema/entities/CertificateField.ts +17 -18
  255. package/src/storage/schema/entities/Commission.ts +16 -20
  256. package/src/storage/schema/entities/EntityBase.ts +1 -1
  257. package/src/storage/schema/entities/MergeEntity.ts +7 -7
  258. package/src/storage/schema/entities/Output.ts +16 -20
  259. package/src/storage/schema/entities/OutputBasket.ts +16 -17
  260. package/src/storage/schema/entities/OutputTag.ts +16 -20
  261. package/src/storage/schema/entities/OutputTagMap.ts +17 -18
  262. package/src/storage/schema/entities/ProvenTx.ts +24 -28
  263. package/src/storage/schema/entities/ProvenTxReq.ts +42 -45
  264. package/src/storage/schema/entities/SyncState.ts +61 -38
  265. package/src/storage/schema/entities/Transaction.ts +23 -23
  266. package/src/storage/schema/entities/TxLabel.ts +16 -17
  267. package/src/storage/schema/entities/TxLabelMap.ts +16 -20
  268. package/src/storage/schema/entities/User.ts +15 -19
  269. package/src/storage/schema/entities/__tests/CertificateFieldTests.test.ts +39 -318
  270. package/src/storage/schema/entities/__tests/CertificateTests.test.ts +29 -169
  271. package/src/storage/schema/entities/__tests/CommissionTests.test.ts +47 -325
  272. package/src/storage/schema/entities/__tests/OutputBasketTests.test.ts +35 -316
  273. package/src/storage/schema/entities/__tests/OutputTagMapTests.test.ts +38 -318
  274. package/src/storage/schema/entities/__tests/OutputTagTests.test.ts +36 -249
  275. package/src/storage/schema/entities/__tests/OutputTests.test.ts +30 -244
  276. package/src/storage/schema/entities/__tests/ProvenTxReqTests.test.ts +35 -101
  277. package/src/storage/schema/entities/__tests/ProvenTxTests.test.ts +27 -243
  278. package/src/storage/schema/entities/__tests/SyncStateTests.test.ts +54 -122
  279. package/src/storage/schema/entities/__tests/TransactionTests.test.ts +53 -333
  280. package/src/storage/schema/entities/__tests/TxLabelMapTests.test.ts +44 -177
  281. package/src/storage/schema/entities/__tests/TxLabelTests.test.ts +19 -163
  282. package/src/storage/schema/entities/__tests/usersTests.test.ts +31 -179
  283. package/src/storage/schema/tables/Certificate.ts +4 -4
  284. package/src/storage/schema/tables/CertificateField.ts +1 -1
  285. package/src/storage/schema/tables/Commission.ts +1 -1
  286. package/src/storage/schema/tables/MonitorEvent.ts +1 -1
  287. package/src/storage/schema/tables/Output.ts +5 -5
  288. package/src/storage/schema/tables/OutputBasket.ts +1 -1
  289. package/src/storage/schema/tables/OutputTag.ts +1 -1
  290. package/src/storage/schema/tables/OutputTagMap.ts +1 -1
  291. package/src/storage/schema/tables/ProvenTx.ts +1 -1
  292. package/src/storage/schema/tables/ProvenTxReq.ts +2 -2
  293. package/src/storage/schema/tables/SyncState.ts +1 -1
  294. package/src/storage/schema/tables/{Settings.ts → TableSettings.ts} +3 -1
  295. package/src/storage/schema/tables/Transaction.ts +1 -1
  296. package/src/storage/schema/tables/TxLabel.ts +1 -1
  297. package/src/storage/schema/tables/TxLabelMap.ts +1 -1
  298. package/src/storage/schema/tables/User.ts +1 -1
  299. package/src/storage/schema/tables/index.ts +1 -1
  300. package/src/storage/sync/StorageMySQLDojoReader.ts +68 -50
  301. package/test/Wallet/certificate/listCertificates.test.ts +12 -8
  302. package/test/Wallet/live/walletLive.man.test.ts +6 -6
  303. package/test/monitor/Monitor.test.ts +8 -8
  304. package/test/storage/StorageMySQLDojoReader.man.test.ts +1 -1
  305. package/test/storage/insert.test.ts +2 -2
  306. package/test/storage/update.test.ts +30 -30
  307. package/test/storage/update2.test.ts +23 -24
  308. package/test/utils/TestUtilsWalletStorage.ts +103 -82
  309. package/test/wallet/action/createActionToGenerateBeefs.man.test.ts +1 -2
  310. package/ts2md.json +1 -1
  311. package/out/src/storage/index.db.d.ts +0 -1
  312. package/out/src/storage/index.db.d.ts.map +0 -1
  313. package/out/src/storage/index.db.js +0 -2
  314. package/out/src/storage/index.db.js.map +0 -1
  315. package/out/src/storage/schema/tables/Settings.d.ts.map +0 -1
  316. package/out/src/storage/schema/tables/Settings.js.map +0 -1
  317. package/src/storage/index.db.ts +0 -0
@@ -13,7 +13,26 @@ import {
13
13
  RelinquishOutputArgs,
14
14
  SendWithResult
15
15
  } from '@bsv/sdk'
16
- import { sdk, table } from '../index.client'
16
+ import {
17
+ sdk,
18
+ TableSettings,
19
+ TableOutputBasket,
20
+ TableCertificateX,
21
+ TableSyncState,
22
+ TableUser,
23
+ TableCertificate,
24
+ TableOutput,
25
+ TableProvenTxReq,
26
+ TableProvenTx,
27
+ TableCertificateField,
28
+ TableCommission,
29
+ TableOutputTagMap,
30
+ TableOutputTag,
31
+ TableTransaction,
32
+ TableTxLabelMap,
33
+ TableTxLabel,
34
+ TableMonitorEvent
35
+ } from '../index.client'
17
36
 
18
37
  /**
19
38
  * This is the `WalletStorage` interface implemented by a class such as `WalletStorageManager`,
@@ -29,19 +48,19 @@ export interface WalletStorage {
29
48
  isStorageProvider(): boolean
30
49
 
31
50
  isAvailable(): boolean
32
- makeAvailable(): Promise<table.Settings>
51
+ makeAvailable(): Promise<TableSettings>
33
52
  migrate(storageName: string, storageIdentityKey: string): Promise<string>
34
53
  destroy(): Promise<void>
35
54
 
36
55
  setServices(v: sdk.WalletServices): void
37
56
  getServices(): sdk.WalletServices
38
- getSettings(): table.Settings
57
+ getSettings(): TableSettings
39
58
 
40
59
  getAuth(): Promise<sdk.AuthId>
41
60
 
42
61
  findOrInsertUser(
43
62
  identityKey: string
44
- ): Promise<{ user: table.User; isNew: boolean }>
63
+ ): Promise<{ user: TableUser; isNew: boolean }>
45
64
 
46
65
  abortAction(args: AbortActionArgs): Promise<AbortActionResult>
47
66
  createAction(
@@ -54,12 +73,12 @@ export interface WalletStorage {
54
73
  args: InternalizeActionArgs
55
74
  ): Promise<InternalizeActionResult>
56
75
 
57
- findCertificates(args: sdk.FindCertificatesArgs): Promise<table.Certificate[]>
76
+ findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
58
77
  findOutputBaskets(
59
78
  args: sdk.FindOutputBasketsArgs
60
- ): Promise<table.OutputBasket[]>
61
- findOutputs(args: sdk.FindOutputsArgs): Promise<table.Output[]>
62
- findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<table.ProvenTxReq[]>
79
+ ): Promise<TableOutputBasket[]>
80
+ findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>
81
+ findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
63
82
 
64
83
  listActions(args: ListActionsArgs): Promise<ListActionsResult>
65
84
  listCertificates(
@@ -67,7 +86,7 @@ export interface WalletStorage {
67
86
  ): Promise<ListCertificatesResult>
68
87
  listOutputs(args: ListOutputsArgs): Promise<ListOutputsResult>
69
88
 
70
- insertCertificate(certificate: table.CertificateX): Promise<number>
89
+ insertCertificate(certificate: TableCertificateX): Promise<number>
71
90
 
72
91
  relinquishCertificate(args: RelinquishCertificateArgs): Promise<number>
73
92
  relinquishOutput(args: RelinquishOutputArgs): Promise<number>
@@ -90,7 +109,7 @@ export interface WalletStorageSync extends WalletStorageWriter {
90
109
  auth: sdk.AuthId,
91
110
  storageIdentityKey: string,
92
111
  storageName: string
93
- ): Promise<{ syncState: table.SyncState; isNew: boolean }>
112
+ ): Promise<{ syncState: TableSyncState; isNew: boolean }>
94
113
 
95
114
  setActive(
96
115
  auth: sdk.AuthId,
@@ -105,13 +124,13 @@ export interface WalletStorageSync extends WalletStorageWriter {
105
124
  }
106
125
 
107
126
  export interface WalletStorageWriter extends WalletStorageReader {
108
- makeAvailable(): Promise<table.Settings>
127
+ makeAvailable(): Promise<TableSettings>
109
128
  migrate(storageName: string, storageIdentityKey: string): Promise<string>
110
129
  destroy(): Promise<void>
111
130
 
112
131
  findOrInsertUser(
113
132
  identityKey: string
114
- ): Promise<{ user: table.User; isNew: boolean }>
133
+ ): Promise<{ user: TableUser; isNew: boolean }>
115
134
 
116
135
  abortAction(
117
136
  auth: sdk.AuthId,
@@ -132,7 +151,7 @@ export interface WalletStorageWriter extends WalletStorageReader {
132
151
 
133
152
  insertCertificateAuth(
134
153
  auth: sdk.AuthId,
135
- certificate: table.CertificateX
154
+ certificate: TableCertificateX
136
155
  ): Promise<number>
137
156
 
138
157
  relinquishCertificate(
@@ -149,21 +168,21 @@ export interface WalletStorageReader {
149
168
  isAvailable(): boolean
150
169
 
151
170
  getServices(): sdk.WalletServices
152
- getSettings(): table.Settings
171
+ getSettings(): TableSettings
153
172
 
154
173
  findCertificatesAuth(
155
174
  auth: sdk.AuthId,
156
175
  args: sdk.FindCertificatesArgs
157
- ): Promise<table.Certificate[]>
176
+ ): Promise<TableCertificateX[]>
158
177
  findOutputBasketsAuth(
159
178
  auth: sdk.AuthId,
160
179
  args: sdk.FindOutputBasketsArgs
161
- ): Promise<table.OutputBasket[]>
180
+ ): Promise<TableOutputBasket[]>
162
181
  findOutputsAuth(
163
182
  auth: sdk.AuthId,
164
183
  args: sdk.FindOutputsArgs
165
- ): Promise<table.Output[]>
166
- findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<table.ProvenTxReq[]>
184
+ ): Promise<TableOutput[]>
185
+ findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
167
186
 
168
187
  listActions(
169
188
  auth: sdk.AuthId,
@@ -201,18 +220,18 @@ export interface FindPartialSincePagedArgs<T extends object>
201
220
  }
202
221
 
203
222
  export interface FindCertificatesArgs extends FindSincePagedArgs {
204
- partial: Partial<table.Certificate>
223
+ partial: Partial<TableCertificate>
205
224
  certifiers?: string[]
206
225
  types?: string[]
207
226
  includeFields?: boolean
208
227
  }
209
228
 
210
229
  export interface FindOutputBasketsArgs extends FindSincePagedArgs {
211
- partial: Partial<table.OutputBasket>
230
+ partial: Partial<TableOutputBasket>
212
231
  }
213
232
 
214
233
  export interface FindOutputsArgs extends FindSincePagedArgs {
215
- partial: Partial<table.Output>
234
+ partial: Partial<TableOutput>
216
235
  noScript?: boolean
217
236
  txStatus?: sdk.TransactionStatus[]
218
237
  }
@@ -271,7 +290,7 @@ export interface StorageProcessActionResults {
271
290
  }
272
291
 
273
292
  export interface ProvenOrRawTx {
274
- proven?: table.ProvenTx
293
+ proven?: TableProvenTx
275
294
  rawTx?: number[]
276
295
  inputBEEF?: number[]
277
296
  }
@@ -304,8 +323,8 @@ export interface PurgeResults {
304
323
  }
305
324
 
306
325
  export interface StorageProvenOrReq {
307
- proven?: table.ProvenTx
308
- req?: table.ProvenTxReq
326
+ proven?: TableProvenTx
327
+ req?: TableProvenTxReq
309
328
  }
310
329
 
311
330
  /**
@@ -347,47 +366,47 @@ export interface StorageSyncReaderOptions {
347
366
  }
348
367
 
349
368
  export interface FindCertificateFieldsArgs extends sdk.FindSincePagedArgs {
350
- partial: Partial<table.CertificateField>
369
+ partial: Partial<TableCertificateField>
351
370
  }
352
371
 
353
372
  export interface FindCommissionsArgs extends sdk.FindSincePagedArgs {
354
- partial: Partial<table.Commission>
373
+ partial: Partial<TableCommission>
355
374
  }
356
375
  export interface FindOutputTagMapsArgs extends sdk.FindSincePagedArgs {
357
- partial: Partial<table.OutputTagMap>
376
+ partial: Partial<TableOutputTagMap>
358
377
  tagIds?: number[]
359
378
  }
360
379
  export interface FindOutputTagsArgs extends sdk.FindSincePagedArgs {
361
- partial: Partial<table.OutputTag>
380
+ partial: Partial<TableOutputTag>
362
381
  }
363
382
  export interface FindProvenTxReqsArgs extends sdk.FindSincePagedArgs {
364
- partial: Partial<table.ProvenTxReq>
383
+ partial: Partial<TableProvenTxReq>
365
384
  status?: sdk.ProvenTxReqStatus[]
366
385
  txids?: string[]
367
386
  }
368
387
  export interface FindProvenTxsArgs extends sdk.FindSincePagedArgs {
369
- partial: Partial<table.ProvenTx>
388
+ partial: Partial<TableProvenTx>
370
389
  }
371
390
  export interface FindSyncStatesArgs extends sdk.FindSincePagedArgs {
372
- partial: Partial<table.SyncState>
391
+ partial: Partial<TableSyncState>
373
392
  }
374
393
  export interface FindTransactionsArgs extends sdk.FindSincePagedArgs {
375
- partial: Partial<table.Transaction>
394
+ partial: Partial<TableTransaction>
376
395
  status?: sdk.TransactionStatus[]
377
396
  noRawTx?: boolean
378
397
  }
379
398
  export interface FindTxLabelMapsArgs extends sdk.FindSincePagedArgs {
380
- partial: Partial<table.TxLabelMap>
399
+ partial: Partial<TableTxLabelMap>
381
400
  labelIds?: number[]
382
401
  }
383
402
  export interface FindTxLabelsArgs extends sdk.FindSincePagedArgs {
384
- partial: Partial<table.TxLabel>
403
+ partial: Partial<TableTxLabel>
385
404
  }
386
405
  export interface FindUsersArgs extends sdk.FindSincePagedArgs {
387
- partial: Partial<table.User>
406
+ partial: Partial<TableUser>
388
407
  }
389
408
  export interface FindMonitorEventsArgs extends sdk.FindSincePagedArgs {
390
- partial: Partial<table.MonitorEvent>
409
+ partial: Partial<TableMonitorEvent>
391
410
  }
392
411
  /**
393
412
  * Place holder for the transaction control object used by actual storage provider implementation.
@@ -1,5 +1,5 @@
1
1
  import { AcquireCertificateResult } from '@bsv/sdk'
2
- import { sdk, table, Wallet } from '../../index.client'
2
+ import { sdk, TableCertificateX, Wallet } from '../../index.client'
3
3
 
4
4
  export async function acquireDirectCertificate(
5
5
  wallet: Wallet,
@@ -7,7 +7,7 @@ export async function acquireDirectCertificate(
7
7
  vargs: sdk.ValidAcquireDirectCertificateArgs
8
8
  ): Promise<AcquireCertificateResult> {
9
9
  const now = new Date()
10
- const newCert: table.CertificateX = {
10
+ const newCert: TableCertificateX = {
11
11
  certificateId: 0, // replaced by storage insert
12
12
  created_at: now,
13
13
  updated_at: now,