@bsv/wallet-toolbox 1.3.21 → 1.3.22

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 (502) 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 +19 -0
  38. package/mobile/out/src/index.mobile.d.ts.map +1 -0
  39. package/mobile/out/src/index.mobile.js +58 -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 +208 -0
  218. package/mobile/out/src/storage/StorageIdb.d.ts.map +1 -0
  219. package/mobile/out/src/storage/StorageIdb.js +2296 -0
  220. package/mobile/out/src/storage/StorageIdb.js.map +1 -0
  221. package/mobile/out/src/storage/StorageProvider.d.ts +209 -0
  222. package/mobile/out/src/storage/StorageProvider.d.ts.map +1 -0
  223. package/mobile/out/src/storage/StorageProvider.js +550 -0
  224. package/mobile/out/src/storage/StorageProvider.js.map +1 -0
  225. package/mobile/out/src/storage/StorageReader.d.ts +76 -0
  226. package/mobile/out/src/storage/StorageReader.d.ts.map +1 -0
  227. package/mobile/out/src/storage/StorageReader.js +129 -0
  228. package/mobile/out/src/storage/StorageReader.js.map +1 -0
  229. package/mobile/out/src/storage/StorageReaderWriter.d.ts +87 -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 +17 -0
  234. package/mobile/out/src/storage/StorageSyncReader.d.ts.map +1 -0
  235. package/mobile/out/src/storage/StorageSyncReader.js +38 -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/schema/StorageIdbSchema.d.ts +133 -0
  310. package/mobile/out/src/storage/schema/StorageIdbSchema.d.ts.map +1 -0
  311. package/mobile/out/src/storage/schema/StorageIdbSchema.js +3 -0
  312. package/mobile/out/src/storage/schema/StorageIdbSchema.js.map +1 -0
  313. package/mobile/out/src/storage/schema/entities/EntityBase.d.ts +105 -0
  314. package/mobile/out/src/storage/schema/entities/EntityBase.d.ts.map +1 -0
  315. package/mobile/out/src/storage/schema/entities/EntityBase.js +100 -0
  316. package/mobile/out/src/storage/schema/entities/EntityBase.js.map +1 -0
  317. package/mobile/out/src/storage/schema/entities/EntityCertificate.d.ts +43 -0
  318. package/mobile/out/src/storage/schema/entities/EntityCertificate.d.ts.map +1 -0
  319. package/mobile/out/src/storage/schema/entities/EntityCertificate.js +162 -0
  320. package/mobile/out/src/storage/schema/entities/EntityCertificate.js.map +1 -0
  321. package/mobile/out/src/storage/schema/entities/EntityCertificateField.d.ts +32 -0
  322. package/mobile/out/src/storage/schema/entities/EntityCertificateField.d.ts.map +1 -0
  323. package/mobile/out/src/storage/schema/entities/EntityCertificateField.js +111 -0
  324. package/mobile/out/src/storage/schema/entities/EntityCertificateField.js.map +1 -0
  325. package/mobile/out/src/storage/schema/entities/EntityCommission.d.ts +37 -0
  326. package/mobile/out/src/storage/schema/entities/EntityCommission.d.ts.map +1 -0
  327. package/mobile/out/src/storage/schema/entities/EntityCommission.js +127 -0
  328. package/mobile/out/src/storage/schema/entities/EntityCommission.js.map +1 -0
  329. package/mobile/out/src/storage/schema/entities/EntityOutput.d.ts +67 -0
  330. package/mobile/out/src/storage/schema/entities/EntityOutput.d.ts.map +1 -0
  331. package/mobile/out/src/storage/schema/entities/EntityOutput.js +264 -0
  332. package/mobile/out/src/storage/schema/entities/EntityOutput.js.map +1 -0
  333. package/mobile/out/src/storage/schema/entities/EntityOutputBasket.d.ts +35 -0
  334. package/mobile/out/src/storage/schema/entities/EntityOutputBasket.d.ts.map +1 -0
  335. package/mobile/out/src/storage/schema/entities/EntityOutputBasket.js +133 -0
  336. package/mobile/out/src/storage/schema/entities/EntityOutputBasket.js.map +1 -0
  337. package/mobile/out/src/storage/schema/entities/EntityOutputTag.d.ts +31 -0
  338. package/mobile/out/src/storage/schema/entities/EntityOutputTag.d.ts.map +1 -0
  339. package/mobile/out/src/storage/schema/entities/EntityOutputTag.js +104 -0
  340. package/mobile/out/src/storage/schema/entities/EntityOutputTag.js.map +1 -0
  341. package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.d.ts +28 -0
  342. package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.d.ts.map +1 -0
  343. package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.js +97 -0
  344. package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.js.map +1 -0
  345. package/mobile/out/src/storage/schema/entities/EntityProvenTx.d.ts +84 -0
  346. package/mobile/out/src/storage/schema/entities/EntityProvenTx.d.ts.map +1 -0
  347. package/mobile/out/src/storage/schema/entities/EntityProvenTx.js +276 -0
  348. package/mobile/out/src/storage/schema/entities/EntityProvenTx.js.map +1 -0
  349. package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.d.ts +135 -0
  350. package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.d.ts.map +1 -0
  351. package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.js +522 -0
  352. package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.js.map +1 -0
  353. package/mobile/out/src/storage/schema/entities/EntitySyncState.d.ts +67 -0
  354. package/mobile/out/src/storage/schema/entities/EntitySyncState.d.ts.map +1 -0
  355. package/mobile/out/src/storage/schema/entities/EntitySyncState.js +319 -0
  356. package/mobile/out/src/storage/schema/entities/EntitySyncState.js.map +1 -0
  357. package/mobile/out/src/storage/schema/entities/EntityTransaction.d.ts +67 -0
  358. package/mobile/out/src/storage/schema/entities/EntityTransaction.d.ts.map +1 -0
  359. package/mobile/out/src/storage/schema/entities/EntityTransaction.js +255 -0
  360. package/mobile/out/src/storage/schema/entities/EntityTransaction.js.map +1 -0
  361. package/mobile/out/src/storage/schema/entities/EntityTxLabel.d.ts +31 -0
  362. package/mobile/out/src/storage/schema/entities/EntityTxLabel.d.ts.map +1 -0
  363. package/mobile/out/src/storage/schema/entities/EntityTxLabel.js +104 -0
  364. package/mobile/out/src/storage/schema/entities/EntityTxLabel.js.map +1 -0
  365. package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.d.ts +28 -0
  366. package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.d.ts.map +1 -0
  367. package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.js +97 -0
  368. package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.js.map +1 -0
  369. package/mobile/out/src/storage/schema/entities/EntityUser.d.ts +29 -0
  370. package/mobile/out/src/storage/schema/entities/EntityUser.d.ts.map +1 -0
  371. package/mobile/out/src/storage/schema/entities/EntityUser.js +98 -0
  372. package/mobile/out/src/storage/schema/entities/EntityUser.js.map +1 -0
  373. package/mobile/out/src/storage/schema/entities/MergeEntity.d.ts +33 -0
  374. package/mobile/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -0
  375. package/mobile/out/src/storage/schema/entities/MergeEntity.js +62 -0
  376. package/mobile/out/src/storage/schema/entities/MergeEntity.js.map +1 -0
  377. package/mobile/out/src/storage/schema/entities/index.d.ts +17 -0
  378. package/mobile/out/src/storage/schema/entities/index.d.ts.map +1 -0
  379. package/mobile/out/src/storage/schema/entities/index.js +33 -0
  380. package/mobile/out/src/storage/schema/entities/index.js.map +1 -0
  381. package/mobile/out/src/storage/schema/tables/TableCertificate.d.ts +20 -0
  382. package/mobile/out/src/storage/schema/tables/TableCertificate.d.ts.map +1 -0
  383. package/mobile/out/src/storage/schema/tables/TableCertificate.js +3 -0
  384. package/mobile/out/src/storage/schema/tables/TableCertificate.js.map +1 -0
  385. package/mobile/out/src/storage/schema/tables/TableCertificateField.d.ts +12 -0
  386. package/mobile/out/src/storage/schema/tables/TableCertificateField.d.ts.map +1 -0
  387. package/mobile/out/src/storage/schema/tables/TableCertificateField.js +3 -0
  388. package/mobile/out/src/storage/schema/tables/TableCertificateField.js.map +1 -0
  389. package/mobile/out/src/storage/schema/tables/TableCommission.d.ts +13 -0
  390. package/mobile/out/src/storage/schema/tables/TableCommission.d.ts.map +1 -0
  391. package/mobile/out/src/storage/schema/tables/TableCommission.js +3 -0
  392. package/mobile/out/src/storage/schema/tables/TableCommission.js.map +1 -0
  393. package/mobile/out/src/storage/schema/tables/TableMonitorEvent.d.ts +9 -0
  394. package/mobile/out/src/storage/schema/tables/TableMonitorEvent.d.ts.map +1 -0
  395. package/mobile/out/src/storage/schema/tables/TableMonitorEvent.js +3 -0
  396. package/mobile/out/src/storage/schema/tables/TableMonitorEvent.js.map +1 -0
  397. package/mobile/out/src/storage/schema/tables/TableOutput.d.ts +36 -0
  398. package/mobile/out/src/storage/schema/tables/TableOutput.d.ts.map +1 -0
  399. package/mobile/out/src/storage/schema/tables/TableOutput.js +31 -0
  400. package/mobile/out/src/storage/schema/tables/TableOutput.js.map +1 -0
  401. package/mobile/out/src/storage/schema/tables/TableOutputBasket.d.ts +12 -0
  402. package/mobile/out/src/storage/schema/tables/TableOutputBasket.d.ts.map +1 -0
  403. package/mobile/out/src/storage/schema/tables/TableOutputBasket.js +3 -0
  404. package/mobile/out/src/storage/schema/tables/TableOutputBasket.js.map +1 -0
  405. package/mobile/out/src/storage/schema/tables/TableOutputTag.d.ts +10 -0
  406. package/mobile/out/src/storage/schema/tables/TableOutputTag.d.ts.map +1 -0
  407. package/mobile/out/src/storage/schema/tables/TableOutputTag.js +3 -0
  408. package/mobile/out/src/storage/schema/tables/TableOutputTag.js.map +1 -0
  409. package/mobile/out/src/storage/schema/tables/TableOutputTagMap.d.ts +9 -0
  410. package/mobile/out/src/storage/schema/tables/TableOutputTagMap.d.ts.map +1 -0
  411. package/mobile/out/src/storage/schema/tables/TableOutputTagMap.js +3 -0
  412. package/mobile/out/src/storage/schema/tables/TableOutputTagMap.js.map +1 -0
  413. package/mobile/out/src/storage/schema/tables/TableProvenTx.d.ts +14 -0
  414. package/mobile/out/src/storage/schema/tables/TableProvenTx.d.ts.map +1 -0
  415. package/mobile/out/src/storage/schema/tables/TableProvenTx.js +3 -0
  416. package/mobile/out/src/storage/schema/tables/TableProvenTx.js.map +1 -0
  417. package/mobile/out/src/storage/schema/tables/TableProvenTxReq.d.ts +64 -0
  418. package/mobile/out/src/storage/schema/tables/TableProvenTxReq.d.ts.map +1 -0
  419. package/mobile/out/src/storage/schema/tables/TableProvenTxReq.js +3 -0
  420. package/mobile/out/src/storage/schema/tables/TableProvenTxReq.js.map +1 -0
  421. package/mobile/out/src/storage/schema/tables/TableSettings.d.ts +17 -0
  422. package/mobile/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -0
  423. package/mobile/out/src/storage/schema/tables/TableSettings.js +3 -0
  424. package/mobile/out/src/storage/schema/tables/TableSettings.js.map +1 -0
  425. package/mobile/out/src/storage/schema/tables/TableSyncState.d.ts +18 -0
  426. package/mobile/out/src/storage/schema/tables/TableSyncState.d.ts.map +1 -0
  427. package/mobile/out/src/storage/schema/tables/TableSyncState.js +3 -0
  428. package/mobile/out/src/storage/schema/tables/TableSyncState.js.map +1 -0
  429. package/mobile/out/src/storage/schema/tables/TableTransaction.d.ts +37 -0
  430. package/mobile/out/src/storage/schema/tables/TableTransaction.d.ts.map +1 -0
  431. package/mobile/out/src/storage/schema/tables/TableTransaction.js +21 -0
  432. package/mobile/out/src/storage/schema/tables/TableTransaction.js.map +1 -0
  433. package/mobile/out/src/storage/schema/tables/TableTxLabel.d.ts +10 -0
  434. package/mobile/out/src/storage/schema/tables/TableTxLabel.d.ts.map +1 -0
  435. package/mobile/out/src/storage/schema/tables/TableTxLabel.js +3 -0
  436. package/mobile/out/src/storage/schema/tables/TableTxLabel.js.map +1 -0
  437. package/mobile/out/src/storage/schema/tables/TableTxLabelMap.d.ts +9 -0
  438. package/mobile/out/src/storage/schema/tables/TableTxLabelMap.d.ts.map +1 -0
  439. package/mobile/out/src/storage/schema/tables/TableTxLabelMap.js +3 -0
  440. package/mobile/out/src/storage/schema/tables/TableTxLabelMap.js.map +1 -0
  441. package/mobile/out/src/storage/schema/tables/TableUser.d.ts +16 -0
  442. package/mobile/out/src/storage/schema/tables/TableUser.d.ts.map +1 -0
  443. package/mobile/out/src/storage/schema/tables/TableUser.js +3 -0
  444. package/mobile/out/src/storage/schema/tables/TableUser.js.map +1 -0
  445. package/mobile/out/src/storage/schema/tables/index.d.ts +17 -0
  446. package/mobile/out/src/storage/schema/tables/index.d.ts.map +1 -0
  447. package/mobile/out/src/storage/schema/tables/index.js +33 -0
  448. package/mobile/out/src/storage/schema/tables/index.js.map +1 -0
  449. package/mobile/out/src/utility/ScriptTemplateBRC29.d.ts +25 -0
  450. package/mobile/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -0
  451. package/mobile/out/src/utility/ScriptTemplateBRC29.js +48 -0
  452. package/mobile/out/src/utility/ScriptTemplateBRC29.js.map +1 -0
  453. package/mobile/out/src/utility/identityUtils.d.ts +31 -0
  454. package/mobile/out/src/utility/identityUtils.d.ts.map +1 -0
  455. package/mobile/out/src/utility/identityUtils.js +116 -0
  456. package/mobile/out/src/utility/identityUtils.js.map +1 -0
  457. package/mobile/out/src/utility/index.client.d.ts +7 -0
  458. package/mobile/out/src/utility/index.client.d.ts.map +1 -0
  459. package/mobile/out/src/utility/index.client.js +23 -0
  460. package/mobile/out/src/utility/index.client.js.map +1 -0
  461. package/mobile/out/src/utility/parseTxScriptOffsets.d.ts +14 -0
  462. package/mobile/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -0
  463. package/mobile/out/src/utility/parseTxScriptOffsets.js +26 -0
  464. package/mobile/out/src/utility/parseTxScriptOffsets.js.map +1 -0
  465. package/mobile/out/src/utility/stampLog.d.ts +18 -0
  466. package/mobile/out/src/utility/stampLog.d.ts.map +1 -0
  467. package/mobile/out/src/utility/stampLog.js +72 -0
  468. package/mobile/out/src/utility/stampLog.js.map +1 -0
  469. package/mobile/out/src/utility/tscProofToMerklePath.d.ts +8 -0
  470. package/mobile/out/src/utility/tscProofToMerklePath.d.ts.map +1 -0
  471. package/mobile/out/src/utility/tscProofToMerklePath.js +41 -0
  472. package/mobile/out/src/utility/tscProofToMerklePath.js.map +1 -0
  473. package/mobile/out/src/utility/utilityHelpers.d.ts +129 -0
  474. package/mobile/out/src/utility/utilityHelpers.d.ts.map +1 -0
  475. package/mobile/out/src/utility/utilityHelpers.js +266 -0
  476. package/mobile/out/src/utility/utilityHelpers.js.map +1 -0
  477. package/mobile/out/src/utility/utilityHelpers.noBuffer.d.ts +9 -0
  478. package/mobile/out/src/utility/utilityHelpers.noBuffer.d.ts.map +1 -0
  479. package/mobile/out/src/utility/utilityHelpers.noBuffer.js +23 -0
  480. package/mobile/out/src/utility/utilityHelpers.noBuffer.js.map +1 -0
  481. package/mobile/out/src/wab-client/WABClient.d.ts +49 -0
  482. package/mobile/out/src/wab-client/WABClient.d.ts.map +1 -0
  483. package/mobile/out/src/wab-client/WABClient.js +80 -0
  484. package/mobile/out/src/wab-client/WABClient.js.map +1 -0
  485. package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts +34 -0
  486. package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts.map +1 -0
  487. package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js +16 -0
  488. package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -0
  489. package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.d.ts +7 -0
  490. package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.d.ts.map +1 -0
  491. package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.js +36 -0
  492. package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.js.map +1 -0
  493. package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.d.ts +28 -0
  494. package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.d.ts.map +1 -0
  495. package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js +69 -0
  496. package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js.map +1 -0
  497. package/mobile/out/tsconfig.mobile.tsbuildinfo +1 -0
  498. package/mobile/package-lock.json +5 -12
  499. package/mobile/package.json +1 -1
  500. package/package.json +1 -1
  501. package/tsconfig.json +3 -0
  502. package/tsconfig.mobile.json +22 -0
