@bsv/wallet-toolbox 1.3.21 → 1.3.23

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 (558) hide show
  1. package/mobile/out/src/CWIStyleWalletManager.d.ts +437 -0
  2. package/mobile/out/src/CWIStyleWalletManager.d.ts.map +1 -0
  3. package/mobile/out/src/CWIStyleWalletManager.js +1255 -0
  4. package/mobile/out/src/CWIStyleWalletManager.js.map +1 -0
  5. package/mobile/out/src/SetupClient.d.ts +126 -0
  6. package/mobile/out/src/SetupClient.d.ts.map +1 -0
  7. package/mobile/out/src/SetupClient.js +220 -0
  8. package/mobile/out/src/SetupClient.js.map +1 -0
  9. package/mobile/out/src/SetupWallet.d.ts +100 -0
  10. package/mobile/out/src/SetupWallet.d.ts.map +1 -0
  11. package/mobile/out/src/SetupWallet.js +3 -0
  12. package/mobile/out/src/SetupWallet.js.map +1 -0
  13. package/mobile/out/src/SimpleWalletManager.d.ts +169 -0
  14. package/mobile/out/src/SimpleWalletManager.d.ts.map +1 -0
  15. package/mobile/out/src/SimpleWalletManager.js +315 -0
  16. package/mobile/out/src/SimpleWalletManager.js.map +1 -0
  17. package/mobile/out/src/Wallet.d.ts +177 -0
  18. package/mobile/out/src/Wallet.d.ts.map +1 -0
  19. package/mobile/out/src/Wallet.js +742 -0
  20. package/mobile/out/src/Wallet.js.map +1 -0
  21. package/mobile/out/src/WalletAuthenticationManager.d.ts +33 -0
  22. package/mobile/out/src/WalletAuthenticationManager.d.ts.map +1 -0
  23. package/mobile/out/src/WalletAuthenticationManager.js +113 -0
  24. package/mobile/out/src/WalletAuthenticationManager.js.map +1 -0
  25. package/mobile/out/src/WalletPermissionsManager.d.ts +598 -0
  26. package/mobile/out/src/WalletPermissionsManager.d.ts.map +1 -0
  27. package/mobile/out/src/WalletPermissionsManager.js +1868 -0
  28. package/mobile/out/src/WalletPermissionsManager.js.map +1 -0
  29. package/mobile/out/src/WalletSettingsManager.d.ts +52 -0
  30. package/mobile/out/src/WalletSettingsManager.d.ts.map +1 -0
  31. package/mobile/out/src/WalletSettingsManager.js +82 -0
  32. package/mobile/out/src/WalletSettingsManager.js.map +1 -0
  33. package/mobile/out/src/index.client.d.ts +19 -0
  34. package/mobile/out/src/index.client.d.ts.map +1 -0
  35. package/mobile/out/src/index.client.js +58 -0
  36. package/mobile/out/src/index.client.js.map +1 -0
  37. package/mobile/out/src/index.mobile.d.ts +17 -0
  38. package/mobile/out/src/index.mobile.d.ts.map +1 -0
  39. package/mobile/out/src/index.mobile.js +56 -0
  40. package/mobile/out/src/index.mobile.js.map +1 -0
  41. package/mobile/out/src/monitor/Monitor.d.ts +91 -0
  42. package/mobile/out/src/monitor/Monitor.d.ts.map +1 -0
  43. package/mobile/out/src/monitor/Monitor.js +298 -0
  44. package/mobile/out/src/monitor/Monitor.js.map +1 -0
  45. package/mobile/out/src/monitor/tasks/TaskCheckForProofs.d.ts +53 -0
  46. package/mobile/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -0
  47. package/mobile/out/src/monitor/tasks/TaskCheckForProofs.js +194 -0
  48. package/mobile/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -0
  49. package/mobile/out/src/monitor/tasks/TaskCheckNoSends.d.ts +33 -0
  50. package/mobile/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -0
  51. package/mobile/out/src/monitor/tasks/TaskCheckNoSends.js +65 -0
  52. package/mobile/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -0
  53. package/mobile/out/src/monitor/tasks/TaskClock.d.ts +14 -0
  54. package/mobile/out/src/monitor/tasks/TaskClock.d.ts.map +1 -0
  55. package/mobile/out/src/monitor/tasks/TaskClock.js +27 -0
  56. package/mobile/out/src/monitor/tasks/TaskClock.js.map +1 -0
  57. package/mobile/out/src/monitor/tasks/TaskFailAbandoned.d.ts +20 -0
  58. package/mobile/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -0
  59. package/mobile/out/src/monitor/tasks/TaskFailAbandoned.js +52 -0
  60. package/mobile/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -0
  61. package/mobile/out/src/monitor/tasks/TaskNewHeader.d.ts +15 -0
  62. package/mobile/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -0
  63. package/mobile/out/src/monitor/tasks/TaskNewHeader.js +43 -0
  64. package/mobile/out/src/monitor/tasks/TaskNewHeader.js.map +1 -0
  65. package/mobile/out/src/monitor/tasks/TaskPurge.d.ts +45 -0
  66. package/mobile/out/src/monitor/tasks/TaskPurge.d.ts.map +1 -0
  67. package/mobile/out/src/monitor/tasks/TaskPurge.js +34 -0
  68. package/mobile/out/src/monitor/tasks/TaskPurge.js.map +1 -0
  69. package/mobile/out/src/monitor/tasks/TaskReviewStatus.d.ts +26 -0
  70. package/mobile/out/src/monitor/tasks/TaskReviewStatus.d.ts.map +1 -0
  71. package/mobile/out/src/monitor/tasks/TaskReviewStatus.js +43 -0
  72. package/mobile/out/src/monitor/tasks/TaskReviewStatus.js.map +1 -0
  73. package/mobile/out/src/monitor/tasks/TaskSendWaiting.d.ts +35 -0
  74. package/mobile/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -0
  75. package/mobile/out/src/monitor/tasks/TaskSendWaiting.js +107 -0
  76. package/mobile/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -0
  77. package/mobile/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts +12 -0
  78. package/mobile/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts.map +1 -0
  79. package/mobile/out/src/monitor/tasks/TaskSyncWhenIdle.js +22 -0
  80. package/mobile/out/src/monitor/tasks/TaskSyncWhenIdle.js.map +1 -0
  81. package/mobile/out/src/monitor/tasks/TaskUnFail.d.ts +41 -0
  82. package/mobile/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -0
  83. package/mobile/out/src/monitor/tasks/TaskUnFail.js +144 -0
  84. package/mobile/out/src/monitor/tasks/TaskUnFail.js.map +1 -0
  85. package/mobile/out/src/monitor/tasks/WalletMonitorTask.d.ts +40 -0
  86. package/mobile/out/src/monitor/tasks/WalletMonitorTask.d.ts.map +1 -0
  87. package/mobile/out/src/monitor/tasks/WalletMonitorTask.js +37 -0
  88. package/mobile/out/src/monitor/tasks/WalletMonitorTask.js.map +1 -0
  89. package/mobile/out/src/sdk/CertOpsWallet.d.ts +7 -0
  90. package/mobile/out/src/sdk/CertOpsWallet.d.ts.map +1 -0
  91. package/mobile/out/src/sdk/CertOpsWallet.js +3 -0
  92. package/mobile/out/src/sdk/CertOpsWallet.js.map +1 -0
  93. package/mobile/out/src/sdk/PrivilegedKeyManager.d.ts +125 -0
  94. package/mobile/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -0
  95. package/mobile/out/src/sdk/PrivilegedKeyManager.js +293 -0
  96. package/mobile/out/src/sdk/PrivilegedKeyManager.js.map +1 -0
  97. package/mobile/out/src/sdk/WERR_errors.d.ts +115 -0
  98. package/mobile/out/src/sdk/WERR_errors.d.ts.map +1 -0
  99. package/mobile/out/src/sdk/WERR_errors.js +158 -0
  100. package/mobile/out/src/sdk/WERR_errors.js.map +1 -0
  101. package/mobile/out/src/sdk/WalletError.d.ts +44 -0
  102. package/mobile/out/src/sdk/WalletError.d.ts.map +1 -0
  103. package/mobile/out/src/sdk/WalletError.js +118 -0
  104. package/mobile/out/src/sdk/WalletError.js.map +1 -0
  105. package/mobile/out/src/sdk/WalletServices.interfaces.d.ts +430 -0
  106. package/mobile/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -0
  107. package/mobile/out/src/sdk/WalletServices.interfaces.js +3 -0
  108. package/mobile/out/src/sdk/WalletServices.interfaces.js.map +1 -0
  109. package/mobile/out/src/sdk/WalletSigner.interfaces.d.ts +10 -0
  110. package/mobile/out/src/sdk/WalletSigner.interfaces.d.ts.map +1 -0
  111. package/mobile/out/src/sdk/WalletSigner.interfaces.js +3 -0
  112. package/mobile/out/src/sdk/WalletSigner.interfaces.js.map +1 -0
  113. package/mobile/out/src/sdk/WalletStorage.interfaces.d.ts +452 -0
  114. package/mobile/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -0
  115. package/mobile/out/src/sdk/WalletStorage.interfaces.js +3 -0
  116. package/mobile/out/src/sdk/WalletStorage.interfaces.js.map +1 -0
  117. package/mobile/out/src/sdk/index.d.ts +10 -0
  118. package/mobile/out/src/sdk/index.d.ts.map +1 -0
  119. package/mobile/out/src/sdk/index.js +26 -0
  120. package/mobile/out/src/sdk/index.js.map +1 -0
  121. package/mobile/out/src/sdk/types.d.ts +158 -0
  122. package/mobile/out/src/sdk/types.d.ts.map +1 -0
  123. package/mobile/out/src/sdk/types.js +90 -0
  124. package/mobile/out/src/sdk/types.js.map +1 -0
  125. package/mobile/out/src/sdk/validationHelpers.d.ts +301 -0
  126. package/mobile/out/src/sdk/validationHelpers.d.ts.map +1 -0
  127. package/mobile/out/src/sdk/validationHelpers.js +629 -0
  128. package/mobile/out/src/sdk/validationHelpers.js.map +1 -0
  129. package/mobile/out/src/services/ServiceCollection.d.ts +25 -0
  130. package/mobile/out/src/services/ServiceCollection.d.ts.map +1 -0
  131. package/mobile/out/src/services/ServiceCollection.js +43 -0
  132. package/mobile/out/src/services/ServiceCollection.js.map +1 -0
  133. package/mobile/out/src/services/Services.d.ts +67 -0
  134. package/mobile/out/src/services/Services.d.ts.map +1 -0
  135. package/mobile/out/src/services/Services.js +391 -0
  136. package/mobile/out/src/services/Services.js.map +1 -0
  137. package/mobile/out/src/services/chaintracker/ChaintracksChainTracker.d.ts +15 -0
  138. package/mobile/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -0
  139. package/mobile/out/src/services/chaintracker/ChaintracksChainTracker.js +51 -0
  140. package/mobile/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -0
  141. package/mobile/out/src/services/chaintracker/chaintracks/BlockHeaderApi.d.ts +98 -0
  142. package/mobile/out/src/services/chaintracker/chaintracks/BlockHeaderApi.d.ts.map +1 -0
  143. package/mobile/out/src/services/chaintracker/chaintracks/BlockHeaderApi.js +38 -0
  144. package/mobile/out/src/services/chaintracker/chaintracks/BlockHeaderApi.js.map +1 -0
  145. package/mobile/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts +36 -0
  146. package/mobile/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -0
  147. package/mobile/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +128 -0
  148. package/mobile/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -0
  149. package/mobile/out/src/services/chaintracker/chaintracks/index.d.ts +3 -0
  150. package/mobile/out/src/services/chaintracker/chaintracks/index.d.ts.map +1 -0
  151. package/mobile/out/src/services/chaintracker/chaintracks/index.js +19 -0
  152. package/mobile/out/src/services/chaintracker/chaintracks/index.js.map +1 -0
  153. package/mobile/out/src/services/chaintracker/index.d.ts +3 -0
  154. package/mobile/out/src/services/chaintracker/index.d.ts.map +1 -0
  155. package/mobile/out/src/services/chaintracker/index.js +19 -0
  156. package/mobile/out/src/services/chaintracker/index.js.map +1 -0
  157. package/mobile/out/src/services/createDefaultWalletServicesOptions.d.ts +4 -0
  158. package/mobile/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -0
  159. package/mobile/out/src/services/createDefaultWalletServicesOptions.js +46 -0
  160. package/mobile/out/src/services/createDefaultWalletServicesOptions.js.map +1 -0
  161. package/mobile/out/src/services/index.d.ts +2 -0
  162. package/mobile/out/src/services/index.d.ts.map +1 -0
  163. package/mobile/out/src/services/index.js +18 -0
  164. package/mobile/out/src/services/index.js.map +1 -0
  165. package/mobile/out/src/services/providers/ARC.d.ts +91 -0
  166. package/mobile/out/src/services/providers/ARC.d.ts.map +1 -0
  167. package/mobile/out/src/services/providers/ARC.js +267 -0
  168. package/mobile/out/src/services/providers/ARC.js.map +1 -0
  169. package/mobile/out/src/services/providers/Bitails.d.ts +49 -0
  170. package/mobile/out/src/services/providers/Bitails.d.ts.map +1 -0
  171. package/mobile/out/src/services/providers/Bitails.js +222 -0
  172. package/mobile/out/src/services/providers/Bitails.js.map +1 -0
  173. package/mobile/out/src/services/providers/SdkWhatsOnChain.d.ts +21 -0
  174. package/mobile/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -0
  175. package/mobile/out/src/services/providers/SdkWhatsOnChain.js +67 -0
  176. package/mobile/out/src/services/providers/SdkWhatsOnChain.js.map +1 -0
  177. package/mobile/out/src/services/providers/WhatsOnChain.d.ts +71 -0
  178. package/mobile/out/src/services/providers/WhatsOnChain.d.ts.map +1 -0
  179. package/mobile/out/src/services/providers/WhatsOnChain.js +582 -0
  180. package/mobile/out/src/services/providers/WhatsOnChain.js.map +1 -0
  181. package/mobile/out/src/services/providers/echangeRates.d.ts +12 -0
  182. package/mobile/out/src/services/providers/echangeRates.d.ts.map +1 -0
  183. package/mobile/out/src/services/providers/echangeRates.js +237 -0
  184. package/mobile/out/src/services/providers/echangeRates.js.map +1 -0
  185. package/mobile/out/src/services/providers/getBeefForTxid.d.ts +4 -0
  186. package/mobile/out/src/services/providers/getBeefForTxid.d.ts.map +1 -0
  187. package/mobile/out/src/services/providers/getBeefForTxid.js +286 -0
  188. package/mobile/out/src/services/providers/getBeefForTxid.js.map +1 -0
  189. package/mobile/out/src/signer/WalletSigner.d.ts +11 -0
  190. package/mobile/out/src/signer/WalletSigner.d.ts.map +1 -0
  191. package/mobile/out/src/signer/WalletSigner.js +13 -0
  192. package/mobile/out/src/signer/WalletSigner.js.map +1 -0
  193. package/mobile/out/src/signer/methods/acquireDirectCertificate.d.ts +4 -0
  194. package/mobile/out/src/signer/methods/acquireDirectCertificate.d.ts.map +1 -0
  195. package/mobile/out/src/signer/methods/acquireDirectCertificate.js +45 -0
  196. package/mobile/out/src/signer/methods/acquireDirectCertificate.js.map +1 -0
  197. package/mobile/out/src/signer/methods/buildSignableTransaction.d.ts +10 -0
  198. package/mobile/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -0
  199. package/mobile/out/src/signer/methods/buildSignableTransaction.js +126 -0
  200. package/mobile/out/src/signer/methods/buildSignableTransaction.js.map +1 -0
  201. package/mobile/out/src/signer/methods/createAction.d.ts +20 -0
  202. package/mobile/out/src/signer/methods/createAction.d.ts.map +1 -0
  203. package/mobile/out/src/signer/methods/createAction.js +160 -0
  204. package/mobile/out/src/signer/methods/createAction.js.map +1 -0
  205. package/mobile/out/src/signer/methods/internalizeAction.d.ts +31 -0
  206. package/mobile/out/src/signer/methods/internalizeAction.d.ts.map +1 -0
  207. package/mobile/out/src/signer/methods/internalizeAction.js +95 -0
  208. package/mobile/out/src/signer/methods/internalizeAction.js.map +1 -0
  209. package/mobile/out/src/signer/methods/proveCertificate.d.ts +4 -0
  210. package/mobile/out/src/signer/methods/proveCertificate.d.ts.map +1 -0
  211. package/mobile/out/src/signer/methods/proveCertificate.js +29 -0
  212. package/mobile/out/src/signer/methods/proveCertificate.js.map +1 -0
  213. package/mobile/out/src/signer/methods/signAction.d.ts +13 -0
  214. package/mobile/out/src/signer/methods/signAction.d.ts.map +1 -0
  215. package/mobile/out/src/signer/methods/signAction.js +89 -0
  216. package/mobile/out/src/signer/methods/signAction.js.map +1 -0
  217. package/mobile/out/src/storage/StorageIdb.d.ts +209 -0
  218. package/mobile/out/src/storage/StorageIdb.d.ts.map +1 -0
  219. package/mobile/out/src/storage/StorageIdb.js +2330 -0
  220. package/mobile/out/src/storage/StorageIdb.js.map +1 -0
  221. package/mobile/out/src/storage/StorageProvider.d.ts +210 -0
  222. package/mobile/out/src/storage/StorageProvider.d.ts.map +1 -0
  223. package/mobile/out/src/storage/StorageProvider.js +585 -0
  224. package/mobile/out/src/storage/StorageProvider.js.map +1 -0
  225. package/mobile/out/src/storage/StorageReader.d.ts +77 -0
  226. package/mobile/out/src/storage/StorageReader.d.ts.map +1 -0
  227. package/mobile/out/src/storage/StorageReader.js +163 -0
  228. package/mobile/out/src/storage/StorageReader.js.map +1 -0
  229. package/mobile/out/src/storage/StorageReaderWriter.d.ts +88 -0
  230. package/mobile/out/src/storage/StorageReaderWriter.d.ts.map +1 -0
  231. package/mobile/out/src/storage/StorageReaderWriter.js +338 -0
  232. package/mobile/out/src/storage/StorageReaderWriter.js.map +1 -0
  233. package/mobile/out/src/storage/StorageSyncReader.d.ts +18 -0
  234. package/mobile/out/src/storage/StorageSyncReader.d.ts.map +1 -0
  235. package/mobile/out/src/storage/StorageSyncReader.js +71 -0
  236. package/mobile/out/src/storage/StorageSyncReader.js.map +1 -0
  237. package/mobile/out/src/storage/WalletStorageManager.d.ts +184 -0
  238. package/mobile/out/src/storage/WalletStorageManager.d.ts.map +1 -0
  239. package/mobile/out/src/storage/WalletStorageManager.js +665 -0
  240. package/mobile/out/src/storage/WalletStorageManager.js.map +1 -0
  241. package/mobile/out/src/storage/index.client.d.ts +8 -0
  242. package/mobile/out/src/storage/index.client.d.ts.map +1 -0
  243. package/mobile/out/src/storage/index.client.js +24 -0
  244. package/mobile/out/src/storage/index.client.js.map +1 -0
  245. package/mobile/out/src/storage/index.mobile.d.ts +7 -0
  246. package/mobile/out/src/storage/index.mobile.d.ts.map +1 -0
  247. package/mobile/out/src/storage/index.mobile.js +23 -0
  248. package/mobile/out/src/storage/index.mobile.js.map +1 -0
  249. package/mobile/out/src/storage/methods/ListActionsSpecOp.d.ts +16 -0
  250. package/mobile/out/src/storage/methods/ListActionsSpecOp.d.ts.map +1 -0
  251. package/mobile/out/src/storage/methods/ListActionsSpecOp.js +40 -0
  252. package/mobile/out/src/storage/methods/ListActionsSpecOp.js.map +1 -0
  253. package/mobile/out/src/storage/methods/ListOutputsSpecOp.d.ts +26 -0
  254. package/mobile/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +1 -0
  255. package/mobile/out/src/storage/methods/ListOutputsSpecOp.js +71 -0
  256. package/mobile/out/src/storage/methods/ListOutputsSpecOp.js.map +1 -0
  257. package/mobile/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +41 -0
  258. package/mobile/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -0
  259. package/mobile/out/src/storage/methods/attemptToPostReqsToNetwork.js +320 -0
  260. package/mobile/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -0
  261. package/mobile/out/src/storage/methods/createAction.d.ts +24 -0
  262. package/mobile/out/src/storage/methods/createAction.d.ts.map +1 -0
  263. package/mobile/out/src/storage/methods/createAction.js +705 -0
  264. package/mobile/out/src/storage/methods/createAction.js.map +1 -0
  265. package/mobile/out/src/storage/methods/generateChange.d.ts +119 -0
  266. package/mobile/out/src/storage/methods/generateChange.d.ts.map +1 -0
  267. package/mobile/out/src/storage/methods/generateChange.js +448 -0
  268. package/mobile/out/src/storage/methods/generateChange.js.map +1 -0
  269. package/mobile/out/src/storage/methods/getBeefForTransaction.d.ts +22 -0
  270. package/mobile/out/src/storage/methods/getBeefForTransaction.d.ts.map +1 -0
  271. package/mobile/out/src/storage/methods/getBeefForTransaction.js +92 -0
  272. package/mobile/out/src/storage/methods/getBeefForTransaction.js.map +1 -0
  273. package/mobile/out/src/storage/methods/getSyncChunk.d.ts +10 -0
  274. package/mobile/out/src/storage/methods/getSyncChunk.d.ts.map +1 -0
  275. package/mobile/out/src/storage/methods/getSyncChunk.js +271 -0
  276. package/mobile/out/src/storage/methods/getSyncChunk.js.map +1 -0
  277. package/mobile/out/src/storage/methods/internalizeAction.d.ts +38 -0
  278. package/mobile/out/src/storage/methods/internalizeAction.d.ts.map +1 -0
  279. package/mobile/out/src/storage/methods/internalizeAction.js +371 -0
  280. package/mobile/out/src/storage/methods/internalizeAction.js.map +1 -0
  281. package/mobile/out/src/storage/methods/listActionsIdb.d.ts +5 -0
  282. package/mobile/out/src/storage/methods/listActionsIdb.d.ts.map +1 -0
  283. package/mobile/out/src/storage/methods/listActionsIdb.js +155 -0
  284. package/mobile/out/src/storage/methods/listActionsIdb.js.map +1 -0
  285. package/mobile/out/src/storage/methods/listCertificates.d.ts +5 -0
  286. package/mobile/out/src/storage/methods/listCertificates.d.ts.map +1 -0
  287. package/mobile/out/src/storage/methods/listCertificates.js +68 -0
  288. package/mobile/out/src/storage/methods/listCertificates.js.map +1 -0
  289. package/mobile/out/src/storage/methods/listOutputsIdb.d.ts +5 -0
  290. package/mobile/out/src/storage/methods/listOutputsIdb.d.ts.map +1 -0
  291. package/mobile/out/src/storage/methods/listOutputsIdb.js +181 -0
  292. package/mobile/out/src/storage/methods/listOutputsIdb.js.map +1 -0
  293. package/mobile/out/src/storage/methods/processAction.d.ts +35 -0
  294. package/mobile/out/src/storage/methods/processAction.d.ts.map +1 -0
  295. package/mobile/out/src/storage/methods/processAction.js +311 -0
  296. package/mobile/out/src/storage/methods/processAction.js.map +1 -0
  297. package/mobile/out/src/storage/methods/purgeDataIdb.d.ts +4 -0
  298. package/mobile/out/src/storage/methods/purgeDataIdb.d.ts.map +1 -0
  299. package/mobile/out/src/storage/methods/purgeDataIdb.js +9 -0
  300. package/mobile/out/src/storage/methods/purgeDataIdb.js.map +1 -0
  301. package/mobile/out/src/storage/methods/reviewStatusIdb.d.ts +20 -0
  302. package/mobile/out/src/storage/methods/reviewStatusIdb.d.ts.map +1 -0
  303. package/mobile/out/src/storage/methods/reviewStatusIdb.js +35 -0
  304. package/mobile/out/src/storage/methods/reviewStatusIdb.js.map +1 -0
  305. package/mobile/out/src/storage/remoting/StorageClient.d.ts +283 -0
  306. package/mobile/out/src/storage/remoting/StorageClient.d.ts.map +1 -0
  307. package/mobile/out/src/storage/remoting/StorageClient.js +477 -0
  308. package/mobile/out/src/storage/remoting/StorageClient.js.map +1 -0
  309. package/mobile/out/src/storage/remoting/StorageMobile.d.ts +283 -0
  310. package/mobile/out/src/storage/remoting/StorageMobile.d.ts.map +1 -0
  311. package/mobile/out/src/storage/remoting/StorageMobile.js +477 -0
  312. package/mobile/out/src/storage/remoting/StorageMobile.js.map +1 -0
  313. package/mobile/out/src/storage/schema/StorageIdbSchema.d.ts +133 -0
  314. package/mobile/out/src/storage/schema/StorageIdbSchema.d.ts.map +1 -0
  315. package/mobile/out/src/storage/schema/StorageIdbSchema.js +3 -0
  316. package/mobile/out/src/storage/schema/StorageIdbSchema.js.map +1 -0
  317. package/mobile/out/src/storage/schema/entities/EntityBase.d.ts +105 -0
  318. package/mobile/out/src/storage/schema/entities/EntityBase.d.ts.map +1 -0
  319. package/mobile/out/src/storage/schema/entities/EntityBase.js +100 -0
  320. package/mobile/out/src/storage/schema/entities/EntityBase.js.map +1 -0
  321. package/mobile/out/src/storage/schema/entities/EntityCertificate.d.ts +43 -0
  322. package/mobile/out/src/storage/schema/entities/EntityCertificate.d.ts.map +1 -0
  323. package/mobile/out/src/storage/schema/entities/EntityCertificate.js +162 -0
  324. package/mobile/out/src/storage/schema/entities/EntityCertificate.js.map +1 -0
  325. package/mobile/out/src/storage/schema/entities/EntityCertificateField.d.ts +32 -0
  326. package/mobile/out/src/storage/schema/entities/EntityCertificateField.d.ts.map +1 -0
  327. package/mobile/out/src/storage/schema/entities/EntityCertificateField.js +111 -0
  328. package/mobile/out/src/storage/schema/entities/EntityCertificateField.js.map +1 -0
  329. package/mobile/out/src/storage/schema/entities/EntityCommission.d.ts +37 -0
  330. package/mobile/out/src/storage/schema/entities/EntityCommission.d.ts.map +1 -0
  331. package/mobile/out/src/storage/schema/entities/EntityCommission.js +127 -0
  332. package/mobile/out/src/storage/schema/entities/EntityCommission.js.map +1 -0
  333. package/mobile/out/src/storage/schema/entities/EntityOutput.d.ts +67 -0
  334. package/mobile/out/src/storage/schema/entities/EntityOutput.d.ts.map +1 -0
  335. package/mobile/out/src/storage/schema/entities/EntityOutput.js +264 -0
  336. package/mobile/out/src/storage/schema/entities/EntityOutput.js.map +1 -0
  337. package/mobile/out/src/storage/schema/entities/EntityOutputBasket.d.ts +35 -0
  338. package/mobile/out/src/storage/schema/entities/EntityOutputBasket.d.ts.map +1 -0
  339. package/mobile/out/src/storage/schema/entities/EntityOutputBasket.js +133 -0
  340. package/mobile/out/src/storage/schema/entities/EntityOutputBasket.js.map +1 -0
  341. package/mobile/out/src/storage/schema/entities/EntityOutputTag.d.ts +31 -0
  342. package/mobile/out/src/storage/schema/entities/EntityOutputTag.d.ts.map +1 -0
  343. package/mobile/out/src/storage/schema/entities/EntityOutputTag.js +104 -0
  344. package/mobile/out/src/storage/schema/entities/EntityOutputTag.js.map +1 -0
  345. package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.d.ts +28 -0
  346. package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.d.ts.map +1 -0
  347. package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.js +97 -0
  348. package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.js.map +1 -0
  349. package/mobile/out/src/storage/schema/entities/EntityProvenTx.d.ts +84 -0
  350. package/mobile/out/src/storage/schema/entities/EntityProvenTx.d.ts.map +1 -0
  351. package/mobile/out/src/storage/schema/entities/EntityProvenTx.js +276 -0
  352. package/mobile/out/src/storage/schema/entities/EntityProvenTx.js.map +1 -0
  353. package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.d.ts +135 -0
  354. package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.d.ts.map +1 -0
  355. package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.js +522 -0
  356. package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.js.map +1 -0
  357. package/mobile/out/src/storage/schema/entities/EntitySyncState.d.ts +67 -0
  358. package/mobile/out/src/storage/schema/entities/EntitySyncState.d.ts.map +1 -0
  359. package/mobile/out/src/storage/schema/entities/EntitySyncState.js +319 -0
  360. package/mobile/out/src/storage/schema/entities/EntitySyncState.js.map +1 -0
  361. package/mobile/out/src/storage/schema/entities/EntityTransaction.d.ts +67 -0
  362. package/mobile/out/src/storage/schema/entities/EntityTransaction.d.ts.map +1 -0
  363. package/mobile/out/src/storage/schema/entities/EntityTransaction.js +255 -0
  364. package/mobile/out/src/storage/schema/entities/EntityTransaction.js.map +1 -0
  365. package/mobile/out/src/storage/schema/entities/EntityTxLabel.d.ts +31 -0
  366. package/mobile/out/src/storage/schema/entities/EntityTxLabel.d.ts.map +1 -0
  367. package/mobile/out/src/storage/schema/entities/EntityTxLabel.js +104 -0
  368. package/mobile/out/src/storage/schema/entities/EntityTxLabel.js.map +1 -0
  369. package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.d.ts +28 -0
  370. package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.d.ts.map +1 -0
  371. package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.js +97 -0
  372. package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.js.map +1 -0
  373. package/mobile/out/src/storage/schema/entities/EntityUser.d.ts +29 -0
  374. package/mobile/out/src/storage/schema/entities/EntityUser.d.ts.map +1 -0
  375. package/mobile/out/src/storage/schema/entities/EntityUser.js +98 -0
  376. package/mobile/out/src/storage/schema/entities/EntityUser.js.map +1 -0
  377. package/mobile/out/src/storage/schema/entities/MergeEntity.d.ts +33 -0
  378. package/mobile/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -0
  379. package/mobile/out/src/storage/schema/entities/MergeEntity.js +62 -0
  380. package/mobile/out/src/storage/schema/entities/MergeEntity.js.map +1 -0
  381. package/mobile/out/src/storage/schema/entities/index.d.ts +17 -0
  382. package/mobile/out/src/storage/schema/entities/index.d.ts.map +1 -0
  383. package/mobile/out/src/storage/schema/entities/index.js +33 -0
  384. package/mobile/out/src/storage/schema/entities/index.js.map +1 -0
  385. package/mobile/out/src/storage/schema/tables/TableCertificate.d.ts +20 -0
  386. package/mobile/out/src/storage/schema/tables/TableCertificate.d.ts.map +1 -0
  387. package/mobile/out/src/storage/schema/tables/TableCertificate.js +3 -0
  388. package/mobile/out/src/storage/schema/tables/TableCertificate.js.map +1 -0
  389. package/mobile/out/src/storage/schema/tables/TableCertificateField.d.ts +12 -0
  390. package/mobile/out/src/storage/schema/tables/TableCertificateField.d.ts.map +1 -0
  391. package/mobile/out/src/storage/schema/tables/TableCertificateField.js +3 -0
  392. package/mobile/out/src/storage/schema/tables/TableCertificateField.js.map +1 -0
  393. package/mobile/out/src/storage/schema/tables/TableCommission.d.ts +13 -0
  394. package/mobile/out/src/storage/schema/tables/TableCommission.d.ts.map +1 -0
  395. package/mobile/out/src/storage/schema/tables/TableCommission.js +3 -0
  396. package/mobile/out/src/storage/schema/tables/TableCommission.js.map +1 -0
  397. package/mobile/out/src/storage/schema/tables/TableMonitorEvent.d.ts +9 -0
  398. package/mobile/out/src/storage/schema/tables/TableMonitorEvent.d.ts.map +1 -0
  399. package/mobile/out/src/storage/schema/tables/TableMonitorEvent.js +3 -0
  400. package/mobile/out/src/storage/schema/tables/TableMonitorEvent.js.map +1 -0
  401. package/mobile/out/src/storage/schema/tables/TableOutput.d.ts +36 -0
  402. package/mobile/out/src/storage/schema/tables/TableOutput.d.ts.map +1 -0
  403. package/mobile/out/src/storage/schema/tables/TableOutput.js +31 -0
  404. package/mobile/out/src/storage/schema/tables/TableOutput.js.map +1 -0
  405. package/mobile/out/src/storage/schema/tables/TableOutputBasket.d.ts +12 -0
  406. package/mobile/out/src/storage/schema/tables/TableOutputBasket.d.ts.map +1 -0
  407. package/mobile/out/src/storage/schema/tables/TableOutputBasket.js +3 -0
  408. package/mobile/out/src/storage/schema/tables/TableOutputBasket.js.map +1 -0
  409. package/mobile/out/src/storage/schema/tables/TableOutputTag.d.ts +10 -0
  410. package/mobile/out/src/storage/schema/tables/TableOutputTag.d.ts.map +1 -0
  411. package/mobile/out/src/storage/schema/tables/TableOutputTag.js +3 -0
  412. package/mobile/out/src/storage/schema/tables/TableOutputTag.js.map +1 -0
  413. package/mobile/out/src/storage/schema/tables/TableOutputTagMap.d.ts +9 -0
  414. package/mobile/out/src/storage/schema/tables/TableOutputTagMap.d.ts.map +1 -0
  415. package/mobile/out/src/storage/schema/tables/TableOutputTagMap.js +3 -0
  416. package/mobile/out/src/storage/schema/tables/TableOutputTagMap.js.map +1 -0
  417. package/mobile/out/src/storage/schema/tables/TableProvenTx.d.ts +14 -0
  418. package/mobile/out/src/storage/schema/tables/TableProvenTx.d.ts.map +1 -0
  419. package/mobile/out/src/storage/schema/tables/TableProvenTx.js +3 -0
  420. package/mobile/out/src/storage/schema/tables/TableProvenTx.js.map +1 -0
  421. package/mobile/out/src/storage/schema/tables/TableProvenTxReq.d.ts +64 -0
  422. package/mobile/out/src/storage/schema/tables/TableProvenTxReq.d.ts.map +1 -0
  423. package/mobile/out/src/storage/schema/tables/TableProvenTxReq.js +3 -0
  424. package/mobile/out/src/storage/schema/tables/TableProvenTxReq.js.map +1 -0
  425. package/mobile/out/src/storage/schema/tables/TableSettings.d.ts +17 -0
  426. package/mobile/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -0
  427. package/mobile/out/src/storage/schema/tables/TableSettings.js +3 -0
  428. package/mobile/out/src/storage/schema/tables/TableSettings.js.map +1 -0
  429. package/mobile/out/src/storage/schema/tables/TableSyncState.d.ts +18 -0
  430. package/mobile/out/src/storage/schema/tables/TableSyncState.d.ts.map +1 -0
  431. package/mobile/out/src/storage/schema/tables/TableSyncState.js +3 -0
  432. package/mobile/out/src/storage/schema/tables/TableSyncState.js.map +1 -0
  433. package/mobile/out/src/storage/schema/tables/TableTransaction.d.ts +37 -0
  434. package/mobile/out/src/storage/schema/tables/TableTransaction.d.ts.map +1 -0
  435. package/mobile/out/src/storage/schema/tables/TableTransaction.js +21 -0
  436. package/mobile/out/src/storage/schema/tables/TableTransaction.js.map +1 -0
  437. package/mobile/out/src/storage/schema/tables/TableTxLabel.d.ts +10 -0
  438. package/mobile/out/src/storage/schema/tables/TableTxLabel.d.ts.map +1 -0
  439. package/mobile/out/src/storage/schema/tables/TableTxLabel.js +3 -0
  440. package/mobile/out/src/storage/schema/tables/TableTxLabel.js.map +1 -0
  441. package/mobile/out/src/storage/schema/tables/TableTxLabelMap.d.ts +9 -0
  442. package/mobile/out/src/storage/schema/tables/TableTxLabelMap.d.ts.map +1 -0
  443. package/mobile/out/src/storage/schema/tables/TableTxLabelMap.js +3 -0
  444. package/mobile/out/src/storage/schema/tables/TableTxLabelMap.js.map +1 -0
  445. package/mobile/out/src/storage/schema/tables/TableUser.d.ts +16 -0
  446. package/mobile/out/src/storage/schema/tables/TableUser.d.ts.map +1 -0
  447. package/mobile/out/src/storage/schema/tables/TableUser.js +3 -0
  448. package/mobile/out/src/storage/schema/tables/TableUser.js.map +1 -0
  449. package/mobile/out/src/storage/schema/tables/index.d.ts +17 -0
  450. package/mobile/out/src/storage/schema/tables/index.d.ts.map +1 -0
  451. package/mobile/out/src/storage/schema/tables/index.js +33 -0
  452. package/mobile/out/src/storage/schema/tables/index.js.map +1 -0
  453. package/mobile/out/src/utility/ScriptTemplateBRC29.d.ts +25 -0
  454. package/mobile/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -0
  455. package/mobile/out/src/utility/ScriptTemplateBRC29.js +48 -0
  456. package/mobile/out/src/utility/ScriptTemplateBRC29.js.map +1 -0
  457. package/mobile/out/src/utility/identityUtils.d.ts +31 -0
  458. package/mobile/out/src/utility/identityUtils.d.ts.map +1 -0
  459. package/mobile/out/src/utility/identityUtils.js +116 -0
  460. package/mobile/out/src/utility/identityUtils.js.map +1 -0
  461. package/mobile/out/src/utility/index.client.d.ts +7 -0
  462. package/mobile/out/src/utility/index.client.d.ts.map +1 -0
  463. package/mobile/out/src/utility/index.client.js +23 -0
  464. package/mobile/out/src/utility/index.client.js.map +1 -0
  465. package/mobile/out/src/utility/parseTxScriptOffsets.d.ts +14 -0
  466. package/mobile/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -0
  467. package/mobile/out/src/utility/parseTxScriptOffsets.js +26 -0
  468. package/mobile/out/src/utility/parseTxScriptOffsets.js.map +1 -0
  469. package/mobile/out/src/utility/stampLog.d.ts +18 -0
  470. package/mobile/out/src/utility/stampLog.d.ts.map +1 -0
  471. package/mobile/out/src/utility/stampLog.js +72 -0
  472. package/mobile/out/src/utility/stampLog.js.map +1 -0
  473. package/mobile/out/src/utility/tscProofToMerklePath.d.ts +8 -0
  474. package/mobile/out/src/utility/tscProofToMerklePath.d.ts.map +1 -0
  475. package/mobile/out/src/utility/tscProofToMerklePath.js +41 -0
  476. package/mobile/out/src/utility/tscProofToMerklePath.js.map +1 -0
  477. package/mobile/out/src/utility/utilityHelpers.d.ts +129 -0
  478. package/mobile/out/src/utility/utilityHelpers.d.ts.map +1 -0
  479. package/mobile/out/src/utility/utilityHelpers.js +266 -0
  480. package/mobile/out/src/utility/utilityHelpers.js.map +1 -0
  481. package/mobile/out/src/utility/utilityHelpers.noBuffer.d.ts +9 -0
  482. package/mobile/out/src/utility/utilityHelpers.noBuffer.d.ts.map +1 -0
  483. package/mobile/out/src/utility/utilityHelpers.noBuffer.js +23 -0
  484. package/mobile/out/src/utility/utilityHelpers.noBuffer.js.map +1 -0
  485. package/mobile/out/src/wab-client/WABClient.d.ts +49 -0
  486. package/mobile/out/src/wab-client/WABClient.d.ts.map +1 -0
  487. package/mobile/out/src/wab-client/WABClient.js +80 -0
  488. package/mobile/out/src/wab-client/WABClient.js.map +1 -0
  489. package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts +34 -0
  490. package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts.map +1 -0
  491. package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js +16 -0
  492. package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -0
  493. package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.d.ts +7 -0
  494. package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.d.ts.map +1 -0
  495. package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.js +36 -0
  496. package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.js.map +1 -0
  497. package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.d.ts +28 -0
  498. package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.d.ts.map +1 -0
  499. package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js +69 -0
  500. package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js.map +1 -0
  501. package/mobile/out/tsconfig.mobile.tsbuildinfo +1 -0
  502. package/mobile/package-lock.json +8 -16
  503. package/mobile/package.json +1 -1
  504. package/out/src/WalletPermissionsManager.d.ts.map +1 -1
  505. package/out/src/WalletPermissionsManager.js.map +1 -1
  506. package/out/src/index.mobile.d.ts +0 -2
  507. package/out/src/index.mobile.d.ts.map +1 -1
  508. package/out/src/index.mobile.js +0 -2
  509. package/out/src/index.mobile.js.map +1 -1
  510. package/out/src/storage/StorageIdb.d.ts +2 -1
  511. package/out/src/storage/StorageIdb.d.ts.map +1 -1
  512. package/out/src/storage/StorageIdb.js +63 -29
  513. package/out/src/storage/StorageIdb.js.map +1 -1
  514. package/out/src/storage/StorageKnex.d.ts +1 -1
  515. package/out/src/storage/StorageKnex.d.ts.map +1 -1
  516. package/out/src/storage/StorageKnex.js +10 -6
  517. package/out/src/storage/StorageKnex.js.map +1 -1
  518. package/out/src/storage/StorageProvider.d.ts +2 -1
  519. package/out/src/storage/StorageProvider.d.ts.map +1 -1
  520. package/out/src/storage/StorageProvider.js +75 -40
  521. package/out/src/storage/StorageProvider.js.map +1 -1
  522. package/out/src/storage/StorageReader.d.ts +2 -1
  523. package/out/src/storage/StorageReader.d.ts.map +1 -1
  524. package/out/src/storage/StorageReader.js +45 -11
  525. package/out/src/storage/StorageReader.js.map +1 -1
  526. package/out/src/storage/StorageReaderWriter.d.ts +2 -1
  527. package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
  528. package/out/src/storage/StorageReaderWriter.js +29 -29
  529. package/out/src/storage/StorageReaderWriter.js.map +1 -1
  530. package/out/src/storage/StorageSyncReader.d.ts +2 -1
  531. package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
  532. package/out/src/storage/StorageSyncReader.js +36 -3
  533. package/out/src/storage/StorageSyncReader.js.map +1 -1
  534. package/out/src/storage/index.mobile.d.ts +1 -1
  535. package/out/src/storage/index.mobile.js +1 -1
  536. package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
  537. package/out/src/storage/remoting/StorageClient.js.map +1 -1
  538. package/out/src/storage/remoting/StorageMobile.d.ts +283 -0
  539. package/out/src/storage/remoting/StorageMobile.d.ts.map +1 -0
  540. package/out/src/storage/remoting/StorageMobile.js +477 -0
  541. package/out/src/storage/remoting/StorageMobile.js.map +1 -0
  542. package/out/tsconfig.all.tsbuildinfo +1 -1
  543. package/package.json +1 -1
  544. package/src/WalletPermissionsManager.ts +19 -8
  545. package/src/index.mobile.ts +0 -2
  546. package/src/storage/StorageIdb.ts +4 -5
  547. package/src/storage/StorageKnex.ts +7 -6
  548. package/src/storage/StorageProvider.ts +5 -9
  549. package/src/storage/StorageReader.ts +4 -7
  550. package/src/storage/StorageReaderWriter.ts +4 -8
  551. package/src/storage/StorageSyncReader.ts +2 -19
  552. package/src/storage/index.mobile.ts +1 -1
  553. package/src/storage/remoting/StorageClient.ts +0 -1
  554. package/src/storage/remoting/StorageMobile.ts +527 -0
  555. package/tsconfig.all.json +2 -1
  556. package/tsconfig.client.json +6 -0
  557. package/tsconfig.json +3 -0
  558. package/tsconfig.mobile.json +28 -0
