@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,585 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.StorageProvider = void 0;
37
+ exports.validateStorageFeeModel = validateStorageFeeModel;
38
+ const sdk_1 = require("@bsv/sdk");
39
+ const utilityHelpers_1 = require("../utility/utilityHelpers");
40
+ const sdk = __importStar(require("../sdk/index"));
41
+ const utilityHelpers_noBuffer_1 = require("../utility/utilityHelpers.noBuffer");
42
+ const getBeefForTransaction_1 = require("./methods/getBeefForTransaction");
43
+ const processAction_1 = require("./methods/processAction");
44
+ const attemptToPostReqsToNetwork_1 = require("./methods/attemptToPostReqsToNetwork");
45
+ const listCertificates_1 = require("./methods/listCertificates");
46
+ const createAction_1 = require("./methods/createAction");
47
+ const internalizeAction_1 = require("./methods/internalizeAction");
48
+ const StorageReaderWriter_1 = require("./StorageReaderWriter");
49
+ const entities_1 = require("./schema/entities");
50
+ class StorageProvider extends StorageReaderWriter_1.StorageReaderWriter {
51
+ static defaultOptions() {
52
+ return {
53
+ feeModel: { model: 'sat/kb', value: 1 },
54
+ commissionSatoshis: 0,
55
+ commissionPubKeyHex: undefined
56
+ };
57
+ }
58
+ static createStorageBaseOptions(chain) {
59
+ const options = {
60
+ ...StorageProvider.defaultOptions(),
61
+ chain
62
+ };
63
+ return options;
64
+ }
65
+ constructor(options) {
66
+ super(options);
67
+ this.isDirty = false;
68
+ this.feeModel = options.feeModel;
69
+ this.commissionPubKeyHex = options.commissionPubKeyHex;
70
+ this.commissionSatoshis = options.commissionSatoshis;
71
+ }
72
+ isStorageProvider() {
73
+ return true;
74
+ }
75
+ setServices(v) {
76
+ this._services = v;
77
+ }
78
+ getServices() {
79
+ if (!this._services)
80
+ throw new sdk.WERR_INVALID_OPERATION('Must setServices first.');
81
+ return this._services;
82
+ }
83
+ async abortAction(auth, args) {
84
+ if (!auth.userId)
85
+ throw new sdk.WERR_INVALID_PARAMETER('auth.userId', 'valid');
86
+ const userId = auth.userId;
87
+ let reference = args.reference;
88
+ let txid = undefined;
89
+ const r = await this.transaction(async (trx) => {
90
+ let tx = (0, utilityHelpers_1.verifyOneOrNone)(await this.findTransactions({
91
+ partial: { reference, userId },
92
+ noRawTx: true,
93
+ trx
94
+ }));
95
+ if (!tx && args.reference.length === 64) {
96
+ // reference may also be a txid
97
+ txid = reference;
98
+ reference = undefined;
99
+ tx = (0, utilityHelpers_1.verifyOneOrNone)(await this.findTransactions({
100
+ partial: { txid, userId },
101
+ noRawTx: true,
102
+ trx
103
+ }));
104
+ }
105
+ const unAbortableStatus = ['completed', 'failed', 'sending', 'unproven'];
106
+ if (!tx || !tx.isOutgoing || -1 < unAbortableStatus.findIndex(s => s === tx.status))
107
+ throw new sdk.WERR_INVALID_PARAMETER('reference', 'an inprocess, outgoing action that has not been signed and shared to the network.');
108
+ await this.updateTransactionStatus('failed', tx.transactionId, userId, reference, trx);
109
+ if (tx.txid) {
110
+ const req = await entities_1.EntityProvenTxReq.fromStorageTxid(this, tx.txid, trx);
111
+ if (req) {
112
+ req.addHistoryNote({ what: 'abortAction', reference: args.reference });
113
+ req.status = 'invalid';
114
+ await req.updateStorageDynamicProperties(this, trx);
115
+ }
116
+ }
117
+ const r = {
118
+ aborted: true
119
+ };
120
+ return r;
121
+ });
122
+ return r;
123
+ }
124
+ async internalizeAction(auth, args) {
125
+ return await (0, internalizeAction_1.internalizeAction)(this, auth, args);
126
+ }
127
+ /**
128
+ * Given an array of transaction txids with current ProvenTxReq ready-to-share status,
129
+ * lookup their ProvenTxReqApi req records.
130
+ * For the txids with reqs and status still ready to send construct a single merged beef.
131
+ *
132
+ * @param txids
133
+ * @param knownTxids
134
+ * @param trx
135
+ */
136
+ async getReqsAndBeefToShareWithWorld(txids, knownTxids, trx) {
137
+ const r = {
138
+ beef: new sdk_1.Beef(),
139
+ details: []
140
+ };
141
+ for (const txid of txids) {
142
+ const d = {
143
+ txid,
144
+ status: 'unknown'
145
+ };
146
+ r.details.push(d);
147
+ try {
148
+ d.proven = (0, utilityHelpers_1.verifyOneOrNone)(await this.findProvenTxs({ partial: { txid }, trx }));
149
+ if (d.proven)
150
+ d.status = 'alreadySent';
151
+ else {
152
+ const alreadySentStatus = ['unmined', 'callback', 'unconfirmed', 'completed'];
153
+ const readyToSendStatus = ['sending', 'unsent', 'nosend', 'unprocessed'];
154
+ const errorStatus = ['unknown', 'nonfinal', 'invalid', 'doubleSpend'];
155
+ d.req = (0, utilityHelpers_1.verifyOneOrNone)(await this.findProvenTxReqs({ partial: { txid }, trx }));
156
+ if (!d.req) {
157
+ d.status = 'error';
158
+ d.error = `ERR_UNKNOWN_TXID: ${txid} was not found.`;
159
+ }
160
+ else if (errorStatus.indexOf(d.req.status) > -1) {
161
+ d.status = 'error';
162
+ d.error = `ERR_INVALID_PARAMETER: ${txid} is not ready to send.`;
163
+ }
164
+ else if (alreadySentStatus.indexOf(d.req.status) > -1) {
165
+ d.status = 'alreadySent';
166
+ }
167
+ else if (readyToSendStatus.indexOf(d.req.status) > -1) {
168
+ if (!d.req.rawTx || !d.req.inputBEEF) {
169
+ d.status = 'error';
170
+ d.error = `ERR_INTERNAL: ${txid} req is missing rawTx or beef.`;
171
+ }
172
+ else
173
+ d.status = 'readyToSend';
174
+ }
175
+ else {
176
+ d.status = 'error';
177
+ d.error = `ERR_INTERNAL: ${txid} has unexpected req status ${d.req.status}`;
178
+ }
179
+ if (d.status === 'readyToSend') {
180
+ await this.mergeReqToBeefToShareExternally(d.req, r.beef, knownTxids, trx);
181
+ }
182
+ }
183
+ }
184
+ catch (eu) {
185
+ const e = sdk.WalletError.fromUnknown(eu);
186
+ d.error = `${e.name}: ${e.message}`;
187
+ }
188
+ }
189
+ return r;
190
+ }
191
+ async mergeReqToBeefToShareExternally(req, mergeToBeef, knownTxids, trx) {
192
+ const { rawTx, inputBEEF: beef } = req;
193
+ if (!rawTx || !beef)
194
+ throw new sdk.WERR_INTERNAL(`req rawTx and beef must be valid.`);
195
+ mergeToBeef.mergeRawTx((0, utilityHelpers_noBuffer_1.asArray)(rawTx));
196
+ mergeToBeef.mergeBeef((0, utilityHelpers_noBuffer_1.asArray)(beef));
197
+ const tx = sdk_1.Transaction.fromBinary((0, utilityHelpers_noBuffer_1.asArray)(rawTx));
198
+ for (const input of tx.inputs) {
199
+ if (!input.sourceTXID)
200
+ throw new sdk.WERR_INTERNAL(`req all transaction inputs must have valid sourceTXID`);
201
+ const txid = input.sourceTXID;
202
+ const btx = mergeToBeef.findTxid(txid);
203
+ if (!btx) {
204
+ if (knownTxids && knownTxids.indexOf(txid) > -1)
205
+ mergeToBeef.mergeTxidOnly(txid);
206
+ else
207
+ await this.getValidBeefForKnownTxid(txid, mergeToBeef, undefined, knownTxids, trx);
208
+ }
209
+ }
210
+ }
211
+ /**
212
+ * Checks if txid is a known valid ProvenTx and returns it if found.
213
+ * Next checks if txid is a current ProvenTxReq and returns that if found.
214
+ * If `newReq` is provided and an existing ProvenTxReq isn't found,
215
+ * use `newReq` to create a new ProvenTxReq.
216
+ *
217
+ * This is safe "findOrInsert" operation using retry if unique index constraint
218
+ * is violated by a race condition insert.
219
+ *
220
+ * @param txid
221
+ * @param newReq
222
+ * @param trx
223
+ * @returns
224
+ */
225
+ async getProvenOrReq(txid, newReq, trx) {
226
+ if (newReq && txid !== newReq.txid)
227
+ throw new sdk.WERR_INVALID_PARAMETER('newReq', `same txid`);
228
+ const r = { proven: undefined, req: undefined };
229
+ r.proven = (0, utilityHelpers_1.verifyOneOrNone)(await this.findProvenTxs({ partial: { txid }, trx }));
230
+ if (r.proven)
231
+ return r;
232
+ for (let retry = 0;; retry++) {
233
+ try {
234
+ r.req = (0, utilityHelpers_1.verifyOneOrNone)(await this.findProvenTxReqs({ partial: { txid }, trx }));
235
+ if (!r.req && !newReq)
236
+ break;
237
+ if (!r.req && newReq) {
238
+ await this.insertProvenTxReq(newReq, trx);
239
+ }
240
+ if (r.req && newReq) {
241
+ // Merge history and notify into existing
242
+ const req1 = new entities_1.EntityProvenTxReq(r.req);
243
+ req1.mergeHistory(newReq, undefined, true);
244
+ req1.mergeNotifyTransactionIds(newReq);
245
+ await req1.updateStorageDynamicProperties(this, trx);
246
+ }
247
+ break;
248
+ }
249
+ catch (eu) {
250
+ if (retry > 0)
251
+ throw eu;
252
+ }
253
+ }
254
+ return r;
255
+ }
256
+ async updateTransactionsStatus(transactionIds, status, trx) {
257
+ await this.transaction(async (trx) => {
258
+ for (const id of transactionIds) {
259
+ await this.updateTransactionStatus(status, id, undefined, undefined, trx);
260
+ }
261
+ }, trx);
262
+ }
263
+ /**
264
+ * For all `status` values besides 'failed', just updates the transaction records status property.
265
+ *
266
+ * For 'status' of 'failed', attempts to make outputs previously allocated as inputs to this transaction usable again.
267
+ *
268
+ * @param status
269
+ * @param transactionId
270
+ * @param userId
271
+ * @param reference
272
+ * @param trx
273
+ */
274
+ async updateTransactionStatus(status, transactionId, userId, reference, trx) {
275
+ if (!transactionId && !(userId && reference))
276
+ throw new sdk.WERR_MISSING_PARAMETER('either transactionId or userId and reference');
277
+ await this.transaction(async (trx) => {
278
+ const where = {};
279
+ if (transactionId)
280
+ where.transactionId = transactionId;
281
+ if (userId)
282
+ where.userId = userId;
283
+ if (reference)
284
+ where.reference = reference;
285
+ const tx = (0, utilityHelpers_1.verifyOne)(await this.findTransactions({ partial: where, noRawTx: true, trx }));
286
+ //if (tx.status === status)
287
+ // no change required. Assume inputs and outputs spendable and spentBy are valid for status.
288
+ //return
289
+ // Once completed, this method cannot be used to "uncomplete" transaction.
290
+ if ((status !== 'completed' && tx.status === 'completed') || tx.provenTxId)
291
+ throw new sdk.WERR_INVALID_OPERATION('The status of a "completed" transaction cannot be changed.');
292
+ // It is not possible to un-fail a transaction. Information is lost and not recoverable.
293
+ if (status !== 'failed' && tx.status === 'failed')
294
+ throw new sdk.WERR_INVALID_OPERATION(`A "failed" transaction may not be un-failed by this method.`);
295
+ switch (status) {
296
+ case 'failed':
297
+ {
298
+ // Attempt to make outputs previously allocated as inputs to this transaction usable again.
299
+ // Only clear input's spentBy and reset spendable = true if it references this transaction
300
+ const t = new entities_1.EntityTransaction(tx);
301
+ const inputs = await t.getInputs(this, trx);
302
+ for (const input of inputs) {
303
+ // input is a prior output belonging to userId that reference this transaction either by `spentBy`
304
+ // or by txid and vout.
305
+ await this.updateOutput((0, utilityHelpers_1.verifyId)(input.outputId), { spendable: true, spentBy: undefined }, trx);
306
+ }
307
+ }
308
+ break;
309
+ case 'nosend':
310
+ case 'unsigned':
311
+ case 'unprocessed':
312
+ case 'sending':
313
+ case 'unproven':
314
+ case 'completed':
315
+ break;
316
+ default:
317
+ throw new sdk.WERR_INVALID_PARAMETER('status', `not be ${status}`);
318
+ }
319
+ await this.updateTransaction(tx.transactionId, { status }, trx);
320
+ }, trx);
321
+ }
322
+ async createAction(auth, args) {
323
+ if (!auth.userId)
324
+ throw new sdk.WERR_UNAUTHORIZED();
325
+ return await (0, createAction_1.createAction)(this, auth, args);
326
+ }
327
+ async processAction(auth, args) {
328
+ if (!auth.userId)
329
+ throw new sdk.WERR_UNAUTHORIZED();
330
+ return await (0, processAction_1.processAction)(this, auth, args);
331
+ }
332
+ async attemptToPostReqsToNetwork(reqs, trx) {
333
+ return await (0, attemptToPostReqsToNetwork_1.attemptToPostReqsToNetwork)(this, reqs, trx);
334
+ }
335
+ async listCertificates(auth, args) {
336
+ return await (0, listCertificates_1.listCertificates)(this, auth, args);
337
+ }
338
+ async verifyKnownValidTransaction(txid, trx) {
339
+ const { proven, rawTx } = await this.getProvenOrRawTx(txid, trx);
340
+ return proven != undefined || rawTx != undefined;
341
+ }
342
+ async getValidBeefForKnownTxid(txid, mergeToBeef, trustSelf, knownTxids, trx) {
343
+ const beef = await this.getValidBeefForTxid(txid, mergeToBeef, trustSelf, knownTxids, trx);
344
+ if (!beef)
345
+ throw new sdk.WERR_INVALID_PARAMETER('txid', `${txid} is not known to storage.`);
346
+ return beef;
347
+ }
348
+ async getValidBeefForTxid(txid, mergeToBeef, trustSelf, knownTxids, trx) {
349
+ const beef = mergeToBeef || new sdk_1.Beef();
350
+ const r = await this.getProvenOrRawTx(txid, trx);
351
+ if (r.proven) {
352
+ if (trustSelf === 'known')
353
+ beef.mergeTxidOnly(txid);
354
+ else {
355
+ beef.mergeRawTx(r.proven.rawTx);
356
+ const mp = new entities_1.EntityProvenTx(r.proven).getMerklePath();
357
+ beef.mergeBump(mp);
358
+ return beef;
359
+ }
360
+ }
361
+ if (r.rawTx && r.inputBEEF) {
362
+ if (trustSelf === 'known')
363
+ beef.mergeTxidOnly(txid);
364
+ else {
365
+ beef.mergeRawTx(r.rawTx);
366
+ beef.mergeBeef(r.inputBEEF);
367
+ const tx = sdk_1.Transaction.fromBinary(r.rawTx);
368
+ for (const input of tx.inputs) {
369
+ const btx = beef.findTxid(input.sourceTXID);
370
+ if (!btx) {
371
+ if (knownTxids && knownTxids.indexOf(input.sourceTXID) > -1)
372
+ beef.mergeTxidOnly(input.sourceTXID);
373
+ else
374
+ await this.getValidBeefForKnownTxid(input.sourceTXID, beef, trustSelf, knownTxids, trx);
375
+ }
376
+ }
377
+ return beef;
378
+ }
379
+ }
380
+ return undefined;
381
+ }
382
+ async getBeefForTransaction(txid, options) {
383
+ return await (0, getBeefForTransaction_1.getBeefForTransaction)(this, txid, options);
384
+ }
385
+ async findMonitorEventById(id, trx) {
386
+ return (0, utilityHelpers_1.verifyOneOrNone)(await this.findMonitorEvents({ partial: { id }, trx }));
387
+ }
388
+ async relinquishCertificate(auth, args) {
389
+ const vargs = sdk.validateRelinquishCertificateArgs(args);
390
+ const cert = (0, utilityHelpers_1.verifyOne)(await this.findCertificates({
391
+ partial: {
392
+ certifier: vargs.certifier,
393
+ serialNumber: vargs.serialNumber,
394
+ type: vargs.type
395
+ }
396
+ }));
397
+ return await this.updateCertificate(cert.certificateId, {
398
+ isDeleted: true
399
+ });
400
+ }
401
+ async relinquishOutput(auth, args) {
402
+ const vargs = sdk.validateRelinquishOutputArgs(args);
403
+ const { txid, vout } = sdk.parseWalletOutpoint(vargs.output);
404
+ const output = (0, utilityHelpers_1.verifyOne)(await this.findOutputs({ partial: { txid, vout } }));
405
+ return await this.updateOutput(output.outputId, { basketId: undefined });
406
+ }
407
+ async processSyncChunk(args, chunk) {
408
+ const user = (0, utilityHelpers_1.verifyTruthy)(await this.findUserByIdentityKey(args.identityKey));
409
+ const ss = new entities_1.EntitySyncState((0, utilityHelpers_1.verifyOne)(await this.findSyncStates({
410
+ partial: {
411
+ storageIdentityKey: args.fromStorageIdentityKey,
412
+ userId: user.userId
413
+ }
414
+ })));
415
+ const r = await ss.processSyncChunk(this, args, chunk);
416
+ return r;
417
+ }
418
+ /**
419
+ * Handles storage changes when a valid MerklePath and mined block header are found for a ProvenTxReq txid.
420
+ *
421
+ * Performs the following storage updates (typically):
422
+ * 1. Lookup the exising `ProvenTxReq` record for its rawTx
423
+ * 2. Insert a new ProvenTx record using properties from `args` and rawTx, yielding a new provenTxId
424
+ * 3. Update ProvenTxReq record with status 'completed' and new provenTxId value (and history of status changed)
425
+ * 4. Unpack notify transactionIds from req and update each transaction's status to 'completed', provenTxId value.
426
+ * 5. Update ProvenTxReq history again to record that transactions have been notified.
427
+ * 6. Return results...
428
+ *
429
+ * Alterations of "typically" to handle:
430
+ */
431
+ async updateProvenTxReqWithNewProvenTx(args) {
432
+ const req = await entities_1.EntityProvenTxReq.fromStorageId(this, args.provenTxReqId);
433
+ let proven;
434
+ if (req.provenTxId) {
435
+ // Someone beat us to it, grab what we need for results...
436
+ proven = new entities_1.EntityProvenTx((0, utilityHelpers_1.verifyOne)(await this.findProvenTxs({ partial: { txid: args.txid } })));
437
+ }
438
+ else {
439
+ let isNew;
440
+ ({ proven, isNew } = await this.transaction(async (trx) => {
441
+ const { proven: api, isNew } = await this.findOrInsertProvenTx({
442
+ created_at: new Date(),
443
+ updated_at: new Date(),
444
+ provenTxId: 0,
445
+ txid: args.txid,
446
+ height: args.height,
447
+ index: args.index,
448
+ merklePath: args.merklePath,
449
+ rawTx: req.rawTx,
450
+ blockHash: args.blockHash,
451
+ merkleRoot: args.merkleRoot
452
+ }, trx);
453
+ proven = new entities_1.EntityProvenTx(api);
454
+ if (isNew) {
455
+ req.status = 'completed';
456
+ req.provenTxId = proven.provenTxId;
457
+ await req.updateStorageDynamicProperties(this, trx);
458
+ // upate the transaction notifications outside of storage transaction....
459
+ }
460
+ return { proven, isNew };
461
+ }));
462
+ if (isNew) {
463
+ const ids = req.notify.transactionIds || [];
464
+ if (ids.length > 0) {
465
+ for (const id of ids) {
466
+ try {
467
+ await this.updateTransaction(id, {
468
+ provenTxId: proven.provenTxId,
469
+ status: 'completed'
470
+ });
471
+ req.addHistoryNote({ what: 'notifyTxOfProof', transactionId: id });
472
+ }
473
+ catch (eu) {
474
+ const { code, description } = sdk.WalletError.fromUnknown(eu);
475
+ const { provenTxId } = proven;
476
+ req.addHistoryNote({ what: 'notifyTxOfProofError', id, provenTxId, code, description });
477
+ }
478
+ }
479
+ await req.updateStorageDynamicProperties(this);
480
+ }
481
+ }
482
+ }
483
+ const r = {
484
+ status: req.status,
485
+ history: req.apiHistory,
486
+ provenTxId: proven.provenTxId
487
+ };
488
+ return r;
489
+ }
490
+ /**
491
+ * For each spendable output in the 'default' basket of the authenticated user,
492
+ * verify that the output script, satoshis, vout and txid match that of an output
493
+ * still in the mempool of at least one service provider.
494
+ *
495
+ * @returns object with invalidSpendableOutputs array. A good result is an empty array.
496
+ */
497
+ async confirmSpendableOutputs() {
498
+ const invalidSpendableOutputs = [];
499
+ const users = await this.findUsers({ partial: {} });
500
+ for (const { userId } of users) {
501
+ const defaultBasket = (0, utilityHelpers_1.verifyOne)(await this.findOutputBaskets({ partial: { userId, name: 'default' } }));
502
+ const where = {
503
+ userId,
504
+ basketId: defaultBasket.basketId,
505
+ spendable: true
506
+ };
507
+ const outputs = await this.findOutputs({ partial: where });
508
+ const services = this.getServices();
509
+ for (let i = outputs.length - 1; i >= 0; i--) {
510
+ const o = outputs[i];
511
+ const oid = (0, utilityHelpers_1.verifyId)(o.outputId);
512
+ if (o.spendable) {
513
+ let ok = false;
514
+ if (o.lockingScript && o.lockingScript.length > 0) {
515
+ const hash = services.hashOutputScript((0, utilityHelpers_noBuffer_1.asString)(o.lockingScript));
516
+ const r = await services.getUtxoStatus(hash, undefined, `${o.txid}.${o.vout}`);
517
+ if (r.isUtxo === true)
518
+ ok = true;
519
+ }
520
+ if (!ok)
521
+ invalidSpendableOutputs.push(o);
522
+ }
523
+ }
524
+ }
525
+ return { invalidSpendableOutputs };
526
+ }
527
+ async updateProvenTxReqDynamics(id, update, trx) {
528
+ const partial = {};
529
+ if (update['updated_at'])
530
+ partial['updated_at'] = update['updated_at'];
531
+ if (update['provenTxId'])
532
+ partial['provenTxId'] = update['provenTxId'];
533
+ if (update['status'])
534
+ partial['status'] = update['status'];
535
+ if (Number.isInteger(update['attempts']))
536
+ partial['attempts'] = update['attempts'];
537
+ if (update['notified'] !== undefined)
538
+ partial['notified'] = update['notified'];
539
+ if (update['batch'])
540
+ partial['batch'] = update['batch'];
541
+ if (update['history'])
542
+ partial['history'] = update['history'];
543
+ if (update['notify'])
544
+ partial['notify'] = update['notify'];
545
+ return await this.updateProvenTxReq(id, partial, trx);
546
+ }
547
+ async extendOutput(o, includeBasket = false, includeTags = false, trx) {
548
+ const ox = o;
549
+ if (includeBasket && ox.basketId)
550
+ ox.basket = await this.findOutputBasketById(o.basketId, trx);
551
+ if (includeTags) {
552
+ ox.tags = await this.getTagsForOutputId(o.outputId);
553
+ }
554
+ return o;
555
+ }
556
+ async validateOutputScript(o, trx) {
557
+ // without offset and length values return what we have (make no changes)
558
+ if (!o.scriptLength || !o.scriptOffset || !o.txid)
559
+ return;
560
+ // if there is an outputScript and its length is the expected length return what we have.
561
+ if (o.lockingScript && o.lockingScript.length === o.scriptLength)
562
+ return;
563
+ // outputScript is missing or has incorrect length...
564
+ const script = await this.getRawTxOfKnownValidTransaction(o.txid, o.scriptOffset, o.scriptLength, trx);
565
+ if (!script)
566
+ return;
567
+ o.lockingScript = script;
568
+ }
569
+ }
570
+ exports.StorageProvider = StorageProvider;
571
+ function validateStorageFeeModel(v) {
572
+ const r = {
573
+ model: 'sat/kb',
574
+ value: 1
575
+ };
576
+ if (typeof v === 'object') {
577
+ if (v.model !== 'sat/kb')
578
+ throw new sdk.WERR_INVALID_PARAMETER('StorageFeeModel.model', `"sat/kb"`);
579
+ if (typeof v.value === 'number') {
580
+ r.value = v.value;
581
+ }
582
+ }
583
+ return r;
584
+ }
585
+ //# sourceMappingURL=StorageProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageProvider.js","sourceRoot":"","sources":["../../../../src/storage/StorageProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyqBA,0DAYC;AArrBD,kCAciB;AAajB,8DAA8F;AAC9F,kDAAmC;AACnC,gFAAsE;AACtE,2EAAuE;AACvE,2DAAmG;AACnG,qFAA0G;AAC1G,iEAA6D;AAC7D,yDAAqD;AACrD,mEAA+D;AAC/D,+DAAuF;AACvF,gDAAyG;AAEzG,MAAsB,eAAgB,SAAQ,yCAAmB;IAQ/D,MAAM,CAAC,cAAc;QACnB,OAAO;YACL,QAAQ,EAAuB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE;YAC5D,kBAAkB,EAAE,CAAC;YACrB,mBAAmB,EAAE,SAAS;SAC/B,CAAA;IACH,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAgB;Q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