@@ -0,0 +1,169 @@
1
+ import { WalletInterface, OriginatorDomainNameStringUnder250Bytes, GetPublicKeyArgs, GetPublicKeyResult, RevealCounterpartyKeyLinkageArgs, RevealCounterpartyKeyLinkageResult, RevealSpecificKeyLinkageArgs, RevealSpecificKeyLinkageResult, WalletEncryptArgs, WalletEncryptResult, WalletDecryptArgs, WalletDecryptResult, CreateHmacArgs, CreateHmacResult, VerifyHmacArgs, VerifyHmacResult, CreateSignatureArgs, CreateSignatureResult, VerifySignatureArgs, VerifySignatureResult, CreateActionArgs, CreateActionResult, SignActionArgs, SignActionResult, AbortActionArgs, AbortActionResult, ListActionsArgs, ListActionsResult, InternalizeActionArgs, InternalizeActionResult, ListOutputsArgs, ListOutputsResult, RelinquishOutputArgs, RelinquishOutputResult, AcquireCertificateArgs, AcquireCertificateResult, ListCertificatesArgs, ListCertificatesResult, ProveCertificateArgs, ProveCertificateResult, RelinquishCertificateArgs, RelinquishCertificateResult, DiscoverByIdentityKeyArgs, DiscoverByAttributesArgs, DiscoverCertificatesResult, AuthenticatedResult, GetHeightResult, GetHeaderArgs, GetHeaderResult, GetNetworkResult, GetVersionResult } from '@bsv/sdk';
2
+ import { PrivilegedKeyManager } from './sdk/PrivilegedKeyManager';
3
+ /**
4
+ * SimpleWalletManager is a slimmed-down wallet manager that only requires two things to authenticate:
5
+ * 1. A primary key (32 bytes), which represents the core secret for the wallet.
6
+ * 2. A privileged key manager (an instance of `PrivilegedKeyManager`), responsible for
7
+ * more sensitive operations.
8
+ *
9
+ * Once both pieces are provided (or if a snapshot containing the primary key is loaded,
10
+ * and the privileged key manager is provided separately), the wallet becomes authenticated.
11
+ *
12
+ * After authentication, calls to the standard wallet methods (`createAction`, `signAction`, etc.)
13
+ * are proxied to an underlying `WalletInterface` instance returned by a user-supplied `walletBuilder`.
14
+ *
15
+ * **Important**: This manager does not handle user password flows, recovery, or on-chain
16
+ * token management. It is a straightforward wrapper that ensures the user has provided
17
+ * both their main secret (primary key) and a privileged key manager before allowing usage.
18
+ *
19
+ * It also prevents calls from the special "admin originator" from being used externally.
20
+ * (Any call that tries to use the admin originator as its originator, other than the manager itself,
21
+ * will result in an error, ensuring that only internal operations can use that originator.)
22
+ *
23
+ * The manager can also save and load snapshots of its state. In this simplified version,
24
+ * the snapshot only contains the primary key. If you load a snapshot, you still need to
25
+ * re-provide the privileged key manager to complete authentication.
26
+ */
27
+ export declare class SimpleWalletManager implements WalletInterface {
28
+ /**
29
+ * Whether the user is currently authenticated (meaning both the primary key
30
+ * and privileged key manager have been provided).
31
+ */
32
+ authenticated: boolean;
33
+ /**
34
+ * The domain name of the administrative originator (wallet operator / vendor, or your own).
35
+ */
36
+ private adminOriginator;
37
+ /**
38
+ * A function that, given the user's primary key and privileged key manager,
39
+ * returns a new `WalletInterface` instance that handles the actual signing,
40
+ * encryption, transaction building, etc.
41
+ */
42
+ private walletBuilder;
43
+ /**
44
+ * The underlying wallet instance that is built once authenticated.
45
+ */
46
+ private underlying?;
47
+ /**
48
+ * The privileged key manager, responsible for sensitive tasks.
49
+ */
50
+ private underlyingPrivilegedKeyManager?;
51
+ /**
52
+ * The primary key (32 bytes) that unlocks the wallet functionality.
53
+ */
54
+ private primaryKey?;
55
+ /**
56
+ * Constructs a new `SimpleWalletManager`.
57
+ *
58
+ * @param adminOriginator The domain name of the administrative originator.
59
+ * @param walletBuilder A function that, given a primary key and privileged key manager,
60
+ * returns a fully functional `WalletInterface`.
61
+ * @param stateSnapshot If provided, a previously saved snapshot of the wallet's state.
62
+ * If the snapshot contains a primary key, it will be loaded immediately
63
+ * (though you will still need to provide a privileged key manager to authenticate).
64
+ */
65
+ constructor(adminOriginator: OriginatorDomainNameStringUnder250Bytes, walletBuilder: (primaryKey: number[], privilegedKeyManager: PrivilegedKeyManager) => Promise<WalletInterface>, stateSnapshot?: number[]);
66
+ /**
67
+ * Provides the primary key (32 bytes) needed for authentication.
68
+ * If a privileged key manager has already been provided, we attempt to build
69
+ * the underlying wallet. Otherwise, we wait until the manager is also provided.
70
+ *
71
+ * @param key A 32-byte primary key.
72
+ */
73
+ providePrimaryKey(key: number[]): Promise<void>;
74
+ /**
75
+ * Provides the privileged key manager needed for sensitive tasks.
76
+ * If a primary key has already been provided (or loaded from a snapshot),
77
+ * we attempt to build the underlying wallet. Otherwise, we wait until the key is provided.
78
+ *
79
+ * @param manager An instance of `PrivilegedKeyManager`.
80
+ */
81
+ providePrivilegedKeyManager(manager: PrivilegedKeyManager): Promise<void>;
82
+ /**
83
+ * Internal method that checks if we have both the primary key and privileged manager.
84
+ * If so, we build the underlying wallet instance and become authenticated.
85
+ */
86
+ private tryBuildUnderlying;
87
+ /**
88
+ * Destroys the underlying wallet, returning to a default (unauthenticated) state.
89
+ *
90
+ * This clears the primary key, the privileged key manager, and the `authenticated` flag.
91
+ */
92
+ destroy(): void;
93
+ /**
94
+ * Saves the current wallet state (including just the primary key)
95
+ * into an encrypted snapshot. This snapshot can be stored and later
96
+ * passed to `loadSnapshot` to restore the primary key (and partially authenticate).
97
+ *
98
+ * **Note**: The snapshot does NOT include the privileged key manager.
99
+ * You must still provide that separately after loading the snapshot
100
+ * in order to complete authentication.
101
+ *
102
+ * @remarks
103
+ * Storing the snapshot (which contains the primary key) provides a significant
104
+ * portion of the wallet's secret material. It must be protected carefully.
105
+ *
106
+ * @returns A byte array representing the encrypted snapshot.
107
+ * @throws {Error} if no primary key is currently set.
108
+ */
109
+ saveSnapshot(): number[];
110
+ /**
111
+ * Loads a previously saved state snapshot (produced by `saveSnapshot`).
112
+ * This will restore the primary key but will **not** restore the privileged key manager
113
+ * (that must be provided separately to complete authentication).
114
+ *
115
+ * @param snapshot A byte array that was previously returned by `saveSnapshot`.
116
+ * @throws {Error} If the snapshot format is invalid or decryption fails.
117
+ */
118
+ loadSnapshot(snapshot: number[]): Promise<void>;
119
+ /**
120
+ * Returns whether the user is currently authenticated (the wallet has a primary key
121
+ * and a privileged key manager). If not authenticated, an error is thrown.
122
+ *
123
+ * @param _ Not used in this manager.
124
+ * @param originator The originator domain, which must not be the admin originator.
125
+ * @throws If not authenticated, or if the originator is the admin.
126
+ */
127
+ isAuthenticated(_: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AuthenticatedResult>;
128
+ /**
129
+ * Blocks until the user is authenticated (by providing primaryKey and privileged manager).
130
+ * If not authenticated yet, it waits until that occurs.
131
+ *
132
+ * @param _ Not used in this manager.
133
+ * @param originator The originator domain, which must not be the admin originator.
134
+ * @throws If the originator is the admin.
135
+ */
136
+ waitForAuthentication(_: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AuthenticatedResult>;
137
+ getPublicKey(args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetPublicKeyResult>;
138
+ revealCounterpartyKeyLinkage(args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RevealCounterpartyKeyLinkageResult>;
139
+ revealSpecificKeyLinkage(args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RevealSpecificKeyLinkageResult>;
140
+ encrypt(args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletEncryptResult>;
141
+ decrypt(args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletDecryptResult>;
142
+ createHmac(args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateHmacResult>;
143
+ verifyHmac(args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<VerifyHmacResult>;
144
+ createSignature(args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateSignatureResult>;
145
+ verifySignature(args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<VerifySignatureResult>;
146
+ createAction(args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateActionResult>;
147
+ signAction(args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<SignActionResult>;
148
+ abortAction(args: AbortActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AbortActionResult>;
149
+ listActions(args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListActionsResult>;
150
+ internalizeAction(args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<InternalizeActionResult>;
151
+ listOutputs(args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListOutputsResult>;
152
+ relinquishOutput(args: RelinquishOutputArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RelinquishOutputResult>;
153
+ acquireCertificate(args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AcquireCertificateResult>;
154
+ listCertificates(args: ListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListCertificatesResult>;
155
+ proveCertificate(args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ProveCertificateResult>;
156
+ relinquishCertificate(args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RelinquishCertificateResult>;
157
+ discoverByIdentityKey(args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>;
158
+ discoverByAttributes(args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>;
159
+ getHeight(_: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetHeightResult>;
160
+ getHeaderForHeight(args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetHeaderResult>;
161
+ getNetwork(_: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetNetworkResult>;
162
+ getVersion(_: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetVersionResult>;
163
+ /**
164
+ * A small helper that throws if the user is not authenticated or if the
165
+ * provided originator is the admin (which is not permitted externally).
166
+ */
167
+ private ensureCanCall;
168
+ }
169
+ //# sourceMappingURL=SimpleWalletManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleWalletManager.d.ts","sourceRoot":"","sources":["../../../src/SimpleWalletManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,uCAAuC,EACvC,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,EAChC,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC9B,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAKjB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEjE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IACzD;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAA;IAEtB;;OAEG;IACH,OAAO,CAAC,eAAe,CAAyC;IAEhE;;;;OAIG;IACH,OAAO,CAAC,aAAa,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CAAC,gBAAgB,CAAC;IAKxG;;;OAGG;IACH,OAAO,CAAC,aAAa;CAQtB"}
@@ -0,0 +1,315 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SimpleWalletManager = void 0;
4
+ const sdk_1 = require("@bsv/sdk");
5
+ /**
6
+ * SimpleWalletManager is a slimmed-down wallet manager that only requires two things to authenticate:
7
+ * 1. A primary key (32 bytes), which represents the core secret for the wallet.
8
+ * 2. A privileged key manager (an instance of `PrivilegedKeyManager`), responsible for
9
+ * more sensitive operations.
10
+ *
11
+ * Once both pieces are provided (or if a snapshot containing the primary key is loaded,
12
+ * and the privileged key manager is provided separately), the wallet becomes authenticated.
13
+ *
14
+ * After authentication, calls to the standard wallet methods (`createAction`, `signAction`, etc.)
15
+ * are proxied to an underlying `WalletInterface` instance returned by a user-supplied `walletBuilder`.
16
+ *
17
+ * **Important**: This manager does not handle user password flows, recovery, or on-chain
18
+ * token management. It is a straightforward wrapper that ensures the user has provided
19
+ * both their main secret (primary key) and a privileged key manager before allowing usage.
20
+ *
21
+ * It also prevents calls from the special "admin originator" from being used externally.
22
+ * (Any call that tries to use the admin originator as its originator, other than the manager itself,
23
+ * will result in an error, ensuring that only internal operations can use that originator.)
24
+ *
25
+ * The manager can also save and load snapshots of its state. In this simplified version,
26
+ * the snapshot only contains the primary key. If you load a snapshot, you still need to
27
+ * re-provide the privileged key manager to complete authentication.
28
+ */
29
+ class SimpleWalletManager {
30
+ /**
31
+ * Constructs a new `SimpleWalletManager`.
32
+ *
33
+ * @param adminOriginator The domain name of the administrative originator.
34
+ * @param walletBuilder A function that, given a primary key and privileged key manager,
35
+ * returns a fully functional `WalletInterface`.
36
+ * @param stateSnapshot If provided, a previously saved snapshot of the wallet's state.
37
+ * If the snapshot contains a primary key, it will be loaded immediately
38
+ * (though you will still need to provide a privileged key manager to authenticate).
39
+ */
40
+ constructor(adminOriginator, walletBuilder, stateSnapshot) {
41
+ this.authenticated = false;
42
+ this.adminOriginator = adminOriginator;
43
+ this.walletBuilder = walletBuilder;
44
+ if (stateSnapshot) {
45
+ this.loadSnapshot(stateSnapshot);
46
+ }
47
+ }
48
+ /**
49
+ * Provides the primary key (32 bytes) needed for authentication.
50
+ * If a privileged key manager has already been provided, we attempt to build
51
+ * the underlying wallet. Otherwise, we wait until the manager is also provided.
52
+ *
53
+ * @param key A 32-byte primary key.
54
+ */
55
+ async providePrimaryKey(key) {
56
+ this.primaryKey = key;
57
+ await this.tryBuildUnderlying();
58
+ }
59
+ /**
60
+ * Provides the privileged key manager needed for sensitive tasks.
61
+ * If a primary key has already been provided (or loaded from a snapshot),
62
+ * we attempt to build the underlying wallet. Otherwise, we wait until the key is provided.
63
+ *
64
+ * @param manager An instance of `PrivilegedKeyManager`.
65
+ */
66
+ async providePrivilegedKeyManager(manager) {
67
+ this.underlyingPrivilegedKeyManager = manager;
68
+ await this.tryBuildUnderlying();
69
+ }
70
+ /**
71
+ * Internal method that checks if we have both the primary key and privileged manager.
72
+ * If so, we build the underlying wallet instance and become authenticated.
73
+ */
74
+ async tryBuildUnderlying() {
75
+ if (this.authenticated) {
76
+ throw new Error('The user is already authenticated.');
77
+ }
78
+ if (!this.primaryKey || !this.underlyingPrivilegedKeyManager) {
79
+ return;
80
+ }
81
+ // Build the underlying wallet:
82
+ this.underlying = await this.walletBuilder(this.primaryKey, this.underlyingPrivilegedKeyManager);
83
+ this.authenticated = true;
84
+ }
85
+ /**
86
+ * Destroys the underlying wallet, returning to a default (unauthenticated) state.
87
+ *
88
+ * This clears the primary key, the privileged key manager, and the `authenticated` flag.
89
+ */
90
+ destroy() {
91
+ this.underlying = undefined;
92
+ this.underlyingPrivilegedKeyManager = undefined;
93
+ this.authenticated = false;
94
+ this.primaryKey = undefined;
95
+ }
96
+ /**
97
+ * Saves the current wallet state (including just the primary key)
98
+ * into an encrypted snapshot. This snapshot can be stored and later
99
+ * passed to `loadSnapshot` to restore the primary key (and partially authenticate).
100
+ *
101
+ * **Note**: The snapshot does NOT include the privileged key manager.
102
+ * You must still provide that separately after loading the snapshot
103
+ * in order to complete authentication.
104
+ *
105
+ * @remarks
106
+ * Storing the snapshot (which contains the primary key) provides a significant
107
+ * portion of the wallet's secret material. It must be protected carefully.
108
+ *
109
+ * @returns A byte array representing the encrypted snapshot.
110
+ * @throws {Error} if no primary key is currently set.
111
+ */
112
+ saveSnapshot() {
113
+ if (!this.primaryKey) {
114
+ throw new Error('No primary key is set; cannot save snapshot.');
115
+ }
116
+ // Generate a random snapshot encryption key:
117
+ const snapshotKey = (0, sdk_1.Random)(32);
118
+ // For this simple wallet manager, we only store the primary key.
119
+ const writer = new sdk_1.Utils.Writer();
120
+ // Write a 1-byte version:
121
+ writer.writeUInt8(1);
122
+ // Write a varint length and then the primary key bytes:
123
+ writer.writeVarIntNum(this.primaryKey.length);
124
+ writer.write(this.primaryKey);
125
+ const snapshotPreimage = writer.toArray();
126
+ // Encrypt the data with the snapshotKey:
127
+ const encryptedPayload = new sdk_1.SymmetricKey(snapshotKey).encrypt(snapshotPreimage);
128
+ // Build the final snapshot: [ snapshotKey (32 bytes) + encryptedPayload ]
129
+ const snapshotWriter = new sdk_1.Utils.Writer();
130
+ snapshotWriter.write(snapshotKey);
131
+ snapshotWriter.write(encryptedPayload);
132
+ return snapshotWriter.toArray();
133
+ }
134
+ /**
135
+ * Loads a previously saved state snapshot (produced by `saveSnapshot`).
136
+ * This will restore the primary key but will **not** restore the privileged key manager
137
+ * (that must be provided separately to complete authentication).
138
+ *
139
+ * @param snapshot A byte array that was previously returned by `saveSnapshot`.
140
+ * @throws {Error} If the snapshot format is invalid or decryption fails.
141
+ */
142
+ async loadSnapshot(snapshot) {
143
+ try {
144
+ const reader = new sdk_1.Utils.Reader(snapshot);
145
+ // First 32 bytes is the snapshotKey:
146
+ const snapshotKey = reader.read(32);
147
+ // The rest is the encrypted payload:
148
+ const encryptedPayload = reader.read();
149
+ // Decrypt the payload with the snapshotKey:
150
+ const decrypted = new sdk_1.SymmetricKey(snapshotKey).decrypt(encryptedPayload);
151
+ const payloadReader = new sdk_1.Utils.Reader(decrypted);
152
+ // Check version:
153
+ const version = payloadReader.readUInt8();
154
+ if (version !== 1) {
155
+ throw new Error(`Unsupported snapshot version: ${version}`);
156
+ }
157
+ // Read the varint length and the primary key:
158
+ const pkLength = payloadReader.readVarIntNum();
159
+ const pk = payloadReader.read(pkLength);
160
+ this.primaryKey = pk;
161
+ // Attempt to build the underlying wallet if the privileged manager is already provided:
162
+ await this.tryBuildUnderlying();
163
+ }
164
+ catch (error) {
165
+ throw new Error(`Failed to load snapshot: ${error.message}`);
166
+ }
167
+ }
168
+ /**
169
+ * Returns whether the user is currently authenticated (the wallet has a primary key
170
+ * and a privileged key manager). If not authenticated, an error is thrown.
171
+ *
172
+ * @param _ Not used in this manager.
173
+ * @param originator The originator domain, which must not be the admin originator.
174
+ * @throws If not authenticated, or if the originator is the admin.
175
+ */
176
+ async isAuthenticated(_, originator) {
177
+ this.ensureCanCall(originator);
178
+ return { authenticated: true };
179
+ }
180
+ /**
181
+ * Blocks until the user is authenticated (by providing primaryKey and privileged manager).
182
+ * If not authenticated yet, it waits until that occurs.
183
+ *
184
+ * @param _ Not used in this manager.
185
+ * @param originator The originator domain, which must not be the admin originator.
186
+ * @throws If the originator is the admin.
187
+ */
188
+ async waitForAuthentication(_, originator) {
189
+ if (originator === this.adminOriginator) {
190
+ throw new Error('External applications cannot use the admin originator.');
191
+ }
192
+ while (!this.authenticated) {
193
+ await new Promise(resolve => setTimeout(resolve, 100));
194
+ }
195
+ return { authenticated: true };
196
+ }
197
+ async getPublicKey(args, originator) {
198
+ this.ensureCanCall(originator);
199
+ return this.underlying.getPublicKey(args, originator);
200
+ }
201
+ async revealCounterpartyKeyLinkage(args, originator) {
202
+ this.ensureCanCall(originator);
203
+ return this.underlying.revealCounterpartyKeyLinkage(args, originator);
204
+ }
205
+ async revealSpecificKeyLinkage(args, originator) {
206
+ this.ensureCanCall(originator);
207
+ return this.underlying.revealSpecificKeyLinkage(args, originator);
208
+ }
209
+ async encrypt(args, originator) {
210
+ this.ensureCanCall(originator);
211
+ return this.underlying.encrypt(args, originator);
212
+ }
213
+ async decrypt(args, originator) {
214
+ this.ensureCanCall(originator);
215
+ return this.underlying.decrypt(args, originator);
216
+ }
217
+ async createHmac(args, originator) {
218
+ this.ensureCanCall(originator);
219
+ return this.underlying.createHmac(args, originator);
220
+ }
221
+ async verifyHmac(args, originator) {
222
+ this.ensureCanCall(originator);
223
+ return this.underlying.verifyHmac(args, originator);
224
+ }
225
+ async createSignature(args, originator) {
226
+ this.ensureCanCall(originator);
227
+ return this.underlying.createSignature(args, originator);
228
+ }
229
+ async verifySignature(args, originator) {
230
+ this.ensureCanCall(originator);
231
+ return this.underlying.verifySignature(args, originator);
232
+ }
233
+ async createAction(args, originator) {
234
+ this.ensureCanCall(originator);
235
+ return this.underlying.createAction(args, originator);
236
+ }
237
+ async signAction(args, originator) {
238
+ this.ensureCanCall(originator);
239
+ return this.underlying.signAction(args, originator);
240
+ }
241
+ async abortAction(args, originator) {
242
+ this.ensureCanCall(originator);
243
+ return this.underlying.abortAction(args, originator);
244
+ }
245
+ async listActions(args, originator) {
246
+ this.ensureCanCall(originator);
247
+ return this.underlying.listActions(args, originator);
248
+ }
249
+ async internalizeAction(args, originator) {
250
+ this.ensureCanCall(originator);
251
+ return this.underlying.internalizeAction(args, originator);
252
+ }
253
+ async listOutputs(args, originator) {
254
+ this.ensureCanCall(originator);
255
+ return this.underlying.listOutputs(args, originator);
256
+ }
257
+ async relinquishOutput(args, originator) {
258
+ this.ensureCanCall(originator);
259
+ return this.underlying.relinquishOutput(args, originator);
260
+ }
261
+ async acquireCertificate(args, originator) {
262
+ this.ensureCanCall(originator);
263
+ return this.underlying.acquireCertificate(args, originator);
264
+ }
265
+ async listCertificates(args, originator) {
266
+ this.ensureCanCall(originator);
267
+ return this.underlying.listCertificates(args, originator);
268
+ }
269
+ async proveCertificate(args, originator) {
270
+ this.ensureCanCall(originator);
271
+ return this.underlying.proveCertificate(args, originator);
272
+ }
273
+ async relinquishCertificate(args, originator) {
274
+ this.ensureCanCall(originator);
275
+ return this.underlying.relinquishCertificate(args, originator);
276
+ }
277
+ async discoverByIdentityKey(args, originator) {
278
+ this.ensureCanCall(originator);
279
+ return this.underlying.discoverByIdentityKey(args, originator);
280
+ }
281
+ async discoverByAttributes(args, originator) {
282
+ this.ensureCanCall(originator);
283
+ return this.underlying.discoverByAttributes(args, originator);
284
+ }
285
+ async getHeight(_, originator) {
286
+ this.ensureCanCall(originator);
287
+ return this.underlying.getHeight({}, originator);
288
+ }
289
+ async getHeaderForHeight(args, originator) {
290
+ this.ensureCanCall(originator);
291
+ return this.underlying.getHeaderForHeight(args, originator);
292
+ }
293
+ async getNetwork(_, originator) {
294
+ this.ensureCanCall(originator);
295
+ return this.underlying.getNetwork({}, originator);
296
+ }
297
+ async getVersion(_, originator) {
298
+ this.ensureCanCall(originator);
299
+ return this.underlying.getVersion({}, originator);
300
+ }
301
+ /**
302
+ * A small helper that throws if the user is not authenticated or if the
303
+ * provided originator is the admin (which is not permitted externally).
304
+ */
305
+ ensureCanCall(originator) {
306
+ if (originator === this.adminOriginator) {
307
+ throw new Error('External applications cannot use the admin originator.');
308
+ }
309
+ if (!this.authenticated) {
310
+ throw new Error('User is not authenticated.');
311
+ }
312
+ }
313
+ }
314
+ exports.SimpleWalletManager = SimpleWalletManager;
315
+ //# sourceMappingURL=SimpleWalletManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleWalletManager.js","sourceRoot":"","sources":["../../../src/SimpleWalletManager.ts"],"names":[],"mappings":";;;AAAA,kCAwDiB;AAGjB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,mBAAmB;IAkC9B;;;;;;;;;OASG;IACH,YACE,eAAwD,EACxD,aAA6G,EAC7G,aAAwB;QAExB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAA;QAC1B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;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