@@ -0,0 +1,255 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityTransaction = void 0;
4
+ /* eslint-disable @typescript-eslint/no-unused-vars */
5
+ const sdk_1 = require("@bsv/sdk");
6
+ const index_client_1 = require("../../../index.client");
7
+ const _1 = require(".");
8
+ class EntityTransaction extends _1.EntityBase {
9
+ /**
10
+ * @returns @bsv/sdk Transaction object from parsed rawTx.
11
+ * If rawTx is undefined, returns undefined.
12
+ */
13
+ getBsvTx() {
14
+ if (!this.rawTx)
15
+ return undefined;
16
+ return sdk_1.Transaction.fromBinary(this.rawTx);
17
+ }
18
+ /**
19
+ * @returns array of @bsv/sdk TransactionInput objects from parsed rawTx.
20
+ * If rawTx is undefined, an empty array is returned.
21
+ */
22
+ getBsvTxIns() {
23
+ const tx = this.getBsvTx();
24
+ if (!tx)
25
+ return [];
26
+ return tx.inputs;
27
+ }
28
+ /**
29
+ * Returns an array of "known" inputs to this transaction which belong to the same userId.
30
+ * Uses both spentBy and rawTx inputs (if available) to locate inputs from among user's outputs.
31
+ * Not all transaction inputs correspond to prior storage outputs.
32
+ */
33
+ async getInputs(storage, trx) {
34
+ const inputs = await storage.findOutputs({
35
+ partial: { userId: this.userId, spentBy: this.id },
36
+ trx
37
+ });
38
+ // Merge "inputs" by spentBy and userId
39
+ for (const input of this.getBsvTxIns()) {
40
+ //console.log(`getInputs of ${this.id}: ${input.txid()} ${input.txOutNum}`)
41
+ const pso = (0, index_client_1.verifyOneOrNone)(await storage.findOutputs({
42
+ partial: {
43
+ userId: this.userId,
44
+ txid: input.sourceTXID,
45
+ vout: input.sourceOutputIndex
46
+ },
47
+ trx
48
+ }));
49
+ if (pso && !inputs.some(i => i.outputId === pso.outputId))
50
+ inputs.push(pso);
51
+ }
52
+ return inputs;
53
+ }
54
+ constructor(api) {
55
+ const now = new Date();
56
+ super(api || {
57
+ transactionId: 0,
58
+ created_at: now,
59
+ updated_at: now,
60
+ userId: 0,
61
+ txid: '',
62
+ status: 'unprocessed',
63
+ reference: '',
64
+ satoshis: 0,
65
+ description: '',
66
+ isOutgoing: false,
67
+ rawTx: undefined,
68
+ inputBEEF: undefined
69
+ });
70
+ }
71
+ updateApi() {
72
+ /* nothing needed yet... */
73
+ }
74
+ get transactionId() {
75
+ return this.api.transactionId;
76
+ }
77
+ set transactionId(v) {
78
+ this.api.transactionId = v;
79
+ }
80
+ get created_at() {
81
+ return this.api.created_at;
82
+ }
83
+ set created_at(v) {
84
+ this.api.created_at = v;
85
+ }
86
+ get updated_at() {
87
+ return this.api.updated_at;
88
+ }
89
+ set updated_at(v) {
90
+ this.api.updated_at = v;
91
+ }
92
+ get version() {
93
+ return this.api.version;
94
+ }
95
+ set version(v) {
96
+ this.api.version = v;
97
+ }
98
+ get lockTime() {
99
+ return this.api.lockTime;
100
+ }
101
+ set lockTime(v) {
102
+ this.api.lockTime = v;
103
+ }
104
+ get isOutgoing() {
105
+ return this.api.isOutgoing;
106
+ }
107
+ set isOutgoing(v) {
108
+ this.api.isOutgoing = v;
109
+ }
110
+ get status() {
111
+ return this.api.status;
112
+ }
113
+ set status(v) {
114
+ this.api.status = v;
115
+ }
116
+ get userId() {
117
+ return this.api.userId;
118
+ }
119
+ set userId(v) {
120
+ this.api.userId = v;
121
+ }
122
+ get provenTxId() {
123
+ return this.api.provenTxId;
124
+ }
125
+ set provenTxId(v) {
126
+ this.api.provenTxId = v;
127
+ }
128
+ get satoshis() {
129
+ return this.api.satoshis;
130
+ }
131
+ set satoshis(v) {
132
+ this.api.satoshis = v;
133
+ }
134
+ get txid() {
135
+ return this.api.txid;
136
+ }
137
+ set txid(v) {
138
+ this.api.txid = v;
139
+ }
140
+ get reference() {
141
+ return this.api.reference;
142
+ }
143
+ set reference(v) {
144
+ this.api.reference = v;
145
+ }
146
+ get inputBEEF() {
147
+ return this.api.inputBEEF;
148
+ }
149
+ set inputBEEF(v) {
150
+ this.api.inputBEEF = v;
151
+ }
152
+ get description() {
153
+ return this.api.description;
154
+ }
155
+ set description(v) {
156
+ this.api.description = v;
157
+ }
158
+ get rawTx() {
159
+ return this.api.rawTx;
160
+ }
161
+ set rawTx(v) {
162
+ this.api.rawTx = v;
163
+ }
164
+ // Extended (computed / dependent entity) Properties
165
+ //get labels() { return this.api.labels }
166
+ //set labels(v: string[] | undefined) { this.api.labels = v }
167
+ get id() {
168
+ return this.api.transactionId;
169
+ }
170
+ set id(v) {
171
+ this.api.transactionId = v;
172
+ }
173
+ get entityName() {
174
+ return 'transaction';
175
+ }
176
+ get entityTable() {
177
+ return 'transactions';
178
+ }
179
+ equals(ei, syncMap) {
180
+ const eo = this.toApi();
181
+ // Properties that are never updated
182
+ if (eo.transactionId !== (syncMap ? syncMap.transaction.idMap[(0, index_client_1.verifyId)(ei.transactionId)] : ei.transactionId) ||
183
+ eo.reference !== ei.reference)
184
+ return false;
185
+ if (eo.version !== ei.version ||
186
+ eo.lockTime !== ei.lockTime ||
187
+ eo.isOutgoing !== ei.isOutgoing ||
188
+ eo.status !== ei.status ||
189
+ eo.satoshis !== ei.satoshis ||
190
+ eo.txid !== ei.txid ||
191
+ eo.description !== ei.description ||
192
+ !(0, index_client_1.optionalArraysEqual)(eo.rawTx, ei.rawTx) ||
193
+ !(0, index_client_1.optionalArraysEqual)(eo.inputBEEF, ei.inputBEEF))
194
+ return false;
195
+ if (!eo.provenTxId !== !ei.provenTxId ||
196
+ (ei.provenTxId && eo.provenTxId !== (syncMap ? syncMap.provenTx.idMap[(0, index_client_1.verifyId)(ei.provenTxId)] : ei.provenTxId)))
197
+ return false;
198
+ return true;
199
+ }
200
+ static async mergeFind(storage, userId, ei, syncMap, trx) {
201
+ const ef = (0, index_client_1.verifyOneOrNone)(await storage.findTransactions({
202
+ partial: { reference: ei.reference, userId },
203
+ trx
204
+ }));
205
+ return {
206
+ found: !!ef,
207
+ eo: new EntityTransaction(ef || { ...ei }),
208
+ eiId: (0, index_client_1.verifyId)(ei.transactionId)
209
+ };
210
+ }
211
+ async mergeNew(storage, userId, syncMap, trx) {
212
+ if (this.provenTxId)
213
+ this.provenTxId = syncMap.provenTx.idMap[this.provenTxId];
214
+ this.userId = userId;
215
+ this.transactionId = 0;
216
+ this.transactionId = await storage.insertTransaction(this.toApi(), trx);
217
+ }
218
+ async mergeExisting(storage, since, ei, syncMap, trx) {
219
+ let wasMerged = false;
220
+ if (ei.updated_at > this.updated_at) {
221
+ // Properties that are never updated:
222
+ // transactionId
223
+ // userId
224
+ // reference
225
+ // Merged properties
226
+ this.version = ei.version;
227
+ this.lockTime = ei.lockTime;
228
+ this.isOutgoing = ei.isOutgoing;
229
+ this.status = ei.status;
230
+ this.provenTxId = ei.provenTxId ? syncMap.provenTx.idMap[ei.provenTxId] : undefined;
231
+ this.satoshis = ei.satoshis;
232
+ this.txid = ei.txid;
233
+ this.description = ei.description;
234
+ this.rawTx = ei.rawTx;
235
+ this.inputBEEF = ei.inputBEEF;
236
+ this.updated_at = new Date(Math.max(ei.updated_at.getTime(), this.updated_at.getTime()));
237
+ await storage.updateTransaction(this.id, this.toApi(), trx);
238
+ wasMerged = true;
239
+ }
240
+ return wasMerged;
241
+ }
242
+ async getProvenTx(storage, trx) {
243
+ if (!this.provenTxId)
244
+ return undefined;
245
+ const p = (0, index_client_1.verifyOneOrNone)(await storage.findProvenTxs({
246
+ partial: { provenTxId: this.provenTxId },
247
+ trx
248
+ }));
249
+ if (!p)
250
+ return undefined;
251
+ return new _1.EntityProvenTx(p);
252
+ }
253
+ }
254
+ exports.EntityTransaction = EntityTransaction;
255
+ //# sourceMappingURL=EntityTransaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityTransaction.js","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityTransaction.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AACtD,kCAA0E;AAC1E,wDAO8B;AAC9B,wBAAsE;AAEtE,MAAa,iBAAkB,SAAQ,aAA4B;IACjE;;;OAGG;IACH,QAAQ;QACN,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,CAAA;QACjC,OAAO,iBAAc,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC9C,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,MAAM,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;QAC1B,IAAI,CAAC,EAAE;YAAE,OAAO,EAAE,CAAA;QAClB,OAAO,EAAE,CAAC,MAAM,CAAA;IAClB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,SAAS,CAAC,OAAsB,EAAE,GAAkB;QACxD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC;YACvC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI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ClB,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAsB,EAAE,GAAkB;QAC1D,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,OAAO,SAAS,CAAA;QACtC,MAAM,CAAC,GAAG,IAAA,8BAAe,EACvB,MAAM,OAAO,CAAC,aAAa,CAAC;YAC1B,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;YACxC,GAAG;SACJ,CAAC,CACH,CAAA;QACD,IAAI,CAAC,CAAC;YAAE,OAAO,SAAS,CAAA;QACxB,OAAO,IAAI,iBAAc,CAAC,CAAC,CAAC,CAAA;IAC9B,CAAC;CACF;AAxSD,8CAwSC"}
@@ -0,0 +1,31 @@
1
+ import { sdk, TableTxLabel } from '../../../index.client';
2
+ import { EntityBase, EntityStorage, SyncMap } from '.';
3
+ export declare class EntityTxLabel extends EntityBase<TableTxLabel> {
4
+ constructor(api?: TableTxLabel);
5
+ updateApi(): void;
6
+ get txLabelId(): number;
7
+ set txLabelId(v: number);
8
+ get created_at(): Date;
9
+ set created_at(v: Date);
10
+ get updated_at(): Date;
11
+ set updated_at(v: Date);
12
+ get label(): string;
13
+ set label(v: string);
14
+ get userId(): number;
15
+ set userId(v: number);
16
+ get isDeleted(): boolean;
17
+ set isDeleted(v: boolean);
18
+ get id(): number;
19
+ set id(v: number);
20
+ get entityName(): string;
21
+ get entityTable(): string;
22
+ equals(ei: TableTxLabel, syncMap?: SyncMap): boolean;
23
+ static mergeFind(storage: EntityStorage, userId: number, ei: TableTxLabel, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
24
+ found: boolean;
25
+ eo: EntityTxLabel;
26
+ eiId: number;
27
+ }>;
28
+ mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>;
29
+ mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableTxLabel, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
30
+ }
31
+ //# sourceMappingURL=EntityTxLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityTxLabel.d.ts","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityTxLabel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,GAAG,EAAE,YAAY,EAA6B,MAAM,uBAAuB,CAAA;AACjG,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,CAAA;AAEtD,qBAAa,aAAc,SAAQ,UAAU,CAAC,YAAY,CAAC;gBAC7C,GAAG,CAAC,EAAE,YAAY;IAcrB,SAAS,IAAI,IAAI;IAI1B,IAAI,SAAS,IAGI,MAAM,CADtB;IACD,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,EAEtB;IACD,IAAI,UAAU,IAGI,IAAI,CADrB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAErB;IACD,IAAI,UAAU,IAGI,IAAI,CADrB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAErB;IACD,IAAI,KAAK,IAGI,MAAM,CADlB;IACD,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,EAElB;IACD,IAAI,MAAM,IAGI,MAAM,CADnB;IACD,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM,EAEnB;IACD,IAAI,SAAS,IAGI,OAAO,CADvB;IACD,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAED,IAAa,EAAE,IAAI,MAAM,CAExB;IACD,IAAa,EAAE,CAAC,CAAC,EAAE,MAAM,EAExB;IACD,IAAa,UAAU,IAAI,MAAM,CAEhC;IACD,IAAa,WAAW,IAAI,MAAM,CAEjC;IAEQ,MAAM,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO;WAShD,SAAS,CACpB,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,YAAY,EAChB,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GACjB,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,EAAE,EAAE,aAAa,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAShD,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrG,aAAa,CAC1B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,IAAI,GAAG,SAAS,EACvB,EAAE,EAAE,YAAY,EAChB,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GACjB,OAAO,CAAC,OAAO,CAAC;CAUpB"}
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityTxLabel = void 0;
4
+ const index_client_1 = require("../../../index.client");
5
+ const _1 = require(".");
6
+ class EntityTxLabel extends _1.EntityBase {
7
+ constructor(api) {
8
+ const now = new Date();
9
+ super(api || {
10
+ txLabelId: 0,
11
+ created_at: now,
12
+ updated_at: now,
13
+ label: '',
14
+ userId: 0,
15
+ isDeleted: false
16
+ });
17
+ }
18
+ updateApi() {
19
+ /* nothing needed yet... */
20
+ }
21
+ get txLabelId() {
22
+ return this.api.txLabelId;
23
+ }
24
+ set txLabelId(v) {
25
+ this.api.txLabelId = v;
26
+ }
27
+ get created_at() {
28
+ return this.api.created_at;
29
+ }
30
+ set created_at(v) {
31
+ this.api.created_at = v;
32
+ }
33
+ get updated_at() {
34
+ return this.api.updated_at;
35
+ }
36
+ set updated_at(v) {
37
+ this.api.updated_at = v;
38
+ }
39
+ get label() {
40
+ return this.api.label;
41
+ }
42
+ set label(v) {
43
+ this.api.label = v;
44
+ }
45
+ get userId() {
46
+ return this.api.userId;
47
+ }
48
+ set userId(v) {
49
+ this.api.userId = v;
50
+ }
51
+ get isDeleted() {
52
+ return this.api.isDeleted;
53
+ }
54
+ set isDeleted(v) {
55
+ this.api.isDeleted = v;
56
+ }
57
+ get id() {
58
+ return this.api.txLabelId;
59
+ }
60
+ set id(v) {
61
+ this.api.txLabelId = v;
62
+ }
63
+ get entityName() {
64
+ return 'txLabel';
65
+ }
66
+ get entityTable() {
67
+ return 'tx_labels';
68
+ }
69
+ equals(ei, syncMap) {
70
+ const eo = this.toApi();
71
+ if (eo.label != ei.label || eo.isDeleted != ei.isDeleted)
72
+ return false;
73
+ if (!syncMap) {
74
+ if (eo.userId !== ei.userId)
75
+ return false;
76
+ }
77
+ return true;
78
+ }
79
+ static async mergeFind(storage, userId, ei, syncMap, trx) {
80
+ const ef = (0, index_client_1.verifyOneOrNone)(await storage.findTxLabels({ partial: { label: ei.label, userId }, trx }));
81
+ return {
82
+ found: !!ef,
83
+ eo: new EntityTxLabel(ef || { ...ei }),
84
+ eiId: (0, index_client_1.verifyId)(ei.txLabelId)
85
+ };
86
+ }
87
+ async mergeNew(storage, userId, syncMap, trx) {
88
+ this.userId = userId;
89
+ this.txLabelId = 0;
90
+ this.txLabelId = await storage.insertTxLabel(this.toApi(), trx);
91
+ }
92
+ async mergeExisting(storage, since, ei, syncMap, trx) {
93
+ let wasMerged = false;
94
+ if (ei.updated_at > this.updated_at) {
95
+ this.isDeleted = ei.isDeleted;
96
+ this.updated_at = new Date(Math.max(ei.updated_at.getTime(), this.updated_at.getTime()));
97
+ await storage.updateTxLabel(this.id, this.toApi(), trx);
98
+ wasMerged = true;
99
+ }
100
+ return wasMerged;
101
+ }
102
+ }
103
+ exports.EntityTxLabel = EntityTxLabel;
104
+ //# sourceMappingURL=EntityTxLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityTxLabel.js","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityTxLabel.ts"],"names":[],"mappings":";;;AAEA,wDAAiG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AE,IAAA,uBAAQ,EAAC,EAAE,CAAC,SAAS,CAAC;SAC7B,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,QAAQ,CAAC,OAAsB,EAAE,MAAc,EAAE,OAAgB,EAAE,GAAkB;QAClG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAA;QAClB,IAAI,CAAC,SAAS,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAA;IACjE,CAAC;IAEQ,KAAK,CAAC,aAAa,CAC1B,OAAsB,EACtB,KAAuB,EACvB,EAAgB,EAChB,OAAgB,EAChB,GAAkB;QAElB,IAAI,SAAS,GAAG,KAAK,CAAA;QACrB,IAAI,EAAE,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YACpC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,CAAA;YAC7B,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;YACxF,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAA;YACvD,SAAS,GAAG,IAAI,CAAA;QAClB,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAnHD,sCAmHC"}
@@ -0,0 +1,28 @@
1
+ import { sdk, TableTxLabelMap } from '../../../index.client';
2
+ import { EntityBase, EntityStorage, SyncMap } from '.';
3
+ export declare class EntityTxLabelMap extends EntityBase<TableTxLabelMap> {
4
+ constructor(api?: TableTxLabelMap);
5
+ updateApi(): void;
6
+ get txLabelId(): number;
7
+ set txLabelId(v: number);
8
+ get transactionId(): number;
9
+ set transactionId(v: number);
10
+ get created_at(): Date;
11
+ set created_at(v: Date);
12
+ get updated_at(): Date;
13
+ set updated_at(v: Date);
14
+ get isDeleted(): boolean;
15
+ set isDeleted(v: boolean);
16
+ get id(): number;
17
+ get entityName(): string;
18
+ get entityTable(): string;
19
+ equals(ei: TableTxLabelMap, syncMap?: SyncMap | undefined): boolean;
20
+ static mergeFind(storage: EntityStorage, userId: number, ei: TableTxLabelMap, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
21
+ found: boolean;
22
+ eo: EntityTxLabelMap;
23
+ eiId: number;
24
+ }>;
25
+ mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>;
26
+ mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableTxLabelMap, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
27
+ }
28
+ //# sourceMappingURL=EntityTxLabelMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityTxLabelMap.d.ts","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityTxLabelMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,GAAG,EAAE,eAAe,EAA6B,MAAM,uBAAuB,CAAA;AACpG,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,CAAA;AAEtD,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,eAAe,CAAC;gBACnD,GAAG,CAAC,EAAE,eAAe;IAaxB,SAAS,IAAI,IAAI;IAI1B,IAAI,SAAS,IAGI,MAAM,CADtB;IACD,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,EAEtB;IACD,IAAI,aAAa,IAGI,MAAM,CAD1B;IACD,IAAI,aAAa,CAAC,CAAC,EAAE,MAAM,EAE1B;IACD,IAAI,UAAU,IAGI,IAAI,CADrB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAErB;IACD,IAAI,UAAU,IAGI,IAAI,CADrB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAErB;IACD,IAAI,SAAS,IAGI,OAAO,CADvB;IACD,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAED,IAAa,EAAE,IAAI,MAAM,CAExB;IACD,IAAa,UAAU,IAAI,MAAM,CAEhC;IACD,IAAa,WAAW,IAAI,MAAM,CAEjC;IAEQ,MAAM,CAAC,EAAE,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO;WAa/D,SAAS,CACpB,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,eAAe,EACnB,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GACjB,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,EAAE,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAgBnD,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrG,aAAa,CAC1B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,IAAI,GAAG,SAAS,EACvB,EAAE,EAAE,eAAe,EACnB,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GACjB,OAAO,CAAC,OAAO,CAAC;CAUpB"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityTxLabelMap = void 0;
4
+ const index_client_1 = require("../../../index.client");
5
+ const _1 = require(".");
6
+ class EntityTxLabelMap extends _1.EntityBase {
7
+ constructor(api) {
8
+ const now = new Date();
9
+ super(api || {
10
+ created_at: now,
11
+ updated_at: now,
12
+ transactionId: 0,
13
+ txLabelId: 0,
14
+ isDeleted: false
15
+ });
16
+ }
17
+ updateApi() {
18
+ /* nothing needed yet... */
19
+ }
20
+ get txLabelId() {
21
+ return this.api.txLabelId;
22
+ }
23
+ set txLabelId(v) {
24
+ this.api.txLabelId = v;
25
+ }
26
+ get transactionId() {
27
+ return this.api.transactionId;
28
+ }
29
+ set transactionId(v) {
30
+ this.api.transactionId = v;
31
+ }
32
+ get created_at() {
33
+ return this.api.created_at;
34
+ }
35
+ set created_at(v) {
36
+ this.api.created_at = v;
37
+ }
38
+ get updated_at() {
39
+ return this.api.updated_at;
40
+ }
41
+ set updated_at(v) {
42
+ this.api.updated_at = v;
43
+ }
44
+ get isDeleted() {
45
+ return this.api.isDeleted;
46
+ }
47
+ set isDeleted(v) {
48
+ this.api.isDeleted = v;
49
+ }
50
+ get id() {
51
+ throw new index_client_1.sdk.WERR_INVALID_OPERATION('entity has no "id" value');
52
+ } // entity does not have its own id.
53
+ get entityName() {
54
+ return 'txLabelMap';
55
+ }
56
+ get entityTable() {
57
+ return 'tx_labels_map';
58
+ }
59
+ equals(ei, syncMap) {
60
+ const eo = this.toApi();
61
+ if (eo.transactionId !== (syncMap ? syncMap.transaction.idMap[(0, index_client_1.verifyId)(ei.transactionId)] : ei.transactionId) ||
62
+ eo.txLabelId !== (syncMap ? syncMap.txLabel.idMap[(0, index_client_1.verifyId)(ei.txLabelId)] : ei.txLabelId) ||
63
+ eo.isDeleted !== ei.isDeleted)
64
+ return false;
65
+ return true;
66
+ }
67
+ static async mergeFind(storage, userId, ei, syncMap, trx) {
68
+ const transactionId = syncMap.transaction.idMap[ei.transactionId];
69
+ const txLabelId = syncMap.txLabel.idMap[ei.txLabelId];
70
+ const ef = (0, index_client_1.verifyOneOrNone)(await storage.findTxLabelMaps({
71
+ partial: { transactionId, txLabelId },
72
+ trx
73
+ }));
74
+ return {
75
+ found: !!ef,
76
+ eo: new EntityTxLabelMap(ef || { ...ei }),
77
+ eiId: -1
78
+ };
79
+ }
80
+ async mergeNew(storage, userId, syncMap, trx) {
81
+ this.transactionId = syncMap.transaction.idMap[this.transactionId];
82
+ this.txLabelId = syncMap.txLabel.idMap[this.txLabelId];
83
+ await storage.insertTxLabelMap(this.toApi(), trx);
84
+ }
85
+ async mergeExisting(storage, since, ei, syncMap, trx) {
86
+ let wasMerged = false;
87
+ if (ei.updated_at > this.updated_at) {
88
+ this.isDeleted = ei.isDeleted;
89
+ this.updated_at = new Date(Math.max(ei.updated_at.getTime(), this.updated_at.getTime()));
90
+ await storage.updateTxLabelMap(this.transactionId, this.txLabelId, this.toApi(), trx);
91
+ wasMerged = true;
92
+ }
93
+ return wasMerged;
94
+ }
95
+ }
96
+ exports.EntityTxLabelMap = EntityTxLabelMap;
97
+ //# sourceMappingURL=EntityTxLabelMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityTxLabelMap.js","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityTxLabelMap.ts"],"names":[],"mappings":";;;AAEA,wDAAoG;AACpG,wBAAsD;AAEtD,MAAa,gBAAiB,SAAQ,aAA2B;IAC/D,YAAY,GAAqB;QAC/B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;QACtB,KAAK,CACH,GAAG,IAAI;YACL,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,GAAG;YACf,aAAa,EAAE,CAAC;YAChB,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,KAAK;SACjB,CACF,CAAA;IACH,CAAC;IAEQ,SAAS;QAChB,2BAA2B;IAC7B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAA;IAC3B,CAAC;IACD,IAAI,SAAS,CAAC,CAAS;QACrB,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,CAAC,CAAA;IACxB,CAAC;IACD,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,CAAA;IAC/B,CAAC;IACD,IAAI,aAAa,CAAC,CAAS;QACzB,IAAI,CAAC,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AAG,KAAK,CAAA;QACrB,IAAI,EAAE,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YACpC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,CAAA;YAC7B,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;YACxF,MAAM,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAA;YACrF,SAAS,GAAG,IAAI,CAAA;QAClB,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AApHD,4CAoHC"}
@@ -0,0 +1,29 @@
1
+ import { sdk, TableUser } from '../../../index.client';
2
+ import { EntityBase, EntityStorage, SyncMap } from '.';
3
+ export declare class EntityUser extends EntityBase<TableUser> {
4
+ constructor(api?: TableUser);
5
+ updateApi(): void;
6
+ get userId(): number;
7
+ set userId(v: number);
8
+ get created_at(): Date;
9
+ set created_at(v: Date);
10
+ get updated_at(): Date;
11
+ set updated_at(v: Date);
12
+ get identityKey(): string;
13
+ set identityKey(v: string);
14
+ get activeStorage(): string;
15
+ set activeStorage(v: string);
16
+ get id(): number;
17
+ set id(v: number);
18
+ get entityName(): string;
19
+ get entityTable(): string;
20
+ equals(ei: TableUser, syncMap?: SyncMap | undefined): boolean;
21
+ static mergeFind(storage: EntityStorage, userId: number, ei: TableUser, trx?: sdk.TrxToken): Promise<{
22
+ found: boolean;
23
+ eo: EntityUser;
24
+ eiId: number;
25
+ }>;
26
+ mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>;
27
+ mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableUser, syncMap?: SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
28
+ }
29
+ //# sourceMappingURL=EntityUser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityUser.d.ts","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityUser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,GAAG,EAAE,SAAS,EAA6B,MAAM,uBAAuB,CAAA;AAC9F,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,CAAA;AAEtD,qBAAa,UAAW,SAAQ,UAAU,CAAC,SAAS,CAAC;gBACvC,GAAG,CAAC,EAAE,SAAS;IAalB,SAAS,IAAI,IAAI;IAI1B,IAAI,MAAM,IAGI,MAAM,CADnB;IACD,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM,EAEnB;IACD,IAAI,UAAU,IAGI,IAAI,CADrB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAErB;IACD,IAAI,UAAU,IAGI,IAAI,CADrB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,EAErB;IACD,IAAI,WAAW,IAGI,MAAM,CADxB;IACD,IAAI,WAAW,CAAC,CAAC,EAAE,MAAM,EAExB;IACD,IAAI,aAAa,IAGI,MAAM,CAD1B;IACD,IAAI,aAAa,CAAC,CAAC,EAAE,MAAM,EAE1B;IAED,IAAa,EAAE,IAAI,MAAM,CAExB;IACD,IAAa,EAAE,CAAC,CAAC,EAAE,MAAM,EAExB;IACD,IAAa,UAAU,IAAI,MAAM,CAEhC;IACD,IAAa,WAAW,IAAI,MAAM,CAEjC;IAEQ,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO;WAQzD,SAAS,CACpB,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,SAAS,EACb,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GACjB,OAAO,CAAC;QAAE,KAAK,EAA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