@bsv/wallet-toolbox-mobile 2.1.23 → 2.1.25

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 (538) hide show
  1. package/out/src/CWIStyleWalletManager.d.ts +33 -7
  2. package/out/src/CWIStyleWalletManager.d.ts.map +1 -1
  3. package/out/src/CWIStyleWalletManager.js +281 -313
  4. package/out/src/CWIStyleWalletManager.js.map +1 -1
  5. package/out/src/SimpleWalletManager.d.ts +12 -2
  6. package/out/src/SimpleWalletManager.d.ts.map +1 -1
  7. package/out/src/SimpleWalletManager.js +46 -30
  8. package/out/src/SimpleWalletManager.js.map +1 -1
  9. package/out/src/Wallet.d.ts +1 -1
  10. package/out/src/Wallet.d.ts.map +1 -1
  11. package/out/src/Wallet.js +102 -100
  12. package/out/src/Wallet.js.map +1 -1
  13. package/out/src/WalletAuthenticationManager.d.ts +1 -1
  14. package/out/src/WalletAuthenticationManager.d.ts.map +1 -1
  15. package/out/src/WalletAuthenticationManager.js +3 -3
  16. package/out/src/WalletAuthenticationManager.js.map +1 -1
  17. package/out/src/WalletLogger.d.ts.map +1 -1
  18. package/out/src/WalletLogger.js +16 -8
  19. package/out/src/WalletLogger.js.map +1 -1
  20. package/out/src/WalletPermissionsManager.d.ts +89 -18
  21. package/out/src/WalletPermissionsManager.d.ts.map +1 -1
  22. package/out/src/WalletPermissionsManager.js +656 -870
  23. package/out/src/WalletPermissionsManager.js.map +1 -1
  24. package/out/src/WalletSettingsManager.d.ts +2 -2
  25. package/out/src/WalletSettingsManager.d.ts.map +1 -1
  26. package/out/src/WalletSettingsManager.js.map +1 -1
  27. package/out/src/mockchain/MockChainMigrations.d.ts +3 -3
  28. package/out/src/mockchain/MockChainMigrations.d.ts.map +1 -1
  29. package/out/src/mockchain/MockChainMigrations.js.map +1 -1
  30. package/out/src/mockchain/MockChainStorage.d.ts.map +1 -1
  31. package/out/src/mockchain/MockChainStorage.js +5 -5
  32. package/out/src/mockchain/MockChainStorage.js.map +1 -1
  33. package/out/src/mockchain/MockChainTracker.d.ts.map +1 -1
  34. package/out/src/mockchain/MockChainTracker.js +10 -10
  35. package/out/src/mockchain/MockChainTracker.js.map +1 -1
  36. package/out/src/mockchain/MockMiner.d.ts.map +1 -1
  37. package/out/src/mockchain/MockMiner.js +3 -3
  38. package/out/src/mockchain/MockMiner.js.map +1 -1
  39. package/out/src/mockchain/MockServices.d.ts +9 -0
  40. package/out/src/mockchain/MockServices.d.ts.map +1 -1
  41. package/out/src/mockchain/MockServices.js +195 -238
  42. package/out/src/mockchain/MockServices.js.map +1 -1
  43. package/out/src/mockchain/merkleTree.d.ts.map +1 -1
  44. package/out/src/mockchain/merkleTree.js +21 -12
  45. package/out/src/mockchain/merkleTree.js.map +1 -1
  46. package/out/src/monitor/Monitor.d.ts +17 -0
  47. package/out/src/monitor/Monitor.d.ts.map +1 -1
  48. package/out/src/monitor/Monitor.js +56 -75
  49. package/out/src/monitor/Monitor.js.map +1 -1
  50. package/out/src/monitor/tasks/TaskArcSSE.d.ts +2 -2
  51. package/out/src/monitor/tasks/TaskArcSSE.d.ts.map +1 -1
  52. package/out/src/monitor/tasks/TaskArcSSE.js +10 -23
  53. package/out/src/monitor/tasks/TaskArcSSE.js.map +1 -1
  54. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +2 -2
  55. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
  56. package/out/src/monitor/tasks/TaskCheckForProofs.js +28 -16
  57. package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
  58. package/out/src/monitor/tasks/TaskCheckNoSends.d.ts +1 -1
  59. package/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -1
  60. package/out/src/monitor/tasks/TaskCheckNoSends.js +1 -2
  61. package/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -1
  62. package/out/src/monitor/tasks/TaskClock.d.ts +1 -1
  63. package/out/src/monitor/tasks/TaskClock.d.ts.map +1 -1
  64. package/out/src/monitor/tasks/TaskClock.js +0 -1
  65. package/out/src/monitor/tasks/TaskClock.js.map +1 -1
  66. package/out/src/monitor/tasks/TaskFailAbandoned.d.ts +1 -1
  67. package/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -1
  68. package/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -1
  69. package/out/src/monitor/tasks/TaskMineBlock.d.ts +1 -1
  70. package/out/src/monitor/tasks/TaskMineBlock.d.ts.map +1 -1
  71. package/out/src/monitor/tasks/TaskMineBlock.js.map +1 -1
  72. package/out/src/monitor/tasks/TaskMonitorCallHistory.d.ts +1 -1
  73. package/out/src/monitor/tasks/TaskMonitorCallHistory.d.ts.map +1 -1
  74. package/out/src/monitor/tasks/TaskMonitorCallHistory.js +1 -1
  75. package/out/src/monitor/tasks/TaskMonitorCallHistory.js.map +1 -1
  76. package/out/src/monitor/tasks/TaskNewHeader.d.ts +2 -2
  77. package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -1
  78. package/out/src/monitor/tasks/TaskNewHeader.js +7 -5
  79. package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -1
  80. package/out/src/monitor/tasks/TaskPurge.d.ts +1 -1
  81. package/out/src/monitor/tasks/TaskPurge.d.ts.map +1 -1
  82. package/out/src/monitor/tasks/TaskPurge.js.map +1 -1
  83. package/out/src/monitor/tasks/TaskReorg.d.ts +1 -1
  84. package/out/src/monitor/tasks/TaskReorg.d.ts.map +1 -1
  85. package/out/src/monitor/tasks/TaskReorg.js +2 -2
  86. package/out/src/monitor/tasks/TaskReorg.js.map +1 -1
  87. package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts +1 -1
  88. package/out/src/monitor/tasks/TaskReviewDoubleSpends.d.ts.map +1 -1
  89. package/out/src/monitor/tasks/TaskReviewDoubleSpends.js +10 -10
  90. package/out/src/monitor/tasks/TaskReviewDoubleSpends.js.map +1 -1
  91. package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts +1 -1
  92. package/out/src/monitor/tasks/TaskReviewProvenTxs.d.ts.map +1 -1
  93. package/out/src/monitor/tasks/TaskReviewProvenTxs.js +2 -2
  94. package/out/src/monitor/tasks/TaskReviewProvenTxs.js.map +1 -1
  95. package/out/src/monitor/tasks/TaskReviewStatus.d.ts +1 -1
  96. package/out/src/monitor/tasks/TaskReviewStatus.d.ts.map +1 -1
  97. package/out/src/monitor/tasks/TaskReviewStatus.js.map +1 -1
  98. package/out/src/monitor/tasks/TaskReviewUtxos.d.ts +1 -1
  99. package/out/src/monitor/tasks/TaskReviewUtxos.d.ts.map +1 -1
  100. package/out/src/monitor/tasks/TaskReviewUtxos.js.map +1 -1
  101. package/out/src/monitor/tasks/TaskSendWaiting.d.ts +1 -1
  102. package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
  103. package/out/src/monitor/tasks/TaskSendWaiting.js +4 -5
  104. package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
  105. package/out/src/monitor/tasks/TaskUnFail.d.ts +1 -1
  106. package/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -1
  107. package/out/src/monitor/tasks/TaskUnFail.js +13 -15
  108. package/out/src/monitor/tasks/TaskUnFail.js.map +1 -1
  109. package/out/src/monitor/tasks/WalletMonitorTask.d.ts.map +1 -1
  110. package/out/src/monitor/tasks/WalletMonitorTask.js +3 -1
  111. package/out/src/monitor/tasks/WalletMonitorTask.js.map +1 -1
  112. package/out/src/sdk/CertOpsWallet.d.ts +3 -3
  113. package/out/src/sdk/CertOpsWallet.d.ts.map +1 -1
  114. package/out/src/sdk/PrivilegedKeyManager.d.ts +3 -3
  115. package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -1
  116. package/out/src/sdk/PrivilegedKeyManager.js +26 -21
  117. package/out/src/sdk/PrivilegedKeyManager.js.map +1 -1
  118. package/out/src/sdk/WERR_errors.d.ts.map +1 -1
  119. package/out/src/sdk/WERR_errors.js +5 -5
  120. package/out/src/sdk/WERR_errors.js.map +1 -1
  121. package/out/src/sdk/WalletError.d.ts +1 -1
  122. package/out/src/sdk/WalletError.d.ts.map +1 -1
  123. package/out/src/sdk/WalletError.js +10 -3
  124. package/out/src/sdk/WalletError.js.map +1 -1
  125. package/out/src/sdk/WalletErrorFromJson.d.ts.map +1 -1
  126. package/out/src/sdk/WalletErrorFromJson.js +1 -3
  127. package/out/src/sdk/WalletErrorFromJson.js.map +1 -1
  128. package/out/src/sdk/WalletServices.interfaces.d.ts +19 -19
  129. package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
  130. package/out/src/sdk/types.d.ts +4 -4
  131. package/out/src/sdk/types.d.ts.map +1 -1
  132. package/out/src/sdk/types.js +3 -3
  133. package/out/src/sdk/types.js.map +1 -1
  134. package/out/src/services/ServiceCollection.d.ts +6 -6
  135. package/out/src/services/ServiceCollection.d.ts.map +1 -1
  136. package/out/src/services/ServiceCollection.js +3 -4
  137. package/out/src/services/ServiceCollection.js.map +1 -1
  138. package/out/src/services/Services.d.ts +5 -0
  139. package/out/src/services/Services.d.ts.map +1 -1
  140. package/out/src/services/Services.js +174 -182
  141. package/out/src/services/Services.js.map +1 -1
  142. package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -1
  143. package/out/src/services/chaintracker/ChaintracksChainTracker.js +5 -5
  144. package/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -1
  145. package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts +5 -3
  146. package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.d.ts.map +1 -1
  147. package/out/src/services/chaintracker/chaintracks/Api/BlockHeaderApi.js.map +1 -1
  148. package/out/src/services/chaintracker/chaintracks/Api/BulkStorageApi.d.ts.map +1 -1
  149. package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts +20 -10
  150. package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts.map +1 -1
  151. package/out/src/services/chaintracker/chaintracks/Chaintracks.js +228 -221
  152. package/out/src/services/chaintracker/chaintracks/Chaintracks.js.map +1 -1
  153. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -1
  154. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +9 -10
  155. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -1
  156. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.d.ts.map +1 -1
  157. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js +1 -1
  158. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorBase.js.map +1 -1
  159. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.d.ts +1 -2
  160. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.d.ts.map +1 -1
  161. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.js +3 -3
  162. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDN.js.map +1 -1
  163. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.d.ts.map +1 -1
  164. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorCDNBabbage.js.map +1 -1
  165. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.d.ts.map +1 -1
  166. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js +3 -3
  167. package/out/src/services/chaintracker/chaintracks/Ingest/BulkIngestorWhatsOnChainCdn.js.map +1 -1
  168. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.d.ts.map +1 -1
  169. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js +1 -1
  170. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorBase.js.map +1 -1
  171. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts.map +1 -1
  172. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js +2 -2
  173. package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js.map +1 -1
  174. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts +2 -2
  175. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.d.ts.map +1 -1
  176. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js +6 -39
  177. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainIngestorWs.js.map +1 -1
  178. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts +3 -3
  179. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.d.ts.map +1 -1
  180. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js +8 -6
  181. package/out/src/services/chaintracker/chaintracks/Ingest/WhatsOnChainServices.js.map +1 -1
  182. package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.d.ts.map +1 -1
  183. package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js +9 -16
  184. package/out/src/services/chaintracker/chaintracks/Storage/BulkStorageBase.js.map +1 -1
  185. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.d.ts.map +1 -1
  186. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js +34 -22
  187. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageBase.js.map +1 -1
  188. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.d.ts.map +1 -1
  189. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js +31 -30
  190. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageIdb.js.map +1 -1
  191. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts +2 -2
  192. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.d.ts.map +1 -1
  193. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js +11 -10
  194. package/out/src/services/chaintracker/chaintracks/Storage/ChaintracksStorageNoDb.js.map +1 -1
  195. package/out/src/services/chaintracker/chaintracks/createNoDbChaintracks.d.ts.map +1 -1
  196. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts +6 -1
  197. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.d.ts.map +1 -1
  198. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js +247 -227
  199. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataManager.js.map +1 -1
  200. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.d.ts.map +1 -1
  201. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.js +8 -7
  202. package/out/src/services/chaintracker/chaintracks/util/BulkFileDataReader.js.map +1 -1
  203. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.d.ts.map +1 -1
  204. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js +35 -25
  205. package/out/src/services/chaintracker/chaintracks/util/BulkFilesReader.js.map +1 -1
  206. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts +5 -5
  207. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.d.ts.map +1 -1
  208. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js +13 -11
  209. package/out/src/services/chaintracker/chaintracks/util/BulkHeaderFile.js.map +1 -1
  210. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts +0 -1
  211. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts.map +1 -1
  212. package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js.map +1 -1
  213. package/out/src/services/chaintracker/chaintracks/util/HeightRange.d.ts.map +1 -1
  214. package/out/src/services/chaintracker/chaintracks/util/HeightRange.js +21 -13
  215. package/out/src/services/chaintracker/chaintracks/util/HeightRange.js.map +1 -1
  216. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts +2 -2
  217. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.d.ts.map +1 -1
  218. package/out/src/services/chaintracker/chaintracks/util/SingleWriterMultiReaderLock.js.map +1 -1
  219. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts +1 -1
  220. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.d.ts.map +1 -1
  221. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js +28 -24
  222. package/out/src/services/chaintracker/chaintracks/util/blockHeaderUtilities.js.map +1 -1
  223. package/out/src/services/chaintracker/chaintracks/util/dirtyHashes.d.ts.map +1 -1
  224. package/out/src/services/chaintracker/chaintracks/util/dirtyHashes.js.map +1 -1
  225. package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.d.ts.map +1 -1
  226. package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.js +9 -10
  227. package/out/src/services/chaintracker/chaintracks/util/validBulkHeaderFilesByFileHash.js.map +1 -1
  228. package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -1
  229. package/out/src/services/createDefaultWalletServicesOptions.js +3 -3
  230. package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -1
  231. package/out/src/services/providers/ARC.d.ts.map +1 -1
  232. package/out/src/services/providers/ARC.js +7 -14
  233. package/out/src/services/providers/ARC.js.map +1 -1
  234. package/out/src/services/providers/ArcSSEClient.d.ts.map +1 -1
  235. package/out/src/services/providers/ArcSSEClient.js +1 -1
  236. package/out/src/services/providers/ArcSSEClient.js.map +1 -1
  237. package/out/src/services/providers/Bitails.d.ts.map +1 -1
  238. package/out/src/services/providers/Bitails.js +17 -17
  239. package/out/src/services/providers/Bitails.js.map +1 -1
  240. package/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -1
  241. package/out/src/services/providers/SdkWhatsOnChain.js.map +1 -1
  242. package/out/src/services/providers/WhatsOnChain.d.ts +2 -0
  243. package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -1
  244. package/out/src/services/providers/WhatsOnChain.js +109 -233
  245. package/out/src/services/providers/WhatsOnChain.js.map +1 -1
  246. package/out/src/services/providers/exchangeRates.d.ts.map +1 -1
  247. package/out/src/services/providers/exchangeRates.js +3 -3
  248. package/out/src/services/providers/exchangeRates.js.map +1 -1
  249. package/out/src/services/providers/getBeefForTxid.d.ts +1 -1
  250. package/out/src/services/providers/getBeefForTxid.d.ts.map +1 -1
  251. package/out/src/services/providers/getBeefForTxid.js.map +1 -1
  252. package/out/src/services/providers/whatsOnChainHelpers.d.ts +68 -0
  253. package/out/src/services/providers/whatsOnChainHelpers.d.ts.map +1 -0
  254. package/out/src/services/providers/whatsOnChainHelpers.js +147 -0
  255. package/out/src/services/providers/whatsOnChainHelpers.js.map +1 -0
  256. package/out/src/signer/WalletSigner.d.ts.map +1 -1
  257. package/out/src/signer/WalletSigner.js.map +1 -1
  258. package/out/src/signer/methods/acquireDirectCertificate.js +1 -1
  259. package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
  260. package/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -1
  261. package/out/src/signer/methods/buildSignableTransaction.js +21 -13
  262. package/out/src/signer/methods/buildSignableTransaction.js.map +1 -1
  263. package/out/src/signer/methods/completeSignedTransaction.d.ts.map +1 -1
  264. package/out/src/signer/methods/completeSignedTransaction.js +20 -21
  265. package/out/src/signer/methods/completeSignedTransaction.js.map +1 -1
  266. package/out/src/signer/methods/createAction.d.ts.map +1 -1
  267. package/out/src/signer/methods/createAction.js +8 -7
  268. package/out/src/signer/methods/createAction.js.map +1 -1
  269. package/out/src/signer/methods/internalizeAction.d.ts.map +1 -1
  270. package/out/src/signer/methods/internalizeAction.js +8 -6
  271. package/out/src/signer/methods/internalizeAction.js.map +1 -1
  272. package/out/src/signer/methods/proveCertificate.js +1 -1
  273. package/out/src/signer/methods/signAction.d.ts.map +1 -1
  274. package/out/src/signer/methods/signAction.js +8 -10
  275. package/out/src/signer/methods/signAction.js.map +1 -1
  276. package/out/src/storage/StorageProvider.d.ts +10 -0
  277. package/out/src/storage/StorageProvider.d.ts.map +1 -1
  278. package/out/src/storage/StorageProvider.js +152 -182
  279. package/out/src/storage/StorageProvider.js.map +1 -1
  280. package/out/src/storage/StorageReader.d.ts.map +1 -1
  281. package/out/src/storage/StorageReader.js +8 -7
  282. package/out/src/storage/StorageReader.js.map +1 -1
  283. package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
  284. package/out/src/storage/StorageReaderWriter.js +32 -32
  285. package/out/src/storage/StorageReaderWriter.js.map +1 -1
  286. package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
  287. package/out/src/storage/StorageSyncReader.js +3 -3
  288. package/out/src/storage/StorageSyncReader.js.map +1 -1
  289. package/out/src/storage/WalletStorageManager.d.ts +3 -0
  290. package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
  291. package/out/src/storage/WalletStorageManager.js +83 -73
  292. package/out/src/storage/WalletStorageManager.js.map +1 -1
  293. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +83 -0
  294. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
  295. package/out/src/storage/methods/attemptToPostReqsToNetwork.js +224 -61
  296. package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
  297. package/out/src/storage/methods/createAction.d.ts.map +1 -1
  298. package/out/src/storage/methods/createAction.js +230 -270
  299. package/out/src/storage/methods/createAction.js.map +1 -1
  300. package/out/src/storage/methods/generateChange.d.ts.map +1 -1
  301. package/out/src/storage/methods/generateChange.js +99 -80
  302. package/out/src/storage/methods/generateChange.js.map +1 -1
  303. package/out/src/storage/methods/getBeefForTransaction.js +15 -13
  304. package/out/src/storage/methods/getBeefForTransaction.js.map +1 -1
  305. package/out/src/storage/methods/getSyncChunk.d.ts.map +1 -1
  306. package/out/src/storage/methods/getSyncChunk.js +4 -3
  307. package/out/src/storage/methods/getSyncChunk.js.map +1 -1
  308. package/out/src/storage/methods/internalizeAction.js +41 -51
  309. package/out/src/storage/methods/internalizeAction.js.map +1 -1
  310. package/out/src/storage/methods/listCertificates.d.ts +1 -1
  311. package/out/src/storage/methods/listCertificates.d.ts.map +1 -1
  312. package/out/src/storage/methods/listCertificates.js +7 -7
  313. package/out/src/storage/methods/listCertificates.js.map +1 -1
  314. package/out/src/storage/methods/offsetKey.d.ts +1 -1
  315. package/out/src/storage/methods/offsetKey.d.ts.map +1 -1
  316. package/out/src/storage/methods/offsetKey.js +3 -5
  317. package/out/src/storage/methods/offsetKey.js.map +1 -1
  318. package/out/src/storage/methods/processAction.d.ts +0 -11
  319. package/out/src/storage/methods/processAction.d.ts.map +1 -1
  320. package/out/src/storage/methods/processAction.js +90 -83
  321. package/out/src/storage/methods/processAction.js.map +1 -1
  322. package/out/src/storage/methods/utils.d.ts.map +1 -1
  323. package/out/src/storage/methods/utils.js +7 -1
  324. package/out/src/storage/methods/utils.js.map +1 -1
  325. package/out/src/storage/remoting/StorageClient.d.ts +4 -270
  326. package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
  327. package/out/src/storage/remoting/StorageClient.js +16 -423
  328. package/out/src/storage/remoting/StorageClient.js.map +1 -1
  329. package/out/src/storage/remoting/StorageClientBase.d.ts +289 -0
  330. package/out/src/storage/remoting/StorageClientBase.d.ts.map +1 -0
  331. package/out/src/storage/remoting/StorageClientBase.js +375 -0
  332. package/out/src/storage/remoting/StorageClientBase.js.map +1 -0
  333. package/out/src/storage/remoting/StorageMobile.d.ts +7 -275
  334. package/out/src/storage/remoting/StorageMobile.d.ts.map +1 -1
  335. package/out/src/storage/remoting/StorageMobile.js +12 -421
  336. package/out/src/storage/remoting/StorageMobile.js.map +1 -1
  337. package/out/src/storage/remoting/entityValidationHelpers.d.ts +29 -0
  338. package/out/src/storage/remoting/entityValidationHelpers.d.ts.map +1 -0
  339. package/out/src/storage/remoting/entityValidationHelpers.js +91 -0
  340. package/out/src/storage/remoting/entityValidationHelpers.js.map +1 -0
  341. package/out/src/storage/schema/entities/EntityBase.d.ts.map +1 -1
  342. package/out/src/storage/schema/entities/EntityBase.js.map +1 -1
  343. package/out/src/storage/schema/entities/EntityCertificate.d.ts.map +1 -1
  344. package/out/src/storage/schema/entities/EntityCertificate.js +5 -4
  345. package/out/src/storage/schema/entities/EntityCertificate.js.map +1 -1
  346. package/out/src/storage/schema/entities/EntityCertificateField.d.ts.map +1 -1
  347. package/out/src/storage/schema/entities/EntityCertificateField.js +5 -7
  348. package/out/src/storage/schema/entities/EntityCertificateField.js.map +1 -1
  349. package/out/src/storage/schema/entities/EntityCommission.d.ts.map +1 -1
  350. package/out/src/storage/schema/entities/EntityCommission.js +6 -8
  351. package/out/src/storage/schema/entities/EntityCommission.js.map +1 -1
  352. package/out/src/storage/schema/entities/EntityOutput.d.ts.map +1 -1
  353. package/out/src/storage/schema/entities/EntityOutput.js +21 -24
  354. package/out/src/storage/schema/entities/EntityOutput.js.map +1 -1
  355. package/out/src/storage/schema/entities/EntityOutputBasket.d.ts.map +1 -1
  356. package/out/src/storage/schema/entities/EntityOutputBasket.js +6 -6
  357. package/out/src/storage/schema/entities/EntityOutputBasket.js.map +1 -1
  358. package/out/src/storage/schema/entities/EntityOutputTag.d.ts.map +1 -1
  359. package/out/src/storage/schema/entities/EntityOutputTag.js +2 -2
  360. package/out/src/storage/schema/entities/EntityOutputTag.js.map +1 -1
  361. package/out/src/storage/schema/entities/EntityOutputTagMap.d.ts.map +1 -1
  362. package/out/src/storage/schema/entities/EntityOutputTagMap.js +4 -6
  363. package/out/src/storage/schema/entities/EntityOutputTagMap.js.map +1 -1
  364. package/out/src/storage/schema/entities/EntityProvenTx.d.ts +3 -3
  365. package/out/src/storage/schema/entities/EntityProvenTx.d.ts.map +1 -1
  366. package/out/src/storage/schema/entities/EntityProvenTx.js +22 -23
  367. package/out/src/storage/schema/entities/EntityProvenTx.js.map +1 -1
  368. package/out/src/storage/schema/entities/EntityProvenTxReq.d.ts +9 -0
  369. package/out/src/storage/schema/entities/EntityProvenTxReq.d.ts.map +1 -1
  370. package/out/src/storage/schema/entities/EntityProvenTxReq.js +116 -68
  371. package/out/src/storage/schema/entities/EntityProvenTxReq.js.map +1 -1
  372. package/out/src/storage/schema/entities/EntitySyncState.d.ts.map +1 -1
  373. package/out/src/storage/schema/entities/EntitySyncState.js +19 -18
  374. package/out/src/storage/schema/entities/EntitySyncState.js.map +1 -1
  375. package/out/src/storage/schema/entities/EntityTransaction.d.ts.map +1 -1
  376. package/out/src/storage/schema/entities/EntityTransaction.js +25 -26
  377. package/out/src/storage/schema/entities/EntityTransaction.js.map +1 -1
  378. package/out/src/storage/schema/entities/EntityTxLabel.d.ts.map +1 -1
  379. package/out/src/storage/schema/entities/EntityTxLabel.js +2 -2
  380. package/out/src/storage/schema/entities/EntityTxLabel.js.map +1 -1
  381. package/out/src/storage/schema/entities/EntityTxLabelMap.d.ts.map +1 -1
  382. package/out/src/storage/schema/entities/EntityTxLabelMap.js +4 -6
  383. package/out/src/storage/schema/entities/EntityTxLabelMap.js.map +1 -1
  384. package/out/src/storage/schema/entities/EntityUser.d.ts.map +1 -1
  385. package/out/src/storage/schema/entities/EntityUser.js +3 -3
  386. package/out/src/storage/schema/entities/EntityUser.js.map +1 -1
  387. package/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -1
  388. package/out/src/storage/schema/entities/MergeEntity.js +6 -6
  389. package/out/src/storage/schema/entities/MergeEntity.js.map +1 -1
  390. package/out/src/storage/schema/tables/TableCertificate.d.ts +2 -1
  391. package/out/src/storage/schema/tables/TableCertificate.d.ts.map +1 -1
  392. package/out/src/storage/schema/tables/TableCertificateField.d.ts +1 -1
  393. package/out/src/storage/schema/tables/TableCertificateField.d.ts.map +1 -1
  394. package/out/src/storage/schema/tables/TableCommission.d.ts +1 -1
  395. package/out/src/storage/schema/tables/TableCommission.d.ts.map +1 -1
  396. package/out/src/storage/schema/tables/TableMonitorEvent.d.ts +1 -1
  397. package/out/src/storage/schema/tables/TableMonitorEvent.d.ts.map +1 -1
  398. package/out/src/storage/schema/tables/TableOutput.d.ts +3 -2
  399. package/out/src/storage/schema/tables/TableOutput.d.ts.map +1 -1
  400. package/out/src/storage/schema/tables/TableOutput.js +1 -1
  401. package/out/src/storage/schema/tables/TableOutput.js.map +1 -1
  402. package/out/src/storage/schema/tables/TableOutputBasket.d.ts +1 -1
  403. package/out/src/storage/schema/tables/TableOutputBasket.d.ts.map +1 -1
  404. package/out/src/storage/schema/tables/TableOutputTag.d.ts +1 -1
  405. package/out/src/storage/schema/tables/TableOutputTag.d.ts.map +1 -1
  406. package/out/src/storage/schema/tables/TableOutputTagMap.d.ts +1 -1
  407. package/out/src/storage/schema/tables/TableOutputTagMap.d.ts.map +1 -1
  408. package/out/src/storage/schema/tables/TableProvenTx.d.ts +1 -1
  409. package/out/src/storage/schema/tables/TableProvenTx.d.ts.map +1 -1
  410. package/out/src/storage/schema/tables/TableProvenTxReq.d.ts +24 -1
  411. package/out/src/storage/schema/tables/TableProvenTxReq.d.ts.map +1 -1
  412. package/out/src/storage/schema/tables/TableSettings.d.ts +1 -1
  413. package/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -1
  414. package/out/src/storage/schema/tables/TableSyncState.d.ts +1 -1
  415. package/out/src/storage/schema/tables/TableSyncState.d.ts.map +1 -1
  416. package/out/src/storage/schema/tables/TableTransaction.d.ts +1 -1
  417. package/out/src/storage/schema/tables/TableTransaction.d.ts.map +1 -1
  418. package/out/src/storage/schema/tables/TableTxLabel.d.ts +1 -1
  419. package/out/src/storage/schema/tables/TableTxLabel.d.ts.map +1 -1
  420. package/out/src/storage/schema/tables/TableTxLabelMap.d.ts +1 -1
  421. package/out/src/storage/schema/tables/TableTxLabelMap.d.ts.map +1 -1
  422. package/out/src/storage/schema/tables/TableUser.d.ts +1 -1
  423. package/out/src/storage/schema/tables/TableUser.d.ts.map +1 -1
  424. package/out/src/storage/storageProviderHelpers.d.ts +34 -0
  425. package/out/src/storage/storageProviderHelpers.d.ts.map +1 -0
  426. package/out/src/storage/storageProviderHelpers.js +100 -0
  427. package/out/src/storage/storageProviderHelpers.js.map +1 -0
  428. package/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -1
  429. package/out/src/utility/ScriptTemplateBRC29.js +2 -1
  430. package/out/src/utility/ScriptTemplateBRC29.js.map +1 -1
  431. package/out/src/utility/aggregateResults.d.ts +1 -1
  432. package/out/src/utility/aggregateResults.d.ts.map +1 -1
  433. package/out/src/utility/aggregateResults.js +2 -2
  434. package/out/src/utility/aggregateResults.js.map +1 -1
  435. package/out/src/utility/brc114ActionTimeLabels.d.ts +2 -2
  436. package/out/src/utility/brc114ActionTimeLabels.d.ts.map +1 -1
  437. package/out/src/utility/brc114ActionTimeLabels.js +16 -9
  438. package/out/src/utility/brc114ActionTimeLabels.js.map +1 -1
  439. package/out/src/utility/identityUtils.js +1 -1
  440. package/out/src/utility/identityUtils.js.map +1 -1
  441. package/out/src/utility/parseTxScriptOffsets.d.ts +4 -4
  442. package/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -1
  443. package/out/src/utility/parseTxScriptOffsets.js.map +1 -1
  444. package/out/src/utility/stampLog.d.ts.map +1 -1
  445. package/out/src/utility/stampLog.js +7 -5
  446. package/out/src/utility/stampLog.js.map +1 -1
  447. package/out/src/utility/tscProofToMerklePath.d.ts.map +1 -1
  448. package/out/src/utility/tscProofToMerklePath.js +1 -1
  449. package/out/src/utility/tscProofToMerklePath.js.map +1 -1
  450. package/out/src/utility/utilityHelpers.d.ts +1 -2
  451. package/out/src/utility/utilityHelpers.d.ts.map +1 -1
  452. package/out/src/utility/utilityHelpers.js +10 -10
  453. package/out/src/utility/utilityHelpers.js.map +1 -1
  454. package/out/src/utility/utilityHelpers.noBuffer.d.ts +7 -3
  455. package/out/src/utility/utilityHelpers.noBuffer.d.ts.map +1 -1
  456. package/out/src/utility/utilityHelpers.noBuffer.js +3 -3
  457. package/out/src/utility/utilityHelpers.noBuffer.js.map +1 -1
  458. package/out/src/wab-client/WABClient.d.ts +1 -1
  459. package/out/src/wab-client/WABClient.d.ts.map +1 -1
  460. package/out/src/wab-client/WABClient.js +12 -12
  461. package/out/src/wab-client/WABClient.js.map +1 -1
  462. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts.map +1 -1
  463. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js +3 -3
  464. package/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -1
  465. package/out/tsconfig.mobile.tsbuildinfo +1 -1
  466. package/package.json +7 -6
  467. package/out/src/SetupClient.d.ts +0 -135
  468. package/out/src/SetupClient.d.ts.map +0 -1
  469. package/out/src/SetupClient.js +0 -226
  470. package/out/src/SetupClient.js.map +0 -1
  471. package/out/src/SetupWallet.d.ts +0 -103
  472. package/out/src/SetupWallet.d.ts.map +0 -1
  473. package/out/src/SetupWallet.js +0 -3
  474. package/out/src/SetupWallet.js.map +0 -1
  475. package/out/src/fundWalletP2PKH.d.ts +0 -48
  476. package/out/src/fundWalletP2PKH.d.ts.map +0 -1
  477. package/out/src/fundWalletP2PKH.js +0 -239
  478. package/out/src/fundWalletP2PKH.js.map +0 -1
  479. package/out/src/index.client.d.ts +0 -23
  480. package/out/src/index.client.d.ts.map +0 -1
  481. package/out/src/index.client.js +0 -62
  482. package/out/src/index.client.js.map +0 -1
  483. package/out/src/services/chaintracker/BHServiceClient.d.ts +0 -39
  484. package/out/src/services/chaintracker/BHServiceClient.d.ts.map +0 -1
  485. package/out/src/services/chaintracker/BHServiceClient.js +0 -174
  486. package/out/src/services/chaintracker/BHServiceClient.js.map +0 -1
  487. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.d.ts +0 -5
  488. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.d.ts.map +0 -1
  489. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js +0 -29
  490. package/out/src/services/chaintracker/chaintracks/createDefaultIdbChaintracksOptions.js.map +0 -1
  491. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.d.ts +0 -13
  492. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.d.ts.map +0 -1
  493. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js +0 -27
  494. package/out/src/services/chaintracker/chaintracks/createIdbChaintracks.js.map +0 -1
  495. package/out/src/services/chaintracker/chaintracks/index.client.d.ts +0 -4
  496. package/out/src/services/chaintracker/chaintracks/index.client.d.ts.map +0 -1
  497. package/out/src/services/chaintracker/chaintracks/index.client.js +0 -20
  498. package/out/src/services/chaintracker/chaintracks/index.client.js.map +0 -1
  499. package/out/src/services/chaintracker/index.client.d.ts +0 -4
  500. package/out/src/services/chaintracker/index.client.d.ts.map +0 -1
  501. package/out/src/services/chaintracker/index.client.js +0 -20
  502. package/out/src/services/chaintracker/index.client.js.map +0 -1
  503. package/out/src/storage/StorageIdb.d.ts +0 -218
  504. package/out/src/storage/StorageIdb.d.ts.map +0 -1
  505. package/out/src/storage/StorageIdb.js +0 -2389
  506. package/out/src/storage/StorageIdb.js.map +0 -1
  507. package/out/src/storage/index.client.d.ts +0 -8
  508. package/out/src/storage/index.client.d.ts.map +0 -1
  509. package/out/src/storage/index.client.js +0 -24
  510. package/out/src/storage/index.client.js.map +0 -1
  511. package/out/src/storage/methods/ListActionsSpecOp.d.ts +0 -18
  512. package/out/src/storage/methods/ListActionsSpecOp.d.ts.map +0 -1
  513. package/out/src/storage/methods/ListActionsSpecOp.js +0 -40
  514. package/out/src/storage/methods/ListActionsSpecOp.js.map +0 -1
  515. package/out/src/storage/methods/ListOutputsSpecOp.d.ts +0 -40
  516. package/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +0 -1
  517. package/out/src/storage/methods/ListOutputsSpecOp.js +0 -142
  518. package/out/src/storage/methods/ListOutputsSpecOp.js.map +0 -1
  519. package/out/src/storage/methods/listActionsIdb.d.ts +0 -5
  520. package/out/src/storage/methods/listActionsIdb.d.ts.map +0 -1
  521. package/out/src/storage/methods/listActionsIdb.js +0 -169
  522. package/out/src/storage/methods/listActionsIdb.js.map +0 -1
  523. package/out/src/storage/methods/listOutputsIdb.d.ts +0 -5
  524. package/out/src/storage/methods/listOutputsIdb.d.ts.map +0 -1
  525. package/out/src/storage/methods/listOutputsIdb.js +0 -182
  526. package/out/src/storage/methods/listOutputsIdb.js.map +0 -1
  527. package/out/src/storage/methods/purgeDataIdb.d.ts +0 -4
  528. package/out/src/storage/methods/purgeDataIdb.d.ts.map +0 -1
  529. package/out/src/storage/methods/purgeDataIdb.js +0 -9
  530. package/out/src/storage/methods/purgeDataIdb.js.map +0 -1
  531. package/out/src/storage/methods/reviewStatusIdb.d.ts +0 -20
  532. package/out/src/storage/methods/reviewStatusIdb.d.ts.map +0 -1
  533. package/out/src/storage/methods/reviewStatusIdb.js +0 -35
  534. package/out/src/storage/methods/reviewStatusIdb.js.map +0 -1
  535. package/out/src/storage/schema/StorageIdbSchema.d.ts +0 -133
  536. package/out/src/storage/schema/StorageIdbSchema.d.ts.map +0 -1
  537. package/out/src/storage/schema/StorageIdbSchema.js +0 -3
  538. package/out/src/storage/schema/StorageIdbSchema.js.map +0 -1
