@bsv/wallet-toolbox-client 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/out/src/Wallet.d.ts +83 -0
  2. package/out/src/Wallet.d.ts.map +1 -0
  3. package/out/src/Wallet.js +415 -0
  4. package/out/src/Wallet.js.map +1 -0
  5. package/out/src/index.client.d.ts +8 -0
  6. package/out/src/index.client.d.ts.map +1 -0
  7. package/out/src/index.client.js +47 -0
  8. package/out/src/index.client.js.map +1 -0
  9. package/out/src/monitor/Monitor.d.ts +89 -0
  10. package/out/src/monitor/Monitor.d.ts.map +1 -0
  11. package/out/src/monitor/Monitor.js +253 -0
  12. package/out/src/monitor/Monitor.js.map +1 -0
  13. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +53 -0
  14. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -0
  15. package/out/src/monitor/tasks/TaskCheckForProofs.js +197 -0
  16. package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -0
  17. package/out/src/monitor/tasks/TaskClock.d.ts +14 -0
  18. package/out/src/monitor/tasks/TaskClock.d.ts.map +1 -0
  19. package/out/src/monitor/tasks/TaskClock.js +27 -0
  20. package/out/src/monitor/tasks/TaskClock.js.map +1 -0
  21. package/out/src/monitor/tasks/TaskFailAbandoned.d.ts +20 -0
  22. package/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -0
  23. package/out/src/monitor/tasks/TaskFailAbandoned.js +52 -0
  24. package/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -0
  25. package/out/src/monitor/tasks/TaskNewHeader.d.ts +15 -0
  26. package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -0
  27. package/out/src/monitor/tasks/TaskNewHeader.js +45 -0
  28. package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -0
  29. package/out/src/monitor/tasks/TaskPurge.d.ts +45 -0
  30. package/out/src/monitor/tasks/TaskPurge.d.ts.map +1 -0
  31. package/out/src/monitor/tasks/TaskPurge.js +35 -0
  32. package/out/src/monitor/tasks/TaskPurge.js.map +1 -0
  33. package/out/src/monitor/tasks/TaskReviewStatus.d.ts +26 -0
  34. package/out/src/monitor/tasks/TaskReviewStatus.d.ts.map +1 -0
  35. package/out/src/monitor/tasks/TaskReviewStatus.js +44 -0
  36. package/out/src/monitor/tasks/TaskReviewStatus.js.map +1 -0
  37. package/out/src/monitor/tasks/TaskSendWaiting.d.ts +32 -0
  38. package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -0
  39. package/out/src/monitor/tasks/TaskSendWaiting.js +99 -0
  40. package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -0
  41. package/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts +12 -0
  42. package/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts.map +1 -0
  43. package/out/src/monitor/tasks/TaskSyncWhenIdle.js +22 -0
  44. package/out/src/monitor/tasks/TaskSyncWhenIdle.js.map +1 -0
  45. package/out/src/monitor/tasks/WalletMonitorTask.d.ts +40 -0
  46. package/out/src/monitor/tasks/WalletMonitorTask.d.ts.map +1 -0
  47. package/out/src/monitor/tasks/WalletMonitorTask.js +37 -0
  48. package/out/src/monitor/tasks/WalletMonitorTask.js.map +1 -0
  49. package/out/src/sdk/CertOps.d.ts +66 -0
  50. package/out/src/sdk/CertOps.d.ts.map +1 -0
  51. package/out/src/sdk/CertOps.js +198 -0
  52. package/out/src/sdk/CertOps.js.map +1 -0
  53. package/out/src/sdk/PrivilegedKeyManager.d.ts +125 -0
  54. package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -0
  55. package/out/src/sdk/PrivilegedKeyManager.js +293 -0
  56. package/out/src/sdk/PrivilegedKeyManager.js.map +1 -0
  57. package/out/src/sdk/StorageSyncReader.d.ts +121 -0
  58. package/out/src/sdk/StorageSyncReader.d.ts.map +1 -0
  59. package/out/src/sdk/StorageSyncReader.js +3 -0
  60. package/out/src/sdk/StorageSyncReader.js.map +1 -0
  61. package/out/src/sdk/StorageSyncReaderWriter.d.ts +89 -0
  62. package/out/src/sdk/StorageSyncReaderWriter.d.ts.map +1 -0
  63. package/out/src/sdk/StorageSyncReaderWriter.js +3 -0
  64. package/out/src/sdk/StorageSyncReaderWriter.js.map +1 -0
  65. package/out/src/sdk/WERR_errors.d.ts +90 -0
  66. package/out/src/sdk/WERR_errors.d.ts.map +1 -0
  67. package/out/src/sdk/WERR_errors.js +128 -0
  68. package/out/src/sdk/WERR_errors.js.map +1 -0
  69. package/out/src/sdk/WalletError.d.ts +45 -0
  70. package/out/src/sdk/WalletError.d.ts.map +1 -0
  71. package/out/src/sdk/WalletError.js +122 -0
  72. package/out/src/sdk/WalletError.js.map +1 -0
  73. package/out/src/sdk/WalletServices.interfaces.d.ts +325 -0
  74. package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -0
  75. package/out/src/sdk/WalletServices.interfaces.js +3 -0
  76. package/out/src/sdk/WalletServices.interfaces.js.map +1 -0
  77. package/out/src/sdk/WalletSigner.interfaces.d.ts +10 -0
  78. package/out/src/sdk/WalletSigner.interfaces.d.ts.map +1 -0
  79. package/out/src/sdk/WalletSigner.interfaces.js +3 -0
  80. package/out/src/sdk/WalletSigner.interfaces.js.map +1 -0
  81. package/out/src/sdk/WalletStorage.interfaces.d.ts +299 -0
  82. package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -0
  83. package/out/src/sdk/WalletStorage.interfaces.js +3 -0
  84. package/out/src/sdk/WalletStorage.interfaces.js.map +1 -0
  85. package/out/src/sdk/index.d.ts +12 -0
  86. package/out/src/sdk/index.d.ts.map +1 -0
  87. package/out/src/sdk/index.js +28 -0
  88. package/out/src/sdk/index.js.map +1 -0
  89. package/out/src/sdk/types.d.ts +74 -0
  90. package/out/src/sdk/types.d.ts.map +1 -0
  91. package/out/src/sdk/types.js +20 -0
  92. package/out/src/sdk/types.js.map +1 -0
  93. package/out/src/sdk/validationHelpers.d.ts +288 -0
  94. package/out/src/sdk/validationHelpers.d.ts.map +1 -0
  95. package/out/src/sdk/validationHelpers.js +630 -0
  96. package/out/src/sdk/validationHelpers.js.map +1 -0
  97. package/out/src/services/ServiceCollection.d.ts +25 -0
  98. package/out/src/services/ServiceCollection.d.ts.map +1 -0
  99. package/out/src/services/ServiceCollection.js +43 -0
  100. package/out/src/services/ServiceCollection.js.map +1 -0
  101. package/out/src/services/Services.d.ts +60 -0
  102. package/out/src/services/Services.d.ts.map +1 -0
  103. package/out/src/services/Services.js +342 -0
  104. package/out/src/services/Services.js.map +1 -0
  105. package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts +15 -0
  106. package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -0
  107. package/out/src/services/chaintracker/ChaintracksChainTracker.js +51 -0
  108. package/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -0
  109. package/out/src/services/chaintracker/chaintracks/BlockHeaderApi.d.ts +98 -0
  110. package/out/src/services/chaintracker/chaintracks/BlockHeaderApi.d.ts.map +1 -0
  111. package/out/src/services/chaintracker/chaintracks/BlockHeaderApi.js +38 -0
  112. package/out/src/services/chaintracker/chaintracks/BlockHeaderApi.js.map +1 -0
  113. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts +36 -0
  114. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -0
  115. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +130 -0
  116. package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -0
  117. package/out/src/services/chaintracker/chaintracks/index.d.ts +3 -0
  118. package/out/src/services/chaintracker/chaintracks/index.d.ts.map +1 -0
  119. package/out/src/services/chaintracker/chaintracks/index.js +19 -0
  120. package/out/src/services/chaintracker/chaintracks/index.js.map +1 -0
  121. package/out/src/services/chaintracker/index.d.ts +3 -0
  122. package/out/src/services/chaintracker/index.d.ts.map +1 -0
  123. package/out/src/services/chaintracker/index.js +19 -0
  124. package/out/src/services/chaintracker/index.js.map +1 -0
  125. package/out/src/services/createDefaultWalletServicesOptions.d.ts +3 -0
  126. package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -0
  127. package/out/src/services/createDefaultWalletServicesOptions.js +34 -0
  128. package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -0
  129. package/out/src/services/providers/arcServices.d.ts +62 -0
  130. package/out/src/services/providers/arcServices.d.ts.map +1 -0
  131. package/out/src/services/providers/arcServices.js +368 -0
  132. package/out/src/services/providers/arcServices.js.map +1 -0
  133. package/out/src/services/providers/echangeRates.d.ts +12 -0
  134. package/out/src/services/providers/echangeRates.d.ts.map +1 -0
  135. package/out/src/services/providers/echangeRates.js +237 -0
  136. package/out/src/services/providers/echangeRates.js.map +1 -0
  137. package/out/src/services/providers/whatsonchain.d.ts +17 -0
  138. package/out/src/services/providers/whatsonchain.d.ts.map +1 -0
  139. package/out/src/services/providers/whatsonchain.js +130 -0
  140. package/out/src/services/providers/whatsonchain.js.map +1 -0
  141. package/out/src/signer/WalletSigner.d.ts +11 -0
  142. package/out/src/signer/WalletSigner.d.ts.map +1 -0
  143. package/out/src/signer/WalletSigner.js +13 -0
  144. package/out/src/signer/WalletSigner.js.map +1 -0
  145. package/out/src/signer/methods/acquireDirectCertificate.d.ts +4 -0
  146. package/out/src/signer/methods/acquireDirectCertificate.d.ts.map +1 -0
  147. package/out/src/signer/methods/acquireDirectCertificate.js +47 -0
  148. package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -0
  149. package/out/src/signer/methods/createAction.d.ts +7 -0
  150. package/out/src/signer/methods/createAction.d.ts.map +1 -0
  151. package/out/src/signer/methods/createAction.js +250 -0
  152. package/out/src/signer/methods/createAction.js.map +1 -0
  153. package/out/src/signer/methods/internalizeAction.d.ts +31 -0
  154. package/out/src/signer/methods/internalizeAction.d.ts.map +1 -0
  155. package/out/src/signer/methods/internalizeAction.js +95 -0
  156. package/out/src/signer/methods/internalizeAction.js.map +1 -0
  157. package/out/src/signer/methods/proveCertificate.d.ts +4 -0
  158. package/out/src/signer/methods/proveCertificate.d.ts.map +1 -0
  159. package/out/src/signer/methods/proveCertificate.js +45 -0
  160. package/out/src/signer/methods/proveCertificate.js.map +1 -0
  161. package/out/src/signer/methods/signAction.d.ts +6 -0
  162. package/out/src/signer/methods/signAction.d.ts.map +1 -0
  163. package/out/src/signer/methods/signAction.js +79 -0
  164. package/out/src/signer/methods/signAction.js.map +1 -0
  165. package/out/src/storage/StorageProvider.d.ts +140 -0
  166. package/out/src/storage/StorageProvider.d.ts.map +1 -0
  167. package/out/src/storage/StorageProvider.js +539 -0
  168. package/out/src/storage/StorageProvider.js.map +1 -0
  169. package/out/src/storage/StorageReader.d.ts +76 -0
  170. package/out/src/storage/StorageReader.d.ts.map +1 -0
  171. package/out/src/storage/StorageReader.js +124 -0
  172. package/out/src/storage/StorageReader.js.map +1 -0
  173. package/out/src/storage/StorageReaderWriter.d.ts +87 -0
  174. package/out/src/storage/StorageReaderWriter.d.ts.map +1 -0
  175. package/out/src/storage/StorageReaderWriter.js +337 -0
  176. package/out/src/storage/StorageReaderWriter.js.map +1 -0
  177. package/out/src/storage/StorageSyncReader.d.ts +33 -0
  178. package/out/src/storage/StorageSyncReader.d.ts.map +1 -0
  179. package/out/src/storage/StorageSyncReader.js +142 -0
  180. package/out/src/storage/StorageSyncReader.js.map +1 -0
  181. package/out/src/storage/WalletStorageManager.d.ts +103 -0
  182. package/out/src/storage/WalletStorageManager.d.ts.map +1 -0
  183. package/out/src/storage/WalletStorageManager.js +408 -0
  184. package/out/src/storage/WalletStorageManager.js.map +1 -0
  185. package/out/src/storage/index.client.d.ts +7 -0
  186. package/out/src/storage/index.client.d.ts.map +1 -0
  187. package/out/src/storage/index.client.js +46 -0
  188. package/out/src/storage/index.client.js.map +1 -0
  189. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +27 -0
  190. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -0
  191. package/out/src/storage/methods/attemptToPostReqsToNetwork.js +148 -0
  192. package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -0
  193. package/out/src/storage/methods/createAction.d.ts +23 -0
  194. package/out/src/storage/methods/createAction.d.ts.map +1 -0
  195. package/out/src/storage/methods/createAction.js +663 -0
  196. package/out/src/storage/methods/createAction.js.map +1 -0
  197. package/out/src/storage/methods/generateChange.d.ts +108 -0
  198. package/out/src/storage/methods/generateChange.d.ts.map +1 -0
  199. package/out/src/storage/methods/generateChange.js +422 -0
  200. package/out/src/storage/methods/generateChange.js.map +1 -0
  201. package/out/src/storage/methods/getBeefForTransaction.d.ts +22 -0
  202. package/out/src/storage/methods/getBeefForTransaction.d.ts.map +1 -0
  203. package/out/src/storage/methods/getBeefForTransaction.js +94 -0
  204. package/out/src/storage/methods/getBeefForTransaction.js.map +1 -0
  205. package/out/src/storage/methods/getSyncChunk.d.ts +10 -0
  206. package/out/src/storage/methods/getSyncChunk.d.ts.map +1 -0
  207. package/out/src/storage/methods/getSyncChunk.js +271 -0
  208. package/out/src/storage/methods/getSyncChunk.js.map +1 -0
  209. package/out/src/storage/methods/internalizeAction.d.ts +38 -0
  210. package/out/src/storage/methods/internalizeAction.d.ts.map +1 -0
  211. package/out/src/storage/methods/internalizeAction.js +378 -0
  212. package/out/src/storage/methods/internalizeAction.js.map +1 -0
  213. package/out/src/storage/methods/listCertificates.d.ts +5 -0
  214. package/out/src/storage/methods/listCertificates.d.ts.map +1 -0
  215. package/out/src/storage/methods/listCertificates.js +68 -0
  216. package/out/src/storage/methods/listCertificates.js.map +1 -0
  217. package/out/src/storage/methods/processAction.d.ts +35 -0
  218. package/out/src/storage/methods/processAction.d.ts.map +1 -0
  219. package/out/src/storage/methods/processAction.js +271 -0
  220. package/out/src/storage/methods/processAction.js.map +1 -0
  221. package/out/src/storage/remoting/StorageClient.d.ts +56 -0
  222. package/out/src/storage/remoting/StorageClient.d.ts.map +1 -0
  223. package/out/src/storage/remoting/StorageClient.js +181 -0
  224. package/out/src/storage/remoting/StorageClient.js.map +1 -0
  225. package/out/src/storage/schema/entities/Certificate.d.ts +43 -0
  226. package/out/src/storage/schema/entities/Certificate.d.ts.map +1 -0
  227. package/out/src/storage/schema/entities/Certificate.js +162 -0
  228. package/out/src/storage/schema/entities/Certificate.js.map +1 -0
  229. package/out/src/storage/schema/entities/CertificateField.d.ts +32 -0
  230. package/out/src/storage/schema/entities/CertificateField.d.ts.map +1 -0
  231. package/out/src/storage/schema/entities/CertificateField.js +114 -0
  232. package/out/src/storage/schema/entities/CertificateField.js.map +1 -0
  233. package/out/src/storage/schema/entities/Commission.d.ts +37 -0
  234. package/out/src/storage/schema/entities/Commission.d.ts.map +1 -0
  235. package/out/src/storage/schema/entities/Commission.js +130 -0
  236. package/out/src/storage/schema/entities/Commission.js.map +1 -0
  237. package/out/src/storage/schema/entities/EntityBase.d.ts +105 -0
  238. package/out/src/storage/schema/entities/EntityBase.d.ts.map +1 -0
  239. package/out/src/storage/schema/entities/EntityBase.js +100 -0
  240. package/out/src/storage/schema/entities/EntityBase.js.map +1 -0
  241. package/out/src/storage/schema/entities/MergeEntity.d.ts +34 -0
  242. package/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -0
  243. package/out/src/storage/schema/entities/MergeEntity.js +57 -0
  244. package/out/src/storage/schema/entities/MergeEntity.js.map +1 -0
  245. package/out/src/storage/schema/entities/Output.d.ts +67 -0
  246. package/out/src/storage/schema/entities/Output.d.ts.map +1 -0
  247. package/out/src/storage/schema/entities/Output.js +281 -0
  248. package/out/src/storage/schema/entities/Output.js.map +1 -0
  249. package/out/src/storage/schema/entities/OutputBasket.d.ts +35 -0
  250. package/out/src/storage/schema/entities/OutputBasket.d.ts.map +1 -0
  251. package/out/src/storage/schema/entities/OutputBasket.js +133 -0
  252. package/out/src/storage/schema/entities/OutputBasket.js.map +1 -0
  253. package/out/src/storage/schema/entities/OutputTag.d.ts +31 -0
  254. package/out/src/storage/schema/entities/OutputTag.d.ts.map +1 -0
  255. package/out/src/storage/schema/entities/OutputTag.js +104 -0
  256. package/out/src/storage/schema/entities/OutputTag.js.map +1 -0
  257. package/out/src/storage/schema/entities/OutputTagMap.d.ts +28 -0
  258. package/out/src/storage/schema/entities/OutputTagMap.d.ts.map +1 -0
  259. package/out/src/storage/schema/entities/OutputTagMap.js +101 -0
  260. package/out/src/storage/schema/entities/OutputTagMap.js.map +1 -0
  261. package/out/src/storage/schema/entities/ProvenTx.d.ts +84 -0
  262. package/out/src/storage/schema/entities/ProvenTx.d.ts.map +1 -0
  263. package/out/src/storage/schema/entities/ProvenTx.js +283 -0
  264. package/out/src/storage/schema/entities/ProvenTx.js.map +1 -0
  265. package/out/src/storage/schema/entities/ProvenTxReq.d.ts +130 -0
  266. package/out/src/storage/schema/entities/ProvenTxReq.d.ts.map +1 -0
  267. package/out/src/storage/schema/entities/ProvenTxReq.js +521 -0
  268. package/out/src/storage/schema/entities/ProvenTxReq.js.map +1 -0
  269. package/out/src/storage/schema/entities/SyncState.d.ts +66 -0
  270. package/out/src/storage/schema/entities/SyncState.d.ts.map +1 -0
  271. package/out/src/storage/schema/entities/SyncState.js +284 -0
  272. package/out/src/storage/schema/entities/SyncState.js.map +1 -0
  273. package/out/src/storage/schema/entities/Transaction.d.ts +67 -0
  274. package/out/src/storage/schema/entities/Transaction.d.ts.map +1 -0
  275. package/out/src/storage/schema/entities/Transaction.js +264 -0
  276. package/out/src/storage/schema/entities/Transaction.js.map +1 -0
  277. package/out/src/storage/schema/entities/TxLabel.d.ts +31 -0
  278. package/out/src/storage/schema/entities/TxLabel.d.ts.map +1 -0
  279. package/out/src/storage/schema/entities/TxLabel.js +104 -0
  280. package/out/src/storage/schema/entities/TxLabel.js.map +1 -0
  281. package/out/src/storage/schema/entities/TxLabelMap.d.ts +28 -0
  282. package/out/src/storage/schema/entities/TxLabelMap.d.ts.map +1 -0
  283. package/out/src/storage/schema/entities/TxLabelMap.js +103 -0
  284. package/out/src/storage/schema/entities/TxLabelMap.js.map +1 -0
  285. package/out/src/storage/schema/entities/User.d.ts +29 -0
  286. package/out/src/storage/schema/entities/User.d.ts.map +1 -0
  287. package/out/src/storage/schema/entities/User.js +100 -0
  288. package/out/src/storage/schema/entities/User.js.map +1 -0
  289. package/out/src/storage/schema/entities/index.d.ts +17 -0
  290. package/out/src/storage/schema/entities/index.d.ts.map +1 -0
  291. package/out/src/storage/schema/entities/index.js +33 -0
  292. package/out/src/storage/schema/entities/index.js.map +1 -0
  293. package/out/src/storage/schema/tables/Certificate.d.ts +20 -0
  294. package/out/src/storage/schema/tables/Certificate.d.ts.map +1 -0
  295. package/out/src/storage/schema/tables/Certificate.js +3 -0
  296. package/out/src/storage/schema/tables/Certificate.js.map +1 -0
  297. package/out/src/storage/schema/tables/CertificateField.d.ts +12 -0
  298. package/out/src/storage/schema/tables/CertificateField.d.ts.map +1 -0
  299. package/out/src/storage/schema/tables/CertificateField.js +3 -0
  300. package/out/src/storage/schema/tables/CertificateField.js.map +1 -0
  301. package/out/src/storage/schema/tables/Commission.d.ts +13 -0
  302. package/out/src/storage/schema/tables/Commission.d.ts.map +1 -0
  303. package/out/src/storage/schema/tables/Commission.js +3 -0
  304. package/out/src/storage/schema/tables/Commission.js.map +1 -0
  305. package/out/src/storage/schema/tables/MonitorEvent.d.ts +9 -0
  306. package/out/src/storage/schema/tables/MonitorEvent.d.ts.map +1 -0
  307. package/out/src/storage/schema/tables/MonitorEvent.js +3 -0
  308. package/out/src/storage/schema/tables/MonitorEvent.js.map +1 -0
  309. package/out/src/storage/schema/tables/Output.d.ts +36 -0
  310. package/out/src/storage/schema/tables/Output.d.ts.map +1 -0
  311. package/out/src/storage/schema/tables/Output.js +31 -0
  312. package/out/src/storage/schema/tables/Output.js.map +1 -0
  313. package/out/src/storage/schema/tables/OutputBasket.d.ts +12 -0
  314. package/out/src/storage/schema/tables/OutputBasket.d.ts.map +1 -0
  315. package/out/src/storage/schema/tables/OutputBasket.js +3 -0
  316. package/out/src/storage/schema/tables/OutputBasket.js.map +1 -0
  317. package/out/src/storage/schema/tables/OutputTag.d.ts +10 -0
  318. package/out/src/storage/schema/tables/OutputTag.d.ts.map +1 -0
  319. package/out/src/storage/schema/tables/OutputTag.js +3 -0
  320. package/out/src/storage/schema/tables/OutputTag.js.map +1 -0
  321. package/out/src/storage/schema/tables/OutputTagMap.d.ts +9 -0
  322. package/out/src/storage/schema/tables/OutputTagMap.d.ts.map +1 -0
  323. package/out/src/storage/schema/tables/OutputTagMap.js +3 -0
  324. package/out/src/storage/schema/tables/OutputTagMap.js.map +1 -0
  325. package/out/src/storage/schema/tables/ProvenTx.d.ts +14 -0
  326. package/out/src/storage/schema/tables/ProvenTx.d.ts.map +1 -0
  327. package/out/src/storage/schema/tables/ProvenTx.js +3 -0
  328. package/out/src/storage/schema/tables/ProvenTx.js.map +1 -0
  329. package/out/src/storage/schema/tables/ProvenTxReq.d.ts +64 -0
  330. package/out/src/storage/schema/tables/ProvenTxReq.d.ts.map +1 -0
  331. package/out/src/storage/schema/tables/ProvenTxReq.js +3 -0
  332. package/out/src/storage/schema/tables/ProvenTxReq.js.map +1 -0
  333. package/out/src/storage/schema/tables/Settings.d.ts +17 -0
  334. package/out/src/storage/schema/tables/Settings.d.ts.map +1 -0
  335. package/out/src/storage/schema/tables/Settings.js +3 -0
  336. package/out/src/storage/schema/tables/Settings.js.map +1 -0
  337. package/out/src/storage/schema/tables/SyncState.d.ts +18 -0
  338. package/out/src/storage/schema/tables/SyncState.d.ts.map +1 -0
  339. package/out/src/storage/schema/tables/SyncState.js +3 -0
  340. package/out/src/storage/schema/tables/SyncState.js.map +1 -0
  341. package/out/src/storage/schema/tables/Transaction.d.ts +37 -0
  342. package/out/src/storage/schema/tables/Transaction.d.ts.map +1 -0
  343. package/out/src/storage/schema/tables/Transaction.js +21 -0
  344. package/out/src/storage/schema/tables/Transaction.js.map +1 -0
  345. package/out/src/storage/schema/tables/TxLabel.d.ts +10 -0
  346. package/out/src/storage/schema/tables/TxLabel.d.ts.map +1 -0
  347. package/out/src/storage/schema/tables/TxLabel.js +3 -0
  348. package/out/src/storage/schema/tables/TxLabel.js.map +1 -0
  349. package/out/src/storage/schema/tables/TxLabelMap.d.ts +9 -0
  350. package/out/src/storage/schema/tables/TxLabelMap.d.ts.map +1 -0
  351. package/out/src/storage/schema/tables/TxLabelMap.js +3 -0
  352. package/out/src/storage/schema/tables/TxLabelMap.js.map +1 -0
  353. package/out/src/storage/schema/tables/User.d.ts +16 -0
  354. package/out/src/storage/schema/tables/User.d.ts.map +1 -0
  355. package/out/src/storage/schema/tables/User.js +3 -0
  356. package/out/src/storage/schema/tables/User.js.map +1 -0
  357. package/out/src/storage/schema/tables/index.d.ts +17 -0
  358. package/out/src/storage/schema/tables/index.d.ts.map +1 -0
  359. package/out/src/storage/schema/tables/index.js +33 -0
  360. package/out/src/storage/schema/tables/index.js.map +1 -0
  361. package/out/src/utility/ScriptTemplateSABPPP.d.ts +25 -0
  362. package/out/src/utility/ScriptTemplateSABPPP.d.ts.map +1 -0
  363. package/out/src/utility/ScriptTemplateSABPPP.js +46 -0
  364. package/out/src/utility/ScriptTemplateSABPPP.js.map +1 -0
  365. package/out/src/utility/index.client.d.ts +7 -0
  366. package/out/src/utility/index.client.d.ts.map +1 -0
  367. package/out/src/utility/index.client.js +23 -0
  368. package/out/src/utility/index.client.js.map +1 -0
  369. package/out/src/utility/parseTxScriptOffsets.d.ts +14 -0
  370. package/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -0
  371. package/out/src/utility/parseTxScriptOffsets.js +26 -0
  372. package/out/src/utility/parseTxScriptOffsets.js.map +1 -0
  373. package/out/src/utility/stampLog.d.ts +18 -0
  374. package/out/src/utility/stampLog.d.ts.map +1 -0
  375. package/out/src/utility/stampLog.js +72 -0
  376. package/out/src/utility/stampLog.js.map +1 -0
  377. package/out/src/utility/tscProofToMerklePath.d.ts +8 -0
  378. package/out/src/utility/tscProofToMerklePath.d.ts.map +1 -0
  379. package/out/src/utility/tscProofToMerklePath.js +41 -0
  380. package/out/src/utility/tscProofToMerklePath.js.map +1 -0
  381. package/out/src/utility/utilityHelpers.d.ts +129 -0
  382. package/out/src/utility/utilityHelpers.d.ts.map +1 -0
  383. package/out/src/utility/utilityHelpers.js +268 -0
  384. package/out/src/utility/utilityHelpers.js.map +1 -0
  385. package/out/src/utility/utilityHelpers.noBuffer.d.ts +9 -0
  386. package/out/src/utility/utilityHelpers.noBuffer.d.ts.map +1 -0
  387. package/out/src/utility/utilityHelpers.noBuffer.js +23 -0
  388. package/out/src/utility/utilityHelpers.noBuffer.js.map +1 -0
  389. package/out/tsconfig.client.tsbuildinfo +1 -0
  390. package/package.json +27 -0
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityBase = void 0;
4
+ exports.createSyncMap = createSyncMap;
5
+ class EntityBase {
6
+ constructor(api) {
7
+ this.api = api;
8
+ }
9
+ /**
10
+ * An entity may decode properties of the underlying Api object on construction.
11
+ *
12
+ * The `toApi` method forces an `updateApi` before returning the underlying,
13
+ * now updated, Api object.
14
+ *
15
+ * @returns The underlying Api object with any entity decoded properties updated.
16
+ */
17
+ toApi() {
18
+ this.updateApi();
19
+ return this.api;
20
+ }
21
+ }
22
+ exports.EntityBase = EntityBase;
23
+ function createSyncMap() {
24
+ const r = {
25
+ provenTx: {
26
+ entityName: 'provenTx',
27
+ idMap: {},
28
+ maxUpdated_at: undefined,
29
+ count: 0
30
+ },
31
+ outputBasket: {
32
+ entityName: 'outputBasket',
33
+ idMap: {},
34
+ maxUpdated_at: undefined,
35
+ count: 0
36
+ },
37
+ transaction: {
38
+ entityName: 'transaction',
39
+ idMap: {},
40
+ maxUpdated_at: undefined,
41
+ count: 0
42
+ },
43
+ provenTxReq: {
44
+ entityName: 'provenTxReq',
45
+ idMap: {},
46
+ maxUpdated_at: undefined,
47
+ count: 0
48
+ },
49
+ txLabel: {
50
+ entityName: 'txLabel',
51
+ idMap: {},
52
+ maxUpdated_at: undefined,
53
+ count: 0
54
+ },
55
+ txLabelMap: {
56
+ entityName: 'txLabelMap',
57
+ idMap: {},
58
+ maxUpdated_at: undefined,
59
+ count: 0
60
+ },
61
+ output: {
62
+ entityName: 'output',
63
+ idMap: {},
64
+ maxUpdated_at: undefined,
65
+ count: 0
66
+ },
67
+ outputTag: {
68
+ entityName: 'outputTag',
69
+ idMap: {},
70
+ maxUpdated_at: undefined,
71
+ count: 0
72
+ },
73
+ outputTagMap: {
74
+ entityName: 'outputTagMap',
75
+ idMap: {},
76
+ maxUpdated_at: undefined,
77
+ count: 0
78
+ },
79
+ certificate: {
80
+ entityName: 'certificate',
81
+ idMap: {},
82
+ maxUpdated_at: undefined,
83
+ count: 0
84
+ },
85
+ certificateField: {
86
+ entityName: 'certificateField',
87
+ idMap: {},
88
+ maxUpdated_at: undefined,
89
+ count: 0
90
+ },
91
+ commission: {
92
+ entityName: 'commission',
93
+ idMap: {},
94
+ maxUpdated_at: undefined,
95
+ count: 0
96
+ }
97
+ };
98
+ return r;
99
+ }
100
+ //# sourceMappingURL=EntityBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityBase.js","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityBase.ts"],"names":[],"mappings":";;;AAmIA,sCA4EC;AA3MD,MAAsB,UAAU;IAG9B,YAAY,GAAM;QAChB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IAChB,CAAC;IAqED;;;;;;;OAOG;IACH,KAAK;QACH,IAAI,CAAC,SAAS,EAAE,CAAA;QAChB,OAAO,IAAI,CAAC,GAAG,CAAA;IACjB,CAAC;CACF;AAtFD,gCAsFC;AAyCD,SAAgB,aAAa;IAC3B,MAAM,CAAC,GAAY;QACjB,QAAQ,EAAE;YACR,UAAU,EAAE,UAAU;YACtB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,cAAc;YAC1B,KAAK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ACF,CAAA;IACD,OAAO,CAAC,CAAA;AACV,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { entity } from '../../index.client';
2
+ import { sdk } from '../../../index.client';
3
+ import { EntityBase } from './EntityBase';
4
+ /**
5
+ * @param API one of the storage table interfaces.
6
+ * @param DE the corresponding entity class
7
+ */
8
+ export declare class MergeEntity<API extends sdk.EntityTimeStamp, DE extends EntityBase<API>> {
9
+ stateArray: API[] | undefined;
10
+ find: (storage: entity.EntityStorage, userId: number, ei: API, syncMap: entity.SyncMap, trx?: sdk.TrxToken) => Promise<{
11
+ found: boolean;
12
+ eo: DE;
13
+ eiId: number;
14
+ }>;
15
+ /** id map for primary id of API and DE object. */
16
+ esm: entity.EntitySyncMap;
17
+ idMap: Record<number, number>;
18
+ constructor(stateArray: API[] | undefined, find: (storage: entity.EntityStorage, userId: number, ei: API, syncMap: entity.SyncMap, trx?: sdk.TrxToken) => Promise<{
19
+ found: boolean;
20
+ eo: DE;
21
+ eiId: number;
22
+ }>,
23
+ /** id map for primary id of API and DE object. */
24
+ esm: entity.EntitySyncMap);
25
+ updateSyncMap(map: Record<number, number>, inId: number, outId: number): void;
26
+ /**
27
+ * @param since date of current sync chunk
28
+ */
29
+ merge(since: Date | undefined, storage: entity.EntityStorage, userId: number, syncMap: entity.SyncMap, trx?: sdk.TrxToken): Promise<{
30
+ inserts: number;
31
+ updates: number;
32
+ }>;
33
+ }
34
+ //# sourceMappingURL=MergeEntity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MergeEntity.d.ts","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/MergeEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAW,GAAG,EAAY,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;GAGG;AACH,qBAAa,WAAW,CACtB,GAAG,SAAS,GAAG,CAAC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AC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CA6BjD"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MergeEntity = void 0;
4
+ const index_client_1 = require("../../../index.client");
5
+ /**
6
+ * @param API one of the storage table interfaces.
7
+ * @param DE the corresponding entity class
8
+ */
9
+ class MergeEntity {
10
+ constructor(stateArray, find,
11
+ /** id map for primary id of API and DE object. */
12
+ esm) {
13
+ this.stateArray = stateArray;
14
+ this.find = find;
15
+ this.esm = esm;
16
+ this.idMap = esm.idMap;
17
+ }
18
+ updateSyncMap(map, inId, outId) {
19
+ const i = (0, index_client_1.verifyId)(inId);
20
+ const o = (0, index_client_1.verifyId)(outId);
21
+ if (map[i] === undefined) {
22
+ map[i] = o;
23
+ }
24
+ else if (map[i] !== o)
25
+ throw new index_client_1.sdk.WERR_INTERNAL(`updateSyncMap map[${inId}] can't override ${map[i]} with ${o}`);
26
+ }
27
+ /**
28
+ * @param since date of current sync chunk
29
+ */
30
+ async merge(since, storage, userId, syncMap, trx) {
31
+ let inserts = 0, updates = 0;
32
+ if (!this.stateArray)
33
+ return { inserts, updates };
34
+ for (const ei of this.stateArray) {
35
+ this.esm.maxUpdated_at = (0, index_client_1.maxDate)(this.esm.maxUpdated_at, ei.updated_at);
36
+ /**
37
+ * TODO:
38
+ * Switch to using syncMap. If the ei id is in the map its an existing merge, else its a new merge.
39
+ */
40
+ const { found, eo, eiId } = await this.find(storage, userId, ei, syncMap, trx);
41
+ if (found) {
42
+ if (await eo.mergeExisting(storage, since, ei, syncMap, trx)) {
43
+ updates++;
44
+ }
45
+ }
46
+ else {
47
+ await eo.mergeNew(storage, userId, syncMap, trx);
48
+ inserts++;
49
+ }
50
+ if (eiId > -1)
51
+ this.updateSyncMap(this.idMap, eiId, eo.id);
52
+ }
53
+ return { inserts, updates };
54
+ }
55
+ }
56
+ exports.MergeEntity = MergeEntity;
57
+ //# sourceMappingURL=MergeEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MergeEntity.js","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/MergeEntity.ts"],"names":[],"mappings":";;;AACA,wDAA8D;AAG9D;;;GAGG;AACH,MAAa,WAAW;IAMtB,YACS,UAA6B,EAC7B,IAM+C;IACtD,kDAAkD;IAC3C,GAAyB;QATzB,eAAU,GAAV,UAAU,CAAmB;QAC7B,SAAI,GAAJ,IAAI,CAM2C;QAE/C,QAAG,GAAH,GAAG,CAAsB;QAEhC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;IACxB,CAAC;IAED,aAAa,CAAC,GAA2B,EAAE,IAAY,EAAE,KAAa;QACpE,MAAM,CAAC,GAAG,IAAA,uBAAQ,EAAC,IAAI,CAAC,CAAA;QACxB,MAAM,CAAC,GAAG,IAAA,uBAAQ,EAAC,KAAK,CAAC,CAAA;QACzB,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;YACzB,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QACZ,CAAC;aAAM,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;YACrB,MAAM,IAAI,kBAAG,CAAC,aAAa,CACzB,qBAAqB,IAAI,oBAAoB,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAChE,CAAA;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK,CACT,KAAuB,EACvB,OAA6B,EAC7B,MAAc,EACd,OAAuB,EACvB,GAAkB;QAElB,IAAI,OAAO,GAAG,CAAC,EACb,OAAO,GAAG,CAAC,CAAA;QACb,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;QACjD,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACjC,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,IAAA,sBAAO,EAAC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,UAAU,CAAC,CAAA;YACvE;;;eAGG;YACH,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CACzC,OAAO,EACP,MAAM,EACN,EAAE,EACF,OAAO,EACP,GAAG,CACJ,CAAA;YACD,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,MAAM,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC;oBAC7D,OAAO,EAAE,CAAA;gBACX,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;gBAChD,OAAO,EAAE,CAAA;YACX,CAAC;YACD,IAAI,IAAI,GAAG,CAAC,CAAC;gBAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAA;QAC5D,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;IAC7B,CAAC;CACF;AAtED,kCAsEC"}
@@ -0,0 +1,67 @@
1
+ import { entity, sdk, table } from '../../../index.client';
2
+ import { EntityBase } from '.';
3
+ export declare class Output extends EntityBase<table.Output> {
4
+ constructor(api?: table.Output);
5
+ updateApi(): void;
6
+ get outputId(): number;
7
+ set outputId(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 userId(): number;
13
+ set userId(v: number);
14
+ get transactionId(): number;
15
+ set transactionId(v: number);
16
+ get basketId(): number | undefined;
17
+ set basketId(v: number | undefined);
18
+ get spentBy(): number | undefined;
19
+ set spentBy(v: number | undefined);
20
+ get vout(): number;
21
+ set vout(v: number);
22
+ get satoshis(): number;
23
+ set satoshis(v: number);
24
+ get outputDescription(): string;
25
+ set outputDescription(v: string);
26
+ get spendable(): boolean;
27
+ set spendable(v: boolean);
28
+ get change(): boolean;
29
+ set change(v: boolean);
30
+ get txid(): string | undefined;
31
+ set txid(v: string | undefined);
32
+ get type(): string;
33
+ set type(v: string);
34
+ get providedBy(): sdk.StorageProvidedBy;
35
+ set providedBy(v: sdk.StorageProvidedBy);
36
+ get purpose(): string;
37
+ set purpose(v: string);
38
+ get spendingDescription(): string | undefined;
39
+ set spendingDescription(v: string | undefined);
40
+ get derivationPrefix(): string | undefined;
41
+ set derivationPrefix(v: string | undefined);
42
+ get derivationSuffix(): string | undefined;
43
+ set derivationSuffix(v: string | undefined);
44
+ get senderIdentityKey(): string | undefined;
45
+ set senderIdentityKey(v: string | undefined);
46
+ get customInstructions(): string | undefined;
47
+ set customInstructions(v: string | undefined);
48
+ get lockingScript(): number[] | undefined;
49
+ set lockingScript(v: number[] | undefined);
50
+ get scriptLength(): number | undefined;
51
+ set scriptLength(v: number | undefined);
52
+ get scriptOffset(): number | undefined;
53
+ set scriptOffset(v: number | undefined);
54
+ get id(): number;
55
+ set id(v: number);
56
+ get entityName(): string;
57
+ get entityTable(): string;
58
+ equals(ei: table.Output, syncMap?: entity.SyncMap | undefined): boolean;
59
+ static mergeFind(storage: entity.EntityStorage, userId: number, ei: table.Output, syncMap: entity.SyncMap, trx?: sdk.TrxToken): Promise<{
60
+ found: boolean;
61
+ eo: entity.Output;
62
+ eiId: number;
63
+ }>;
64
+ mergeNew(storage: entity.EntityStorage, userId: number, syncMap: entity.SyncMap, trx?: sdk.TrxToken): Promise<void>;
65
+ mergeExisting(storage: entity.EntityStorage, since: Date | undefined, ei: table.Output, syncMap: entity.SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
66
+ }
67
+ //# sourceMappingURL=Output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Output.d.ts","sourceRoot":"","sources":["../../../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ports, "__esModule", { value: true });
3
+ exports.Output = void 0;
4
+ const index_client_1 = require("../../../index.client");
5
+ const _1 = require(".");
6
+ class Output extends _1.EntityBase {
7
+ constructor(api) {
8
+ const now = new Date();
9
+ super(api || {
10
+ outputId: 0,
11
+ created_at: now,
12
+ updated_at: now,
13
+ userId: 0,
14
+ transactionId: 0,
15
+ spendable: false,
16
+ change: false,
17
+ satoshis: 0,
18
+ outputDescription: '',
19
+ vout: 0,
20
+ type: '',
21
+ providedBy: 'you',
22
+ purpose: '',
23
+ txid: undefined,
24
+ basketId: undefined,
25
+ spentBy: undefined,
26
+ derivationPrefix: undefined,
27
+ derivationSuffix: undefined,
28
+ senderIdentityKey: undefined,
29
+ customInstructions: undefined,
30
+ spendingDescription: undefined,
31
+ scriptLength: undefined,
32
+ scriptOffset: undefined,
33
+ lockingScript: undefined
34
+ });
35
+ }
36
+ updateApi() {
37
+ /* nothing needed yet... */
38
+ }
39
+ get outputId() {
40
+ return this.api.outputId;
41
+ }
42
+ set outputId(v) {
43
+ this.api.outputId = v;
44
+ }
45
+ get created_at() {
46
+ return this.api.created_at;
47
+ }
48
+ set created_at(v) {
49
+ this.api.created_at = v;
50
+ }
51
+ get updated_at() {
52
+ return this.api.updated_at;
53
+ }
54
+ set updated_at(v) {
55
+ this.api.updated_at = v;
56
+ }
57
+ get userId() {
58
+ return this.api.userId;
59
+ }
60
+ set userId(v) {
61
+ this.api.userId = v;
62
+ }
63
+ get transactionId() {
64
+ return this.api.transactionId;
65
+ }
66
+ set transactionId(v) {
67
+ this.api.transactionId = v;
68
+ }
69
+ get basketId() {
70
+ return this.api.basketId;
71
+ }
72
+ set basketId(v) {
73
+ this.api.basketId = v;
74
+ }
75
+ get spentBy() {
76
+ return this.api.spentBy;
77
+ }
78
+ set spentBy(v) {
79
+ this.api.spentBy = v;
80
+ }
81
+ get vout() {
82
+ return this.api.vout;
83
+ }
84
+ set vout(v) {
85
+ this.api.vout = v;
86
+ }
87
+ get satoshis() {
88
+ return this.api.satoshis;
89
+ }
90
+ set satoshis(v) {
91
+ this.api.satoshis = v;
92
+ }
93
+ get outputDescription() {
94
+ return this.api.outputDescription;
95
+ }
96
+ set outputDescription(v) {
97
+ this.api.outputDescription = v;
98
+ }
99
+ get spendable() {
100
+ return this.api.spendable;
101
+ }
102
+ set spendable(v) {
103
+ this.api.spendable = v;
104
+ }
105
+ get change() {
106
+ return this.api.change;
107
+ }
108
+ set change(v) {
109
+ this.api.change = v;
110
+ }
111
+ get txid() {
112
+ return this.api.txid;
113
+ }
114
+ set txid(v) {
115
+ this.api.txid = v;
116
+ }
117
+ get type() {
118
+ return this.api.type;
119
+ }
120
+ set type(v) {
121
+ this.api.type = v;
122
+ }
123
+ get providedBy() {
124
+ return this.api.providedBy;
125
+ }
126
+ set providedBy(v) {
127
+ this.api.providedBy = v;
128
+ }
129
+ get purpose() {
130
+ return this.api.purpose;
131
+ }
132
+ set purpose(v) {
133
+ this.api.purpose = v;
134
+ }
135
+ get spendingDescription() {
136
+ return this.api.spendingDescription;
137
+ }
138
+ set spendingDescription(v) {
139
+ this.api.spendingDescription = v;
140
+ }
141
+ get derivationPrefix() {
142
+ return this.api.derivationPrefix;
143
+ }
144
+ set derivationPrefix(v) {
145
+ this.api.derivationPrefix = v;
146
+ }
147
+ get derivationSuffix() {
148
+ return this.api.derivationSuffix;
149
+ }
150
+ set derivationSuffix(v) {
151
+ this.api.derivationSuffix = v;
152
+ }
153
+ get senderIdentityKey() {
154
+ return this.api.senderIdentityKey;
155
+ }
156
+ set senderIdentityKey(v) {
157
+ this.api.senderIdentityKey = v;
158
+ }
159
+ get customInstructions() {
160
+ return this.api.customInstructions;
161
+ }
162
+ set customInstructions(v) {
163
+ this.api.customInstructions = v;
164
+ }
165
+ get lockingScript() {
166
+ return this.api.lockingScript;
167
+ }
168
+ set lockingScript(v) {
169
+ this.api.lockingScript = v;
170
+ }
171
+ get scriptLength() {
172
+ return this.api.scriptLength;
173
+ }
174
+ set scriptLength(v) {
175
+ this.api.scriptLength = v;
176
+ }
177
+ get scriptOffset() {
178
+ return this.api.scriptOffset;
179
+ }
180
+ set scriptOffset(v) {
181
+ this.api.scriptOffset = v;
182
+ }
183
+ get id() {
184
+ return this.api.outputId;
185
+ }
186
+ set id(v) {
187
+ this.api.outputId = v;
188
+ }
189
+ get entityName() {
190
+ return 'Output';
191
+ }
192
+ get entityTable() {
193
+ return 'outputs';
194
+ }
195
+ equals(ei, syncMap) {
196
+ if (this.transactionId !==
197
+ (syncMap
198
+ ? syncMap.transaction.idMap[ei.transactionId]
199
+ : ei.transactionId) ||
200
+ this.basketId !==
201
+ (syncMap && ei.basketId
202
+ ? syncMap.outputBasket.idMap[ei.basketId]
203
+ : ei.basketId) ||
204
+ this.spentBy !==
205
+ (syncMap && ei.spentBy
206
+ ? syncMap.transaction.idMap[ei.spentBy]
207
+ : ei.spentBy) ||
208
+ this.vout !== ei.vout ||
209
+ this.satoshis !== ei.satoshis ||
210
+ this.spendable !== ei.spendable ||
211
+ this.change !== ei.change ||
212
+ this.txid !== ei.txid ||
213
+ this.type !== ei.type ||
214
+ this.providedBy !== ei.providedBy ||
215
+ this.purpose !== ei.purpose ||
216
+ this.outputDescription !== ei.outputDescription ||
217
+ this.spendingDescription !== ei.spendingDescription ||
218
+ this.derivationPrefix !== ei.derivationPrefix ||
219
+ this.derivationSuffix !== ei.derivationSuffix ||
220
+ this.senderIdentityKey !== ei.senderIdentityKey ||
221
+ this.customInstructions !== ei.customInstructions ||
222
+ !(0, index_client_1.optionalArraysEqual)(this.lockingScript, ei.lockingScript) ||
223
+ this.scriptLength !== ei.scriptLength ||
224
+ this.scriptOffset !== ei.scriptOffset)
225
+ return false;
226
+ return true;
227
+ }
228
+ static async mergeFind(storage, userId, ei, syncMap, trx) {
229
+ const transactionId = syncMap.transaction.idMap[ei.transactionId];
230
+ const basketId = ei.basketId
231
+ ? syncMap.outputBasket.idMap[ei.basketId]
232
+ : null;
233
+ const ef = (0, index_client_1.verifyOneOrNone)(await storage.findOutputs({
234
+ partial: { userId, transactionId, vout: ei.vout },
235
+ trx
236
+ }));
237
+ return {
238
+ found: !!ef,
239
+ eo: new index_client_1.entity.Output(ef || { ...ei }),
240
+ eiId: (0, index_client_1.verifyId)(ei.outputId)
241
+ };
242
+ }
243
+ async mergeNew(storage, userId, syncMap, trx) {
244
+ this.userId = userId;
245
+ this.basketId = this.basketId
246
+ ? syncMap.outputBasket.idMap[this.basketId]
247
+ : undefined;
248
+ this.transactionId = syncMap.transaction.idMap[this.transactionId];
249
+ this.spentBy = this.spentBy
250
+ ? syncMap.transaction.idMap[this.spentBy]
251
+ : undefined;
252
+ this.outputId = 0;
253
+ this.outputId = await storage.insertOutput(this.toApi(), trx);
254
+ }
255
+ async mergeExisting(storage, since, ei, syncMap, trx) {
256
+ let wasMerged = false;
257
+ if (ei.updated_at > this.updated_at) {
258
+ this.spentBy = ei.spentBy
259
+ ? syncMap.transaction.idMap[ei.spentBy]
260
+ : undefined;
261
+ this.spendable = ei.spendable;
262
+ this.change = ei.change;
263
+ this.type = ei.type;
264
+ this.providedBy = ei.providedBy;
265
+ this.purpose = ei.purpose;
266
+ this.outputDescription = ei.outputDescription;
267
+ this.spendingDescription = ei.spendingDescription;
268
+ this.senderIdentityKey = ei.senderIdentityKey;
269
+ this.customInstructions = ei.customInstructions;
270
+ this.scriptLength = ei.scriptLength;
271
+ this.scriptOffset = ei.scriptOffset;
272
+ this.lockingScript = ei.lockingScript;
273
+ this.updated_at = new Date();
274
+ await storage.updateOutput(this.id, this.toApi(), trx);
275
+ wasMerged = true;
276
+ }
277
+ return wasMerged;
278
+ }
279
+ }
280
+ exports.Output = Output;
281
+ //# sourceMappingURL=Output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Output.js","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/Output.ts"],"names":[],"mappings":";;;AAEA,wDAQ8B;AAC9B,wBAA8B;AAE9B,MAAa,MAAO,SAAQ,aAAwB;IAClD,YAAY,GAAkB;QAC5B,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E,CAAC,SAAS,CAAA;YAC7B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,MAAM,CAAA;YACvB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAA;YACnB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,UAAU,CAAA;YAC/B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,OAAO,CAAA;YACzB,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,iBAAiB,CAAA;YAC7C,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC,mBAAmB,CAAA;YACjD,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,iBAAiB,CAAA;YAC7C,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,kBAAkB,CAAA;YAC/C,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,YAAY,CAAA;YACnC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,YAAY,CAAA;YACnC,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC,aAAa,CAAA;YACrC,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAA;YAC5B,MAAM,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAA;YACtD,SAAS,GAAG,IAAI,CAAA;QAClB,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AArTD,wBAqTC"}
@@ -0,0 +1,35 @@
1
+ import { entity, sdk, table } from '../../../index.client';
2
+ import { EntityBase } from '.';
3
+ export declare class OutputBasket extends EntityBase<table.OutputBasket> {
4
+ constructor(api?: table.OutputBasket);
5
+ get basketId(): number;
6
+ set basketId(v: number);
7
+ get created_at(): Date;
8
+ set created_at(v: Date);
9
+ get updated_at(): Date;
10
+ set updated_at(v: Date);
11
+ get userId(): number;
12
+ set userId(v: number);
13
+ get name(): string;
14
+ set name(v: string);
15
+ get numberOfDesiredUTXOs(): number;
16
+ set numberOfDesiredUTXOs(v: number);
17
+ get minimumDesiredUTXOValue(): number;
18
+ set minimumDesiredUTXOValue(v: number);
19
+ get isDeleted(): boolean;
20
+ set isDeleted(v: boolean);
21
+ get id(): number;
22
+ set id(v: number);
23
+ get entityName(): string;
24
+ get entityTable(): string;
25
+ updateApi(): void;
26
+ equals(ei: table.OutputBasket, syncMap?: entity.SyncMap): boolean;
27
+ static mergeFind(storage: entity.EntityStorage, userId: number, ei: table.OutputBasket, syncMap: entity.SyncMap, trx?: sdk.TrxToken): Promise<{
28
+ found: boolean;
29
+ eo: OutputBasket;
30
+ eiId: number;
31
+ }>;
32
+ mergeNew(storage: entity.EntityStorage, userId: number, syncMap: entity.SyncMap, trx?: sdk.TrxToken): Promise<void>;
33
+ mergeExisting(storage: entity.EntityStorage, since: Date | undefined, ei: table.OutputBasket, syncMap: entity.SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
34
+ }
35
+ //# sourceMappingURL=OutputBasket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OutputBasket.d.ts","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/OutputBasket.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,MAAM,EACN,GAAG,EACH,KAAK,EAGN,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAA;AAE9B,qBAAa,YAAa,SAAQ,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC;gBAClD,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY;IAgBpC,IAAI,QAAQ,IAGI,MAAM,CADrB;IACD,IAAI,QAAQ,CAAC,CAAC,EAAE,MAAM,EAErB;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,MAAM,IAGI,MAAM,CADn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