@@ -22,9 +22,9 @@ async function processAction(storage, auth, args) {
22
22
  const txidsOfReqsToShareWithWorld = [...args.sendWith];
23
23
  if (args.isNewTx) {
24
24
  const vargs = await validateCommitNewTxToStorageArgs(storage, userId, args);
25
- logger === null || logger === void 0 ? void 0 : logger.log(`validated new tx updates to storage`);
25
+ logger === null || logger === void 0 ? void 0 : logger.log('validated new tx updates to storage');
26
26
  ({ req } = await commitNewTxToStorage(storage, userId, vargs));
27
- logger === null || logger === void 0 ? void 0 : logger.log(`committed new tx updates to storage `);
27
+ logger === null || logger === void 0 ? void 0 : logger.log('committed new tx updates to storage ');
28
28
  if (!req)
29
29
  throw new WERR_errors_1.WERR_INTERNAL();
30
30
  // Add the new txid to sendWith unless there are no others to send and the noSend option is set.
@@ -53,45 +53,43 @@ async function processAction(storage, auth, args) {
53
53
  * @param isDelayed
54
54
  * @param r Optional. Ignores txids and allows ProvenTxReqs and merged beef to be passed in.
55
55
  */
56
- async function shareReqsWithWorld(storage, userId, txids, isDelayed, r, logger) {
57
- let swr = [];
58
- let ndr = undefined;
59
- if (!r && txids.length < 1)
60
- return { swr, ndr };
61
- // Collect what we know about these sendWith transaction txids from storage.
62
- r || (r = await storage.getReqsAndBeefToShareWithWorld(txids, []));
63
- const readyToSendReqs = [];
64
- for (const getReq of r.details) {
56
+ function classifyReqDetails(details, swr, readyToSendReqs) {
57
+ for (const getReq of details) {
65
58
  let status = 'failed';
66
- if (getReq.status === 'alreadySent')
59
+ if (getReq.status === 'alreadySent') {
67
60
  status = 'unproven';
61
+ }
68
62
  else if (getReq.status === 'readyToSend') {
69
63
  status = 'sending';
70
64
  readyToSendReqs.push(new EntityProvenTxReq_1.EntityProvenTxReq(getReq.req));
71
65
  }
72
- swr.push({
73
- txid: getReq.txid,
74
- status
75
- });
66
+ swr.push({ txid: getReq.txid, status });
67
+ }
68
+ }
69
+ async function verifyMergedBeef(storage, r, readyToSendReqs, logger) {
70
+ if (readyToSendReqs.length === 0)
71
+ return;
72
+ const beefIsValid = await r.beef.verify(await storage.getServices().getChainTracker());
73
+ if (!beefIsValid) {
74
+ logger === null || logger === void 0 ? void 0 : logger.error(`VERIFY FALSE BEEF: ${r.beef.toLogString()}`);
75
+ throw new WERR_errors_1.WERR_INTERNAL('merged Beef failed validation.');
76
76
  }
77
- // Filter original txids down to reqIds that are available and need sending
77
+ logger === null || logger === void 0 ? void 0 : logger.log('beef is valid');
78
+ }
79
+ async function shareReqsWithWorld(storage, userId, txids, isDelayed, r, logger) {
80
+ const swr = [];
81
+ const ndr = undefined;
82
+ if ((r == null) && txids.length < 1)
83
+ return { swr, ndr };
84
+ r || (r = await storage.getReqsAndBeefToShareWithWorld(txids, []));
85
+ const readyToSendReqs = [];
86
+ classifyReqDetails(r.details, swr, readyToSendReqs);
78
87
  const readyToSendReqIds = readyToSendReqs.map(r => r.id);
79
88
  const transactionIds = readyToSendReqs.map(r => r.notify.transactionIds || []).flat();
80
- // If there are reqs to send, verify that we have a valid aggregate beef for them.
81
89
  // If isDelayed, this (or a different beef) will have to be rebuilt at the time of sending.
82
- if (readyToSendReqs.length > 0) {
83
- const beefIsValid = await r.beef.verify(await storage.getServices().getChainTracker());
84
- if (!beefIsValid) {
85
- logger === null || logger === void 0 ? void 0 : logger.error(`VERIFY FALSE BEEF: ${r.beef.toLogString()}`);
86
- throw new WERR_errors_1.WERR_INTERNAL(`merged Beef failed validation.`);
87
- }
88
- logger === null || logger === void 0 ? void 0 : logger.log(`beef is valid`);
89
- }
90
- // Set req batch property for the reqs being sent
91
- // If delayed, also bump status to 'unsent' and we're done here
90
+ await verifyMergedBeef(storage, r, readyToSendReqs, logger);
92
91
  const batch = txids.length > 1 ? (0, utilityHelpers_1.randomBytesBase64)(16) : undefined;
93
92
  if (isDelayed) {
94
- // Just bump the req status to 'unsent' to enable background sending...
95
93
  if (readyToSendReqIds.length > 0) {
96
94
  await storage.transaction(async (trx) => {
97
95
  await storage.updateProvenTxReq(readyToSendReqIds, { status: 'unsent', batch }, trx);
@@ -100,35 +98,71 @@ async function shareReqsWithWorld(storage, userId, txids, isDelayed, r, logger)
100
98
  }
101
99
  return { swr, ndr };
102
100
  }
103
- if (readyToSendReqIds.length < 1) {
101
+ if (readyToSendReqIds.length < 1)
104
102
  return { swr, ndr };
105
- }
106
103
  if (batch) {
107
- // Keep batch values in sync...
108
104
  for (const req of readyToSendReqs)
109
105
  req.batch = batch;
110
106
  await storage.updateProvenTxReq(readyToSendReqIds, { batch });
111
107
  }
112
- //
113
- // Handle the NON-DELAYED-SEND-NOW case
114
- //
115
108
  const prtn = await storage.attemptToPostReqsToNetwork(readyToSendReqs, undefined, logger);
116
109
  const { swr: swrRes, rar } = await (0, aggregateResults_1.aggregateActionResults)(storage, swr, prtn);
117
110
  return { swr: swrRes, ndr: rar };
118
111
  }
112
+ function determineReqTxStatus(params) {
113
+ if (params.isNoSend && !params.isSendWith)
114
+ return { status: { req: 'nosend', tx: 'nosend' }, postStatus: undefined };
115
+ if (!params.isNoSend && params.isDelayed)
116
+ return { status: { req: 'unsent', tx: 'unprocessed' }, postStatus: undefined };
117
+ if (!params.isNoSend && !params.isDelayed) {
118
+ return {
119
+ status: { req: 'unprocessed', tx: 'unprocessed' },
120
+ postStatus: { req: 'unmined', tx: 'unproven' }
121
+ };
122
+ }
123
+ throw new WERR_errors_1.WERR_INTERNAL('logic error');
124
+ }
125
+ function buildOutputUpdates(storage, tx, vargs) {
126
+ for (const o of vargs.outputOutputs) {
127
+ const vout = (0, utilityHelpers_1.verifyInteger)(o.vout);
128
+ const offset = vargs.txScriptOffsets.outputs[vout];
129
+ const rawTxScript = (0, utilityHelpers_noBuffer_1.asString)(vargs.rawTx.slice(offset.offset, offset.offset + offset.length));
130
+ if ((o.lockingScript != null) && rawTxScript !== (0, utilityHelpers_noBuffer_1.asString)(o.lockingScript)) {
131
+ throw new WERR_errors_1.WERR_INVALID_OPERATION(`rawTx output locking script for vout ${vout} not equal to expected output script.`);
132
+ }
133
+ if (tx.outputs[vout].lockingScript.toHex() !== rawTxScript) {
134
+ throw new WERR_errors_1.WERR_INVALID_OPERATION(`parsed transaction output locking script for vout ${vout} not equal to expected output script.`);
135
+ }
136
+ const update = {
137
+ txid: vargs.txid,
138
+ spendable: true, // spendability is gated by transaction status. Remains true until the output is spent.
139
+ scriptLength: offset.length,
140
+ scriptOffset: offset.offset
141
+ };
142
+ if (offset.length > storage.getSettings().maxOutputScript)
143
+ // Remove long lockingScript data from outputs table, will be read from rawTx in proven_tx or proven_tx_reqs tables.
144
+ {
145
+ update.lockingScript = undefined;
146
+ }
147
+ vargs.outputUpdates.push({ id: o.outputId, update });
148
+ }
149
+ }
119
150
  async function validateCommitNewTxToStorageArgs(storage, userId, params) {
120
- if (!params.reference || !params.txid || !params.rawTx)
151
+ if (!params.reference || !params.txid || (params.rawTx == null)) {
121
152
  throw new WERR_errors_1.WERR_INVALID_OPERATION('One or more expected params are undefined.');
153
+ }
122
154
  let tx;
123
155
  try {
124
156
  tx = sdk_1.Transaction.fromBinary(params.rawTx);
125
157
  }
126
- catch (e) {
158
+ catch (_parseError) {
127
159
  throw new WERR_errors_1.WERR_INVALID_OPERATION('Parsing serialized transaction failed.');
128
160
  }
129
- if (params.txid !== tx.id('hex'))
130
- throw new WERR_errors_1.WERR_INVALID_OPERATION(`Hash of serialized transaction doesn't match expected txid`);
131
- if (!(await storage.getServices()).nLockTimeIsFinal(tx)) {
161
+ if (params.txid !== tx.id('hex')) {
162
+ throw new WERR_errors_1.WERR_INVALID_OPERATION('Hash of serialized transaction doesn\'t match expected txid');
163
+ }
164
+ const services = storage.getServices();
165
+ if (!(await services.nLockTimeIsFinal(tx))) {
132
166
  throw new WERR_errors_1.WERR_INVALID_OPERATION(`This transaction is not final.
133
167
  Ensure that the transaction meets the rules for being a finalized
134
168
  which can be found at https://wiki.bitcoinsv.io/index.php/NLocktime_and_nSequence`);
@@ -139,13 +173,14 @@ async function validateCommitNewTxToStorageArgs(storage, userId, params) {
139
173
  }));
140
174
  if (!transaction.isOutgoing)
141
175
  throw new WERR_errors_1.WERR_INVALID_OPERATION('isOutgoing is not true');
142
- if (!transaction.inputBEEF)
176
+ if (transaction.inputBEEF == null)
143
177
  throw new WERR_errors_1.WERR_INVALID_OPERATION();
144
178
  const beef = sdk_1.Beef.fromBinary((0, utilityHelpers_noBuffer_1.asArray)(transaction.inputBEEF));
145
- // TODO: Could check beef validates transaction inputs...
179
+ // Could check beef validates transaction inputs...
146
180
  // Transaction must have unsigned or unprocessed status
147
- if (transaction.status !== 'unsigned' && transaction.status !== 'unprocessed')
181
+ if (transaction.status !== 'unsigned' && transaction.status !== 'unprocessed') {
148
182
  throw new WERR_errors_1.WERR_INVALID_OPERATION(`invalid transaction status ${transaction.status}`);
183
+ }
149
184
  const transactionId = (0, utilityHelpers_1.verifyId)(transaction.transactionId);
150
185
  const outputOutputs = await storage.findOutputs({
151
186
  partial: { userId, transactionId }
@@ -156,11 +191,12 @@ async function validateCommitNewTxToStorageArgs(storage, userId, params) {
156
191
  const commission = (0, utilityHelpers_1.verifyOneOrNone)(await storage.findCommissions({ partial: { transactionId, userId } }));
157
192
  if (storage.commissionSatoshis > 0) {
158
193
  // A commission is required...
159
- if (!commission)
194
+ if (commission == null)
160
195
  throw new WERR_errors_1.WERR_INTERNAL();
161
196
  const commissionValid = tx.outputs.some(x => x.satoshis === commission.satoshis && x.lockingScript.toHex() === (0, utilityHelpers_noBuffer_1.asString)(commission.lockingScript));
162
- if (!commissionValid)
197
+ if (!commissionValid) {
163
198
  throw new WERR_errors_1.WERR_INVALID_OPERATION('Transaction did not include an output to cover service fee.');
199
+ }
164
200
  }
165
201
  const req = EntityProvenTxReq_1.EntityProvenTxReq.fromTxid(params.txid, params.rawTx, transaction.inputBEEF);
166
202
  req.addNotifyTransactionId(transactionId);
@@ -176,18 +212,7 @@ async function validateCommitNewTxToStorageArgs(storage, userId, params) {
176
212
  // isNoSend noSend noSend
177
213
  // !isNoSend && isDelayed unsent unprocessed
178
214
  // !isNoSend && !isDelayed unprocessed unprocessed sending/unmined sending/unproven This is the only case that sends immediately.
179
- let postStatus = undefined;
180
- let status;
181
- if (params.isNoSend && !params.isSendWith)
182
- status = { req: 'nosend', tx: 'nosend' };
183
- else if (!params.isNoSend && params.isDelayed)
184
- status = { req: 'unsent', tx: 'unprocessed' };
185
- else if (!params.isNoSend && !params.isDelayed) {
186
- status = { req: 'unprocessed', tx: 'unprocessed' };
187
- postStatus = { req: 'unmined', tx: 'unproven' };
188
- }
189
- else
190
- throw new WERR_errors_1.WERR_INTERNAL('logic error');
215
+ const { status, postStatus } = determineReqTxStatus(params);
191
216
  req.status = status.req;
192
217
  const vargs = {
193
218
  reference: params.reference,
@@ -219,49 +244,31 @@ async function validateCommitNewTxToStorageArgs(storage, userId, params) {
219
244
  // update outputs with txid, script offsets and lengths, drop long output scripts from outputs table
220
245
  // outputs spendable will be updated for change to true and all others to !!o.tracked when tx has been broadcast
221
246
  // MAX_OUTPUTSCRIPT_LENGTH is limit for scripts left in outputs table
222
- for (const o of vargs.outputOutputs) {
223
- const vout = (0, utilityHelpers_1.verifyInteger)(o.vout);
224
- const offset = vargs.txScriptOffsets.outputs[vout];
225
- const rawTxScript = (0, utilityHelpers_noBuffer_1.asString)(vargs.rawTx.slice(offset.offset, offset.offset + offset.length));
226
- if (o.lockingScript && rawTxScript !== (0, utilityHelpers_noBuffer_1.asString)(o.lockingScript))
227
- throw new WERR_errors_1.WERR_INVALID_OPERATION(`rawTx output locking script for vout ${vout} not equal to expected output script.`);
228
- if (tx.outputs[vout].lockingScript.toHex() !== rawTxScript)
229
- throw new WERR_errors_1.WERR_INVALID_OPERATION(`parsed transaction output locking script for vout ${vout} not equal to expected output script.`);
230
- const update = {
231
- txid: vargs.txid,
232
- spendable: true, // spendability is gated by transaction status. Remains true until the output is spent.
233
- scriptLength: offset.length,
234
- scriptOffset: offset.offset
235
- };
236
- if (offset.length > (await storage.getSettings()).maxOutputScript)
237
- // Remove long lockingScript data from outputs table, will be read from rawTx in proven_tx or proven_tx_reqs tables.
238
- update.lockingScript = undefined;
239
- vargs.outputUpdates.push({ id: o.outputId, update });
240
- }
247
+ buildOutputUpdates(storage, tx, vargs);
241
248
  return vargs;
242
249
  }
243
250
  async function commitNewTxToStorage(storage, userId, vargs) {
244
251
  let log = vargs.log;
245
- log = (0, stampLog_1.stampLog)(log, `start storage commitNewTxToStorage`);
252
+ log = (0, stampLog_1.stampLog)(log, 'start storage commitNewTxToStorage');
246
253
  let req;
247
254
  await storage.transaction(async (trx) => {
248
- log = (0, stampLog_1.stampLog)(log, `... storage commitNewTxToStorage storage transaction start`);
255
+ log = (0, stampLog_1.stampLog)(log, '... storage commitNewTxToStorage storage transaction start');
249
256
  // Create initial 'nosend' proven_tx_req record to store signed, valid rawTx and input beef
250
257
  req = await vargs.req.insertOrMerge(storage, trx);
251
- log = (0, stampLog_1.stampLog)(log, `... storage commitNewTxToStorage req inserted`);
258
+ log = (0, stampLog_1.stampLog)(log, '... storage commitNewTxToStorage req inserted');
252
259
  for (const ou of vargs.outputUpdates) {
253
260
  await storage.updateOutput(ou.id, ou.update, trx);
254
261
  }
255
- log = (0, stampLog_1.stampLog)(log, `... storage commitNewTxToStorage outputs updated`);
262
+ log = (0, stampLog_1.stampLog)(log, '... storage commitNewTxToStorage outputs updated');
256
263
  await storage.updateTransaction(vargs.transactionId, vargs.transactionUpdate, trx);
257
- log = (0, stampLog_1.stampLog)(log, `... storage commitNewTxToStorage storage transaction end`);
264
+ log = (0, stampLog_1.stampLog)(log, '... storage commitNewTxToStorage storage transaction end');
258
265
  });
259
- log = (0, stampLog_1.stampLog)(log, `... storage commitNewTxToStorage storage transaction await done`);
266
+ log = (0, stampLog_1.stampLog)(log, '... storage commitNewTxToStorage storage transaction await done');
260
267
  const r = {
261
268
  req: (0, utilityHelpers_1.verifyTruthy)(req),
262
269
  log
263
270
  };
264
- log = (0, stampLog_1.stampLog)(log, `end storage commitNewTxToStorage`);
271
+ log = (0, stampLog_1.stampLog)(log, 'end storage commitNewTxToStorage');
265
272
  return r;
266
273
  }
267
274
  //# sourceMappingURL=processAction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"processAction.js","sourceRoot":"","sources":["../../../../../src/storage/methods/processAction.ts"],"names":[],"mappings":";;AAoCA,sCA8CC;AA8CD,gDA4EC;AA5MD,6DAA6D;AAC7D,kCAMiB;AACjB,qEAAuE;AAQvE,qDAAiD;AACjD,iEAOqC;AACrC,4EAAwE;AACxE,uDAA6E;AAI7E,6EAA0F;AAI1F,mFAAyE;AAElE,KAAK,UAAU,aAAa,CACjC,OAAwB,EACxB,IAAY,EACZ,IAA8B;IAE9B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;IAC1B,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,uBAAuB,CAAC,CAAA;IAEtC,MAAM,MAAM,GAAG,IAAA,yB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;AAED;;;GAGG;AAEH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMhE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAS3E"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/storage/methods/utils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,WAAW,CAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAMvD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAQhE;AAED;;;GAGG;AAEH,wBAAgB,qBAAqB,CAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAE,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAS5E"}
@@ -12,7 +12,13 @@ const WERR_errors_1 = require("../../sdk/WERR_errors");
12
12
  function varUintSize(val) {
13
13
  if (val < 0)
14
14
  throw new WERR_errors_1.WERR_INVALID_PARAMETER('varUint', 'non-negative');
15
- return val <= 0xfc ? 1 : val <= 0xffff ? 3 : val <= 0xffffffff ? 5 : 9;
15
+ if (val <= 0xfc)
16
+ return 1;
17
+ if (val <= 0xffff)
18
+ return 3;
19
+ if (val <= 0xffffffff)
20
+ return 5;
21
+ return 9;
16
22
  }
17
23
  /**
18
24
  * @param scriptSize byte length of input script
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/storage/methods/utils.ts"],"names":[],"mappings":";;AAMA,kCAGC;AAMD,oDAQC;AAOD,sDAMC;AAUD,0CASC;AAvDD,uDAA8D;AAE9D;;;GAGG;AACH,SAAgB,WAAW,CAAC,GAAW;IACrC,IAAI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C,GAAG,oBAAoB;QAClD,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc;QAC1E,CAAC,CACF,CAAA,CAAC,YAAY;AAChB,CAAC"}
@@ -1,14 +1,5 @@
1
- import { AbortActionArgs, AbortActionResult, InternalizeActionArgs, ListActionsResult, ListCertificatesResult, ListOutputsResult, RelinquishCertificateArgs, RelinquishOutputArgs, WalletInterface, Validation } from '@bsv/sdk';
2
- import { AuthId, FindCertificatesArgs, FindOutputBasketsArgs, FindOutputsArgs, FindProvenTxReqsArgs, ProcessSyncChunkResult, RequestSyncChunkArgs, StorageCreateActionResult, StorageInternalizeActionResult, StorageProcessActionArgs, StorageProcessActionResults, SyncChunk, UpdateProvenTxReqWithNewProvenTxArgs, UpdateProvenTxReqWithNewProvenTxResult, WalletStorageProvider } from '../../sdk/WalletStorage.interfaces';
3
- import { TableSettings } from '../schema/tables/TableSettings';
4
- import { WalletServices } from '../../sdk/WalletServices.interfaces';
5
- import { TableUser } from '../schema/tables/TableUser';
6
- import { TableSyncState } from '../schema/tables/TableSyncState';
7
- import { TableCertificateX } from '../schema/tables/TableCertificate';
8
- import { TableOutputBasket } from '../schema/tables/TableOutputBasket';
9
- import { TableOutput } from '../schema/tables/TableOutput';
10
- import { TableProvenTxReq } from '../schema/tables/TableProvenTxReq';
11
- import { EntityTimeStamp } from '../../sdk/types';
1
+ import { WalletInterface } from '@bsv/sdk';
2
+ import { StorageClientBase } from './StorageClientBase';
12
3
  /**
13
4
  * `StorageClient` implements the `WalletStorageProvider` interface which allows it to
14
5
  * serve as a BRC-100 wallet's active storage.
@@ -23,270 +14,13 @@ import { EntityTimeStamp } from '../../sdk/types';
23
14
  *
24
15
  * For details of the API implemented, follow the "See also" link for the `WalletStorageProvider` interface.
25
16
  */
26
- export declare class StorageClient implements WalletStorageProvider {
27
- readonly endpointUrl: string;
28
- private readonly authClient;
29
- private nextId;
30
- settings?: TableSettings;
17
+ export declare class StorageClient extends StorageClientBase {
31
18
  constructor(wallet: WalletInterface, endpointUrl: string);
32
- /**
33
- * The `StorageClient` implements the `WalletStorageProvider` interface.
34
- * It does not implement the lower level `StorageProvider` interface.
35
- *
36
- * @returns false
37
- */
38
- isStorageProvider(): boolean;
39
19
  /**
40
20
  * Make a JSON-RPC call to the remote server.
41
21
  * @param method The WalletStorage method name to call.
42
22
  * @param params The array of parameters to pass to the method in order.
43
23
  */
44
- private rpcCall;
45
- /**
46
- * @returns true once storage `TableSettings` have been retreived from remote storage.
47
- */
48
- isAvailable(): boolean;
49
- /**
50
- * @returns remote storage `TableSettings` if they have been retreived by `makeAvailable`.
51
- * @throws WERR_INVALID_OPERATION if `makeAvailable` has not yet been called.
52
- */
53
- getSettings(): TableSettings;
54
- /**
55
- * Must be called prior to making use of storage.
56
- * Retreives `TableSettings` from remote storage provider.
57
- * @returns remote storage `TableSettings`
58
- */
59
- makeAvailable(): Promise<TableSettings>;
60
- /**
61
- * Called to cleanup resources when no further use of this object will occur.
62
- */
63
- destroy(): Promise<void>;
64
- /**
65
- * Requests schema migration to latest.
66
- * Typically remote storage will ignore this request.
67
- * @param storageName Unique human readable name for remote storage if it does not yet exist.
68
- * @param storageIdentityKey Unique identity key for remote storage if it does not yet exist.
69
- * @returns current schema migration identifier
70
- */
71
- migrate(storageName: string, storageIdentityKey: string): Promise<string>;
72
- /**
73
- * Remote storage does not offer `Services` to remote clients.
74
- * @throws WERR_INVALID_OPERATION
75
- */
76
- getServices(): WalletServices;
77
- /**
78
- * Ignored. Remote storage cannot share `Services` with remote clients.
79
- */
80
- setServices(v: WalletServices): void;
81
- /**
82
- * Storage level processing for wallet `internalizeAction`.
83
- * Updates internalized outputs in remote storage.
84
- * Triggers proof validation of containing transaction.
85
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
86
- * This must match the `AuthFetch` identity securing the remote conneciton.
87
- * @param args Original wallet `internalizeAction` arguments.
88
- * @returns `internalizeAction` results
89
- */
90
- internalizeAction(auth: AuthId, args: InternalizeActionArgs): Promise<StorageInternalizeActionResult>;
91
- /**
92
- * Storage level processing for wallet `createAction`.
93
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
94
- * This must match the `AuthFetch` identity securing the remote conneciton.
95
- * @param args Validated extension of original wallet `createAction` arguments.
96
- * @returns `StorageCreateActionResults` supporting additional wallet processing to yield `createAction` results.
97
- */
98
- createAction(auth: AuthId, args: Validation.ValidCreateActionArgs): Promise<StorageCreateActionResult>;
99
- /**
100
- * Storage level processing for wallet `createAction` and `signAction`.
101
- *
102
- * Handles remaining storage tasks once a fully signed transaction has been completed. This is common to both `createAction` and `signAction`.
103
- *
104
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
105
- * This must match the `AuthFetch` identity securing the remote conneciton.
106
- * @param args `StorageProcessActionArgs` convey completed signed transaction to storage.
107
- * @returns `StorageProcessActionResults` supporting final wallet processing to yield `createAction` or `signAction` results.
108
- */
109
- processAction(auth: AuthId, args: StorageProcessActionArgs): Promise<StorageProcessActionResults>;
110
- /**
111
- * Aborts an action by `reference` string.
112
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
113
- * This must match the `AuthFetch` identity securing the remote conneciton.
114
- * @param args original wallet `abortAction` args.
115
- * @returns `abortAction` result.
116
- */
117
- abortAction(auth: AuthId, args: AbortActionArgs): Promise<AbortActionResult>;
118
- /**
119
- * Used to both find and initialize a new user by identity key.
120
- * It is up to the remote storage whether to allow creation of new users by this method.
121
- * @param identityKey of the user.
122
- * @returns `TableUser` for the user and whether a new user was created.
123
- */
124
- findOrInsertUser(identityKey: any): Promise<{
125
- user: TableUser;
126
- isNew: boolean;
127
- }>;
128
- /**
129
- * Used to both find and insert a `TableSyncState` record for the user to track wallet data replication across storage providers.
130
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
131
- * This must match the `AuthFetch` identity securing the remote conneciton.
132
- * @param storageName the name of the remote storage being sync'd
133
- * @param storageIdentityKey the identity key of the remote storage being sync'd
134
- * @returns `TableSyncState` and whether a new record was created.
135
- */
136
- findOrInsertSyncStateAuth(auth: AuthId, storageIdentityKey: string, storageName: string): Promise<{
137
- syncState: TableSyncState;
138
- isNew: boolean;
139
- }>;
140
- /**
141
- * Inserts a new certificate with fields and keyring into remote storage.
142
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
143
- * This must match the `AuthFetch` identity securing the remote conneciton.
144
- * @param certificate the certificate to insert.
145
- * @returns record Id of the inserted `TableCertificate` record.
146
- */
147
- insertCertificateAuth(auth: AuthId, certificate: TableCertificateX): Promise<number>;
148
- /**
149
- * Storage level processing for wallet `listActions`.
150
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
151
- * This must match the `AuthFetch` identity securing the remote conneciton.
152
- * @param args Validated extension of original wallet `listActions` arguments.
153
- * @returns `listActions` results.
154
- */
155
- listActions(auth: AuthId, vargs: Validation.ValidListActionsArgs): Promise<ListActionsResult>;
156
- /**
157
- * Storage level processing for wallet `listOutputs`.
158
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
159
- * This must match the `AuthFetch` identity securing the remote conneciton.
160
- * @param args Validated extension of original wallet `listOutputs` arguments.
161
- * @returns `listOutputs` results.
162
- */
163
- listOutputs(auth: AuthId, vargs: Validation.ValidListOutputsArgs): Promise<ListOutputsResult>;
164
- /**
165
- * Storage level processing for wallet `listCertificates`.
166
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
167
- * This must match the `AuthFetch` identity securing the remote conneciton.
168
- * @param args Validated extension of original wallet `listCertificates` arguments.
169
- * @returns `listCertificates` results.
170
- */
171
- listCertificates(auth: AuthId, vargs: Validation.ValidListCertificatesArgs): Promise<ListCertificatesResult>;
172
- /**
173
- * Find user certificates, optionally with fields.
174
- *
175
- * This certificate retrieval method supports internal wallet operations.
176
- * Field values are stored and retrieved encrypted.
177
- *
178
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
179
- * This must match the `AuthFetch` identity securing the remote conneciton.
180
- * @param args `FindCertificatesArgs` determines which certificates to retrieve and whether to include fields.
181
- * @returns array of certificates matching args.
182
- */
183
- findCertificatesAuth(auth: AuthId, args: FindCertificatesArgs): Promise<TableCertificateX[]>;
184
- /**
185
- * Find output baskets.
186
- *
187
- * This retrieval method supports internal wallet operations.
188
- *
189
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
190
- * This must match the `AuthFetch` identity securing the remote conneciton.
191
- * @param args `FindOutputBasketsArgs` determines which baskets to retrieve.
192
- * @returns array of output baskets matching args.
193
- */
194
- findOutputBasketsAuth(auth: AuthId, args: FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
195
- /**
196
- * Find outputs.
197
- *
198
- * This retrieval method supports internal wallet operations.
199
- *
200
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
201
- * This must match the `AuthFetch` identity securing the remote conneciton.
202
- * @param args `FindOutputsArgs` determines which outputs to retrieve.
203
- * @returns array of outputs matching args.
204
- */
205
- findOutputsAuth(auth: AuthId, args: FindOutputsArgs): Promise<TableOutput[]>;
206
- /**
207
- * Find requests for transaction proofs.
208
- *
209
- * This retrieval method supports internal wallet operations.
210
- *
211
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
212
- * This must match the `AuthFetch` identity securing the remote conneciton.
213
- * @param args `FindProvenTxReqsArgs` determines which proof requests to retrieve.
214
- * @returns array of proof requests matching args.
215
- */
216
- findProvenTxReqs(args: FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>;
217
- /**
218
- * Relinquish a certificate.
219
- *
220
- * For storage supporting replication records must be kept of deletions. Therefore certificates are marked as deleted
221
- * when relinquished, and no longer returned by `listCertificates`, but are still retained by storage.
222
- *
223
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
224
- * This must match the `AuthFetch` identity securing the remote conneciton.
225
- * @param args original wallet `relinquishCertificate` args.
226
- */
227
- relinquishCertificate(auth: AuthId, args: RelinquishCertificateArgs): Promise<number>;
228
- /**
229
- * Relinquish an output.
230
- *
231
- * Relinquishing an output removes the output from whatever basket was tracking it.
232
- *
233
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
234
- * This must match the `AuthFetch` identity securing the remote conneciton.
235
- * @param args original wallet `relinquishOutput` args.
236
- */
237
- relinquishOutput(auth: AuthId, args: RelinquishOutputArgs): Promise<number>;
238
- /**
239
- * Process a "chunk" of replication data for the user.
240
- *
241
- * The normal data flow is for the active storage to push backups as a sequence of data chunks to backup storage providers.
242
- *
243
- * @param args a copy of the replication request args that initiated the sequence of data chunks.
244
- * @param chunk the current data chunk to process.
245
- * @returns whether processing is done, counts of inserts and udpates, and related progress tracking properties.
246
- */
247
- processSyncChunk(args: RequestSyncChunkArgs, chunk: SyncChunk): Promise<ProcessSyncChunkResult>;
248
- /**
249
- * Request a "chunk" of replication data for a specific user and storage provider.
250
- *
251
- * The normal data flow is for the active storage to push backups as a sequence of data chunks to backup storage providers.
252
- * Also supports recovery where non-active storage can attempt to merge available data prior to becoming active.
253
- *
254
- * @param args that identify the non-active storage which will receive replication data and constrains the replication process.
255
- * @returns the next "chunk" of replication data
256
- */
257
- getSyncChunk(args: RequestSyncChunkArgs): Promise<SyncChunk>;
258
- /**
259
- * Handles the data received when a new transaction proof is found in response to an outstanding request for proof data:
260
- *
261
- * - Creates a new `TableProvenTx` record.
262
- * - Notifies all user transaction records of the new status.
263
- * - Updates the proof request record to 'completed' status which enables delayed deletion.
264
- *
265
- * @param args proof request and new transaction proof data
266
- * @returns results of updates
267
- */
268
- updateProvenTxReqWithNewProvenTx(args: UpdateProvenTxReqWithNewProvenTxArgs): Promise<UpdateProvenTxReqWithNewProvenTxResult>;
269
- /**
270
- * Ensures up-to-date wallet data replication to all configured backup storage providers,
271
- * then promotes one of the configured backups to active,
272
- * demoting the current active to new backup.
273
- *
274
- * @param auth Identifies client by identity key and the storage identity key of their currently active storage.
275
- * This must match the `AuthFetch` identity securing the remote conneciton.
276
- * @param newActiveStorageIdentityKey which must be a currently configured backup storage provider.
277
- */
278
- setActive(auth: AuthId, newActiveStorageIdentityKey: string): Promise<number>;
279
- validateDate(date: Date | string | number): Date;
280
- /**
281
- * Helper to force uniform behavior across database engines.
282
- * Use to process all individual records with time stamps retreived from database.
283
- */
284
- validateEntity<T extends EntityTimeStamp>(entity: T, dateFields?: string[]): T;
285
- /**
286
- * Helper to force uniform behavior across database engines.
287
- * Use to process all arrays of records with time stamps retreived from database.
288
- * @returns input `entities` array with contained values validated.
289
- */
290
- validateEntities<T extends EntityTimeStamp>(entities: T[], dateFields?: string[]): T[];
24
+ protected rpcCall<T>(method: string, params: unknown[]): Promise<T>;
291
25
  }
292
26
  //# sourceMappingURL=StorageClient.d.ts.map