@wallfree-dev/angular-core 0.0.59-beta.1

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 (623) hide show
  1. package/README.md +60 -0
  2. package/esm2022/lib/airgap-angular-core.module.mjs +63 -0
  3. package/esm2022/lib/base/base.component.mjs +38 -0
  4. package/esm2022/lib/base/base.facade.mjs +37 -0
  5. package/esm2022/lib/capacitor-plugins/definitions.mjs +15 -0
  6. package/esm2022/lib/capacitor-plugins/injection-tokens.mjs +11 -0
  7. package/esm2022/lib/capacitor-plugins/isolated-modules/isolated-modules.plugin-wrapper.mjs +67 -0
  8. package/esm2022/lib/capacitor-plugins/isolated-modules/isolated-modules.plugin.mjs +247 -0
  9. package/esm2022/lib/components/account-item/account-item.component.mjs +30 -0
  10. package/esm2022/lib/components/account-selection/account-selection.component.mjs +61 -0
  11. package/esm2022/lib/components/components.module.mjs +97 -0
  12. package/esm2022/lib/components/currency-symbol/currency-symbol.component.mjs +45 -0
  13. package/esm2022/lib/components/currency-symbol/currency-symbol.facade.mjs +8 -0
  14. package/esm2022/lib/components/currency-symbol/currency-symbol.types.mjs +2 -0
  15. package/esm2022/lib/components/from-to/from-to.component.mjs +100 -0
  16. package/esm2022/lib/components/iac-qr/iac-qr.component.mjs +192 -0
  17. package/esm2022/lib/components/identicon/identicon.component.mjs +51 -0
  18. package/esm2022/lib/components/isolated-modules-badges/isolated-modules-badges.component.mjs +16 -0
  19. package/esm2022/lib/components/isolated-modules-details/isolated-modules-details.component.mjs +43 -0
  20. package/esm2022/lib/components/isolated-modules-details/isolated-modules-details.facade.mjs +7 -0
  21. package/esm2022/lib/components/isolated-modules-list/isolated-modules-list.component.mjs +50 -0
  22. package/esm2022/lib/components/isolated-modules-list/isolated-modules-list.facade.mjs +7 -0
  23. package/esm2022/lib/components/isolated-modules-onboarding/isolated-modules-onboarding.component.mjs +12 -0
  24. package/esm2022/lib/components/network-badge/network-badge.component.mjs +19 -0
  25. package/esm2022/lib/components/qr/qr.component.mjs +36 -0
  26. package/esm2022/lib/components/qr-settings/qr-settings.component.mjs +30 -0
  27. package/esm2022/lib/components/titled-address/titled-address.component.mjs +31 -0
  28. package/esm2022/lib/components/titled-text/titled-text.component.mjs +28 -0
  29. package/esm2022/lib/config/app-config.mjs +3 -0
  30. package/esm2022/lib/pages/isolated-modules-list/isolated-modules-list.facade.mjs +7 -0
  31. package/esm2022/lib/pipes/amount-converter/amount-converter.pipe.mjs +82 -0
  32. package/esm2022/lib/pipes/fee-converter/fee-converter.pipe.mjs +36 -0
  33. package/esm2022/lib/pipes/pipes.module.mjs +19 -0
  34. package/esm2022/lib/pipes/wallet-filter/wallet-filter.pipe.mjs +36 -0
  35. package/esm2022/lib/protocol/adapter/protocol-v0-adapter.mjs +880 -0
  36. package/esm2022/lib/protocol/isolated/base-isolated.mjs +27 -0
  37. package/esm2022/lib/protocol/isolated/block-explorer-isolated.mjs +32 -0
  38. package/esm2022/lib/protocol/isolated/protocol-offline-isolated.mjs +37 -0
  39. package/esm2022/lib/protocol/isolated/protocol-online-isolated.mjs +52 -0
  40. package/esm2022/lib/protocol/isolated/v3-serializer-companion-isolated.mjs +35 -0
  41. package/esm2022/lib/services/address/address.service.mjs +78 -0
  42. package/esm2022/lib/services/clipboard/clipboard.service.mjs +48 -0
  43. package/esm2022/lib/services/deeplink/deeplink.service.mjs +73 -0
  44. package/esm2022/lib/services/environment/base-environment.service.mjs +6 -0
  45. package/esm2022/lib/services/filesystem/filesystem.service.mjs +291 -0
  46. package/esm2022/lib/services/iac/base.iac.service.mjs +155 -0
  47. package/esm2022/lib/services/iac/message-handler-single.mjs +48 -0
  48. package/esm2022/lib/services/iac/message-handler.mjs +22 -0
  49. package/esm2022/lib/services/iac/qr-generator.mjs +17 -0
  50. package/esm2022/lib/services/image/fetcher/image-direct.fetcher.mjs +16 -0
  51. package/esm2022/lib/services/image/fetcher/image-proxy.fetcher.mjs +45 -0
  52. package/esm2022/lib/services/image/image.service.mjs +39 -0
  53. package/esm2022/lib/services/key-pair/key-pair.service.mjs +57 -0
  54. package/esm2022/lib/services/language/language.service.mjs +47 -0
  55. package/esm2022/lib/services/modules/base-modules.service.mjs +157 -0
  56. package/esm2022/lib/services/modules/controller/base-modules.controller.mjs +2 -0
  57. package/esm2022/lib/services/modules/controller/integral/integral-modules.controller.mjs +91 -0
  58. package/esm2022/lib/services/modules/controller/isolated/isolated-modules.controller.mjs +190 -0
  59. package/esm2022/lib/services/modules/controller/modules.controller.mjs +85 -0
  60. package/esm2022/lib/services/permissions/permissions.service.mjs +140 -0
  61. package/esm2022/lib/services/protocol/defaults.mjs +55 -0
  62. package/esm2022/lib/services/protocol/protocol.service.mjs +230 -0
  63. package/esm2022/lib/services/protocol/store/base-protocol-store.service.mjs +63 -0
  64. package/esm2022/lib/services/protocol/store/main/main-protocol-store.service.mjs +91 -0
  65. package/esm2022/lib/services/protocol/store/sub/sub-protocol-store.service.mjs +174 -0
  66. package/esm2022/lib/services/qr/qr-generators/bc-ur-generator.mjs +127 -0
  67. package/esm2022/lib/services/qr/qr-generators/metamask-generator.mjs +117 -0
  68. package/esm2022/lib/services/qr/qr-generators/output-descriptor-generator.mjs +49 -0
  69. package/esm2022/lib/services/qr/qr-generators/serializer-v2-generator.mjs +30 -0
  70. package/esm2022/lib/services/qr/qr-generators/serializer-v3-generator.mjs +45 -0
  71. package/esm2022/lib/services/qr/qr-generators/xpub-generator.mjs +38 -0
  72. package/esm2022/lib/services/qr/qr-handler/serializer-v2-handler.mjs +114 -0
  73. package/esm2022/lib/services/qr/qr-handler/serializer-v3-handler.mjs +274 -0
  74. package/esm2022/lib/services/qr-scanner/qr-scanner.service.mjs +61 -0
  75. package/esm2022/lib/services/serializer/serializer.service.mjs +181 -0
  76. package/esm2022/lib/services/storage/base.storage.mjs +30 -0
  77. package/esm2022/lib/services/storage/storage.service.mjs +33 -0
  78. package/esm2022/lib/services/token/token.service.mjs +52 -0
  79. package/esm2022/lib/services/transaction/transaction.service.mjs +67 -0
  80. package/esm2022/lib/services/ui-event/ui-event.service.mjs +198 -0
  81. package/esm2022/lib/services/ui-event-elements/ui-event-elements.service.mjs +122 -0
  82. package/esm2022/lib/services/uri/uri.service.mjs +51 -0
  83. package/esm2022/lib/translation/AirGapTranslateLoader.mjs +26 -0
  84. package/esm2022/lib/types/Either.mjs +2 -0
  85. package/esm2022/lib/types/ExternalAliasResolver.mjs +2 -0
  86. package/esm2022/lib/types/RuntimeMode.mjs +6 -0
  87. package/esm2022/lib/types/SupportedLanguage.mjs +2 -0
  88. package/esm2022/lib/types/Token.mjs +2 -0
  89. package/esm2022/lib/types/isolated-modules/IsolatedModule.mjs +2 -0
  90. package/esm2022/lib/types/isolated-modules/IsolatedModuleManifest.mjs +2 -0
  91. package/esm2022/lib/types/isolated-modules/IsolatedModuleMetadata.mjs +2 -0
  92. package/esm2022/lib/types/ui/UIAction.mjs +6 -0
  93. package/esm2022/lib/types/ui/UIResource.mjs +8 -0
  94. package/esm2022/lib/utils/ExposedPromise.mjs +103 -0
  95. package/esm2022/lib/utils/airgap-transaction.mjs +23 -0
  96. package/esm2022/lib/utils/array.mjs +32 -0
  97. package/esm2022/lib/utils/modules/isolated/isolated-modules-metadata.mjs +10 -0
  98. package/esm2022/lib/utils/modules/load-protocol.mjs +19 -0
  99. package/esm2022/lib/utils/not-initialized.mjs +7 -0
  100. package/esm2022/lib/utils/protocol/delegation.mjs +33 -0
  101. package/esm2022/lib/utils/protocol/protocol-identifier.mjs +4 -0
  102. package/esm2022/lib/utils/protocol/protocol-network-identifier.mjs +18 -0
  103. package/esm2022/lib/utils/protocol/protocol-options.mjs +114 -0
  104. package/esm2022/lib/utils/protocol/protocol-v0-adapter.mjs +390 -0
  105. package/esm2022/lib/utils/utils.mjs +80 -0
  106. package/esm2022/lib/utils/worker.mjs +28 -0
  107. package/esm2022/public-api.mjs +102 -0
  108. package/esm2022/wallfree-dev-angular-core.mjs +5 -0
  109. package/fesm2022/wallfree-dev-angular-core.mjs +6933 -0
  110. package/fesm2022/wallfree-dev-angular-core.mjs.map +1 -0
  111. package/index.d.ts +6 -0
  112. package/lib/airgap-angular-core.module.d.ts +25 -0
  113. package/lib/airgap-angular-core.module.d.ts.map +1 -0
  114. package/lib/base/base.component.d.ts +18 -0
  115. package/lib/base/base.component.d.ts.map +1 -0
  116. package/lib/base/base.facade.d.ts +16 -0
  117. package/lib/base/base.facade.d.ts.map +1 -0
  118. package/lib/capacitor-plugins/definitions.d.ts +122 -0
  119. package/lib/capacitor-plugins/definitions.d.ts.map +1 -0
  120. package/lib/capacitor-plugins/injection-tokens.d.ts +18 -0
  121. package/lib/capacitor-plugins/injection-tokens.d.ts.map +1 -0
  122. package/lib/capacitor-plugins/isolated-modules/isolated-modules.plugin-wrapper.d.ts +20 -0
  123. package/lib/capacitor-plugins/isolated-modules/isolated-modules.plugin-wrapper.d.ts.map +1 -0
  124. package/lib/capacitor-plugins/isolated-modules/isolated-modules.plugin.d.ts +38 -0
  125. package/lib/capacitor-plugins/isolated-modules/isolated-modules.plugin.d.ts.map +1 -0
  126. package/lib/components/account-item/account-item.component.d.ts +15 -0
  127. package/lib/components/account-item/account-item.component.d.ts.map +1 -0
  128. package/lib/components/account-selection/account-selection.component.d.ts +23 -0
  129. package/lib/components/account-selection/account-selection.component.d.ts.map +1 -0
  130. package/lib/components/components.module.d.ts +28 -0
  131. package/lib/components/components.module.d.ts.map +1 -0
  132. package/lib/components/currency-symbol/currency-symbol.component.d.ts +20 -0
  133. package/lib/components/currency-symbol/currency-symbol.component.d.ts.map +1 -0
  134. package/lib/components/currency-symbol/currency-symbol.facade.d.ts +16 -0
  135. package/lib/components/currency-symbol/currency-symbol.facade.d.ts.map +1 -0
  136. package/lib/components/currency-symbol/currency-symbol.types.d.ts +35 -0
  137. package/lib/components/currency-symbol/currency-symbol.types.d.ts.map +1 -0
  138. package/lib/components/from-to/from-to.component.d.ts +33 -0
  139. package/lib/components/from-to/from-to.component.d.ts.map +1 -0
  140. package/lib/components/iac-qr/iac-qr.component.d.ts +45 -0
  141. package/lib/components/iac-qr/iac-qr.component.d.ts.map +1 -0
  142. package/lib/components/identicon/identicon.component.d.ts +14 -0
  143. package/lib/components/identicon/identicon.component.d.ts.map +1 -0
  144. package/lib/components/isolated-modules-badges/isolated-modules-badges.component.d.ts +8 -0
  145. package/lib/components/isolated-modules-badges/isolated-modules-badges.component.d.ts.map +1 -0
  146. package/lib/components/isolated-modules-details/isolated-modules-details.component.d.ts +17 -0
  147. package/lib/components/isolated-modules-details/isolated-modules-details.component.d.ts.map +1 -0
  148. package/lib/components/isolated-modules-details/isolated-modules-details.facade.d.ts +17 -0
  149. package/lib/components/isolated-modules-details/isolated-modules-details.facade.d.ts.map +1 -0
  150. package/lib/components/isolated-modules-list/isolated-modules-list.component.d.ts +20 -0
  151. package/lib/components/isolated-modules-list/isolated-modules-list.component.d.ts.map +1 -0
  152. package/lib/components/isolated-modules-list/isolated-modules-list.facade.d.ts +15 -0
  153. package/lib/components/isolated-modules-list/isolated-modules-list.facade.d.ts.map +1 -0
  154. package/lib/components/isolated-modules-onboarding/isolated-modules-onboarding.component.d.ts +6 -0
  155. package/lib/components/isolated-modules-onboarding/isolated-modules-onboarding.component.d.ts.map +1 -0
  156. package/lib/components/network-badge/network-badge.component.d.ts +9 -0
  157. package/lib/components/network-badge/network-badge.component.d.ts.map +1 -0
  158. package/lib/components/qr/qr.component.d.ts +16 -0
  159. package/lib/components/qr/qr.component.d.ts.map +1 -0
  160. package/lib/components/qr-settings/qr-settings.component.d.ts +12 -0
  161. package/lib/components/qr-settings/qr-settings.component.d.ts.map +1 -0
  162. package/lib/components/titled-address/titled-address.component.d.ts +13 -0
  163. package/lib/components/titled-address/titled-address.component.d.ts.map +1 -0
  164. package/lib/components/titled-text/titled-text.component.d.ts +11 -0
  165. package/lib/components/titled-text/titled-text.component.d.ts.map +1 -0
  166. package/lib/config/app-config.d.ts +15 -0
  167. package/lib/config/app-config.d.ts.map +1 -0
  168. package/lib/pages/isolated-modules-list/isolated-modules-list.facade.d.ts +16 -0
  169. package/lib/pages/isolated-modules-list/isolated-modules-list.facade.d.ts.map +1 -0
  170. package/lib/pipes/amount-converter/amount-converter.pipe.d.ts +29 -0
  171. package/lib/pipes/amount-converter/amount-converter.pipe.d.ts.map +1 -0
  172. package/lib/pipes/fee-converter/fee-converter.pipe.d.ts +20 -0
  173. package/lib/pipes/fee-converter/fee-converter.pipe.d.ts.map +1 -0
  174. package/lib/pipes/pipes.module.d.ts +10 -0
  175. package/lib/pipes/pipes.module.d.ts.map +1 -0
  176. package/lib/pipes/wallet-filter/wallet-filter.pipe.d.ts +15 -0
  177. package/lib/pipes/wallet-filter/wallet-filter.pipe.d.ts.map +1 -0
  178. package/lib/protocol/adapter/protocol-v0-adapter.d.ts +231 -0
  179. package/lib/protocol/adapter/protocol-v0-adapter.d.ts.map +1 -0
  180. package/lib/protocol/isolated/base-isolated.d.ts +11 -0
  181. package/lib/protocol/isolated/base-isolated.d.ts.map +1 -0
  182. package/lib/protocol/isolated/block-explorer-isolated.d.ts +14 -0
  183. package/lib/protocol/isolated/block-explorer-isolated.d.ts.map +1 -0
  184. package/lib/protocol/isolated/protocol-offline-isolated.d.ts +17 -0
  185. package/lib/protocol/isolated/protocol-offline-isolated.d.ts.map +1 -0
  186. package/lib/protocol/isolated/protocol-online-isolated.d.ts +21 -0
  187. package/lib/protocol/isolated/protocol-online-isolated.d.ts.map +1 -0
  188. package/lib/protocol/isolated/v3-serializer-companion-isolated.d.ts +17 -0
  189. package/lib/protocol/isolated/v3-serializer-companion-isolated.d.ts.map +1 -0
  190. package/lib/services/address/address.service.d.ts +26 -0
  191. package/lib/services/address/address.service.d.ts.map +1 -0
  192. package/lib/services/clipboard/clipboard.service.d.ts +14 -0
  193. package/lib/services/clipboard/clipboard.service.d.ts.map +1 -0
  194. package/lib/services/deeplink/deeplink.service.d.ts +18 -0
  195. package/lib/services/deeplink/deeplink.service.d.ts.map +1 -0
  196. package/lib/services/environment/base-environment.service.d.ts +6 -0
  197. package/lib/services/environment/base-environment.service.d.ts.map +1 -0
  198. package/lib/services/filesystem/filesystem.service.d.ts +42 -0
  199. package/lib/services/filesystem/filesystem.service.d.ts.map +1 -0
  200. package/lib/services/iac/base.iac.service.d.ts +41 -0
  201. package/lib/services/iac/base.iac.service.d.ts.map +1 -0
  202. package/lib/services/iac/message-handler-single.d.ts +20 -0
  203. package/lib/services/iac/message-handler-single.d.ts.map +1 -0
  204. package/lib/services/iac/message-handler.d.ts +34 -0
  205. package/lib/services/iac/message-handler.d.ts.map +1 -0
  206. package/lib/services/iac/qr-generator.d.ts +13 -0
  207. package/lib/services/iac/qr-generator.d.ts.map +1 -0
  208. package/lib/services/image/fetcher/image-direct.fetcher.d.ts +9 -0
  209. package/lib/services/image/fetcher/image-direct.fetcher.d.ts.map +1 -0
  210. package/lib/services/image/fetcher/image-proxy.fetcher.d.ts +9 -0
  211. package/lib/services/image/fetcher/image-proxy.fetcher.d.ts.map +1 -0
  212. package/lib/services/image/image.service.d.ts +20 -0
  213. package/lib/services/image/image.service.d.ts.map +1 -0
  214. package/lib/services/key-pair/key-pair.service.d.ts +14 -0
  215. package/lib/services/key-pair/key-pair.service.d.ts.map +1 -0
  216. package/lib/services/language/language.service.d.ts +21 -0
  217. package/lib/services/language/language.service.d.ts.map +1 -0
  218. package/lib/services/modules/base-modules.service.d.ts +34 -0
  219. package/lib/services/modules/base-modules.service.d.ts.map +1 -0
  220. package/lib/services/modules/controller/base-modules.controller.d.ts +19 -0
  221. package/lib/services/modules/controller/base-modules.controller.d.ts.map +1 -0
  222. package/lib/services/modules/controller/integral/integral-modules.controller.d.ts +22 -0
  223. package/lib/services/modules/controller/integral/integral-modules.controller.d.ts.map +1 -0
  224. package/lib/services/modules/controller/isolated/isolated-modules.controller.d.ts +32 -0
  225. package/lib/services/modules/controller/isolated/isolated-modules.controller.d.ts.map +1 -0
  226. package/lib/services/modules/controller/modules.controller.d.ts +27 -0
  227. package/lib/services/modules/controller/modules.controller.d.ts.map +1 -0
  228. package/lib/services/permissions/permissions.service.d.ts +39 -0
  229. package/lib/services/permissions/permissions.service.d.ts.map +1 -0
  230. package/lib/services/protocol/defaults.d.ts +6 -0
  231. package/lib/services/protocol/defaults.d.ts.map +1 -0
  232. package/lib/services/protocol/protocol.service.d.ts +47 -0
  233. package/lib/services/protocol/protocol.service.d.ts.map +1 -0
  234. package/lib/services/protocol/store/base-protocol-store.service.d.ts +36 -0
  235. package/lib/services/protocol/store/base-protocol-store.service.d.ts.map +1 -0
  236. package/lib/services/protocol/store/main/main-protocol-store.service.d.ts +21 -0
  237. package/lib/services/protocol/store/main/main-protocol-store.service.d.ts.map +1 -0
  238. package/lib/services/protocol/store/sub/sub-protocol-store.service.d.ts +31 -0
  239. package/lib/services/protocol/store/sub/sub-protocol-store.service.d.ts.map +1 -0
  240. package/lib/services/qr/qr-generators/bc-ur-generator.d.ts +16 -0
  241. package/lib/services/qr/qr-generators/bc-ur-generator.d.ts.map +1 -0
  242. package/lib/services/qr/qr-generators/metamask-generator.d.ts +16 -0
  243. package/lib/services/qr/qr-generators/metamask-generator.d.ts.map +1 -0
  244. package/lib/services/qr/qr-generators/output-descriptor-generator.d.ts +13 -0
  245. package/lib/services/qr/qr-generators/output-descriptor-generator.d.ts.map +1 -0
  246. package/lib/services/qr/qr-generators/serializer-v2-generator.d.ts +13 -0
  247. package/lib/services/qr/qr-generators/serializer-v2-generator.d.ts.map +1 -0
  248. package/lib/services/qr/qr-generators/serializer-v3-generator.d.ts +12 -0
  249. package/lib/services/qr/qr-generators/serializer-v3-generator.d.ts.map +1 -0
  250. package/lib/services/qr/qr-generators/xpub-generator.d.ts +12 -0
  251. package/lib/services/qr/qr-generators/xpub-generator.d.ts.map +1 -0
  252. package/lib/services/qr/qr-handler/serializer-v2-handler.d.ts +20 -0
  253. package/lib/services/qr/qr-handler/serializer-v2-handler.d.ts.map +1 -0
  254. package/lib/services/qr/qr-handler/serializer-v3-handler.d.ts +23 -0
  255. package/lib/services/qr/qr-handler/serializer-v3-handler.d.ts.map +1 -0
  256. package/lib/services/qr-scanner/qr-scanner.service.d.ts +23 -0
  257. package/lib/services/qr-scanner/qr-scanner.service.d.ts.map +1 -0
  258. package/lib/services/serializer/serializer.service.d.ts +34 -0
  259. package/lib/services/serializer/serializer.service.d.ts.map +1 -0
  260. package/lib/services/storage/base.storage.d.ts +15 -0
  261. package/lib/services/storage/base.storage.d.ts.map +1 -0
  262. package/lib/services/storage/storage.service.d.ts +28 -0
  263. package/lib/services/storage/storage.service.d.ts.map +1 -0
  264. package/lib/services/token/token.service.d.ts +11 -0
  265. package/lib/services/token/token.service.d.ts.map +1 -0
  266. package/lib/services/transaction/transaction.service.d.ts +21 -0
  267. package/lib/services/transaction/transaction.service.d.ts.map +1 -0
  268. package/lib/services/ui-event/ui-event.service.d.ts +58 -0
  269. package/lib/services/ui-event/ui-event.service.d.ts.map +1 -0
  270. package/lib/services/ui-event-elements/ui-event-elements.service.d.ts +16 -0
  271. package/lib/services/ui-event-elements/ui-event-elements.service.d.ts.map +1 -0
  272. package/lib/services/uri/uri.service.d.ts +15 -0
  273. package/lib/services/uri/uri.service.d.ts.map +1 -0
  274. package/lib/translation/AirGapTranslateLoader.d.ts +15 -0
  275. package/lib/translation/AirGapTranslateLoader.d.ts.map +1 -0
  276. package/lib/types/Either.d.ts +2 -0
  277. package/lib/types/Either.d.ts.map +1 -0
  278. package/lib/types/ExternalAliasResolver.d.ts +6 -0
  279. package/lib/types/ExternalAliasResolver.d.ts.map +1 -0
  280. package/lib/types/RuntimeMode.d.ts +5 -0
  281. package/lib/types/RuntimeMode.d.ts.map +1 -0
  282. package/lib/types/SupportedLanguage.d.ts +2 -0
  283. package/lib/types/SupportedLanguage.d.ts.map +1 -0
  284. package/lib/types/Token.d.ts +9 -0
  285. package/lib/types/Token.d.ts.map +1 -0
  286. package/lib/types/isolated-modules/IsolatedModule.d.ts +28 -0
  287. package/lib/types/isolated-modules/IsolatedModule.d.ts.map +1 -0
  288. package/lib/types/isolated-modules/IsolatedModuleManifest.d.ts +24 -0
  289. package/lib/types/isolated-modules/IsolatedModuleManifest.d.ts.map +1 -0
  290. package/lib/types/isolated-modules/IsolatedModuleMetadata.d.ts +21 -0
  291. package/lib/types/isolated-modules/IsolatedModuleMetadata.d.ts.map +1 -0
  292. package/lib/types/ui/UIAction.d.ts +10 -0
  293. package/lib/types/ui/UIAction.d.ts.map +1 -0
  294. package/lib/types/ui/UIResource.d.ts +11 -0
  295. package/lib/types/ui/UIResource.d.ts.map +1 -0
  296. package/lib/utils/ExposedPromise.d.ts +40 -0
  297. package/lib/utils/ExposedPromise.d.ts.map +1 -0
  298. package/lib/utils/airgap-transaction.d.ts +4 -0
  299. package/lib/utils/airgap-transaction.d.ts.map +1 -0
  300. package/lib/utils/array.d.ts +6 -0
  301. package/lib/utils/array.d.ts.map +1 -0
  302. package/lib/utils/modules/isolated/isolated-modules-metadata.d.ts +3 -0
  303. package/lib/utils/modules/isolated/isolated-modules-metadata.d.ts.map +1 -0
  304. package/lib/utils/modules/load-protocol.d.ts +4 -0
  305. package/lib/utils/modules/load-protocol.d.ts.map +1 -0
  306. package/lib/utils/not-initialized.d.ts +2 -0
  307. package/lib/utils/not-initialized.d.ts.map +1 -0
  308. package/lib/utils/protocol/delegation.d.ts +6 -0
  309. package/lib/utils/protocol/delegation.d.ts.map +1 -0
  310. package/lib/utils/protocol/protocol-identifier.d.ts +3 -0
  311. package/lib/utils/protocol/protocol-identifier.d.ts.map +1 -0
  312. package/lib/utils/protocol/protocol-network-identifier.d.ts +8 -0
  313. package/lib/utils/protocol/protocol-network-identifier.d.ts.map +1 -0
  314. package/lib/utils/protocol/protocol-options.d.ts +6 -0
  315. package/lib/utils/protocol/protocol-options.d.ts.map +1 -0
  316. package/lib/utils/protocol/protocol-v0-adapter.d.ts +75 -0
  317. package/lib/utils/protocol/protocol-v0-adapter.d.ts.map +1 -0
  318. package/lib/utils/utils.d.ts +9 -0
  319. package/lib/utils/utils.d.ts.map +1 -0
  320. package/lib/utils/worker.d.ts +11 -0
  321. package/lib/utils/worker.d.ts.map +1 -0
  322. package/package.json +88 -0
  323. package/public-api.d.ts +87 -0
  324. package/public-api.d.ts.map +1 -0
  325. package/src/assets/i18n-common/de.json +112 -0
  326. package/src/assets/i18n-common/en.json +112 -0
  327. package/src/assets/i18n-common/es.json +112 -0
  328. package/src/assets/i18n-common/fr.json +112 -0
  329. package/src/assets/i18n-common/pt_BR.json +112 -0
  330. package/src/assets/i18n-common/ru.json +112 -0
  331. package/src/assets/i18n-common/zh_CN.json +112 -0
  332. package/src/assets/img/identicon_placeholder.png +0 -0
  333. package/src/assets/native/isolated_modules/isolated-modules.js-engine-android.js +34 -0
  334. package/src/assets/native/isolated_modules/isolated-modules.script.js +304 -0
  335. package/src/assets/symbols/abt.svg +1 -0
  336. package/src/assets/symbols/adx.svg +1 -0
  337. package/src/assets/symbols/ae.svg +17 -0
  338. package/src/assets/symbols/agi.svg +1 -0
  339. package/src/assets/symbols/aion.svg +1 -0
  340. package/src/assets/symbols/amb.svg +1 -0
  341. package/src/assets/symbols/ampl.svg +7 -0
  342. package/src/assets/symbols/ant.svg +1 -0
  343. package/src/assets/symbols/aoa.svg +7 -0
  344. package/src/assets/symbols/appc.svg +1 -0
  345. package/src/assets/symbols/aqua.svg +5 -0
  346. package/src/assets/symbols/arn.svg +1 -0
  347. package/src/assets/symbols/ary.svg +1 -0
  348. package/src/assets/symbols/ast.svg +1 -0
  349. package/src/assets/symbols/astr.png +0 -0
  350. package/src/assets/symbols/atm.svg +1 -0
  351. package/src/assets/symbols/atom.svg +1 -0
  352. package/src/assets/symbols/auto.svg +1 -0
  353. package/src/assets/symbols/bal.svg +7 -0
  354. package/src/assets/symbols/band.svg +7 -0
  355. package/src/assets/symbols/bat.svg +1 -0
  356. package/src/assets/symbols/bcbc.svg +1 -0
  357. package/src/assets/symbols/bcpt.svg +1 -0
  358. package/src/assets/symbols/bix.svg +1 -0
  359. package/src/assets/symbols/blz.svg +1 -0
  360. package/src/assets/symbols/bnb.svg +1 -0
  361. package/src/assets/symbols/bnt.svg +1 -0
  362. package/src/assets/symbols/bnty.svg +1 -0
  363. package/src/assets/symbols/bpt.svg +1 -0
  364. package/src/assets/symbols/brc.svg +7 -0
  365. package/src/assets/symbols/brd.svg +1 -0
  366. package/src/assets/symbols/btc.svg +1 -0
  367. package/src/assets/symbols/btctz.png +0 -0
  368. package/src/assets/symbols/btm.svg +1 -0
  369. package/src/assets/symbols/busd.svg +7 -0
  370. package/src/assets/symbols/bytom.svg +7 -0
  371. package/src/assets/symbols/cacu.svg +1 -0
  372. package/src/assets/symbols/cdt.svg +1 -0
  373. package/src/assets/symbols/cel.svg +7 -0
  374. package/src/assets/symbols/cennz.svg +7 -0
  375. package/src/assets/symbols/cfx.svg +1 -0
  376. package/src/assets/symbols/chsb.svg +7 -0
  377. package/src/assets/symbols/chz.svg +7 -0
  378. package/src/assets/symbols/ckbtc.png +0 -0
  379. package/src/assets/symbols/cmt.svg +1 -0
  380. package/src/assets/symbols/cnd.svg +1 -0
  381. package/src/assets/symbols/cob.svg +1 -0
  382. package/src/assets/symbols/comp.svg +7 -0
  383. package/src/assets/symbols/coreum.png +0 -0
  384. package/src/assets/symbols/cred.svg +1 -0
  385. package/src/assets/symbols/cro.svg +7 -0
  386. package/src/assets/symbols/crpt.svg +1 -0
  387. package/src/assets/symbols/crv.svg +7 -0
  388. package/src/assets/symbols/cs.svg +1 -0
  389. package/src/assets/symbols/ctez.svg +1 -0
  390. package/src/assets/symbols/ctr.svg +1 -0
  391. package/src/assets/symbols/ctxc.svg +1 -0
  392. package/src/assets/symbols/cusdc.svg +7 -0
  393. package/src/assets/symbols/cvc.svg +1 -0
  394. package/src/assets/symbols/cvt.svg +7 -0
  395. package/src/assets/symbols/czrx.svg +7 -0
  396. package/src/assets/symbols/dai.svg +7 -0
  397. package/src/assets/symbols/dat.svg +1 -0
  398. package/src/assets/symbols/data.svg +1 -0
  399. package/src/assets/symbols/dcn.svg +1 -0
  400. package/src/assets/symbols/deez.svg +1 -0
  401. package/src/assets/symbols/dent.svg +1 -0
  402. package/src/assets/symbols/dew.svg +1 -0
  403. package/src/assets/symbols/dgd.svg +1 -0
  404. package/src/assets/symbols/dia.svg +7 -0
  405. package/src/assets/symbols/divx.svg +7 -0
  406. package/src/assets/symbols/dlt.svg +1 -0
  407. package/src/assets/symbols/dnt.svg +1 -0
  408. package/src/assets/symbols/dock.svg +1 -0
  409. package/src/assets/symbols/doga.png +0 -0
  410. package/src/assets/symbols/dot.svg +14 -0
  411. package/src/assets/symbols/drgn.svg +1 -0
  412. package/src/assets/symbols/drop.svg +1 -0
  413. package/src/assets/symbols/dth.svg +1 -0
  414. package/src/assets/symbols/dtr.svg +1 -0
  415. package/src/assets/symbols/dx.svg +7 -0
  416. package/src/assets/symbols/edg.svg +1 -0
  417. package/src/assets/symbols/edo.svg +1 -0
  418. package/src/assets/symbols/elf.svg +1 -0
  419. package/src/assets/symbols/elix.svg +1 -0
  420. package/src/assets/symbols/eng.svg +1 -0
  421. package/src/assets/symbols/enj.svg +1 -0
  422. package/src/assets/symbols/entrp.svg +1 -0
  423. package/src/assets/symbols/eos.svg +1 -0
  424. package/src/assets/symbols/eth.svg +1 -0
  425. package/src/assets/symbols/ethtz.png +0 -0
  426. package/src/assets/symbols/eurc.svg +8 -0
  427. package/src/assets/symbols/evx.svg +1 -0
  428. package/src/assets/symbols/fet.svg +7 -0
  429. package/src/assets/symbols/frax.svg +26 -0
  430. package/src/assets/symbols/fsn.svg +1 -0
  431. package/src/assets/symbols/ftc.svg +1 -0
  432. package/src/assets/symbols/ftm.svg +7 -0
  433. package/src/assets/symbols/fuel.svg +1 -0
  434. package/src/assets/symbols/fun.svg +1 -0
  435. package/src/assets/symbols/gbx.svg +1 -0
  436. package/src/assets/symbols/generic-coin.svg +1 -0
  437. package/src/assets/symbols/glmr.svg +1 -0
  438. package/src/assets/symbols/gno.svg +1 -0
  439. package/src/assets/symbols/gnt.svg +1 -0
  440. package/src/assets/symbols/grs.svg +1 -0
  441. package/src/assets/symbols/gsc.svg +1 -0
  442. package/src/assets/symbols/gto.svg +1 -0
  443. package/src/assets/symbols/gup.svg +1 -0
  444. package/src/assets/symbols/gusd.svg +1 -0
  445. package/src/assets/symbols/gvt.svg +1 -0
  446. package/src/assets/symbols/gzr.svg +1 -0
  447. package/src/assets/symbols/hedg.svg +7 -0
  448. package/src/assets/symbols/hodl.svg +1 -0
  449. package/src/assets/symbols/hot.svg +7 -0
  450. package/src/assets/symbols/hpb.svg +1 -0
  451. package/src/assets/symbols/ht.svg +1 -0
  452. package/src/assets/symbols/husd.svg +7 -0
  453. package/src/assets/symbols/icn.svg +1 -0
  454. package/src/assets/symbols/icp.svg +16 -0
  455. package/src/assets/symbols/icx.svg +1 -0
  456. package/src/assets/symbols/inb.svg +7 -0
  457. package/src/assets/symbols/ino.svg +7 -0
  458. package/src/assets/symbols/ins.svg +1 -0
  459. package/src/assets/symbols/iost.svg +1 -0
  460. package/src/assets/symbols/iotx.svg +1 -0
  461. package/src/assets/symbols/itc.svg +1 -0
  462. package/src/assets/symbols/jnt.svg +1 -0
  463. package/src/assets/symbols/kcs.svg +7 -0
  464. package/src/assets/symbols/kin.svg +1 -0
  465. package/src/assets/symbols/knc.svg +1 -0
  466. package/src/assets/symbols/ksm.svg +1 -0
  467. package/src/assets/symbols/kusd.svg +1 -0
  468. package/src/assets/symbols/ldo.svg +97 -0
  469. package/src/assets/symbols/lend.svg +1 -0
  470. package/src/assets/symbols/leo.svg +7 -0
  471. package/src/assets/symbols/link.svg +7 -0
  472. package/src/assets/symbols/loom.svg +1 -0
  473. package/src/assets/symbols/lpt.svg +1 -0
  474. package/src/assets/symbols/lrc.svg +1 -0
  475. package/src/assets/symbols/lun.svg +1 -0
  476. package/src/assets/symbols/mana.svg +1 -0
  477. package/src/assets/symbols/matic.svg +7 -0
  478. package/src/assets/symbols/mcap.svg +1 -0
  479. package/src/assets/symbols/mco.svg +1 -0
  480. package/src/assets/symbols/mda.svg +1 -0
  481. package/src/assets/symbols/mds.svg +1 -0
  482. package/src/assets/symbols/mkr.svg +1 -0
  483. package/src/assets/symbols/mln.svg +7 -0
  484. package/src/assets/symbols/mnw.svg +1 -0
  485. package/src/assets/symbols/mod.svg +1 -0
  486. package/src/assets/symbols/movr.svg +10 -0
  487. package/src/assets/symbols/mth.svg +1 -0
  488. package/src/assets/symbols/mtl.svg +1 -0
  489. package/src/assets/symbols/mxc.svg +7 -0
  490. package/src/assets/symbols/nas.svg +1 -0
  491. package/src/assets/symbols/ncash.svg +1 -0
  492. package/src/assets/symbols/neu.svg +1 -0
  493. package/src/assets/symbols/nexo.svg +1 -0
  494. package/src/assets/symbols/ngc.svg +1 -0
  495. package/src/assets/symbols/nio.svg +1 -0
  496. package/src/assets/symbols/nmr.svg +7 -0
  497. package/src/assets/symbols/noah.svg +7 -0
  498. package/src/assets/symbols/npxs.svg +1 -0
  499. package/src/assets/symbols/nuls.svg +1 -0
  500. package/src/assets/symbols/nxm.svg +7 -0
  501. package/src/assets/symbols/oax.svg +1 -0
  502. package/src/assets/symbols/ocean.svg +7 -0
  503. package/src/assets/symbols/okb.svg +7 -0
  504. package/src/assets/symbols/omg.svg +1 -0
  505. package/src/assets/symbols/ong.svg +1 -0
  506. package/src/assets/symbols/op.svg +21 -0
  507. package/src/assets/symbols/ost.svg +1 -0
  508. package/src/assets/symbols/pax.svg +1 -0
  509. package/src/assets/symbols/paxg.svg +7 -0
  510. package/src/assets/symbols/pay.svg +1 -0
  511. package/src/assets/symbols/plenty.svg +1 -0
  512. package/src/assets/symbols/plr.svg +1 -0
  513. package/src/assets/symbols/pnk.svg +7 -0
  514. package/src/assets/symbols/poe.svg +1 -0
  515. package/src/assets/symbols/poly.svg +1 -0
  516. package/src/assets/symbols/powr.svg +1 -0
  517. package/src/assets/symbols/ppp.svg +1 -0
  518. package/src/assets/symbols/ppt.svg +1 -0
  519. package/src/assets/symbols/prl.svg +1 -0
  520. package/src/assets/symbols/qash.svg +1 -0
  521. package/src/assets/symbols/qnt.svg +7 -0
  522. package/src/assets/symbols/qrl.svg +1 -0
  523. package/src/assets/symbols/qsp.svg +1 -0
  524. package/src/assets/symbols/qtum.svg +1 -0
  525. package/src/assets/symbols/quipu.png +0 -0
  526. package/src/assets/symbols/r.svg +1 -0
  527. package/src/assets/symbols/rcn.svg +1 -0
  528. package/src/assets/symbols/rdn.svg +1 -0
  529. package/src/assets/symbols/ren.svg +7 -0
  530. package/src/assets/symbols/rep.svg +1 -0
  531. package/src/assets/symbols/repv2.svg +7 -0
  532. package/src/assets/symbols/req.svg +1 -0
  533. package/src/assets/symbols/rev.svg +7 -0
  534. package/src/assets/symbols/rhoc.svg +1 -0
  535. package/src/assets/symbols/rlc.svg +1 -0
  536. package/src/assets/symbols/rsr.svg +7 -0
  537. package/src/assets/symbols/sai.svg +7 -0
  538. package/src/assets/symbols/salt.svg +1 -0
  539. package/src/assets/symbols/san.svg +1 -0
  540. package/src/assets/symbols/sdn.svg +1 -0
  541. package/src/assets/symbols/shx.svg +32 -0
  542. package/src/assets/symbols/sirs.svg +1 -0
  543. package/src/assets/symbols/smart.svg +1 -0
  544. package/src/assets/symbols/sngls.svg +1 -0
  545. package/src/assets/symbols/snm.svg +1 -0
  546. package/src/assets/symbols/snt.svg +1 -0
  547. package/src/assets/symbols/snx.svg +7 -0
  548. package/src/assets/symbols/soc.svg +1 -0
  549. package/src/assets/symbols/sol.svg +1 -0
  550. package/src/assets/symbols/spank.svg +1 -0
  551. package/src/assets/symbols/sphtx.svg +1 -0
  552. package/src/assets/symbols/srm.svg +7 -0
  553. package/src/assets/symbols/srn.svg +1 -0
  554. package/src/assets/symbols/stake.svg +7 -0
  555. package/src/assets/symbols/stellar.png +0 -0
  556. package/src/assets/symbols/storj.svg +1 -0
  557. package/src/assets/symbols/storm.svg +1 -0
  558. package/src/assets/symbols/stq.svg +1 -0
  559. package/src/assets/symbols/stxtz.svg +18 -0
  560. package/src/assets/symbols/sub.svg +1 -0
  561. package/src/assets/symbols/sushi.svg +7 -0
  562. package/src/assets/symbols/sxp.svg +7 -0
  563. package/src/assets/symbols/sxtz.svg +6 -0
  564. package/src/assets/symbols/taas.svg +1 -0
  565. package/src/assets/symbols/tau.svg +1 -0
  566. package/src/assets/symbols/tbx.svg +1 -0
  567. package/src/assets/symbols/tel.svg +1 -0
  568. package/src/assets/symbols/ten.svg +1 -0
  569. package/src/assets/symbols/theta.svg +1 -0
  570. package/src/assets/symbols/tix.svg +1 -0
  571. package/src/assets/symbols/tkn.svg +1 -0
  572. package/src/assets/symbols/tnt.svg +1 -0
  573. package/src/assets/symbols/tomo.svg +1 -0
  574. package/src/assets/symbols/trac.svg +7 -0
  575. package/src/assets/symbols/trb.svg +7 -0
  576. package/src/assets/symbols/trx.svg +1 -0
  577. package/src/assets/symbols/tusd.svg +1 -0
  578. package/src/assets/symbols/tzbtc.svg +1 -0
  579. package/src/assets/symbols/ubt.svg +7 -0
  580. package/src/assets/symbols/ubtc.svg +1 -0
  581. package/src/assets/symbols/udefi.svg +1 -0
  582. package/src/assets/symbols/uma.svg +7 -0
  583. package/src/assets/symbols/usdc.svg +1 -0
  584. package/src/assets/symbols/usdt.png +0 -0
  585. package/src/assets/symbols/usdt.svg +1 -0
  586. package/src/assets/symbols/usdtz.svg +17 -0
  587. package/src/assets/symbols/ust.svg +1 -0
  588. package/src/assets/symbols/utk.svg +1 -0
  589. package/src/assets/symbols/uusd.svg +1 -0
  590. package/src/assets/symbols/uxtz.svg +1 -0
  591. package/src/assets/symbols/velo.svg +5 -0
  592. package/src/assets/symbols/ven.svg +7 -0
  593. package/src/assets/symbols/veri.svg +1 -0
  594. package/src/assets/symbols/verse.svg +1 -0
  595. package/src/assets/symbols/vest.svg +7 -0
  596. package/src/assets/symbols/vib.svg +1 -0
  597. package/src/assets/symbols/vibe.svg +1 -0
  598. package/src/assets/symbols/wabi.svg +1 -0
  599. package/src/assets/symbols/wax.svg +1 -0
  600. package/src/assets/symbols/wbtc.svg +7 -0
  601. package/src/assets/symbols/weth.svg +18 -0
  602. package/src/assets/symbols/wic.svg +7 -0
  603. package/src/assets/symbols/wings.svg +1 -0
  604. package/src/assets/symbols/wnxm.svg +7 -0
  605. package/src/assets/symbols/wpr.svg +1 -0
  606. package/src/assets/symbols/wrap.png +0 -0
  607. package/src/assets/symbols/wtc.svg +1 -0
  608. package/src/assets/symbols/wusdc.png +0 -0
  609. package/src/assets/symbols/xchf.svg +1 -0
  610. package/src/assets/symbols/xdce.svg +7 -0
  611. package/src/assets/symbols/xin.svg +7 -0
  612. package/src/assets/symbols/xpa.svg +1 -0
  613. package/src/assets/symbols/xpl.svg +1 -0
  614. package/src/assets/symbols/xtz.svg +5 -0
  615. package/src/assets/symbols/yfi.svg +7 -0
  616. package/src/assets/symbols/you.svg +1 -0
  617. package/src/assets/symbols/yoyow.svg +1 -0
  618. package/src/assets/symbols/ytez.svg +1 -0
  619. package/src/assets/symbols/zb.svg +7 -0
  620. package/src/assets/symbols/zil.svg +1 -0
  621. package/src/assets/symbols/zrx.svg +1 -0
  622. package/src/assets/workers/airgap-coin-lib.js +119 -0
  623. package/wallfree-dev-angular-core.d.ts.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallfree-dev-angular-core.mjs","sources":["../../src/lib/utils/ExposedPromise.ts","../../src/lib/utils/protocol/protocol-identifier.ts","../../src/lib/utils/protocol/protocol-options.ts","../../src/lib/utils/protocol/delegation.ts","../../src/lib/protocol/adapter/protocol-v0-adapter.ts","../../src/lib/utils/protocol/protocol-v0-adapter.ts","../../src/lib/services/protocol/defaults.ts","../../src/lib/types/RuntimeMode.ts","../../src/lib/utils/protocol/protocol-network-identifier.ts","../../src/lib/utils/not-initialized.ts","../../src/lib/services/environment/base-environment.service.ts","../../src/lib/utils/array.ts","../../src/lib/utils/modules/load-protocol.ts","../../src/lib/utils/worker.ts","../../src/lib/services/modules/controller/integral/integral-modules.controller.ts","../../src/lib/capacitor-plugins/injection-tokens.ts","../../src/lib/protocol/isolated/base-isolated.ts","../../src/lib/protocol/isolated/v3-serializer-companion-isolated.ts","../../src/lib/protocol/isolated/protocol-offline-isolated.ts","../../src/lib/protocol/isolated/protocol-online-isolated.ts","../../src/lib/protocol/isolated/block-explorer-isolated.ts","../../src/lib/services/uri/uri.service.ts","../../src/lib/services/image/fetcher/image-direct.fetcher.ts","../../src/lib/services/image/fetcher/image-proxy.fetcher.ts","../../src/lib/services/image/image.service.ts","../../src/lib/services/filesystem/filesystem.service.ts","../../src/lib/services/modules/controller/isolated/isolated-modules.controller.ts","../../src/lib/services/modules/controller/modules.controller.ts","../../src/lib/services/protocol/store/base-protocol-store.service.ts","../../src/lib/services/protocol/store/main/main-protocol-store.service.ts","../../src/lib/services/protocol/store/sub/sub-protocol-store.service.ts","../../src/lib/services/protocol/protocol.service.ts","../../src/lib/pipes/amount-converter/amount-converter.pipe.ts","../../src/lib/pipes/fee-converter/fee-converter.pipe.ts","../../src/lib/pipes/wallet-filter/wallet-filter.pipe.ts","../../src/lib/pipes/pipes.module.ts","../../src/lib/base/base.component.ts","../../src/lib/components/currency-symbol/currency-symbol.facade.ts","../../src/lib/components/currency-symbol/currency-symbol.component.ts","../../src/lib/components/currency-symbol/currency-symbol.component.html","../../src/lib/config/app-config.ts","../../src/lib/services/ui-event/ui-event.service.ts","../../src/lib/services/ui-event-elements/ui-event-elements.service.ts","../../src/lib/services/clipboard/clipboard.service.ts","../../src/lib/components/titled-text/titled-text.component.ts","../../src/lib/components/titled-text/titled-text.component.html","../../src/lib/components/identicon/identicon.component.ts","../../src/lib/components/identicon/identicon.component.html","../../src/lib/components/titled-address/titled-address.component.ts","../../src/lib/components/titled-address/titled-address.component.html","../../src/lib/components/network-badge/network-badge.component.ts","../../src/lib/components/network-badge/network-badge.component.html","../../src/lib/components/from-to/from-to.component.ts","../../src/lib/components/from-to/from-to.component.html","../../src/lib/components/account-item/account-item.component.ts","../../src/lib/components/account-item/account-item.component.html","../../src/lib/components/account-selection/account-selection.component.ts","../../src/lib/components/account-selection/account-selection.component.html","../../src/lib/components/qr/qr.component.ts","../../src/lib/components/qr/qr.component.html","../../src/lib/utils/utils.ts","../../src/lib/services/storage/base.storage.ts","../../src/lib/services/storage/storage.service.ts","../../src/lib/services/serializer/serializer.service.ts","../../src/lib/components/qr-settings/qr-settings.component.ts","../../src/lib/components/qr-settings/qr-settings.component.html","../../src/lib/services/iac/qr-generator.ts","../../src/lib/services/qr/qr-generators/serializer-v3-generator.ts","../../src/lib/services/qr/qr-generators/serializer-v2-generator.ts","../../src/lib/services/qr/qr-generators/bc-ur-generator.ts","../../src/lib/services/qr/qr-generators/metamask-generator.ts","../../src/lib/services/qr/qr-generators/xpub-generator.ts","../../src/lib/services/qr/qr-generators/output-descriptor-generator.ts","../../src/lib/components/iac-qr/iac-qr.component.ts","../../src/lib/components/iac-qr/iac-qr.component.html","../../src/lib/types/ui/UIResource.ts","../../src/lib/components/isolated-modules-list/isolated-modules-list.facade.ts","../../src/lib/components/isolated-modules-badges/isolated-modules-badges.component.ts","../../src/lib/components/isolated-modules-badges/isolated-modules-badges.component.html","../../src/lib/components/isolated-modules-list/isolated-modules-list.component.ts","../../src/lib/components/isolated-modules-list/isolated-modules-list.component.html","../../src/lib/components/isolated-modules-onboarding/isolated-modules-onboarding.component.ts","../../src/lib/components/isolated-modules-onboarding/isolated-modules-onboarding.component.html","../../src/lib/components/isolated-modules-details/isolated-modules-details.facade.ts","../../src/lib/components/isolated-modules-details/isolated-modules-details.component.ts","../../src/lib/components/isolated-modules-details/isolated-modules-details.component.html","../../src/lib/components/components.module.ts","../../src/lib/pages/isolated-modules-list/isolated-modules-list.facade.ts","../../src/lib/airgap-angular-core.module.ts","../../src/lib/base/base.facade.ts","../../src/lib/translation/AirGapTranslateLoader.ts","../../src/lib/services/address/address.service.ts","../../src/lib/services/deeplink/deeplink.service.ts","../../src/lib/services/iac/message-handler.ts","../../src/lib/services/qr/qr-handler/serializer-v3-handler.ts","../../src/lib/services/qr/qr-handler/serializer-v2-handler.ts","../../src/lib/services/iac/base.iac.service.ts","../../src/lib/services/iac/message-handler-single.ts","../../src/lib/services/modules/base-modules.service.ts","../../src/lib/services/key-pair/key-pair.service.ts","../../src/lib/services/language/language.service.ts","../../src/lib/services/permissions/permissions.service.ts","../../src/lib/services/qr-scanner/qr-scanner.service.ts","../../src/lib/services/token/token.service.ts","../../src/lib/services/transaction/transaction.service.ts","../../src/lib/types/ui/UIAction.ts","../../src/lib/utils/modules/isolated/isolated-modules-metadata.ts","../../src/lib/utils/airgap-transaction.ts","../../src/lib/capacitor-plugins/isolated-modules/isolated-modules.plugin-wrapper.ts","../../src/lib/capacitor-plugins/definitions.ts","../../src/lib/capacitor-plugins/isolated-modules/isolated-modules.plugin.ts","../../src/public-api.ts","../../src/wallfree-dev-angular-core.ts"],"sourcesContent":["/* eslint-disable max-classes-per-file */\n\nexport enum ExposedPromiseStatus {\n PENDING = 'pending',\n RESOLVED = 'resolved',\n REJECTED = 'rejected'\n}\n\ntype Resolve<T> = (value: T | PromiseLike<T>) => void\ntype Reject<U> = (reason?: U) => void\n\nconst notInitialized = (): never => {\n throw new Error('ExposedPromise not initialized yet.')\n}\n\nexport class ExposedPromise<T = unknown, U = unknown> {\n private readonly _promise: Promise<T>\n\n private _resolve: Resolve<T> = notInitialized\n private _reject: Reject<U> = notInitialized\n private _status: ExposedPromiseStatus = ExposedPromiseStatus.PENDING\n private _promiseResult: T | PromiseLike<T> | undefined\n private _promiseError: U | undefined\n\n public get promise(): Promise<T> {\n return this._promise\n }\n\n public get resolve(): Resolve<T> {\n return this._resolve\n }\n public get reject(): Reject<U> {\n return this._reject\n }\n public get status(): ExposedPromiseStatus {\n return this._status\n }\n public get promiseResult(): T | PromiseLike<T> | undefined {\n return this._promiseResult\n }\n public get promiseError(): U | undefined {\n return this._promiseError\n }\n\n constructor() {\n this._promise = new Promise<T>((innerResolve: Resolve<T>, innerReject: Reject<U>): void => {\n this._resolve = (value: T | PromiseLike<T>): void => {\n if (this.isSettled()) {\n return\n }\n\n this._promiseResult = value\n\n innerResolve(value)\n\n this._status = ExposedPromiseStatus.RESOLVED\n\n return\n }\n this._reject = (reason?: U): void => {\n if (this.isSettled()) {\n return\n }\n\n this._promiseError = reason\n\n innerReject(reason)\n\n this._status = ExposedPromiseStatus.REJECTED\n\n return\n }\n })\n }\n\n public static resolve<T>(value: T): ExposedPromise<T> {\n const promise = new ExposedPromise<T>()\n promise.resolve(value)\n\n return promise\n }\n\n public static reject<T = never, U = unknown>(reason?: U): ExposedPromise<T, U> {\n const promise = new ExposedPromise<T, U>()\n promise.reject(reason)\n\n return promise\n }\n\n public isPending(): boolean {\n return this.status === ExposedPromiseStatus.PENDING\n }\n\n public isResolved(): boolean {\n return this.status === ExposedPromiseStatus.RESOLVED\n }\n\n public isRejected(): boolean {\n return this.status === ExposedPromiseStatus.REJECTED\n }\n\n public isSettled(): boolean {\n return this.isResolved() || this.isRejected()\n }\n}\n\ntype ResolveTypes<K extends string> = Record<K, unknown>\ntype RejectTypes<K extends string> = Record<K, unknown> | unknown\ntype Error<K extends string, E extends RejectTypes<K>> = E extends Record<K, unknown> ? E[K] : unknown\nexport class ExposedPromiseRegistry<\n Key extends string,\n ResolveType extends ResolveTypes<Key>,\n RejectType extends RejectTypes<Key> = unknown\n> {\n private readonly exposedPromises: { [key in Key]?: ExposedPromise<ResolveType[key], Error<key, RejectType>> } = {}\n\n public resolve<K extends Key>(key: K, value: ResolveType[K]): void {\n this.getIfNotSettled(key)?.resolve(value)\n }\n\n public reject<K extends Key>(key: K, error: Error<K, RejectType>): void {\n this.getIfNotSettled(key)?.reject(error)\n }\n\n public async yield<K extends Key>(key: K): Promise<ResolveType[K]> {\n const exposedPromise: ExposedPromise<ResolveType[K], Error<K, RejectType>> = new ExposedPromise()\n this.exposedPromises[key] = exposedPromise\n\n const value: ResolveType[K] = await exposedPromise.promise\n this.exposedPromises[key] = undefined\n\n return value\n }\n\n private getIfNotSettled<K extends Key>(key: K): ExposedPromise<ResolveType[K], Error<K, RejectType>> | undefined {\n const promise: ExposedPromise<ResolveType[K], Error<K, RejectType>> | undefined = this.exposedPromises[key]\n if (promise?.isSettled()) {\n throw new Error('Promise is already settled')\n }\n\n return promise\n }\n}\n","import { ProtocolSymbols, MainProtocolSymbols } from '@wallfree-dev/coinlib-core'\n\nexport function getMainIdentifier(subIdentifier: ProtocolSymbols): MainProtocolSymbols {\n return subIdentifier.split('-')[0] as MainProtocolSymbols\n}\n","/* eslint-disable complexity */\nimport { AeternityProtocolNetwork, AeternityProtocolOptions } from '@wallfree-dev/aeternity/v0'\nimport { BitcoinProtocolNetwork, BitcoinProtocolOptions } from '@wallfree-dev/bitcoin/v0'\nimport { CosmosProtocolNetwork, CosmosProtocolOptions } from '@wallfree-dev/cosmos/v0'\nimport { EthereumProtocolNetwork, EthereumProtocolOptions } from '@wallfree-dev/ethereum/v0'\nimport { GroestlcoinProtocolNetwork, GroestlcoinProtocolOptions } from '@wallfree-dev/groestlcoin/v0'\nimport { KusamaProtocolNetwork, KusamaProtocolOptions, PolkadotProtocolNetwork, PolkadotProtocolOptions } from '@wallfree-dev/polkadot/v0'\nimport { MoonbaseProtocolNetwork, MoonbaseProtocolOptions, MoonriverProtocolNetwork, MoonriverProtocolOptions } from '@wallfree-dev/moonbeam/v0'\nimport { AstarProtocolNetwork, AstarProtocolOptions, ShidenProtocolNetwork, ShidenProtocolOptions } from '@wallfree-dev/astar/v0'\nimport { SolanaBlockExplorer } from '@wallfree-dev/solana/v1/block-explorer/SolanaBlockExplorer'\nimport { SolanaProtocolNetwork, SolanaProtocolOptions } from '@wallfree-dev/solana'\nimport {\n TezosBTCProtocolConfig,\n TezosBTCTezProtocolConfig,\n TezosCTezProtocolConfig,\n TezosDOGAProtocolConfig,\n TezosFAProtocolOptions,\n TezosKolibriUSDProtocolConfig,\n TezosPlentyProtocolConfig,\n TezosProtocolNetwork,\n TezosProtocolOptions,\n TezosQUIPUProtocolConfig,\n TezosSaplingProtocolOptions,\n TezosShieldedTezProtocolConfig,\n TezosSIRSProtocolConfig,\n TezosStakerProtocolConfig,\n TezosUBTCProtocolConfig,\n TezosUDEFIProtocolConfig,\n TezosUSDProtocolConfig,\n TezosUSDTProtocolConfig,\n TezosUUSDProtocolConfig,\n TezosWrappedProtocolConfig,\n TezosWRAPProtocolConfig,\n TezosYOUProtocolConfig\n} from '@wallfree-dev/tezos/v0'\nimport { ProtocolSymbols, ProtocolNetwork, MainProtocolSymbols, SubProtocolSymbols, Domain } from '@wallfree-dev/coinlib-core'\nimport { NotFoundError } from '@wallfree-dev/coinlib-core/errors'\nimport { ProtocolOptions } from '@wallfree-dev/coinlib-core/utils/ProtocolOptions'\nimport { MoonbeamProtocolOptions, MoonbeamProtocolNetwork } from '@wallfree-dev/moonbeam/v0/protocol/moonbeam/MoonbeamProtocolOptions'\nimport { TezosETHtzProtocolConfig } from '@wallfree-dev/tezos/v0/protocol/fa/TezosFAProtocolOptions'\nimport { ProtocolOptionsAdapter } from '../../protocol/adapter/protocol-v0-adapter'\nimport { ModulesController } from '../../services/modules/controller/modules.controller'\nimport { convertNetworkV1ToV0 } from './protocol-v0-adapter'\n\nexport const getProtocolOptionsByIdentifierLegacy: (identifier: ProtocolSymbols, network?: ProtocolNetwork) => ProtocolOptions = (\n identifier: ProtocolSymbols,\n network?: ProtocolNetwork\n): ProtocolOptions => {\n switch (identifier) {\n case MainProtocolSymbols.AE:\n return new AeternityProtocolOptions(network ? (network as AeternityProtocolNetwork) : new AeternityProtocolNetwork())\n case MainProtocolSymbols.BTC:\n case MainProtocolSymbols.BTC_SEGWIT:\n return new BitcoinProtocolOptions(network ? (network as BitcoinProtocolNetwork) : new BitcoinProtocolNetwork())\n case MainProtocolSymbols.ETH:\n case SubProtocolSymbols.ETH_ERC20_XCHF:\n case SubProtocolSymbols.ETH_ERC20:\n return new EthereumProtocolOptions(network ? (network as EthereumProtocolNetwork) : new EthereumProtocolNetwork())\n case MainProtocolSymbols.GRS:\n return new GroestlcoinProtocolOptions(network ? (network as GroestlcoinProtocolNetwork) : new GroestlcoinProtocolNetwork())\n case MainProtocolSymbols.COSMOS:\n return new CosmosProtocolOptions(network ? (network as CosmosProtocolNetwork) : new CosmosProtocolNetwork())\n case MainProtocolSymbols.POLKADOT:\n return new PolkadotProtocolOptions(network ? (network as PolkadotProtocolNetwork) : new PolkadotProtocolNetwork())\n case MainProtocolSymbols.KUSAMA:\n return new KusamaProtocolOptions(network ? (network as KusamaProtocolNetwork) : new KusamaProtocolNetwork())\n case MainProtocolSymbols.MOONBASE:\n return new MoonbaseProtocolOptions(network ? (network as MoonbaseProtocolNetwork) : new MoonbaseProtocolNetwork())\n case MainProtocolSymbols.MOONRIVER:\n return new MoonriverProtocolOptions(network ? (network as MoonriverProtocolNetwork) : new MoonriverProtocolNetwork())\n case MainProtocolSymbols.MOONBEAM:\n return new MoonbeamProtocolOptions(network ? (network as MoonbeamProtocolNetwork) : new MoonbeamProtocolNetwork())\n case MainProtocolSymbols.ASTAR:\n return new AstarProtocolOptions(network ? (network as AstarProtocolNetwork) : new AstarProtocolNetwork())\n case MainProtocolSymbols.SHIDEN:\n return new ShidenProtocolOptions(network ? (network as ShidenProtocolNetwork) : new ShidenProtocolNetwork())\n case MainProtocolSymbols.XTZ:\n case SubProtocolSymbols.XTZ_KT:\n return new TezosProtocolOptions(network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork())\n case MainProtocolSymbols.XTZ_SHIELDED:\n return network\n ? new TezosSaplingProtocolOptions(network as TezosProtocolNetwork, new TezosShieldedTezProtocolConfig())\n : new TezosSaplingProtocolOptions()\n case SubProtocolSymbols.XTZ_BTC:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosBTCProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_ETHTZ:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosETHtzProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_UUSD:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosUUSDProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_UBTC:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosUBTCProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_YOU:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosYOUProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_W:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosWrappedProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_KUSD:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosKolibriUSDProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_USD:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosUSDProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_USDT:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosUSDTProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_STKR:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosStakerProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_UDEFI:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosUDEFIProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_CTEZ:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosCTezProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_PLENTY:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosPlentyProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_WRAP:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosWRAPProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_QUIPU:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosQUIPUProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_DOGA:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosDOGAProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_SIRS:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosSIRSProtocolConfig()\n )\n case SubProtocolSymbols.XTZ_BTC_TEZ:\n return new TezosFAProtocolOptions(\n network ? (network as TezosProtocolNetwork) : new TezosProtocolNetwork(),\n new TezosBTCTezProtocolConfig()\n )\n default:\n // Maybe we get an identifier of a sub-protocol that is not in the known list. In that case, get the options of the parent\n if ((identifier as string).includes('-')) {\n return getProtocolOptionsByIdentifierLegacy((identifier as string).split('-')[0] as any)\n }\n throw new NotFoundError(Domain.UTILS, `No protocol options found for ${identifier}`)\n }\n}\n\nconst cache: Record<string, ProtocolOptions> = {}\nexport const getProtocolOptionsByIdentifier: (\n modulesController: ModulesController,\n identifier: ProtocolSymbols,\n network?: ProtocolNetwork\n) => Promise<ProtocolOptions> = async (\n modulesController: ModulesController,\n identifier: ProtocolSymbols,\n network?: ProtocolNetwork\n): Promise<ProtocolOptions> => {\n try {\n return getProtocolOptionsByIdentifierLegacy(identifier, network)\n } catch {\n if (network) {\n return new ProtocolOptionsAdapter(network)\n }\n\n if (!cache[identifier]) {\n const defaultNetwork = await modulesController.getProtocolNetwork(identifier)\n const blockExplorer = defaultNetwork ? await modulesController.getProtocolBlockExplorer(identifier, defaultNetwork) : undefined\n\n cache[identifier] = new ProtocolOptionsAdapter(\n convertNetworkV1ToV0(defaultNetwork ?? { name: 'Mainnet', type: 'mainnet', rpcUrl: '', blockExplorerUrl: '' }, blockExplorer)\n )\n }\n\n return cache[identifier]\n }\n}\n","/* eslint-disable no-implicit-coercion */\nimport { ICoinDelegateProtocol, ICoinProtocol, MainProtocolSymbols, SubProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { AirGapAnyProtocol } from '@wallfree-dev/module-kit'\nimport { AirGapDelegateProtocol } from '@wallfree-dev/module-kit/internal'\nimport { TezosProtocol } from '@wallfree-dev/tezos/v0'\n\nexport function supportsV0Delegation(protocol: ICoinProtocol): protocol is ICoinDelegateProtocol {\n const delegateProtocol = protocol as ICoinDelegateProtocol\n\n // temporary until Tezos subprotocols stop inherit TezosProtocol and implement ICoinDelegateProtocol\n const supportingTezosProtocols: string[] = [MainProtocolSymbols.XTZ, SubProtocolSymbols.XTZ_KT]\n if (delegateProtocol instanceof TezosProtocol && !supportingTezosProtocols.includes(delegateProtocol.identifier)) {\n return false\n }\n\n return (\n !!delegateProtocol.getDefaultDelegatee &&\n !!delegateProtocol.getCurrentDelegateesForPublicKey &&\n !!delegateProtocol.getCurrentDelegateesForAddress &&\n !!delegateProtocol.getDelegateeDetails &&\n !!delegateProtocol.isPublicKeyDelegating &&\n !!delegateProtocol.isAddressDelegating &&\n !!delegateProtocol.getDelegationDetailsFromPublicKey &&\n !!delegateProtocol.getDelegationDetailsFromAddress &&\n !!delegateProtocol.prepareDelegatorActionFromPublicKey\n )\n}\n\nexport function supportsV1Delegation(protocol: AirGapAnyProtocol): protocol is AirGapAnyProtocol & AirGapDelegateProtocol {\n const delegateProtocol = protocol as AirGapAnyProtocol & AirGapDelegateProtocol\n\n return (\n !!delegateProtocol.getDefaultDelegatee &&\n !!delegateProtocol.getCurrentDelegateesForPublicKey &&\n !!delegateProtocol.getCurrentDelegateesForAddress &&\n !!delegateProtocol.getDelegateeDetails &&\n !!delegateProtocol.isPublicKeyDelegating &&\n !!delegateProtocol.isAddressDelegating &&\n !!delegateProtocol.getDelegationDetailsFromPublicKey &&\n !!delegateProtocol.getDelegationDetailsFromAddress &&\n !!delegateProtocol.prepareDelegatorActionFromPublicKey\n )\n}\n","/* eslint-disable max-lines */\n/* eslint-disable max-classes-per-file */\nimport {\n CryptoClient,\n DelegateeDetails,\n DelegationDetails,\n DelegatorDetails,\n FeeDefaults as FeeDefaultsV0,\n IAirGapTransaction,\n IAirGapTransactionResult,\n ICoinDelegateProtocol,\n ICoinProtocol,\n ICoinSubProtocol,\n IProtocolTransactionCursor,\n NetworkType as NetworkTypeV0,\n ProtocolBlockExplorer as ProtocolBlockExplorerV0,\n ProtocolNetwork as ProtocolNetworkV0,\n ProtocolSymbols,\n SignedTransaction as SignedTransactionV0,\n SubProtocolSymbols,\n SubProtocolType as SubProtocolTypeV0,\n UnsignedTransaction as UnsignedTransactionV0\n} from '@wallfree-dev/coinlib-core'\nimport { IProtocolAddressCursor, IAirGapAddressResult } from '@wallfree-dev/coinlib-core/interfaces/IAirGapAddress'\nimport { AirGapTransactionStatus as AirGapTransactionStatusV0 } from '@wallfree-dev/coinlib-core/interfaces/IAirGapTransaction'\nimport { ProtocolOptions as ProtocolOptionsV0 } from '@wallfree-dev/coinlib-core/utils/ProtocolOptions'\nimport { derive, mnemonicToSeed } from '@wallfree-dev/crypto'\nimport {\n AddressWithCursor,\n AirGapAnyProtocol,\n AirGapBlockExplorer,\n AirGapTransaction,\n AirGapTransactionStatus,\n AirGapTransactionsWithCursor,\n AirGapV3SerializerCompanion,\n Amount,\n Balance,\n BlockExplorerMetadata,\n canEncryptAES,\n canEncryptAsymmetric,\n canFetchDataForAddress,\n canFetchDataForMultipleAddresses,\n canSignMessage,\n CryptoConfiguration,\n CryptoDerivative,\n ExtendedKeyPair,\n ExtendedPublicKey,\n ExtendedSecretKey,\n FeeDefaults,\n FeeEstimation,\n hasConfigurableContract,\n hasMultiAddressPublicKeys,\n implementsInterface,\n isAmount,\n isBip32Protocol,\n isMultiTokenSubProtocol,\n isOfflineProtocol,\n isOnlineProtocol,\n isTransactionStatusChecker,\n KeyPair,\n newAmount,\n newExtendedPublicKey,\n newExtendedSecretKey,\n newPublicKey,\n newSecretKey,\n newSignature,\n ProtocolConfiguration,\n ProtocolMetadata,\n ProtocolNetwork,\n ProtocolNetworkType,\n ProtocolSymbol,\n ProtocolTransactionArbitraryDataMetadata,\n ProtocolUnitsMetadata,\n PublicKey,\n Schema,\n SecretKey,\n Signature,\n SignedTransaction,\n SubProtocol,\n SubProtocolType,\n TransactionCursor,\n TransactionDetails,\n UnsignedTransaction\n} from '@wallfree-dev/module-kit'\nimport BigNumber from 'bignumber.js'\nimport { TransactionSignRequest, TransactionSignResponse, TransactionValidator } from '@wallfree-dev/serializer'\nimport { AirGapDelegateProtocol } from '@wallfree-dev/module-kit/internal'\nimport { isTezosSaplingProtocol } from '@wallfree-dev/tezos'\nimport { BitcoinSegwitProtocol, BitcoinTaprootProtocol, isBitcoinSegwitProtocol, isBitcoinTaprootProtocol } from '@wallfree-dev/bitcoin'\nimport { getProtocolOptionsByIdentifierLegacy } from '../../utils/protocol/protocol-options'\nimport { supportsV1Delegation } from '../../utils/protocol/delegation'\nimport {\n convertFeeDefaultsV1ToV0,\n convertNetworkTypeV1ToV0,\n convertTransactionDetailsV1ToV0,\n convertTransactionStatusV1ToV0,\n getBytesFormatV1FromV0,\n getPublicKeyType,\n getSecretKeyType\n} from '../../utils/protocol/protocol-v0-adapter'\n\n// ProtocolBlockExplorer\n\nexport class ProtocolBlockExplorerAdapter extends ProtocolBlockExplorerV0 {\n constructor(private readonly blockExplorerV1: AirGapBlockExplorer, url: string) {\n super(url)\n }\n\n public async getAddressLink(address: string): Promise<string> {\n return this.blockExplorerV1.createAddressUrl(address)\n }\n\n public async getTransactionLink(transactionId: string): Promise<string> {\n return this.blockExplorerV1.createTransactionUrl(transactionId)\n }\n\n public toJSON(): any {\n return {\n blockExplorer: this.blockExplorer\n }\n }\n}\n\n// ProtocolNetwork\n\nexport class ProtocolNetworkAdapter extends ProtocolNetworkV0 {\n constructor(\n name: string,\n type: ProtocolNetworkType | NetworkTypeV0,\n rpcUrl: string,\n blockExplorer: ProtocolBlockExplorerV0 | undefined,\n extras: unknown = {}\n ) {\n const networkType: NetworkTypeV0 = Object.values(NetworkTypeV0).includes(type as NetworkTypeV0)\n ? (type as NetworkTypeV0)\n : convertNetworkTypeV1ToV0(type as ProtocolNetworkType)\n\n super(name, networkType, rpcUrl, blockExplorer, extras)\n }\n}\n\n// ProtocolOptions\n\nexport class ProtocolOptionsAdapter implements ProtocolOptionsV0 {\n constructor(public readonly network: ProtocolNetworkV0, public readonly config: unknown = {}) {}\n}\n\n// TransactionValidator\n\nexport class TransactionValidatorAdapter implements TransactionValidator {\n constructor(private readonly protocolIdentifier: string, private readonly serializerCompanion: AirGapV3SerializerCompanion) {}\n\n public async validateUnsignedTransaction(transaction: TransactionSignRequest): Promise<any> {\n return this.serializerCompanion.validateTransactionSignRequest(this.protocolIdentifier, transaction)\n }\n\n public async validateSignedTransaction(transaction: TransactionSignResponse): Promise<any> {\n return this.serializerCompanion.validateTransactionSignResponse(this.protocolIdentifier, transaction)\n }\n}\n\n// ICoinProtocol\n\nexport class ICoinProtocolAdapter<T extends AirGapAnyProtocol = AirGapAnyProtocol> implements ICoinProtocol {\n public readonly symbol: string\n public readonly name: string\n public readonly marketSymbol: string\n public readonly assetSymbol: string | undefined\n public readonly feeSymbol: string\n public readonly feeDefaults: FeeDefaultsV0\n public readonly decimals: number\n public readonly feeDecimals: number\n public readonly identifier: ProtocolSymbols\n public readonly units: { unitSymbol: string; factor: string }[]\n public readonly supportsHD: boolean\n public readonly standardDerivationPath: string\n public readonly addressIsCaseSensitive: boolean\n public readonly addressValidationPattern: string\n public readonly addressPlaceholder: string\n public readonly options: ProtocolOptionsV0\n public readonly cryptoClient: CryptoClient\n\n private readonly networkV0: ProtocolNetworkV0\n private readonly blockExplorerV0: ProtocolBlockExplorerAdapter | undefined\n\n constructor(\n public readonly protocolV1: T,\n private readonly protocolMetadata: ProtocolMetadata,\n private readonly crypto: CryptoConfiguration | undefined,\n private readonly network: ProtocolNetwork | undefined,\n blockExplorerV1: AirGapBlockExplorer | undefined,\n blockExplorerMetadata: BlockExplorerMetadata | undefined,\n private readonly v3SerializerCompanion: AirGapV3SerializerCompanion\n ) {\n const units: ProtocolUnitsMetadata = this.protocolMetadata.units\n const mainUnit: string = this.protocolMetadata.mainUnit\n const symbol: ProtocolSymbol = units[mainUnit].symbol\n\n const feeUnits: ProtocolUnitsMetadata = protocolMetadata.fee?.units ?? protocolMetadata.units\n const mainFeeUnit: string = protocolMetadata.fee?.mainUnit ?? protocolMetadata.mainUnit\n const feeSymbol: ProtocolSymbol = feeUnits[mainFeeUnit].symbol\n\n const feeDefaults: FeeDefaults = protocolMetadata.fee?.defaults ?? {\n low: newAmount('0', 'blockchain'),\n medium: newAmount('0', 'blockchain'),\n high: newAmount('0', 'blockchain')\n }\n\n const maxDecimals: number = Math.max(...Object.values(protocolMetadata.units).map((unit) => unit.decimals))\n\n this.name = this.protocolMetadata.name\n this.identifier = this.protocolMetadata.identifier as ProtocolSymbols\n\n this.symbol = symbol.value\n this.marketSymbol = symbol.market ?? symbol.value\n this.assetSymbol = symbol.asset\n this.decimals = units[mainUnit].decimals\n\n this.feeSymbol = feeSymbol.value\n this.feeDefaults = this.convertFeeDefaultsV1ToV0(feeDefaults)\n this.feeDecimals = feeUnits[mainFeeUnit].decimals\n\n this.units = Object.entries(protocolMetadata.units).map((entry) => {\n const unitSymbol: string = entry[0]\n const factor: string = new BigNumber(1).shiftedBy(-(maxDecimals - entry[1].decimals)).toFixed()\n\n return { unitSymbol, factor }\n })\n\n this.supportsHD = isBip32Protocol(this.protocolV1)\n\n this.standardDerivationPath = this.protocolMetadata.account?.standardDerivationPath ?? 'm/'\n this.addressIsCaseSensitive = this.protocolMetadata.account.address?.isCaseSensitive ?? false\n this.addressValidationPattern = this.protocolMetadata.account?.address?.regex ?? '*+'\n this.addressPlaceholder = this.protocolMetadata.account?.address?.placeholder ?? ''\n\n let knownOptions: ProtocolOptionsV0 | undefined\n try {\n knownOptions = getProtocolOptionsByIdentifierLegacy(this.protocolMetadata.identifier as ProtocolSymbols)\n // eslint-disable-next-line no-empty\n } catch {}\n\n this.blockExplorerV0 =\n blockExplorerV1 && blockExplorerMetadata ? new ProtocolBlockExplorerAdapter(blockExplorerV1, blockExplorerMetadata.url) : undefined\n this.networkV0 = this.getNetwork(knownOptions)\n this.options = new ProtocolOptionsAdapter(this.networkV0, knownOptions?.config ?? {})\n }\n\n public async getSymbol(): Promise<string> {\n return this.symbol\n }\n\n public async getName(): Promise<string> {\n return this.name\n }\n\n public async getMarketSymbol(): Promise<string> {\n return this.marketSymbol\n }\n\n public async getAssetSymbol(): Promise<string | undefined> {\n return this.assetSymbol\n }\n\n public async getFeeSymbol(): Promise<string> {\n return this.feeSymbol\n }\n\n public async getFeeDefaults(): Promise<FeeDefaultsV0> {\n return this.feeDefaults\n }\n\n public async getDecimals(): Promise<number> {\n return this.decimals\n }\n\n public async getFeeDecimals(): Promise<number> {\n return this.feeDecimals\n }\n\n public async getIdentifier(): Promise<ProtocolSymbols> {\n return this.identifier\n }\n\n public async getUnits(): Promise<{ unitSymbol: string; factor: string }[]> {\n return this.units\n }\n\n public async getSupportsHD(): Promise<boolean> {\n return this.supportsHD\n }\n\n public async getStandardDerivationPath(): Promise<string> {\n return this.standardDerivationPath\n }\n\n public async getAddressIsCaseSensitive(): Promise<boolean> {\n return this.addressIsCaseSensitive\n }\n\n public async getAddressValidationPattern(): Promise<string> {\n return this.addressValidationPattern\n }\n\n public async getAddressPlaceholder(): Promise<string> {\n return this.addressPlaceholder\n }\n\n public async getOptions(): Promise<ProtocolOptionsV0> {\n return this.options\n }\n\n public async getBlockExplorerLinkForAddress(address: string): Promise<string> {\n if (this.blockExplorerV0 === undefined) {\n throw new Error('Method not supported, BlockExplorer not found.')\n }\n\n return this.blockExplorerV0.getAddressLink(address)\n }\n\n public async getBlockExplorerLinkForTxId(txId: string): Promise<string> {\n if (this.blockExplorerV0 === undefined) {\n throw new Error('Method not supported, BlockExplorer not found.')\n }\n\n return this.blockExplorerV0.getTransactionLink(txId)\n }\n\n public async getTransactionsFromPublicKey(\n publicKey: string,\n limit: number,\n cursor?: IProtocolTransactionCursor\n ): Promise<IAirGapTransactionResult> {\n if (!isOnlineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required interface: Online.')\n }\n\n const transactions: AirGapTransactionsWithCursor = await this.protocolV1.getTransactionsForPublicKey(\n newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey)),\n limit,\n cursor as TransactionCursor\n )\n\n return {\n transactions: await this.convertTransactionDetailsV1ToV0(transactions.transactions),\n cursor\n }\n }\n\n public async getTransactionsFromExtendedPublicKey(\n extendedPublicKey: string,\n limit: number,\n cursor?: IProtocolTransactionCursor\n ): Promise<IAirGapTransactionResult> {\n if (!isOnlineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required interface: Online, Bip32.')\n }\n\n const transactions: AirGapTransactionsWithCursor = await this.protocolV1.getTransactionsForPublicKey(\n newExtendedPublicKey(extendedPublicKey, getBytesFormatV1FromV0(extendedPublicKey)),\n limit,\n cursor as TransactionCursor\n )\n\n return {\n transactions: await this.convertTransactionDetailsV1ToV0(transactions.transactions),\n cursor\n }\n }\n\n public async getTransactionsFromAddresses(\n addresses: string[],\n limit: number,\n cursor?: IProtocolTransactionCursor\n ): Promise<IAirGapTransactionResult> {\n if (!isOnlineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required interface: Online, FetchDataForAddress/FetchDataForMultipleAddresses.')\n }\n\n let transactions: AirGapTransactionsWithCursor\n if (addresses.length === 1 && canFetchDataForAddress(this.protocolV1)) {\n transactions = await this.protocolV1.getTransactionsForAddress(addresses[0], limit, cursor as TransactionCursor)\n } else if (canFetchDataForMultipleAddresses(this.protocolV1)) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n transactions = await this.protocolV1.getTransactionsForAddresses(addresses, limit, cursor as TransactionCursor)\n } else {\n throw new Error('Method not supported, required interface: Online, FetchDataForAddress/FetchDataForMultipleAddresses.')\n }\n\n return {\n transactions: await this.convertTransactionDetailsV1ToV0(transactions.transactions),\n cursor: transactions.cursor ? transactions.cursor : cursor\n }\n }\n\n public async getBalanceOfAddresses(addresses: string[], _data?: { [key: string]: unknown }): Promise<string> {\n if (!isOnlineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required interface: Online, FetchDataForAddress/FetchDataForMultipleAddresses.')\n }\n\n let balance: Balance\n if (addresses.length === 1 && canFetchDataForAddress(this.protocolV1)) {\n balance = await this.protocolV1.getBalanceOfAddress(addresses[0])\n } else if (canFetchDataForMultipleAddresses(this.protocolV1)) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n balance = await this.protocolV1.getBalanceOfAddresses(addresses)\n } else {\n throw new Error('Method not supported, required interface: Online, FetchDataForAddress/FetchDataForMultipleAddresses.')\n }\n\n return newAmount(balance.total).blockchain(this.protocolMetadata.units).value\n }\n\n public async getBalanceOfPublicKey(\n publicKey: string,\n data?: { [key: string]: unknown; addressIndex?: number; assetID?: string }\n ): Promise<string> {\n if (!isOnlineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online.')\n }\n\n const publicKeyV1: PublicKey = newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey))\n\n const balance: Balance =\n data?.assetID && isMultiTokenSubProtocol(this.protocolV1)\n ? await this.protocolV1.getBalanceOfPublicKey(publicKeyV1, { tokenId: data.assetID })\n : await this.protocolV1.getBalanceOfPublicKey(publicKeyV1)\n\n return newAmount(balance.total).blockchain(this.protocolMetadata.units).value\n }\n\n public async getBalanceOfExtendedPublicKey(\n extendedPublicKey: string,\n _offset: number,\n data?: { [key: string]: unknown; assetID?: string }\n ): Promise<string> {\n if (!isOnlineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online, Bip32.')\n }\n\n const extendedPublicKeyV1: ExtendedPublicKey = newExtendedPublicKey(extendedPublicKey, getBytesFormatV1FromV0(extendedPublicKey))\n\n const balance: Balance =\n data?.assetID && isMultiTokenSubProtocol(this.protocolV1)\n ? await this.protocolV1.getBalanceOfPublicKey(extendedPublicKeyV1, { tokenId: data.assetID })\n : await this.protocolV1.getBalanceOfPublicKey(extendedPublicKeyV1)\n\n return newAmount(balance.total).blockchain(this.protocolMetadata.units).value\n }\n\n public async getAvailableBalanceOfAddresses(addresses: string[], _data?: { [key: string]: unknown }): Promise<string> {\n if (!isOnlineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required interface: Online, FetchDataForAddress/FetchDataForMultipleAddresses.')\n }\n\n let balance: Balance\n if (addresses.length === 1 && canFetchDataForAddress(this.protocolV1)) {\n balance = await this.protocolV1.getBalanceOfAddress(addresses[0])\n } else if (canFetchDataForMultipleAddresses(this.protocolV1)) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n balance = await this.protocolV1.getBalanceOfAddresses(addresses)\n } else {\n throw new Error('Method not supported, required interface: Online, FetchDataForAddress/FetchDataForMultipleAddresses.')\n }\n\n return newAmount(balance.transferable ?? balance.total).blockchain(this.protocolMetadata.units).value\n }\n\n public async getTransactionStatuses(transactionHash: string[]): Promise<AirGapTransactionStatusV0[]> {\n if (!isOnlineProtocol(this.protocolV1) || !isTransactionStatusChecker(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online, TransactionStatusChecker.')\n }\n\n const statuses: Record<string, AirGapTransactionStatus> = await this.protocolV1.getTransactionStatus(transactionHash)\n\n return transactionHash.map((hash: string) => {\n const status: AirGapTransactionStatus = statuses[hash]\n\n return convertTransactionStatusV1ToV0(status)\n })\n }\n\n public async getBalanceOfPublicKeyForSubProtocols(_publicKey: string, _subProtocols: ICoinSubProtocol[]): Promise<string[]> {\n throw new Error('Method not supported.')\n }\n\n public async estimateMaxTransactionValueFromExtendedPublicKey(\n extendedPublicKey: string,\n recipients: string[],\n fee?: string,\n data?: { [key: string]: unknown }\n ): Promise<string> {\n if (!isOnlineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online, Bip32.')\n }\n\n const maxAmount: Amount = await this.protocolV1.getTransactionMaxAmountWithPublicKey(\n newExtendedPublicKey(extendedPublicKey, getBytesFormatV1FromV0(extendedPublicKey)),\n recipients,\n {\n arbitraryData: this.getArbitraryData(data),\n fee: fee ? newAmount(fee, 'blockchain') : undefined\n }\n )\n\n return newAmount(maxAmount).blockchain(this.protocolMetadata.units).value\n }\n\n public async estimateMaxTransactionValueFromPublicKey(\n publicKey: string,\n recipients: string[],\n fee?: string,\n data?: { [key: string]: unknown; addressIndex?: number }\n ): Promise<string> {\n if (!isOnlineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online.')\n }\n\n const maxAmount: Amount = await this.protocolV1.getTransactionMaxAmountWithPublicKey(\n newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey)),\n recipients,\n {\n fee: fee ? newAmount(fee, 'blockchain') : undefined,\n arbitraryData: this.getArbitraryData(data)\n }\n )\n\n return newAmount(maxAmount).blockchain(this.protocolMetadata.units).value\n }\n\n public async estimateFeeDefaultsFromExtendedPublicKey(\n publicKey: string,\n recipients: string[],\n values: string[],\n data?: {\n [key: string]: unknown\n\n // Tezos FA2\n assetID?: string\n }\n ): Promise<FeeDefaultsV0> {\n if (!isOnlineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online, Bip32.')\n }\n\n const feeEstimation: FeeEstimation | undefined = await this.protocolV1.getTransactionFeeWithPublicKey(\n newExtendedPublicKey(publicKey, getBytesFormatV1FromV0(publicKey)),\n this.combineTransactionDetails(recipients, values),\n {\n arbitraryData: this.getArbitraryData(data),\n assetId: data?.assetID ? parseInt(data.assetID, 10) : undefined\n }\n )\n\n if (feeEstimation === undefined) {\n throw new Error('Method `estimateFeeDefaultsFromExtendedPublicKey` not supported.')\n }\n\n const feeDefaults: FeeDefaults = isAmount(feeEstimation)\n ? { low: feeEstimation, medium: feeEstimation, high: feeEstimation }\n : feeEstimation\n\n return this.convertFeeDefaultsV1ToV0(feeDefaults)\n }\n\n public async estimateFeeDefaultsFromPublicKey(\n publicKey: string,\n recipients: string[],\n values: string[],\n data?: {\n [key: string]: unknown\n\n // Tezos FA2\n assetID?: string\n }\n ): Promise<FeeDefaultsV0> {\n if (!isOnlineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online.')\n }\n\n if (recipients.length !== values.length) {\n throw new Error('Recipients length must match values length.')\n }\n\n const transactionDetails: TransactionDetails[] = recipients.map((recipient: string, index: number) => ({\n to: recipient,\n amount: newAmount(values[index], 'blockchain')\n }))\n\n const feeEstimation: FeeEstimation | undefined = await this.protocolV1.getTransactionFeeWithPublicKey(\n newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey)),\n transactionDetails,\n {\n arbitraryData: this.getArbitraryData(data),\n assetId: data?.assetID ? parseInt(data.assetID, 10) : undefined\n }\n )\n\n if (feeEstimation === undefined) {\n throw new Error('Method `estimateFeeDefaultsFromPublicKey` not supported.')\n }\n\n const feeDefaults: FeeDefaults = isAmount(feeEstimation)\n ? { low: feeEstimation, medium: feeEstimation, high: feeEstimation }\n : feeEstimation\n\n return this.convertFeeDefaultsV1ToV0(feeDefaults)\n }\n\n public async prepareTransactionFromExtendedPublicKey(\n extendedPublicKey: string,\n _offset: number,\n recipients: string[],\n values: string[],\n fee: string,\n extras?: {\n [key: string]: unknown\n\n // Bitcoin\n masterFingerprint: string\n replaceByFee: boolean\n\n // Tezos FA2\n assetID?: string\n }\n ): Promise<any> {\n if (!isOnlineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online.')\n }\n\n const isSegwit = isBitcoinSegwitProtocol(this.protocolV1)\n const isTaproot = isBitcoinTaprootProtocol(this.protocolV1)\n\n let transaction: UnsignedTransaction\n if (isSegwit || isTaproot) {\n transaction = await (isSegwit\n ? (this.protocolV1 as BitcoinSegwitProtocol)\n : (this.protocolV1 as BitcoinTaprootProtocol)\n ).prepareTransactionWithPublicKey(\n newExtendedPublicKey(extendedPublicKey, getBytesFormatV1FromV0(extendedPublicKey)),\n this.combineTransactionDetails(recipients, values),\n {\n fee: newAmount(fee, 'blockchain'),\n arbitraryData: this.getArbitraryData(extras),\n masterFingerprint: {\n format: 'hex',\n value: extras?.masterFingerprint\n },\n replaceByFee: extras?.replaceByFee\n }\n )\n } else {\n transaction = await this.protocolV1.prepareTransactionWithPublicKey(\n newExtendedPublicKey(extendedPublicKey, getBytesFormatV1FromV0(extendedPublicKey)),\n this.combineTransactionDetails(recipients, values),\n {\n fee: newAmount(fee, 'blockchain'),\n assetId: extras?.assetID ? parseInt(extras.assetID, 10) : undefined,\n arbitraryData: this.getArbitraryData(extras)\n }\n )\n }\n\n const transactionV0 = await this.convertUnsignedTransactionV1ToV0(transaction, extendedPublicKey)\n\n return transactionV0.transaction\n }\n\n public async prepareTransactionFromPublicKey(\n publicKey: string,\n recipients: string[],\n values: string[],\n fee: string,\n extras?: {\n [key: string]: unknown\n\n // Tezos FA2\n assetID?: string\n }\n ): Promise<any> {\n if (!isOnlineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online.')\n }\n\n const transaction: UnsignedTransaction = await this.protocolV1.prepareTransactionWithPublicKey(\n newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey)),\n this.combineTransactionDetails(recipients, values),\n {\n fee: newAmount(fee, 'blockchain'),\n arbitraryData: this.getArbitraryData(extras),\n assetId: extras?.assetID ? parseInt(extras.assetID, 10) : undefined\n }\n )\n\n const transactionV0 = await this.convertUnsignedTransactionV1ToV0(transaction, publicKey)\n\n return transactionV0.transaction\n }\n\n public async broadcastTransaction(rawTransaction: any): Promise<string> {\n if (!isOnlineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Online.')\n }\n\n const transaction = { transaction: rawTransaction, accountIdentifier: '' }\n const signed: SignedTransaction = await this.convertSignedTransactionV0ToV1(transaction)\n\n return this.protocolV1.broadcastTransaction(signed)\n }\n\n public async getAddressFromPublicKey(publicKey: string, _cursor?: IProtocolAddressCursor): Promise<IAirGapAddressResult> {\n const address: AddressWithCursor | string = await this.protocolV1.getAddressFromPublicKey(\n newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey))\n )\n\n return {\n address: typeof address === 'string' ? address : address.address,\n cursor: typeof address === 'object' ? address.cursor : { hasNext: false }\n }\n }\n\n public async getAddressesFromPublicKey(publicKey: string, _cursor?: IProtocolAddressCursor): Promise<IAirGapAddressResult[]> {\n if (hasMultiAddressPublicKeys(this.protocolV1)) {\n const pk: PublicKey = newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey))\n const addresses: AddressWithCursor[] = await this.protocolV1.getInitialAddressesFromPublicKey(pk)\n\n return addresses\n } else {\n return [await this.getAddressFromPublicKey(publicKey)]\n }\n }\n\n public async getAddressFromExtendedPublicKey(\n extendedPublicKey: string,\n visibilityDerivationIndex: number,\n addressDerivationIndex: number\n ): Promise<IAirGapAddressResult> {\n if (!isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Bip32.')\n }\n\n const derivedPublicKey: PublicKey = await this.protocolV1.deriveFromExtendedPublicKey(\n newExtendedPublicKey(extendedPublicKey, getBytesFormatV1FromV0(extendedPublicKey)),\n visibilityDerivationIndex,\n addressDerivationIndex\n )\n\n return this.getAddressFromPublicKey(derivedPublicKey.value)\n }\n\n public async getAddressesFromExtendedPublicKey(\n extendedPublicKey: string,\n visibilityDerivationIndex: number,\n addressCount: number,\n offset: number\n ): Promise<IAirGapAddressResult[]> {\n if (!isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Bip32.')\n }\n\n const generatorArray = Array.from(new Array(addressCount), (_, i) => i + offset)\n\n return Promise.all(\n generatorArray.map((addressDerivationIndex: number) =>\n this.getAddressFromExtendedPublicKey(extendedPublicKey, visibilityDerivationIndex, addressDerivationIndex)\n )\n )\n }\n\n public async getTransactionDetails(\n transaction: UnsignedTransactionV0,\n data?: {\n [key: string]: unknown\n transactionOwner?: string\n\n // TezosSapling\n knownViewingKeys?: string[]\n }\n ): Promise<IAirGapTransaction[]> {\n const unsigned: UnsignedTransaction = await this.convertUnsignedTransactionV0ToV1(transaction, data?.transactionOwner)\n\n let transactions: AirGapTransaction[]\n if (this.isExtendedPublicKey(transaction.publicKey)) {\n if (!isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Bip32.')\n }\n\n transactions = await this.protocolV1.getDetailsFromTransaction(\n unsigned,\n newExtendedPublicKey(transaction.publicKey, getBytesFormatV1FromV0(transaction.publicKey))\n )\n } else {\n const publicKey: PublicKey = newPublicKey(transaction.publicKey, getBytesFormatV1FromV0(transaction.publicKey))\n transactions =\n data?.knownViewingKeys && isTezosSaplingProtocol(this.protocolV1)\n ? await this.protocolV1.getDetailsFromTransaction(unsigned as any, publicKey, data.knownViewingKeys)\n : await this.protocolV1.getDetailsFromTransaction(unsigned, publicKey)\n }\n\n const transactionsV0: IAirGapTransaction[] = await this.convertTransactionDetailsV1ToV0(transactions)\n\n return transactionsV0.map(\n (tx: IAirGapTransaction): IAirGapTransaction => ({\n ...tx,\n transactionDetails: tx.transactionDetails ?? transaction.transaction\n })\n )\n }\n\n public async getTransactionDetailsFromSigned(\n transaction: SignedTransactionV0,\n data?: {\n [key: string]: unknown\n transactionOwner?: string\n\n // TezosSapling\n knownViewingKeys?: string[]\n }\n ): Promise<IAirGapTransaction[]> {\n const signed: SignedTransaction = await this.convertSignedTransactionV0ToV1(transaction, data?.transactionOwner)\n\n let transactions: AirGapTransaction[]\n if (this.isExtendedPublicKey(transaction.accountIdentifier)) {\n if (!isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Bip32.')\n }\n\n transactions = await this.protocolV1.getDetailsFromTransaction(\n signed,\n newExtendedPublicKey(transaction.accountIdentifier, getBytesFormatV1FromV0(transaction.accountIdentifier))\n )\n } else {\n const publicKey: PublicKey = newPublicKey(transaction.accountIdentifier, getBytesFormatV1FromV0(transaction.accountIdentifier))\n transactions =\n data?.knownViewingKeys && isTezosSaplingProtocol(this.protocolV1)\n ? await this.protocolV1.getDetailsFromTransaction(signed as any, publicKey, data.knownViewingKeys)\n : await this.protocolV1.getDetailsFromTransaction(signed, publicKey)\n }\n\n const transactionsV0: IAirGapTransaction[] = await this.convertTransactionDetailsV1ToV0(transactions)\n\n return transactionsV0.map(\n (tx: IAirGapTransaction): IAirGapTransaction => ({\n ...tx,\n transactionDetails: tx.transactionDetails ?? transaction.transaction\n })\n )\n }\n\n public async verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean> {\n if (!isOfflineProtocol(this.protocolV1) || !canSignMessage(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, SignMessage.')\n }\n\n return this.protocolV1.verifyMessageWithPublicKey(\n message,\n newSignature(signature, getBytesFormatV1FromV0(signature)),\n newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey))\n )\n }\n\n public async encryptAsymmetric(payload: string, publicKey: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !canEncryptAsymmetric(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, AsymmetricEncryption.')\n }\n\n return this.protocolV1.encryptAsymmetricWithPublicKey(payload, newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey)))\n }\n\n public async getPublicKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline.')\n }\n\n const crypto: CryptoConfiguration = this.crypto ?? (await this.protocolV1.getCryptoConfiguration())\n const seed: Buffer = await mnemonicToSeed(crypto, mnemonic, password)\n\n return this.getPublicKeyFromHexSecret(seed.toString('hex'), derivationPath)\n }\n\n public async getPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline.')\n }\n\n const crypto: CryptoConfiguration = this.crypto ?? (await this.protocolV1.getCryptoConfiguration())\n const seed: Buffer = await mnemonicToSeed(crypto, mnemonic, password)\n\n return this.getPrivateKeyFromHexSecret(seed.toString('hex'), derivationPath)\n }\n\n public async getExtendedPublicKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, Bip32.')\n }\n\n const crypto: CryptoConfiguration = this.crypto ?? (await this.protocolV1.getCryptoConfiguration())\n const seed: Buffer = await mnemonicToSeed(crypto, mnemonic, password)\n\n return this.getExtendedPublicKeyFromHexSecret(seed.toString('hex'), derivationPath)\n }\n\n public async getExtendedPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, Bip32.')\n }\n\n const crypto: CryptoConfiguration = this.crypto ?? (await this.protocolV1.getCryptoConfiguration())\n const seed: Buffer = await mnemonicToSeed(crypto, mnemonic, password)\n\n return this.getExtendedPrivateKeyFromHexSecret(seed.toString('hex'), derivationPath)\n }\n\n public async getPublicKeyFromHexSecret(secret: string, derivationPath: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, Bip32.')\n }\n\n const crypto: CryptoConfiguration = this.crypto ?? (await this.protocolV1.getCryptoConfiguration())\n const derivative: CryptoDerivative = await derive(crypto, Buffer.from(secret, 'hex'), derivationPath)\n const keyPair: KeyPair = await this.protocolV1.getKeyPairFromDerivative(derivative)\n\n return keyPair.publicKey.value\n }\n\n public async getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline.')\n }\n\n const crypto: CryptoConfiguration = this.crypto ?? (await this.protocolV1.getCryptoConfiguration())\n const derivative: CryptoDerivative = await derive(crypto, Buffer.from(secret, 'hex'), derivationPath)\n const keyPair: KeyPair = await this.protocolV1.getKeyPairFromDerivative(derivative)\n\n return keyPair.secretKey.value\n }\n\n public async getExtendedPublicKeyFromHexSecret(secret: string, derivationPath: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, Bip32.')\n }\n\n const crypto: CryptoConfiguration = this.crypto ?? (await this.protocolV1.getCryptoConfiguration())\n const derivative: CryptoDerivative = await derive(crypto, Buffer.from(secret, 'hex'), derivationPath)\n const keyPair: ExtendedKeyPair = await this.protocolV1.getExtendedKeyPairFromDerivative(derivative)\n\n return keyPair.publicKey.value\n }\n\n public async getExtendedPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, Bip32.')\n }\n\n const crypto: CryptoConfiguration = this.crypto ?? (await this.protocolV1.getCryptoConfiguration())\n const derivative: CryptoDerivative = await derive(crypto, Buffer.from(secret, 'hex'), derivationPath)\n const keyPair: ExtendedKeyPair = await this.protocolV1.getExtendedKeyPairFromDerivative(derivative)\n\n return keyPair.secretKey.value\n }\n\n public async signWithExtendedPrivateKey(extendedPrivateKey: string, transaction: any, childDerivationPath?: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, Bip32.')\n }\n\n const unsigned: UnsignedTransaction = await this.convertUnsignedTransactionV0ToV1({\n transaction,\n publicKey: ''\n })\n\n const extendedSecretKey: ExtendedSecretKey = newExtendedSecretKey(extendedPrivateKey, getBytesFormatV1FromV0(extendedPrivateKey))\n\n const secretKey: ExtendedSecretKey | SecretKey = childDerivationPath\n ? await this.deriveSecretKey(extendedSecretKey, childDerivationPath)\n : extendedSecretKey\n\n const signed: SignedTransaction = await this.protocolV1.signTransactionWithSecretKey(unsigned, secretKey)\n const signedV0: TransactionSignResponse = await this.convertSignedTransactionV1ToV0(signed, '')\n\n return signedV0.transaction\n }\n\n public async signWithPrivateKey(privateKey: string, transaction: any): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline.')\n }\n\n const unsigned: UnsignedTransaction = await this.convertUnsignedTransactionV0ToV1({\n transaction,\n publicKey: ''\n })\n\n const signed: SignedTransaction = await this.protocolV1.signTransactionWithSecretKey(\n unsigned,\n newSecretKey(privateKey, getBytesFormatV1FromV0(privateKey))\n )\n const signedV0: TransactionSignResponse = await this.convertSignedTransactionV1ToV0(signed, '')\n\n return signedV0.transaction\n }\n\n public async signMessage(message: string, keypair: { publicKey?: string; privateKey: string }): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !canSignMessage(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, SignMessage.')\n }\n\n const privateKey =\n getSecretKeyType(keypair.privateKey) === 'xpriv'\n ? await this.getPrivateKeyFromExtendedPrivateKey(keypair.privateKey)\n : keypair.privateKey\n\n const publicKey = keypair.publicKey\n ? getPublicKeyType(keypair.publicKey) === 'xpub'\n ? await this.getPublicKeyFromExtendedPrivateKey(keypair.publicKey)\n : keypair.publicKey\n : ''\n\n const signature: Signature = await this.protocolV1.signMessageWithKeyPair(message, {\n secretKey: newSecretKey(privateKey, getBytesFormatV1FromV0(privateKey)),\n publicKey: newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey))\n })\n\n return signature.value\n }\n\n public async decryptAsymmetric(encryptedPayload: string, keypair: { publicKey?: string; privateKey: string }): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !canEncryptAsymmetric(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, AsymmetricEncryption.')\n }\n\n const privateKey =\n getSecretKeyType(keypair.privateKey) === 'xpriv'\n ? await this.getPrivateKeyFromExtendedPrivateKey(keypair.privateKey)\n : keypair.privateKey\n\n const publicKey = keypair.publicKey\n ? getPublicKeyType(keypair.publicKey) === 'xpub'\n ? await this.getPublicKeyFromExtendedPrivateKey(keypair.publicKey)\n : keypair.publicKey\n : ''\n\n return this.protocolV1.decryptAsymmetricWithKeyPair(encryptedPayload, {\n secretKey: newSecretKey(privateKey, getBytesFormatV1FromV0(privateKey)),\n publicKey: newPublicKey(publicKey, getBytesFormatV1FromV0(publicKey))\n })\n }\n\n public async encryptAES(payload: string, privateKey: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !canEncryptAES(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, AES.')\n }\n\n // eslint-disable-next-line no-param-reassign\n privateKey = getSecretKeyType(privateKey) === 'xpriv' ? await this.getPrivateKeyFromExtendedPrivateKey(privateKey) : privateKey\n\n return this.protocolV1.encryptAESWithSecretKey(payload, newSecretKey(privateKey, getBytesFormatV1FromV0(privateKey)))\n }\n\n public async decryptAES(encryptedPayload: string, privateKey: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !canEncryptAES(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, AES.')\n }\n\n // eslint-disable-next-line no-param-reassign\n privateKey = getSecretKeyType(privateKey) === 'xpriv' ? await this.getPrivateKeyFromExtendedPrivateKey(privateKey) : privateKey\n\n return this.protocolV1.decryptAESWithSecretKey(encryptedPayload, newSecretKey(privateKey, getBytesFormatV1FromV0(privateKey)))\n }\n\n public async getPrivateKeyFromExtendedPrivateKey(extendedPrivateKey: string, childDerivationPath?: string): Promise<string> {\n if (!isOfflineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Offline, Bip32.')\n }\n\n const secretKey: SecretKey = await this.deriveSecretKey(\n newExtendedSecretKey(extendedPrivateKey, getBytesFormatV1FromV0(extendedPrivateKey)),\n childDerivationPath\n )\n\n return secretKey.value\n }\n\n public async getPublicKeyFromExtendedPrivateKey(extendedPublicKey: string, childDerivationPath?: string): Promise<string> {\n if (!isBip32Protocol(this.protocolV1)) {\n throw new Error('Method not supported, required inferface: Bip32.')\n }\n\n const publicKey: PublicKey = await this.derivePublicKey(\n newExtendedPublicKey(extendedPublicKey, getBytesFormatV1FromV0(extendedPublicKey)),\n childDerivationPath\n )\n\n return publicKey.value\n }\n\n protected getNetwork(protocolOptions?: ProtocolOptionsV0): ProtocolNetworkV0 {\n let knownOptions: ProtocolOptionsV0 | undefined\n try {\n knownOptions = protocolOptions ?? getProtocolOptionsByIdentifierLegacy(this.identifier)\n // eslint-disable-next-line no-empty\n } catch {}\n\n const { name, type, rpcUrl, ...rest } = this.network ?? {}\n\n return new ProtocolNetworkAdapter(\n name ?? knownOptions?.network.name ?? '',\n type ?? knownOptions?.network.type ?? 'mainnet',\n rpcUrl ?? knownOptions?.network.rpcUrl ?? '',\n this.blockExplorerV0,\n rest || (knownOptions?.network.extras ?? {})\n )\n }\n\n protected async deriveSecretKey(extendedSecretKey: ExtendedSecretKey, childDerivationPath: string = '0/0'): Promise<SecretKey> {\n if (!isOfflineProtocol(this.protocolV1) || !isBip32Protocol(this.protocolV1)) {\n throw new Error(`Protocol doesn't support secret key derivation, missing inferface: Offline, Bip32.`)\n }\n\n if (childDerivationPath.startsWith('m')) {\n throw new Error('Received full derivation path, expected child derivation path')\n }\n\n if (childDerivationPath.toLowerCase().includes('h') || childDerivationPath.includes(`'`)) {\n throw new Error('Child derivation path cannot include hardened children')\n }\n\n const [visibilityIndex, addressIndex]: number[] = childDerivationPath.split('/').map((index: string) => parseInt(index, 10))\n\n return this.protocolV1.deriveFromExtendedSecretKey(extendedSecretKey, visibilityIndex, addressIndex)\n }\n\n protected async derivePublicKey(extendedPublicKey: ExtendedPublicKey, childDerivationPath: string = '0/0'): Promise<PublicKey> {\n if (!isBip32Protocol(this.protocolV1)) {\n throw new Error(`Protocol doesn't support public key derivation, missing inferface: Bip32.`)\n }\n\n if (childDerivationPath.startsWith('m')) {\n throw new Error('Received full derivation path, expected child derivation path')\n }\n\n if (childDerivationPath.toLowerCase().includes('h') || childDerivationPath.includes(`'`)) {\n throw new Error('Child derivation path cannot include hardened children')\n }\n\n const [visibilityIndex, addressIndex]: number[] = childDerivationPath.split('/').map((index: string) => parseInt(index, 10))\n\n return this.protocolV1.deriveFromExtendedPublicKey(extendedPublicKey, visibilityIndex, addressIndex)\n }\n\n protected async getSerializerIdentifier(base?: string): Promise<string> {\n const identifier: string = base ?? (await this.getIdentifier())\n\n return identifier.startsWith(SubProtocolSymbols.ETH_ERC20)\n ? SubProtocolSymbols.ETH_ERC20\n : identifier.startsWith(SubProtocolSymbols.OPTIMISM_ERC20)\n ? SubProtocolSymbols.OPTIMISM_ERC20\n : identifier\n }\n\n public async convertUnsignedTransactionV0ToV1(transaction: TransactionSignRequest, owner?: string): Promise<UnsignedTransaction> {\n const identifier: string = await this.getSerializerIdentifier(owner)\n\n return this.v3SerializerCompanion.fromTransactionSignRequest(identifier, transaction)\n }\n\n public async convertUnsignedTransactionV1ToV0(\n transaction: UnsignedTransaction,\n publicKey: string,\n callbackUrl?: string,\n owner?: string\n ): Promise<TransactionSignRequest> {\n const identifier: string = await this.getSerializerIdentifier(owner)\n\n return this.v3SerializerCompanion.toTransactionSignRequest(identifier, transaction, publicKey, callbackUrl)\n }\n\n public async convertSignedTransactionV0ToV1(transaction: TransactionSignResponse, owner?: string): Promise<SignedTransaction> {\n const identifier: string = await this.getSerializerIdentifier(owner)\n\n return this.v3SerializerCompanion.fromTransactionSignResponse(identifier, transaction)\n }\n\n public async convertSignedTransactionV1ToV0(\n transaction: SignedTransaction,\n accountIdentifier: string,\n owner?: string\n ): Promise<TransactionSignResponse> {\n const identifier: string = await this.getSerializerIdentifier(owner)\n\n return this.v3SerializerCompanion.toTransactionSignResponse(identifier, transaction, accountIdentifier)\n }\n\n public convertFeeDefaultsV1ToV0(feeDefaults: FeeDefaults): FeeDefaultsV0 {\n return convertFeeDefaultsV1ToV0(feeDefaults, this.protocolMetadata)\n }\n\n public async convertTransactionDetailsV1ToV0(txs: AirGapTransaction[]): Promise<IAirGapTransaction[]> {\n return convertTransactionDetailsV1ToV0(txs, this.protocolMetadata, this.networkV0)\n }\n\n protected combineTransactionDetails<_Units extends string>(recipients: string[], values: string[]): TransactionDetails<_Units>[] {\n if (recipients.length !== values.length) {\n throw new Error('Recipients length must match values length.')\n }\n\n return recipients.map((recipient: string, index: number) => ({\n to: recipient,\n amount: newAmount(values[index], 'blockchain')\n }))\n }\n\n protected isExtendedPublicKey(publicKey: string): boolean {\n return publicKey.startsWith('xpub') || publicKey.startsWith('ypub') || publicKey.startsWith('zpub')\n }\n\n protected getArbitraryData(data: any): string | undefined {\n const simpleArbitraryDataMetadataSchema: Schema<ProtocolTransactionArbitraryDataMetadata> = {\n name: 'required',\n maxLength: 'optional',\n regex: 'optional'\n }\n\n return this.protocolMetadata.transaction?.arbitraryData\n ? implementsInterface<ProtocolTransactionArbitraryDataMetadata>(\n this.protocolMetadata.transaction?.arbitraryData,\n simpleArbitraryDataMetadataSchema\n )\n ? data[this.protocolMetadata.transaction.arbitraryData.name]\n : data[this.protocolMetadata.transaction.arbitraryData.root?.name ?? this.protocolMetadata.transaction.arbitraryData.inner?.name]\n : undefined\n }\n}\n\n// ICoinDelegateProtocol\n\nexport class ICoinDelegateProtocolAdapter<T extends AirGapAnyProtocol & AirGapDelegateProtocol>\n extends ICoinProtocolAdapter<T>\n implements ICoinDelegateProtocol\n{\n public async getDefaultDelegatee(): Promise<string> {\n return this.protocolV1.getDefaultDelegatee()\n }\n\n public async getCurrentDelegateesForPublicKey(publicKey: string, data?: any): Promise<string[]> {\n return this.protocolV1.getCurrentDelegateesForPublicKey(\n { type: 'pub', value: publicKey, format: getBytesFormatV1FromV0(publicKey) },\n data\n )\n }\n\n public async getCurrentDelegateesForAddress(address: string, data?: any): Promise<string[]> {\n return this.protocolV1.getCurrentDelegateesForAddress(address, data)\n }\n\n public async getDelegateeDetails(address: string, data?: any): Promise<DelegateeDetails> {\n return this.protocolV1.getDelegateeDetails(address, data)\n }\n\n public async isPublicKeyDelegating(publicKey: string, data?: any): Promise<boolean> {\n return this.protocolV1.isPublicKeyDelegating({ type: 'pub', value: publicKey, format: getBytesFormatV1FromV0(publicKey) }, data)\n }\n\n public async isAddressDelegating(address: string, data?: any): Promise<boolean> {\n return this.protocolV1.isAddressDelegating(address, data)\n }\n\n public async getDelegatorDetailsFromPublicKey(publicKey: string, data?: any): Promise<DelegatorDetails> {\n return this.protocolV1.getDelegatorDetailsFromPublicKey(\n { type: 'pub', value: publicKey, format: getBytesFormatV1FromV0(publicKey) },\n data\n )\n }\n\n public async getDelegatorDetailsFromAddress(address: string, data?: any): Promise<DelegatorDetails> {\n return this.protocolV1.getDelegatorDetailsFromAddress(address, data)\n }\n\n public async getDelegationDetailsFromPublicKey(publicKey: string, delegatees: string[], data?: any): Promise<DelegationDetails> {\n return this.protocolV1.getDelegationDetailsFromPublicKey(\n { type: 'pub', value: publicKey, format: getBytesFormatV1FromV0(publicKey) },\n delegatees,\n data\n )\n }\n\n public async getDelegationDetailsFromAddress(address: string, delegatees: string[], data?: any): Promise<DelegationDetails> {\n return this.protocolV1.getDelegationDetailsFromAddress(address, delegatees, data)\n }\n\n public async prepareDelegatorActionFromPublicKey(publicKey: string, type: any, data?: any): Promise<any[]> {\n const transactions = await this.protocolV1.prepareDelegatorActionFromPublicKey(\n { type: 'pub', value: publicKey, format: getBytesFormatV1FromV0(publicKey) },\n type,\n data\n )\n\n const transactionsV0 = await Promise.all(\n transactions.map((transaction) => this.convertUnsignedTransactionV1ToV0(transaction, publicKey))\n )\n\n return transactionsV0.map((transaction) => transaction.transaction)\n }\n}\n\n// ICoinSubProtocol\n\nexport class ICoinSubProtocolAdapter<T extends AirGapAnyProtocol & SubProtocol = AirGapAnyProtocol & SubProtocol>\n extends ICoinProtocolAdapter<T>\n implements ICoinSubProtocol\n{\n public readonly isSubProtocol: boolean = true\n public readonly subProtocolType: SubProtocolTypeV0\n public readonly contractAddress?: string\n\n constructor(\n protocolV1: T,\n protocolMetadata: ProtocolMetadata,\n crypto: CryptoConfiguration | undefined,\n network: ProtocolNetwork | undefined,\n v1BlockExplorer: AirGapBlockExplorer | undefined,\n blockExplorerMetadata: BlockExplorerMetadata | undefined,\n v3SerializerCompanion: AirGapV3SerializerCompanion,\n type: SubProtocolType,\n contractAddress: string | undefined\n ) {\n super(protocolV1, protocolMetadata, crypto, network, v1BlockExplorer, blockExplorerMetadata, v3SerializerCompanion)\n\n this.subProtocolType = type === 'account' ? SubProtocolTypeV0.ACCOUNT : SubProtocolTypeV0.TOKEN\n this.contractAddress = contractAddress\n }\n\n public async getIsSubProtocol(): Promise<boolean> {\n return this.isSubProtocol\n }\n\n public async getSubProtocolType(): Promise<SubProtocolTypeV0> {\n return this.subProtocolType\n }\n\n public async getContractAddress(): Promise<string | undefined> {\n return this.contractAddress\n }\n}\n\nexport class ICoinDelegateSubProtocolAdapter<\n T extends AirGapAnyProtocol & AirGapDelegateProtocol & SubProtocol = AirGapAnyProtocol & AirGapDelegateProtocol & SubProtocol\n >\n extends ICoinSubProtocolAdapter<T>\n implements ICoinSubProtocol, ICoinDelegateProtocol\n{\n private readonly delegateProtocolAdapter: ICoinDelegateProtocolAdapter<T>\n\n constructor(\n protocolV1: T,\n protocolMetadata: ProtocolMetadata,\n crypto: CryptoConfiguration | undefined,\n network: ProtocolNetwork | undefined,\n v1BlockExplorer: AirGapBlockExplorer | undefined,\n blockExplorerMetadata: BlockExplorerMetadata | undefined,\n v3SerializerCompanion: AirGapV3SerializerCompanion,\n type: SubProtocolType,\n contractAddress: string | undefined\n ) {\n super(\n protocolV1,\n protocolMetadata,\n crypto,\n network,\n v1BlockExplorer,\n blockExplorerMetadata,\n v3SerializerCompanion,\n type,\n contractAddress\n )\n\n this.delegateProtocolAdapter = new ICoinDelegateProtocolAdapter(\n protocolV1,\n protocolMetadata,\n crypto,\n network,\n v1BlockExplorer,\n blockExplorerMetadata,\n v3SerializerCompanion\n )\n }\n\n public async getDefaultDelegatee(): Promise<string> {\n return this.delegateProtocolAdapter.getDefaultDelegatee()\n }\n\n public async getCurrentDelegateesForPublicKey(publicKey: string, data?: any): Promise<string[]> {\n return this.delegateProtocolAdapter.getCurrentDelegateesForPublicKey(publicKey, data)\n }\n\n public async getCurrentDelegateesForAddress(address: string, data?: any): Promise<string[]> {\n return this.delegateProtocolAdapter.getCurrentDelegateesForAddress(address, data)\n }\n\n public async getDelegateeDetails(address: string, data?: any): Promise<DelegateeDetails> {\n return this.delegateProtocolAdapter.getDelegateeDetails(address, data)\n }\n\n public async isPublicKeyDelegating(publicKey: string, data?: any): Promise<boolean> {\n return this.delegateProtocolAdapter.isPublicKeyDelegating(publicKey, data)\n }\n\n public async isAddressDelegating(address: string, data?: any): Promise<boolean> {\n return this.delegateProtocolAdapter.isAddressDelegating(address, data)\n }\n\n public async getDelegatorDetailsFromPublicKey(publicKey: string, data?: any): Promise<DelegatorDetails> {\n return this.delegateProtocolAdapter.getDelegatorDetailsFromPublicKey(publicKey, data)\n }\n\n public async getDelegatorDetailsFromAddress(address: string, data?: any): Promise<DelegatorDetails> {\n return this.delegateProtocolAdapter.getDelegatorDetailsFromAddress(address, data)\n }\n\n public async getDelegationDetailsFromPublicKey(publicKey: string, delegatees: string[], data?: any): Promise<DelegationDetails> {\n return this.delegateProtocolAdapter.getDelegationDetailsFromPublicKey(publicKey, delegatees, data)\n }\n\n public async getDelegationDetailsFromAddress(address: string, delegatees: string[], data?: any): Promise<DelegationDetails> {\n return this.delegateProtocolAdapter.getDelegationDetailsFromAddress(address, delegatees, data)\n }\n\n public async prepareDelegatorActionFromPublicKey(publicKey: string, type: any, data?: any): Promise<any[]> {\n return this.delegateProtocolAdapter.prepareDelegatorActionFromPublicKey(publicKey, type, data)\n }\n}\n\n// Factories\n\nexport async function createICoinProtocolAdapter<T extends AirGapAnyProtocol>(\n protocolV1: T,\n blockExplorerV1: AirGapBlockExplorer | undefined,\n v3SerializerCompanion: AirGapV3SerializerCompanion,\n extra: {\n type?: ProtocolConfiguration['type']\n protocolMetadata?: ProtocolMetadata\n crypto?: CryptoConfiguration | null\n network?: ProtocolNetwork | null\n blockExplorerMetadata?: BlockExplorerMetadata | null\n } = {}\n): Promise<ICoinProtocolAdapter<T>> {\n const [protocolMetadata, crypto, network, blockExplorerMetadata]: [\n ProtocolMetadata,\n CryptoConfiguration | undefined,\n ProtocolNetwork | undefined,\n BlockExplorerMetadata | undefined\n ] = await Promise.all([\n extra.protocolMetadata ? Promise.resolve(extra.protocolMetadata) : protocolV1.getMetadata(),\n extra.crypto\n ? Promise.resolve(extra.crypto)\n : extra.crypto === null || !isOfflineProtocol(protocolV1) || (extra.type !== 'offline' && extra.type !== 'full')\n ? Promise.resolve(undefined)\n : protocolV1.getCryptoConfiguration(),\n extra.network\n ? Promise.resolve(extra.network)\n : extra.network === null || !isOnlineProtocol(protocolV1) || (extra.type !== 'online' && extra.type !== 'full')\n ? Promise.resolve(undefined)\n : protocolV1.getNetwork(),\n extra.blockExplorerMetadata\n ? Promise.resolve(extra.blockExplorerMetadata)\n : extra.blockExplorerMetadata === null || blockExplorerV1 === undefined || (extra.type !== 'online' && extra.type !== 'full')\n ? Promise.resolve(undefined)\n : blockExplorerV1.getMetadata()\n ])\n\n if (supportsV1Delegation(protocolV1)) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return new ICoinDelegateProtocolAdapter(\n protocolV1,\n protocolMetadata,\n crypto,\n network,\n blockExplorerV1,\n blockExplorerMetadata,\n v3SerializerCompanion\n )\n } else {\n return new ICoinProtocolAdapter(\n protocolV1,\n protocolMetadata,\n crypto,\n network,\n blockExplorerV1,\n blockExplorerMetadata,\n v3SerializerCompanion\n )\n }\n}\n\n// eslint-disable-next-line complexity\nexport async function createICoinSubProtocolAdapter<T extends AirGapAnyProtocol & SubProtocol>(\n protocolV1: T,\n blockExplorerV1: AirGapBlockExplorer | undefined,\n v3SerializerCompanion: AirGapV3SerializerCompanion,\n extra: {\n type?: ProtocolConfiguration['type']\n protocolMetadata?: ProtocolMetadata\n crypto?: CryptoConfiguration | null\n network?: ProtocolNetwork | null\n blockExplorerMetadata?: BlockExplorerMetadata | null\n subType?: SubProtocolType\n contractAddress?: string | null\n } = {}\n): Promise<ICoinSubProtocolAdapter<T>> {\n const [protocolMetadata, crypto, network, blockExplorerMetadata, type, contractAddress]: [\n ProtocolMetadata,\n CryptoConfiguration | undefined,\n ProtocolNetwork | undefined,\n BlockExplorerMetadata | undefined,\n SubProtocolType,\n string | undefined\n ] = await Promise.all([\n extra.protocolMetadata ? Promise.resolve(extra.protocolMetadata) : protocolV1.getMetadata(),\n extra.crypto\n ? Promise.resolve(extra.crypto)\n : extra.crypto === null || !isOfflineProtocol(protocolV1) || (extra?.type !== 'offline' && extra?.type !== 'full')\n ? Promise.resolve(undefined)\n : protocolV1.getCryptoConfiguration(),\n extra.network\n ? Promise.resolve(extra.network)\n : extra.network === null || !isOnlineProtocol(protocolV1) || (extra?.type !== 'online' && extra?.type !== 'full')\n ? Promise.resolve(undefined)\n : protocolV1.getNetwork(),\n extra.blockExplorerMetadata\n ? Promise.resolve(extra.blockExplorerMetadata)\n : extra.blockExplorerMetadata === null || blockExplorerV1 === undefined || (extra?.type !== 'online' && extra?.type !== 'full')\n ? Promise.resolve(undefined)\n : blockExplorerV1.getMetadata(),\n extra.subType ? Promise.resolve(extra.subType) : protocolV1.getType(),\n extra.contractAddress\n ? Promise.resolve(extra.contractAddress)\n : extra.contractAddress === null || !hasConfigurableContract(protocolV1)\n ? Promise.resolve(undefined)\n : protocolV1.getContractAddress()\n ])\n\n if (supportsV1Delegation(protocolV1)) {\n return new ICoinDelegateSubProtocolAdapter(\n protocolV1,\n protocolMetadata,\n crypto,\n network,\n blockExplorerV1,\n blockExplorerMetadata,\n v3SerializerCompanion,\n type,\n contractAddress\n )\n } else {\n return new ICoinSubProtocolAdapter(\n protocolV1,\n protocolMetadata,\n crypto,\n network,\n blockExplorerV1,\n blockExplorerMetadata,\n v3SerializerCompanion,\n type,\n contractAddress\n )\n }\n}\n","/* eslint-disable max-lines */\nimport { AeternityModule, AeternityProtocol, createAeternityProtocol } from '@wallfree-dev/aeternity'\nimport { AstarModule, AstarProtocol, createAstarProtocol, createShidenProtocol, ShidenProtocol } from '@wallfree-dev/astar'\nimport {\n ProtocolNetwork as ProtocolNetworkV0,\n NetworkType as ProtocolNetworkTypeV0,\n ProtocolBlockExplorer as ProtocolBlockExplorerV0,\n FeeDefaults as FeeDefaultsV0,\n IAirGapTransaction as AirGapTransactionV0,\n ProtocolSymbols\n} from '@wallfree-dev/coinlib-core'\nimport {\n createERC20Token as createEthereumERC20Token,\n createEthereumProtocol,\n ERC20Token as EthereumERC20Token,\n EthereumModule,\n EthereumProtocol\n} from '@wallfree-dev/ethereum'\nimport {\n AirGapAnyProtocol,\n AirGapBlockExplorer as ProtocolBlockExplorerV1,\n AirGapModule,\n AirGapOnlineProtocol,\n AirGapTransaction as AirGapTransactionV1,\n AirGapTransactionStatus as AirGapTransactionStatusV1,\n AirGapUIAction as AirGapUIActionV1,\n AirGapUIAlert as AirGapUIAlertV1,\n AirGapV3SerializerCompanion,\n BytesStringFormat,\n ExtendedPublicKey,\n ExtendedSecretKey,\n FeeDefaults as FeeDefaultsV1,\n isOnlineProtocol,\n newAmount,\n ProtocolConfiguration,\n ProtocolMetadata,\n ProtocolNetwork as ProtocolNetworkV1,\n ProtocolNetworkType as ProtocolNetworkTypeV1,\n ProtocolUnitsMetadata,\n PublicKey,\n RecursivePartial,\n SecretKey,\n SubProtocol\n} from '@wallfree-dev/module-kit'\nimport { BitcoinModule, BitcoinProtocol, BitcoinSegwitProtocol, createBitcoinProtocol, createBitcoinSegwitProtocol } from '@wallfree-dev/bitcoin'\nimport { CoreumModule, CoreumProtocol, createCoreumProtocol } from '@wallfree-dev/coreum'\nimport { CosmosModule, CosmosProtocol, createCosmosProtocol } from '@wallfree-dev/cosmos'\nimport { createGroestlcoinProtocol, GroestlcoinModule, GroestlcoinProtocol } from '@wallfree-dev/groestlcoin'\nimport { createICPProtocol, ICPModule, ICPProtocol } from '@wallfree-dev/icp'\nimport {\n createMoonbaseProtocol,\n createMoonbeamProtocol,\n createMoonriverProtocol,\n MoonbaseProtocol,\n MoonbeamModule,\n MoonbeamProtocol,\n MoonriverProtocol\n} from '@wallfree-dev/moonbeam'\nimport {\n createERC20Token as createOptimismERC20Token,\n createOptimismProtocol,\n ERC20Token as OptimismERC20Token,\n OptimismModule,\n OptimismProtocol\n} from '@wallfree-dev/optimism'\nimport { createKusamaProtocol, createPolkadotProtocol, KusamaProtocol, PolkadotModule, PolkadotProtocol } from '@wallfree-dev/polkadot'\nimport { createSolanaProtocol, SolanaModule, SolanaProtocol } from '@wallfree-dev/solana'\nimport {\n BTCTezProtocol,\n createBTCTezProtocol,\n createCTezProtocol,\n createDogamiProtocol,\n createETHTezProtocol,\n createKolibriUSDProtocol,\n createPlentyProtocol,\n createQuipuswapProtocol,\n createSiriusProtocol,\n createStakerProtocol,\n createTetherUSDProtocol,\n createTezosFA1p2Protocol,\n createTezosFA2Protocol,\n createTezosKtProtocol,\n createTezosProtocol,\n createTezosShieldedTezProtocol,\n createTzBTCProtocol,\n createUBTCProtocol,\n createUDEFIProtocol,\n createUSDTezProtocol,\n createUUSDProtocol,\n createWrappedTezosProtocol,\n createWrapProtocol,\n createYouProtocol,\n CTezProtocol,\n DogamiProtocol,\n ETHTezProtocol,\n KolibriUSDProtocol,\n PlentyProtocol,\n QuipuswapProtocol,\n SiriusProtocol,\n StakerProtocol,\n TetherUSDProtocol,\n TezosFA1p2Protocol,\n TezosFA2Protocol,\n TezosFAProtocol,\n TezosKtProtocol,\n TezosModule,\n TezosProtocol,\n TezosProtocolNetwork,\n TezosShieldedTezProtocol,\n TzBTCProtocol,\n UBTCProtocol,\n UDEFIProtocol,\n USDTezProtocol,\n UUSDProtocol,\n WrappedTezosProtocol,\n WrapProtocol,\n YouProtocol\n} from '@wallfree-dev/tezos'\nimport BigNumber from '@wallfree-dev/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber'\n\nimport {\n AirGapTransactionStatus as AirGapTransactionStatusV0,\n AirGapTransactionWarning as AirGapUIAlertV0,\n AirGapTransactionWarningType\n} from '@wallfree-dev/coinlib-core/interfaces/IAirGapTransaction'\nimport { isHex } from '@wallfree-dev/coinlib-core/utils/hex'\n\nimport {\n createICoinProtocolAdapter,\n createICoinSubProtocolAdapter,\n ICoinProtocolAdapter,\n ICoinSubProtocolAdapter,\n ProtocolBlockExplorerAdapter,\n ProtocolNetworkAdapter\n} from '../../protocol/adapter/protocol-v0-adapter'\n\n// Network\n\nexport function convertNetworkTypeV0ToV1(type: ProtocolNetworkTypeV0): ProtocolNetworkTypeV1 {\n return type === ProtocolNetworkTypeV0.MAINNET ? 'mainnet' : type === ProtocolNetworkTypeV0.TESTNET ? 'testnet' : 'custom'\n}\n\nexport function convertNetworkTypeV1ToV0(type: ProtocolNetworkTypeV1): ProtocolNetworkTypeV0 {\n return type === 'mainnet'\n ? ProtocolNetworkTypeV0.MAINNET\n : type === 'testnet'\n ? ProtocolNetworkTypeV0.TESTNET\n : ProtocolNetworkTypeV0.CUSTOM\n}\n\nexport function convertNetworkV0ToV1(network: ProtocolNetworkV0): ProtocolNetworkV1 {\n return {\n name: network.name,\n type: convertNetworkTypeV0ToV1(network.type),\n rpcUrl: network.rpcUrl,\n blockExplorerUrl: network.blockExplorer.blockExplorer,\n ...(typeof network.extras === 'object' ? network.extras : {})\n }\n}\n\nexport function convertNetworkV1ToV0(network: ProtocolNetworkV1, blockExplorer?: ProtocolBlockExplorerV1): ProtocolNetworkV0 {\n const { name, type, rpcUrl, ...rest } = network\n const blockExplorerV0: ProtocolBlockExplorerV0 = new ProtocolBlockExplorerAdapter(blockExplorer, network.blockExplorerUrl)\n\n return new ProtocolNetworkAdapter(name, convertNetworkTypeV1ToV0(type), rpcUrl, blockExplorerV0, rest)\n}\n\n// Protocol\n\nasync function createAdapterSupplementsFromIdentifierAndNetwork(\n module: AirGapModule,\n identifier: string,\n network: ProtocolNetworkV1 | undefined\n): Promise<[ProtocolBlockExplorerV1, AirGapV3SerializerCompanion]> {\n const [blockExplorer, v3SerializerCompanion] = await Promise.all([\n module.createBlockExplorer(identifier, network),\n module.createV3SerializerCompanion()\n ])\n\n return [blockExplorer, v3SerializerCompanion]\n}\n\nasync function createAdapterSupplementsFromProtocol<T extends AirGapAnyProtocol>(\n protocol: T,\n module: AirGapModule\n): Promise<[ProtocolBlockExplorerV1, AirGapV3SerializerCompanion]> {\n const [metadata, network]: [ProtocolMetadata, ProtocolNetworkV1 | undefined] = await Promise.all([\n protocol.getMetadata(),\n isOnlineProtocol(protocol) ? protocol.getNetwork() : Promise.resolve(undefined)\n ])\n\n return createAdapterSupplementsFromIdentifierAndNetwork(module, metadata.identifier, network)\n}\n\nexport async function createV0Protocol<T extends AirGapAnyProtocol>(\n protocol: T,\n module: AirGapModule,\n type: ProtocolConfiguration['type'] = 'full'\n): Promise<ICoinProtocolAdapter<T>> {\n const [blockExplorer, v3SerializerCompanion]: [ProtocolBlockExplorerV1, AirGapV3SerializerCompanion] =\n await createAdapterSupplementsFromProtocol(protocol, module)\n\n return createICoinProtocolAdapter(protocol, blockExplorer, v3SerializerCompanion, { type })\n}\n\nexport async function createV0SubProtocol<T extends AirGapAnyProtocol & SubProtocol>(\n protocol: T,\n module: AirGapModule,\n type: ProtocolConfiguration['type'] = 'full'\n): Promise<ICoinSubProtocolAdapter<T>> {\n const [blockExplorer, v3SerializerCompanion]: [ProtocolBlockExplorerV1, AirGapV3SerializerCompanion] =\n await createAdapterSupplementsFromProtocol(protocol, module)\n\n return createICoinSubProtocolAdapter(protocol, blockExplorer, v3SerializerCompanion, { type })\n}\n\nexport async function createV0ERC20Token<T extends AirGapAnyProtocol & SubProtocol>(\n erc20Token: T,\n protocol: AirGapAnyProtocol,\n module: AirGapModule,\n type: ProtocolConfiguration['type'] = 'full'\n): Promise<ICoinSubProtocolAdapter<T>> {\n const [metadata, network]: [ProtocolMetadata, ProtocolNetworkV1 | undefined] = await Promise.all([\n protocol.getMetadata(),\n isOnlineProtocol(erc20Token) ? erc20Token.getNetwork() : Promise.resolve(undefined)\n ])\n\n const [blockExplorer, v3SerializerCompanion] = await createAdapterSupplementsFromIdentifierAndNetwork(\n module,\n metadata.identifier,\n network\n )\n\n return createICoinSubProtocolAdapter(erc20Token, blockExplorer, v3SerializerCompanion, { type })\n}\n\nexport async function createV0AeternityProtocol(\n ...args: Parameters<typeof createAeternityProtocol>\n): Promise<ICoinProtocolAdapter<AeternityProtocol>> {\n const protocol: AeternityProtocol = createAeternityProtocol(...args)\n const module: AeternityModule = new AeternityModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0AstarProtocol(...args: Parameters<typeof createAstarProtocol>): Promise<ICoinProtocolAdapter<AstarProtocol>> {\n const protocol: AstarProtocol = createAstarProtocol(...args)\n const module: AstarModule = new AstarModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0ShidenProtocol(\n ...args: Parameters<typeof createShidenProtocol>\n): Promise<ICoinProtocolAdapter<ShidenProtocol>> {\n const protocol: ShidenProtocol = createShidenProtocol(...args)\n const module: AstarModule = new AstarModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0BitcoinProtocol(\n ...args: Parameters<typeof createBitcoinProtocol>\n): Promise<ICoinProtocolAdapter<BitcoinProtocol>> {\n const protocol: BitcoinProtocol = createBitcoinProtocol(...args)\n const module: BitcoinModule = new BitcoinModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0BitcoinSegwitProtocol(\n ...args: Parameters<typeof createBitcoinSegwitProtocol>\n): Promise<ICoinProtocolAdapter<BitcoinSegwitProtocol>> {\n const protocol: BitcoinSegwitProtocol = createBitcoinSegwitProtocol(...args)\n const module: BitcoinModule = new BitcoinModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0CoreumProtocol(\n ...args: Parameters<typeof createCoreumProtocol>\n): Promise<ICoinProtocolAdapter<CoreumProtocol>> {\n const protocol: CoreumProtocol = createCoreumProtocol(...args)\n const module: CoreumModule = new CoreumModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0CosmosProtocol(\n ...args: Parameters<typeof createCosmosProtocol>\n): Promise<ICoinProtocolAdapter<CosmosProtocol>> {\n const protocol: CosmosProtocol = createCosmosProtocol(...args)\n const module: CosmosModule = new CosmosModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0EthereumProtocol(\n ...args: Parameters<typeof createEthereumProtocol>\n): Promise<ICoinProtocolAdapter<EthereumProtocol>> {\n const protocol: EthereumProtocol = createEthereumProtocol(...args)\n const module: EthereumModule = new EthereumModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0EthereumERC20Token(\n ...args: Parameters<typeof createEthereumERC20Token>\n): Promise<ICoinSubProtocolAdapter<EthereumERC20Token>> {\n const erc20Token: EthereumERC20Token = createEthereumERC20Token(...args)\n const ethereumProtocol: EthereumProtocol = createEthereumProtocol(args[1])\n const module: EthereumModule = new EthereumModule()\n\n return createV0ERC20Token(erc20Token, ethereumProtocol, module)\n}\n\nexport async function createV0GroestlcoinProtocol(\n ...args: Parameters<typeof createGroestlcoinProtocol>\n): Promise<ICoinProtocolAdapter<GroestlcoinProtocol>> {\n const protocol: GroestlcoinProtocol = createGroestlcoinProtocol(...args)\n const module: GroestlcoinModule = new GroestlcoinModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0ICPProtocol(...args: Parameters<typeof createICPProtocol>): Promise<ICoinProtocolAdapter<ICPProtocol>> {\n const protocol: ICPProtocol = createICPProtocol(...args)\n const module: ICPModule = new ICPModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0MoonbeamProtocol(\n ...args: Parameters<typeof createMoonbeamProtocol>\n): Promise<ICoinProtocolAdapter<MoonbeamProtocol>> {\n const protocol: MoonbeamProtocol = createMoonbeamProtocol(...args)\n const module: MoonbeamModule = new MoonbeamModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0MoonriverProtocol(\n ...args: Parameters<typeof createMoonriverProtocol>\n): Promise<ICoinProtocolAdapter<MoonriverProtocol>> {\n const protocol: MoonriverProtocol = createMoonriverProtocol(...args)\n const module: MoonbeamModule = new MoonbeamModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0MoonbaseProtocol(\n ...args: Parameters<typeof createMoonbaseProtocol>\n): Promise<ICoinProtocolAdapter<MoonbaseProtocol>> {\n const protocol: MoonbaseProtocol = createMoonbaseProtocol(...args)\n const module: MoonbeamModule = new MoonbeamModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0OptimismProtocol(\n ...args: Parameters<typeof createOptimismProtocol>\n): Promise<ICoinProtocolAdapter<OptimismProtocol>> {\n const protocol: OptimismProtocol = createOptimismProtocol(...args)\n const module: OptimismModule = new OptimismModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0OptimismERC20Token(\n ...args: Parameters<typeof createOptimismERC20Token>\n): Promise<ICoinSubProtocolAdapter<OptimismERC20Token>> {\n const erc20Token: OptimismERC20Token = createOptimismERC20Token(...args)\n const optimismProtocol: OptimismProtocol = createOptimismProtocol(args[1])\n const module: OptimismModule = new OptimismModule()\n\n return createV0ERC20Token(erc20Token, optimismProtocol, module)\n}\n\nexport async function createV0PolkadotProtocol(\n ...args: Parameters<typeof createPolkadotProtocol>\n): Promise<ICoinProtocolAdapter<PolkadotProtocol>> {\n const protocol: PolkadotProtocol = createPolkadotProtocol(...args)\n const module: PolkadotModule = new PolkadotModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0KusamaProtocol(\n ...args: Parameters<typeof createKusamaProtocol>\n): Promise<ICoinProtocolAdapter<KusamaProtocol>> {\n const protocol: KusamaProtocol = createKusamaProtocol(...args)\n const module: PolkadotModule = new PolkadotModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0SolanaProtocol(\n ...args: Parameters<typeof createSolanaProtocol>\n): Promise<ICoinProtocolAdapter<SolanaProtocol>> {\n const protocol: SolanaProtocol = createSolanaProtocol(...args)\n const module: any = new SolanaModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0TezosProtocol(...args: Parameters<typeof createTezosProtocol>): Promise<ICoinProtocolAdapter<TezosProtocol>> {\n const protocol: TezosProtocol = createTezosProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0TezosShieldedTezProtocol(\n ...args: Parameters<typeof createTezosShieldedTezProtocol>\n): Promise<ICoinProtocolAdapter<TezosShieldedTezProtocol>> {\n const protocol: TezosShieldedTezProtocol = createTezosShieldedTezProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0Protocol(protocol, module)\n}\n\nexport async function createV0TezosKtProtocol(\n ...args: Parameters<typeof createTezosKtProtocol>\n): Promise<ICoinSubProtocolAdapter<TezosKtProtocol>> {\n const protocol: TezosKtProtocol = createTezosKtProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nasync function createV0TezosFAProtocol<T extends TezosFAProtocol>(\n faProtocol: T,\n tezosNetwork?: RecursivePartial<TezosProtocolNetwork>,\n type: ProtocolConfiguration['type'] = 'full'\n): Promise<ICoinSubProtocolAdapter<T>> {\n const tezosProtocol: TezosProtocol = createTezosProtocol({ network: tezosNetwork })\n const module: TezosModule = new TezosModule()\n\n const [metadata, network]: [ProtocolMetadata, ProtocolNetworkV1 | undefined] = await Promise.all([\n tezosProtocol.getMetadata(),\n isOnlineProtocol(faProtocol) ? faProtocol.getNetwork() : Promise.resolve(undefined)\n ])\n\n const [blockExplorer, v3SerializerCompanion] = await createAdapterSupplementsFromIdentifierAndNetwork(\n module,\n metadata.identifier,\n network\n )\n\n return createICoinSubProtocolAdapter(faProtocol, blockExplorer, v3SerializerCompanion, { type })\n}\n\nexport async function createV0TezosFA1p2Protocol(\n ...args: Parameters<typeof createTezosFA1p2Protocol>\n): Promise<ICoinSubProtocolAdapter<TezosFA1p2Protocol>> {\n const fa1p2Protocol: TezosFA1p2Protocol = createTezosFA1p2Protocol(...args)\n\n return createV0TezosFAProtocol(fa1p2Protocol, args[0].network)\n}\n\nexport async function createV0TezosFA2Protocol(\n ...args: Parameters<typeof createTezosFA2Protocol>\n): Promise<ICoinSubProtocolAdapter<TezosFA2Protocol>> {\n const fa2Protocol: TezosFA2Protocol = createTezosFA2Protocol(...args)\n\n return createV0TezosFAProtocol(fa2Protocol, args[0].network)\n}\n\nexport async function createV0TezosBTCTezProtocol(\n ...args: Parameters<typeof createBTCTezProtocol>\n): Promise<ICoinSubProtocolAdapter<BTCTezProtocol>> {\n const protocol: BTCTezProtocol = createBTCTezProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosCTezProtocol(\n ...args: Parameters<typeof createCTezProtocol>\n): Promise<ICoinSubProtocolAdapter<CTezProtocol>> {\n const protocol: CTezProtocol = createCTezProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosDogamiProtocol(\n ...args: Parameters<typeof createDogamiProtocol>\n): Promise<ICoinSubProtocolAdapter<DogamiProtocol>> {\n const protocol: DogamiProtocol = createDogamiProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosETHTezProtocol(\n ...args: Parameters<typeof createETHTezProtocol>\n): Promise<ICoinSubProtocolAdapter<ETHTezProtocol>> {\n const protocol: ETHTezProtocol = createETHTezProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosKolibriUSDProtocol(\n ...args: Parameters<typeof createKolibriUSDProtocol>\n): Promise<ICoinSubProtocolAdapter<KolibriUSDProtocol>> {\n const protocol: KolibriUSDProtocol = createKolibriUSDProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosPlentyProtocol(\n ...args: Parameters<typeof createPlentyProtocol>\n): Promise<ICoinSubProtocolAdapter<PlentyProtocol>> {\n const protocol: PlentyProtocol = createPlentyProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosQuipuswapProtocol(\n ...args: Parameters<typeof createQuipuswapProtocol>\n): Promise<ICoinSubProtocolAdapter<QuipuswapProtocol>> {\n const protocol: QuipuswapProtocol = createQuipuswapProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosSiriusProtocol(\n ...args: Parameters<typeof createSiriusProtocol>\n): Promise<ICoinSubProtocolAdapter<SiriusProtocol>> {\n const protocol: SiriusProtocol = createSiriusProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosStakerProtocol(\n ...args: Parameters<typeof createStakerProtocol>\n): Promise<ICoinSubProtocolAdapter<StakerProtocol>> {\n const protocol: StakerProtocol = createStakerProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosTetherUSDProtocol(\n ...args: Parameters<typeof createTetherUSDProtocol>\n): Promise<ICoinSubProtocolAdapter<TetherUSDProtocol>> {\n const protocol: TetherUSDProtocol = createTetherUSDProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosTzBTCProtocol(\n ...args: Parameters<typeof createTzBTCProtocol>\n): Promise<ICoinSubProtocolAdapter<TzBTCProtocol>> {\n const protocol: TzBTCProtocol = createTzBTCProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosUBTCProtocol(\n ...args: Parameters<typeof createUBTCProtocol>\n): Promise<ICoinSubProtocolAdapter<UBTCProtocol>> {\n const protocol: UBTCProtocol = createUBTCProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosUDEFIProtocol(\n ...args: Parameters<typeof createUDEFIProtocol>\n): Promise<ICoinSubProtocolAdapter<UDEFIProtocol>> {\n const protocol: UDEFIProtocol = createUDEFIProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosUSDTezProtocol(\n ...args: Parameters<typeof createUSDTezProtocol>\n): Promise<ICoinSubProtocolAdapter<USDTezProtocol>> {\n const protocol: USDTezProtocol = createUSDTezProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosUUSDProtocol(\n ...args: Parameters<typeof createUUSDProtocol>\n): Promise<ICoinSubProtocolAdapter<UUSDProtocol>> {\n const protocol: UUSDProtocol = createUUSDProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosWrappedProtocol(\n ...args: Parameters<typeof createWrappedTezosProtocol>\n): Promise<ICoinSubProtocolAdapter<WrappedTezosProtocol>> {\n const protocol: WrappedTezosProtocol = createWrappedTezosProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosWrapProtocol(\n ...args: Parameters<typeof createWrapProtocol>\n): Promise<ICoinSubProtocolAdapter<WrapProtocol>> {\n const protocol: WrapProtocol = createWrapProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\nexport async function createV0TezosYouProtocol(\n ...args: Parameters<typeof createYouProtocol>\n): Promise<ICoinSubProtocolAdapter<YouProtocol>> {\n const protocol: YouProtocol = createYouProtocol(...args)\n const module: TezosModule = new TezosModule()\n\n return createV0SubProtocol(protocol, module)\n}\n\n// Transaction\n\nexport function convertTransactionStatusV1ToV0(status: AirGapTransactionStatusV1): AirGapTransactionStatusV0 {\n return status.type === 'applied'\n ? AirGapTransactionStatusV0.APPLIED\n : status.type === 'failed'\n ? AirGapTransactionStatusV0.FAILED\n : undefined\n}\n\nfunction convertUIActionsV1ToV0(actions: AirGapUIActionV1[]): AirGapUIAlertV0['actions'] {\n return actions.map((action: AirGapUIActionV1) => ({\n text: action.text.value,\n link: ''\n }))\n}\n\nfunction convertUIAlertsV1ToV0(alerts: AirGapUIAlertV1[]): AirGapUIAlertV0[] {\n return alerts.map((alert: AirGapUIAlertV1) => ({\n type:\n alert.type === 'success'\n ? AirGapTransactionWarningType.SUCCESS\n : alert.type === 'info'\n ? AirGapTransactionWarningType.NOTE\n : alert.type === 'warning'\n ? AirGapTransactionWarningType.WARNING\n : AirGapTransactionWarningType.ERROR,\n title: alert.title.value,\n description: alert.description.value,\n icon: alert.icon,\n actions: alert.actions ? convertUIActionsV1ToV0(alert.actions) : undefined\n }))\n}\n\nexport async function convertTransactionDetailsV1ToV0(\n txs: AirGapTransactionV1[],\n protocol: AirGapOnlineProtocol\n): Promise<AirGapTransactionV0[]>\n// eslint-disable-next-line no-redeclare\nexport async function convertTransactionDetailsV1ToV0(\n txs: AirGapTransactionV1[],\n metadata: ProtocolMetadata,\n network: ProtocolNetworkV1 | ProtocolNetworkV0\n): Promise<AirGapTransactionV0[]>\n// eslint-disable-next-line no-redeclare\nexport async function convertTransactionDetailsV1ToV0(\n txs: AirGapTransactionV1[],\n protocolOrMetadata: AirGapOnlineProtocol | ProtocolMetadata,\n networkOrUndefined?: ProtocolNetworkV1 | ProtocolNetworkV0\n): Promise<AirGapTransactionV0[]> {\n const protocolMetadata: ProtocolMetadata = isOnlineProtocol(protocolOrMetadata)\n ? await protocolOrMetadata.getMetadata()\n : protocolOrMetadata\n\n const networkV0: ProtocolNetworkV0 = isOnlineProtocol(protocolOrMetadata)\n ? convertNetworkV1ToV0(await protocolOrMetadata.getNetwork())\n : networkOrUndefined instanceof ProtocolNetworkV0\n ? networkOrUndefined\n : convertNetworkV1ToV0(networkOrUndefined)\n\n const units: ProtocolUnitsMetadata = protocolMetadata.units\n const feeUnits: ProtocolUnitsMetadata = protocolMetadata.fee?.units ?? units\n\n return txs.map((tx: AirGapTransactionV1): AirGapTransactionV0 => {\n return {\n from: tx.from,\n to: tx.to,\n isInbound: tx.isInbound,\n\n amount: newAmount(tx.amount).blockchain(units).value,\n fee: newAmount(tx.fee).blockchain(feeUnits).value,\n\n timestamp: tx.timestamp,\n changeAddressInfo: tx.changeAddressInfo,\n displayFromTo: tx.displayFromTo,\n\n protocolIdentifier: protocolMetadata.identifier as ProtocolSymbols,\n network: networkV0,\n\n data: typeof tx.arbitraryData === 'string' ? tx.arbitraryData : tx.arbitraryData?.[1],\n\n hash: tx.status?.hash,\n blockHeight: tx.status?.block,\n status: tx.status ? convertTransactionStatusV1ToV0(tx.status) : undefined,\n\n warnings: tx.uiAlerts ? convertUIAlertsV1ToV0(tx.uiAlerts) : undefined,\n\n extra: {\n ...tx.extra,\n type: tx.type\n },\n transactionDetails: tx.json\n }\n })\n}\n\n// FeeDefaults\n\nexport function convertFeeDefaultsV0ToV1<_FeeUnits extends string>(feeDefaults: FeeDefaultsV0, decimals: number): FeeDefaultsV1<_FeeUnits> {\n return {\n low: newAmount(new BigNumber(feeDefaults.low).shiftedBy(decimals), 'blockchain'),\n medium: newAmount(new BigNumber(feeDefaults.medium).shiftedBy(decimals), 'blockchain'),\n high: newAmount(new BigNumber(feeDefaults.high).shiftedBy(decimals), 'blockchain')\n }\n}\n\nexport function convertFeeDefaultsV1ToV0(feeDefaults: FeeDefaultsV1, protocolMetadata: ProtocolMetadata): FeeDefaultsV0 {\n const feeUnits: ProtocolUnitsMetadata = protocolMetadata.fee?.units ?? protocolMetadata.units\n const feeUnit: string = protocolMetadata.fee?.mainUnit ?? protocolMetadata.mainUnit\n\n return {\n low: new BigNumber(newAmount(feeDefaults.low).convert(feeUnit, feeUnits).value).toFixed(),\n medium: new BigNumber(newAmount(feeDefaults.medium).convert(feeUnit, feeUnits).value).toFixed(),\n high: new BigNumber(newAmount(feeDefaults.high).convert(feeUnit, feeUnits).value).toFixed()\n }\n}\n\n// Bytes\n\nexport function getBytesFormatV1FromV0(bytes: string): BytesStringFormat {\n return isHex(bytes) ? 'hex' : 'encoded'\n}\n\nexport function getSecretKeyType(secretKey: string): SecretKey['type'] | ExtendedSecretKey['type'] {\n return secretKey.startsWith('xprv') ? 'xpriv' : 'priv'\n}\n\nexport function getPublicKeyType(publicKey: string): PublicKey['type'] | ExtendedPublicKey['type'] {\n return publicKey.startsWith('xpub') ? 'xpub' : 'pub'\n}\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport { ICoinProtocol, ICoinSubProtocol } from '@wallfree-dev/coinlib-core'\nimport { erc20Tokens } from '@wallfree-dev/ethereum'\nimport { Token } from '../../types/Token'\nimport {\n createV0AeternityProtocol,\n createV0AstarProtocol,\n createV0BitcoinProtocol,\n createV0BitcoinSegwitProtocol,\n createV0CosmosProtocol,\n createV0EthereumERC20Token,\n createV0EthereumProtocol,\n createV0GroestlcoinProtocol,\n createV0KusamaProtocol,\n createV0MoonbeamProtocol,\n createV0MoonriverProtocol,\n createV0PolkadotProtocol,\n createV0ShidenProtocol,\n createV0SolanaProtocol,\n createV0TezosBTCTezProtocol,\n createV0TezosCTezProtocol,\n createV0TezosDogamiProtocol,\n createV0TezosETHTezProtocol,\n createV0TezosKolibriUSDProtocol,\n createV0TezosKtProtocol,\n createV0TezosPlentyProtocol,\n createV0TezosProtocol,\n createV0TezosQuipuswapProtocol,\n createV0TezosSiriusProtocol,\n createV0TezosTetherUSDProtocol,\n createV0TezosTzBTCProtocol,\n createV0TezosUBTCProtocol,\n createV0TezosUDEFIProtocol,\n createV0TezosUSDTezProtocol,\n createV0TezosUUSDProtocol,\n createV0TezosWrapProtocol,\n createV0TezosYouProtocol\n} from '../../utils/protocol/protocol-v0-adapter'\n\nexport async function getDefaultPassiveProtocols(): Promise<ICoinProtocol[]> {\n return []\n}\n\nexport async function getDefaultActiveProtocols(): Promise<ICoinProtocol[]> {\n return Promise.all<ICoinProtocol>([\n createV0BitcoinSegwitProtocol(),\n createV0EthereumProtocol(),\n createV0TezosProtocol(),\n createV0PolkadotProtocol(),\n createV0KusamaProtocol(),\n createV0CosmosProtocol(),\n createV0AeternityProtocol(),\n createV0GroestlcoinProtocol(),\n createV0MoonriverProtocol(),\n createV0MoonbeamProtocol(),\n createV0BitcoinProtocol(),\n createV0AstarProtocol(),\n createV0ShidenProtocol(),\n createV0SolanaProtocol()\n ])\n}\n\nexport async function getDefaultPassiveSubProtocols(): Promise<[ICoinProtocol, ICoinSubProtocol][]> {\n return []\n}\n\nexport async function getDefaultActiveSubProtocols(): Promise<[ICoinProtocol, ICoinSubProtocol][]> {\n const [tezosProtocol, ethereumProtocol] = await Promise.all([createV0TezosProtocol(), createV0EthereumProtocol()])\n\n return Promise.all([\n createV0TezosUUSDProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosYouProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosTzBTCProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosUSDTezProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosUDEFIProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosCTezProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosPlentyProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosWrapProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosQuipuswapProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosKolibriUSDProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosUBTCProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosDogamiProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosSiriusProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosBTCTezProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosETHTezProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosTetherUSDProtocol().then(pairWithMainProtocol(tezosProtocol)),\n createV0TezosKtProtocol().then(pairWithMainProtocol(tezosProtocol)),\n ...Object.values(erc20Tokens).map((token: Token) => createV0EthereumERC20Token(token).then(pairWithMainProtocol(ethereumProtocol)))\n ])\n}\n\nfunction pairWithMainProtocol(mainProtocol: ICoinProtocol): (subProtocol: ICoinSubProtocol) => [ICoinProtocol, ICoinSubProtocol] {\n return (subProtocol: ICoinSubProtocol): [ICoinProtocol, ICoinSubProtocol] => {\n return [mainProtocol, subProtocol] as [ICoinProtocol, ICoinSubProtocol]\n }\n}\n","export enum RuntimeMode {\n OFFLINE = 'offline',\n ONLINE = 'online'\n}\n","import { ICoinProtocol, ProtocolNetwork, ProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { RuntimeMode } from '../../types/RuntimeMode'\n\nexport async function getProtocolAndNetworkIdentifier(\n mode: RuntimeMode,\n protocol: ICoinProtocol | ProtocolSymbols,\n network?: ProtocolNetwork | string\n): Promise<string> {\n const protocolIdentifier: string = typeof protocol === 'string' ? protocol : await protocol.getIdentifier()\n if (mode === RuntimeMode.OFFLINE) {\n return protocolIdentifier\n }\n\n const networkIdentifier: string | undefined =\n typeof protocol !== 'string'\n ? (await protocol.getOptions()).network.identifier\n : typeof network === 'string'\n ? network\n : network?.identifier\n\n return networkIdentifier !== undefined ? `${protocolIdentifier}:${networkIdentifier}` : protocolIdentifier\n}\n\nexport function splitProtocolNetworkIdentifier(protocolAndNetworkIdentifier: string): { protocol: ProtocolSymbols; network?: string } {\n const [protocol, network]: string[] = protocolAndNetworkIdentifier.split(':', 2)\n\n return { protocol: protocol as ProtocolSymbols, network }\n}\n","export function createNotInitialized(name: string, details?: string): () => never {\n return () => {\n const error: string = [`${name} not initialized yet.`, details].filter((part: string | undefined) => part !== undefined).join(' ')\n throw new Error(error)\n }\n}\n","import { RuntimeMode } from '../../types/RuntimeMode'\n\nexport abstract class BaseEnvironmentService {\n constructor(public readonly mode: RuntimeMode) {}\n}\n","import { Either } from '../types/Either'\n\nexport function duplicatesRemoved<T>(array: T[]): T[] {\n return array.filter((item: T, index: number, arr: T[]) => arr.indexOf(item) === index)\n}\n\nexport function partition<T>(array: T[], isValid: (element: T) => boolean): [T[], T[]] {\n const pass: T[] = []\n const fail: T[] = []\n array.forEach((element: T) => {\n if (isValid(element)) {\n pass.push(element)\n } else {\n fail.push(element)\n }\n })\n\n return [pass, fail]\n}\n\nexport function flattened<T>(array: T[][]): T[] {\n return array.reduce((output: T[], next: T[]) => output.concat(next), [])\n}\n\nexport function merged<T, R>(array: Either<T, R>[]): [T[], R[]] {\n return array.reduce(\n (output: [T[], R[]], next: Either<T, R>) => {\n const [t, r]: Either<T, R> = next\n if (t !== undefined) {\n output[0].push(t)\n }\n\n if (r !== undefined) {\n output[1].push(r)\n }\n\n return output\n },\n [[], []]\n )\n}\n","import { OfflineProtocolConfiguration, OnlineProtocolConfiguration, ProtocolConfiguration } from '@wallfree-dev/module-kit'\n\nexport function getOfflineProtocolConfiguration(\n configuration: ProtocolConfiguration,\n protocolType?: ProtocolConfiguration['type']\n): OfflineProtocolConfiguration | undefined {\n return protocolType === 'offline' || protocolType === 'full' || protocolType === undefined\n ? configuration.type === 'offline'\n ? configuration\n : configuration.type === 'full'\n ? configuration.offline\n : undefined\n : undefined\n}\n\nexport function getOnlineProtocolConfiguration(\n configuration: ProtocolConfiguration,\n protocolType?: ProtocolConfiguration['type']\n): OnlineProtocolConfiguration | undefined {\n return protocolType === 'online' || protocolType === 'full' || protocolType === undefined\n ? configuration.type === 'online'\n ? configuration\n : configuration.type === 'full'\n ? configuration.online\n : undefined\n : undefined\n}\n","import { AirGapWallet } from '@wallfree-dev/coinlib-core'\n\nexport interface DeriveAddressesAsyncOptions {\n protocolIdentifier: string\n publicKey: string\n isExtendedPublicKey: boolean\n derivationPath: string\n addressIndex?: number\n}\n\nexport type DerieveAddressesAsyncResult = Record<string, string[]>\n\nasync function convertDeriveAddressesWallet(wallet: AirGapWallet | DeriveAddressesAsyncOptions): Promise<DeriveAddressesAsyncOptions> {\n return wallet instanceof AirGapWallet\n ? {\n protocolIdentifier: await wallet.protocol.getIdentifier(),\n publicKey: wallet.publicKey,\n isExtendedPublicKey: wallet.isExtendedPublicKey,\n derivationPath: wallet.derivationPath,\n addressIndex: wallet.addressIndex\n }\n : wallet\n}\n\nexport async function deriveAddressesAsync(\n walletOrWallets: AirGapWallet | AirGapWallet[] | DeriveAddressesAsyncOptions | DeriveAddressesAsyncOptions[],\n amount: number = 50\n): Promise<DerieveAddressesAsyncResult> {\n const wallets: DeriveAddressesAsyncOptions[] = await Promise.all(\n Array.isArray(walletOrWallets)\n ? (walletOrWallets as (AirGapWallet | DeriveAddressesAsyncOptions)[]).map(convertDeriveAddressesWallet)\n : [convertDeriveAddressesWallet(walletOrWallets)]\n )\n\n if (wallets.length === 0) {\n return {}\n }\n\n const airGapWorker = new Worker('./assets/workers/airgap-coin-lib.js')\n\n return new Promise<DerieveAddressesAsyncResult>((resolve) => {\n airGapWorker.onmessage = (event) => {\n resolve(event.data)\n }\n\n airGapWorker.postMessage({ wallets, amount })\n })\n}\n","import { AirGapWallet } from '@wallfree-dev/coinlib-core'\nimport {\n AirGapBlockExplorer,\n AirGapModule,\n AirGapOfflineProtocol,\n AirGapOnlineProtocol,\n AirGapV3SerializerCompanion,\n OfflineProtocolConfiguration,\n OnlineProtocolConfiguration,\n ProtocolConfiguration,\n ProtocolNetwork\n} from '@wallfree-dev/module-kit'\nimport { Injectable } from '@angular/core'\nimport { flattened } from '../../../../utils/array'\nimport { getOfflineProtocolConfiguration, getOnlineProtocolConfiguration } from '../../../../utils/modules/load-protocol'\nimport { deriveAddressesAsync } from '../../../../utils/worker'\nimport { BaseModulesController, LoadedModule, LoadedProtocol } from '../base-modules.controller'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IntegralModulesController implements BaseModulesController {\n public isInitialized: boolean = false\n\n private modules: AirGapModule[] = []\n\n private readonly supportedProtocols: Set<string> = new Set()\n\n public init(modules: AirGapModule[]): void {\n this.isInitialized = true\n this.modules = modules\n }\n\n public async loadModules(protocolType?: ProtocolConfiguration['type'], ignoreProtocols: string[] = []): Promise<LoadedModule[]> {\n return Promise.all(this.modules.map((module: AirGapModule) => this.loadModule(module, protocolType, new Set(ignoreProtocols))))\n }\n\n private async loadModule(\n module: AirGapModule,\n protocolType: ProtocolConfiguration['type'] | undefined,\n ignoreProtocols: Set<string>\n ): Promise<LoadedModule> {\n const v3SerializerCompanion: AirGapV3SerializerCompanion = await module.createV3SerializerCompanion()\n const protocols: LoadedProtocol[] = flattened(\n await Promise.all(\n Object.entries(module.supportedProtocols)\n .filter(([identifier, _]) => !ignoreProtocols.has(identifier))\n .map(([identifier, configuration]: [string, ProtocolConfiguration]) =>\n this.loadModuleProtocols(module, identifier, configuration, protocolType)\n )\n )\n )\n\n protocols.forEach((protocol: LoadedProtocol) => {\n this.supportedProtocols.add(protocol.identifier)\n })\n\n return { protocols, v3SerializerCompanion }\n }\n\n private async loadModuleProtocols(\n module: AirGapModule,\n identifier: string,\n configuration: ProtocolConfiguration,\n protocolType?: ProtocolConfiguration['type']\n ): Promise<LoadedProtocol[]> {\n const offlineConfiguration: OfflineProtocolConfiguration | undefined = getOfflineProtocolConfiguration(configuration, protocolType)\n const onlineConfiguration: OnlineProtocolConfiguration | undefined = getOnlineProtocolConfiguration(configuration, protocolType)\n\n const [offlineProtocols, onlineProtocols]: [LoadedProtocol[], LoadedProtocol[]] = await Promise.all([\n offlineConfiguration ? this.loadOfflineProtocols(module, identifier, offlineConfiguration) : Promise.resolve([]),\n onlineConfiguration ? this.loadOnlineProtocols(module, identifier, onlineConfiguration) : Promise.resolve([])\n ])\n\n return offlineProtocols.concat(onlineProtocols)\n }\n\n private async loadOfflineProtocols(\n module: AirGapModule,\n identifier: string,\n _configuration: OfflineProtocolConfiguration\n ): Promise<LoadedProtocol[]> {\n const protocol: AirGapOfflineProtocol | undefined = await module.createOfflineProtocol(identifier)\n if (protocol === undefined) {\n return []\n }\n\n return [{ identifier, protocol }]\n }\n\n private async loadOnlineProtocols(\n module: AirGapModule,\n identifier: string,\n configuration: OnlineProtocolConfiguration\n ): Promise<LoadedProtocol[]> {\n const protocols: (LoadedProtocol | undefined)[] = await Promise.all(\n Object.entries(configuration.networks).map(async ([networkId, _]: [string, ProtocolNetwork]) => {\n const [protocol, blockExplorer]: [AirGapOnlineProtocol | undefined, AirGapBlockExplorer | undefined] = await Promise.all([\n module.createOnlineProtocol(identifier, networkId),\n module.createBlockExplorer(identifier, networkId)\n ])\n if (protocol === undefined) {\n return undefined\n }\n\n return { identifier, protocol, blockExplorer }\n })\n )\n\n return protocols.filter((protocol: LoadedProtocol | undefined) => protocol !== undefined)\n }\n\n public isProtocolSupported(identifier: string): boolean {\n return this.supportedProtocols.has(identifier)\n }\n\n public async getProtocolNetwork(protocolIdentifier: string, networkId?: string): Promise<ProtocolNetwork | undefined> {\n const targetModule: AirGapModule | undefined = this.modules.find(\n (module: AirGapModule) => module.supportedProtocols[protocolIdentifier] !== undefined\n )\n if (targetModule === undefined) {\n return undefined\n }\n\n const onlineProtocol: AirGapOnlineProtocol | undefined = await targetModule.createOnlineProtocol(protocolIdentifier, networkId)\n if (onlineProtocol === undefined) {\n return undefined\n }\n\n return onlineProtocol.getNetwork()\n }\n\n public async getProtocolBlockExplorer(\n protocolIdentifier: string,\n network: string | ProtocolNetwork\n ): Promise<AirGapBlockExplorer | undefined> {\n const targetModule: AirGapModule | undefined = this.modules.find(\n (module: AirGapModule) => module.supportedProtocols[protocolIdentifier] !== undefined\n )\n if (targetModule === undefined) {\n return undefined\n }\n\n return targetModule.createBlockExplorer(protocolIdentifier, network)\n }\n\n public async deriveAddresses(wallets: AirGapWallet[], amount?: number): Promise<Record<string, string[]>> {\n return deriveAddressesAsync(wallets, amount)\n }\n}\n","import { InjectionToken } from '@angular/core'\nimport { AppPlugin } from '@capacitor/app'\nimport { AppLauncherPlugin } from '@capacitor/app-launcher'\nimport { ClipboardPlugin } from '@capacitor/clipboard'\nimport { FilesystemPlugin } from '@capacitor/filesystem'\nimport { SplashScreenPlugin } from '@capacitor/splash-screen'\nimport { StatusBarPlugin } from '@capacitor/status-bar'\n\nimport { AppInfoPlugin, IsolatedModulesPlugin, ZipPlugin } from './definitions'\n\nexport const APP_PLUGIN = new InjectionToken<AppPlugin>('AppPlugin')\nexport const APP_INFO_PLUGIN = new InjectionToken<AppInfoPlugin>('AppInfoPlugin')\nexport const APP_LAUNCHER_PLUGIN = new InjectionToken<AppLauncherPlugin>('AppLauncherPlugin')\nexport const CLIPBOARD_PLUGIN = new InjectionToken<ClipboardPlugin>('ClipboardPlugin')\nexport const FILESYSTEM_PLUGIN = new InjectionToken<FilesystemPlugin>('FilesystemPlugin')\nexport const ISOLATED_MODULES_PLUGIN = new InjectionToken<IsolatedModulesPlugin>('IsolatedModulesPlugin')\nexport const SPLASH_SCREEN_PLUGIN = new InjectionToken<SplashScreenPlugin>('SplashScreenPlugin')\nexport const STATUS_BAR_PLUGIN = new InjectionToken<StatusBarPlugin>('StatusBarPlugin')\nexport const ZIP_PLUGIN = new InjectionToken<ZipPlugin>('ZipPlugin')\n","import { CallMethodOptions, CallMethodResult, IsolatedModulesPlugin } from '../../capacitor-plugins/definitions'\n\nexport abstract class IsolatedBase<I> {\n constructor(\n protected readonly isolatedModulesPlugin: IsolatedModulesPlugin,\n methods: string[] = [],\n protected readonly cachedValues: Record<string, unknown> = {}\n ) {\n this.extendWithMethods(methods)\n }\n\n protected abstract createCallOptions(method: string, args: unknown[] | undefined): Promise<CallMethodOptions>\n\n protected async callMethod<T, K extends string = keyof I extends string ? keyof I : string>(name: K, args?: unknown[]): Promise<T> {\n if (name in this.cachedValues) {\n return this.cachedValues[name] as T\n }\n\n const { value }: CallMethodResult = await this.isolatedModulesPlugin.callMethod(\n await this.createCallOptions(name, this.serializeArgs(args))\n )\n\n return value as T\n }\n\n private extendWithMethods(methods: string[]) {\n for (const method of methods) {\n if (this[method] === undefined) {\n this[method] = (...args) => {\n return this.callMethod<any, string>(method, this.serializeArgs(args))\n }\n }\n }\n }\n\n private serializeArgs(args?: unknown[]): unknown[] | undefined {\n return args ? JSON.parse(JSON.stringify(args)) : undefined\n }\n}\n","import { AirGapV3SerializerCompanion, SignedTransaction, UnsignedTransaction, V3SchemaConfiguration } from '@wallfree-dev/module-kit'\nimport { TransactionSignRequest, TransactionSignResponse } from '@wallfree-dev/serializer'\nimport { CallMethodOptions, IsolatedModulesPlugin, V3SerializerCompanionCallMethodOptions } from '../../capacitor-plugins/definitions'\nimport { IsolatedBase } from './base-isolated'\n\nexport class IsolatedAirGapV3SerializerCompanion extends IsolatedBase<AirGapV3SerializerCompanion> implements AirGapV3SerializerCompanion {\n constructor(\n isolatedModulesPlugin: IsolatedModulesPlugin,\n public readonly schemas: V3SchemaConfiguration[],\n private readonly moduleIdentifier: string\n ) {\n super(isolatedModulesPlugin)\n }\n\n public async toTransactionSignRequest(\n identifier: string,\n unsignedTransaction: UnsignedTransaction,\n publicKey: string,\n callbackUrl?: string\n ): Promise<TransactionSignRequest> {\n return this.callMethod('toTransactionSignRequest', [identifier, unsignedTransaction, publicKey, callbackUrl])\n }\n\n public async fromTransactionSignRequest(\n identifier: string,\n transactionSignRequest: TransactionSignRequest\n ): Promise<UnsignedTransaction> {\n return this.callMethod('fromTransactionSignRequest', [identifier, transactionSignRequest])\n }\n\n public async validateTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<boolean> {\n return this.callMethod('validateTransactionSignRequest', [identifier, transactionSignRequest])\n }\n\n public async toTransactionSignResponse(\n identifier: string,\n signedTransaction: SignedTransaction,\n accountIdentifier: string\n ): Promise<TransactionSignResponse> {\n return this.callMethod('toTransactionSignResponse', [identifier, signedTransaction, accountIdentifier])\n }\n\n public async fromTransactionSignResponse(\n identifier: string,\n transactionSignResponse: TransactionSignResponse\n ): Promise<SignedTransaction> {\n return this.callMethod('fromTransactionSignResponse', [identifier, transactionSignResponse])\n }\n\n public async validateTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<boolean> {\n return this.callMethod('validateTransactionSignResponse', [identifier, transactionSignResponse])\n }\n\n protected async createCallOptions(method: V3SerializerCompanionCallMethodOptions['method'], args: unknown[]): Promise<CallMethodOptions> {\n return {\n target: 'v3SerializerCompanion',\n method,\n args,\n moduleIdentifier: this.moduleIdentifier\n }\n }\n}\n","import {\n AddressWithCursor,\n AirGapOfflineProtocol,\n AirGapTransaction,\n CryptoConfiguration,\n CryptoDerivative,\n KeyPair,\n ProtocolMetadata,\n PublicKey,\n SecretKey,\n SignedTransaction,\n UnsignedTransaction\n} from '@wallfree-dev/module-kit'\nimport { CallMethodOptions, IsolatedModulesPlugin, OfflineProtocolCallMethodOptions } from '../../capacitor-plugins/definitions'\nimport { IsolatedProtocol } from '../../types/isolated-modules/IsolatedModule'\nimport { IsolatedBase } from './base-isolated'\n\nexport class IsolatedAirGapOfflineProtocol extends IsolatedBase<AirGapOfflineProtocol> implements AirGapOfflineProtocol {\n constructor(isolatedModulesPlugin: IsolatedModulesPlugin, private readonly isolatedProtocol: IsolatedProtocol) {\n super(isolatedModulesPlugin, isolatedProtocol.methods, isolatedProtocol.cachedValues)\n }\n\n public async getMetadata(): Promise<ProtocolMetadata> {\n return this.isolatedProtocol.protocolMetadata\n }\n\n public async getAddressFromPublicKey(publicKey: PublicKey): Promise<string | AddressWithCursor> {\n return this.callMethod('getAddressFromPublicKey', [publicKey])\n }\n\n public async getDetailsFromTransaction(\n transaction: SignedTransaction | UnsignedTransaction,\n publicKey: PublicKey\n ): Promise<AirGapTransaction[]> {\n return this.callMethod('getDetailsFromTransaction', [transaction, publicKey])\n }\n\n private cryptoConfiguration: CryptoConfiguration | undefined\n public async getCryptoConfiguration(): Promise<CryptoConfiguration> {\n if (this.cryptoConfiguration === undefined) {\n this.cryptoConfiguration = await this.callMethod('getCryptoConfiguration')\n }\n\n return this.cryptoConfiguration\n }\n\n public async getKeyPairFromDerivative(derivative: CryptoDerivative): Promise<KeyPair> {\n return this.callMethod('getKeyPairFromDerivative', [derivative])\n }\n\n public async signTransactionWithSecretKey(transaction: UnsignedTransaction, secretKey: SecretKey): Promise<SignedTransaction> {\n return this.callMethod('signTransactionWithSecretKey', [transaction, secretKey])\n }\n\n protected async createCallOptions(method: OfflineProtocolCallMethodOptions['method'], args: unknown[]): Promise<CallMethodOptions> {\n return {\n target: 'offlineProtocol',\n method,\n args,\n protocolIdentifier: this.isolatedProtocol.identifier\n }\n }\n}\n","import {\n AddressWithCursor,\n AirGapOnlineProtocol,\n AirGapTransaction,\n AirGapTransactionsWithCursor,\n Amount,\n Balance,\n FeeEstimation,\n ProtocolMetadata,\n ProtocolNetwork,\n protocolNetworkIdentifier,\n PublicKey,\n SignedTransaction,\n TransactionFullConfiguration,\n TransactionCursor,\n TransactionDetails,\n UnsignedTransaction,\n TransactionSimpleConfiguration\n} from '@wallfree-dev/module-kit'\nimport { CallMethodOptions, IsolatedModulesPlugin, OnlineProtocolCallMethodOptions } from '../../capacitor-plugins/definitions'\nimport { IsolatedProtocol } from '../../types/isolated-modules/IsolatedModule'\nimport { IsolatedBase } from './base-isolated'\n\nexport class IsolatedAirGapOnlineProtocol extends IsolatedBase<AirGapOnlineProtocol> implements AirGapOnlineProtocol {\n constructor(isolatedModulesPlugin: IsolatedModulesPlugin, private readonly isolatedProtocol: IsolatedProtocol) {\n super(isolatedModulesPlugin, isolatedProtocol.methods, isolatedProtocol.cachedValues)\n }\n\n public async getMetadata(): Promise<ProtocolMetadata> {\n return this.isolatedProtocol.protocolMetadata\n }\n\n public async getAddressFromPublicKey(publicKey: PublicKey): Promise<string | AddressWithCursor> {\n return this.callMethod('getAddressFromPublicKey', [publicKey])\n }\n\n public async getDetailsFromTransaction(\n transaction: SignedTransaction | UnsignedTransaction,\n publicKey: PublicKey\n ): Promise<AirGapTransaction[]> {\n return this.callMethod('getDetailsFromTransaction', [transaction, publicKey])\n }\n\n private network: ProtocolNetwork | null = this.isolatedProtocol.network\n public async getNetwork(): Promise<ProtocolNetwork> {\n if (this.network === null) {\n this.network = await this.callMethod('getNetwork')\n }\n\n return this.network\n }\n\n public async getTransactionsForPublicKey(\n publicKey: PublicKey,\n limit: number,\n cursor?: TransactionCursor\n ): Promise<AirGapTransactionsWithCursor> {\n return this.callMethod('getTransactionsForPublicKey', [publicKey, limit, cursor])\n }\n\n public async getBalanceOfPublicKey(publicKey: PublicKey, configuration?: any): Promise<Balance> {\n return this.callMethod('getBalanceOfPublicKey', [publicKey, configuration])\n }\n\n public async getTransactionMaxAmountWithPublicKey(\n publicKey: PublicKey,\n to: string[],\n configuration?: TransactionFullConfiguration\n ): Promise<Amount> {\n return this.callMethod('getTransactionMaxAmountWithPublicKey', [publicKey, to, configuration])\n }\n\n public async getTransactionFeeWithPublicKey(\n publicKey: PublicKey,\n details: TransactionDetails[],\n configuration?: TransactionSimpleConfiguration\n ): Promise<FeeEstimation> {\n return this.callMethod('getTransactionFeeWithPublicKey', [publicKey, details, configuration])\n }\n\n public async prepareTransactionWithPublicKey(\n publicKey: PublicKey,\n details: TransactionDetails[],\n configuration?: TransactionFullConfiguration\n ): Promise<UnsignedTransaction> {\n return this.callMethod('prepareTransactionWithPublicKey', [publicKey, details, configuration])\n }\n\n public async broadcastTransaction(transaction: SignedTransaction): Promise<string> {\n return this.callMethod('broadcastTransaction', [transaction])\n }\n\n protected async createCallOptions(method: OnlineProtocolCallMethodOptions['method'], args: unknown[]): Promise<CallMethodOptions> {\n return {\n target: 'onlineProtocol',\n method,\n args,\n protocolIdentifier: this.isolatedProtocol.identifier,\n networkId: protocolNetworkIdentifier(this.isolatedProtocol.network ?? (await this.getNetwork()))\n }\n }\n}\n","import { AirGapBlockExplorer, BlockExplorerMetadata, ProtocolNetwork, protocolNetworkIdentifier } from '@wallfree-dev/module-kit'\nimport { BlockExplorerCallMethodOptions, CallMethodOptions, IsolatedModulesPlugin } from '../../capacitor-plugins/definitions'\nimport { IsolatedBase } from './base-isolated'\n\nexport class IsolatedAirGapBlockExplorer extends IsolatedBase<AirGapBlockExplorer> implements AirGapBlockExplorer {\n constructor(\n isolatedModulesPlugin: IsolatedModulesPlugin,\n private readonly protocolIdentifier: string,\n private readonly network: ProtocolNetwork,\n metadata?: BlockExplorerMetadata\n ) {\n super(isolatedModulesPlugin)\n\n this.metadata = metadata\n }\n\n private metadata: BlockExplorerMetadata | undefined\n public async getMetadata(): Promise<BlockExplorerMetadata> {\n if (this.metadata === undefined) {\n this.metadata = await this.callMethod('getMetadata')\n }\n\n return this.metadata\n }\n\n public async createAddressUrl(address: string): Promise<string> {\n return this.callMethod('createAddressUrl', [address])\n }\n\n public async createTransactionUrl(transactionId: string): Promise<string> {\n return this.callMethod('createTransactionUrl', [transactionId])\n }\n\n protected async createCallOptions(method: BlockExplorerCallMethodOptions['method'], args: unknown[]): Promise<CallMethodOptions> {\n return {\n target: 'blockExplorer',\n method,\n args,\n protocolIdentifier: this.protocolIdentifier,\n networkId: protocolNetworkIdentifier(this.network)\n }\n }\n}\n","import { HttpRemoteData } from '@wallfree-dev/coinlib-core/utils/remote-data/HttpRemoteData'\nimport { IpfsRemoteData } from '@wallfree-dev/coinlib-core/utils/remote-data/IpfsRemoteData'\nimport { Injectable } from '@angular/core'\n\ntype UriType = 'remote' | 'data' | 'unsupported'\n\nconst SCHEME = {\n data: 'data'\n}\n\nconst EXTENSION = {\n base64: 'base64'\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UriService {\n public resolveUriType(uri: string): UriType {\n if (uri.startsWith(SCHEME.data)) {\n return 'data'\n } else if (IpfsRemoteData.validate(uri) || HttpRemoteData.validate(uri)) {\n return 'remote'\n } else {\n return 'unsupported'\n }\n }\n\n public splitDataUri(uri: string): { mediaType?: string; isBinary: boolean; data: string } | undefined {\n if (!uri.startsWith(SCHEME.data)) {\n return undefined\n }\n\n const dataSeparatorIndex: number = uri.indexOf(',')\n const extensionSeparatorIndex: number = uri.indexOf(';')\n\n const mediaType: string = uri.slice(\n `${SCHEME.data}:`.length,\n extensionSeparatorIndex !== -1 ? extensionSeparatorIndex : dataSeparatorIndex\n )\n\n const isBinary: boolean = uri.includes(EXTENSION.base64)\n const data: string = uri.slice(dataSeparatorIndex + 1)\n\n return {\n mediaType: mediaType.length > 0 ? mediaType : undefined,\n isBinary,\n data\n }\n }\n\n public data(data: string, mediaType: string = '', isBinary: boolean = false): string {\n const extension: string = isBinary ? `;${EXTENSION.base64}` : ''\n\n return `${SCHEME.data}:${mediaType}${extension},${data}`\n }\n}\n","import { RawData } from '@wallfree-dev/coinlib-core/utils/remote-data/RemoteData'\nimport { RemoteDataFactory } from '@wallfree-dev/coinlib-core/utils/remote-data/RemoteDataFactory'\nimport { UriService } from '../../uri/uri.service'\nimport { ImageFetcher } from '../image.service'\n\nexport class ImageDirectFetcher implements ImageFetcher {\n private readonly remoteDataFactory: RemoteDataFactory\n\n constructor(private readonly uriService: UriService) {\n this.remoteDataFactory = new RemoteDataFactory()\n }\n\n public async fetch(uri: string): Promise<string> {\n const remoteData = this.remoteDataFactory.create(uri, {})\n const rawData: RawData | undefined = await remoteData?.getRaw()\n if (!rawData) {\n return undefined\n }\n\n return this.uriService.data(rawData.bytes.toString('base64'), rawData.contentType, true)\n }\n}\n","import axios, { AxiosResponse } from 'axios'\nimport { ImageFetcher } from '../image.service'\n\ninterface ApiResponseBase {\n jsonrpc: string\n // eslint-disable-next-line @typescript-eslint/naming-convention\n rpc_status: string\n}\n\ninterface ApiResponseSuccess<T> extends ApiResponseBase {\n // eslint-disable-next-line id-blacklist\n result: T\n}\n\nfunction isApiResponseSuccess<T>(response: ApiResponse<T>): response is ApiResponseSuccess<T> {\n return (response as Partial<ApiResponseSuccess<T>>).result !== undefined\n}\n\ninterface ApiResponseError extends ApiResponseBase {\n error: {\n code: number\n reason: string\n // eslint-disable-next-line @typescript-eslint/naming-convention\n request_id: string\n }\n}\n\nfunction isApiResponseError<T>(response: ApiResponse<T>): response is ApiResponseError {\n return (response as Partial<ApiResponseError>).error !== undefined\n}\n\ntype ApiResponse<T> = ApiResponseSuccess<T> | ApiResponseError\n\ninterface ImgProxyFetchParams {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n response_type: 'Raw' | 'Json'\n url: string\n force: boolean\n}\n\ninterface ImgProxyFetchResult {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n moderation_status: string\n categories: string[]\n data: string\n}\n\ntype ApiMethod = 'img_proxy_fetch'\n\ntype ApiParams<T extends ApiMethod> = T extends 'img_proxy_fetch' ? ImgProxyFetchParams : never\ntype ApiResult<T extends ApiMethod> = T extends 'img_proxy_fetch' ? ImgProxyFetchResult : never\n\nconst API_URL = 'https://imgproxy-prod.cryptonomic-infra.tech'\nconst API_KEY = '' // TODO: set apikey\n\nexport class ImageProxyFetcher implements ImageFetcher {\n constructor(private readonly apiUrl: string = API_URL, private readonly apiKey: string = API_KEY) {}\n\n public async fetch(uri: string): Promise<string> {\n const result: ImgProxyFetchResult = await this.send('img_proxy_fetch', {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n response_type: 'Raw',\n url: uri,\n force: false\n })\n\n return result.data\n }\n\n private async send<T extends ApiMethod>(method: T, params: ApiParams<T>): Promise<ApiResult<T>> {\n const response: AxiosResponse<ApiResponse<ApiResult<T>>> = await axios.post(\n this.apiUrl,\n {\n jsonrpc: '1.0.0',\n method,\n params\n },\n {\n headers: {\n apikey: this.apiKey,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'Content-Type': 'application/json'\n }\n }\n )\n\n if (isApiResponseError(response.data)) {\n throw response.data.error\n }\n\n if (isApiResponseSuccess(response.data)) {\n return response.data.result\n }\n\n throw new Error('Unknown error')\n }\n}\n","import { Injectable } from '@angular/core'\nimport { UriService } from '../uri/uri.service'\nimport { ImageDirectFetcher } from './fetcher/image-direct.fetcher'\nimport { ImageProxyFetcher } from './fetcher/image-proxy.fetcher'\n\nexport interface ImageFetcher {\n fetch(uri: string): Promise<string | undefined>\n}\n\ninterface FetchOptions {\n useProxy: boolean\n}\n\nconst DEFAULT_FETCH_OPTIONS: FetchOptions = {\n useProxy: false\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ImageService {\n private directFetcher: ImageDirectFetcher | undefined\n private proxyFetcher: ImageProxyFetcher | undefined\n\n constructor(private readonly uriService: UriService) {}\n\n public async fetch(uri: string, options: FetchOptions = DEFAULT_FETCH_OPTIONS): Promise<string> {\n return this.getFetcher(options).fetch(uri)\n }\n\n private getFetcher(options: FetchOptions): ImageFetcher {\n if (options.useProxy) {\n const proxyFetcher = this.proxyFetcher ?? new ImageProxyFetcher()\n if (!this.proxyFetcher) {\n this.proxyFetcher = proxyFetcher\n }\n\n return proxyFetcher\n }\n\n const directFetcher = this.directFetcher ?? new ImageDirectFetcher(this.uriService)\n if (!this.directFetcher) {\n this.directFetcher = directFetcher\n }\n\n return directFetcher\n }\n}\n","import { Inject, Injectable } from '@angular/core'\nimport {\n Directory,\n Encoding,\n FileInfo,\n FilesystemPlugin,\n ReaddirResult,\n ReadFileOptions,\n ReadFileResult,\n WriteFileOptions,\n WriteFileResult\n} from '@capacitor/filesystem'\nimport { ZipPlugin } from '../../capacitor-plugins/definitions'\n\nimport { FILESYSTEM_PLUGIN, ZIP_PLUGIN } from '../../capacitor-plugins/injection-tokens'\nimport { ImageService } from '../image/image.service'\nimport { UriService } from '../uri/uri.service'\n\ninterface Metadata {\n mediaType?: string\n isBinary?: boolean\n}\n\nconst MANIFEST_FILENAME = 'manifest.json'\nconst SIGNATURE_FILENAME = 'module.sig'\n\nconst ISOLATED_MODULES_PATH = '__airgap_protocol_modules__'\nconst ISOLATED_SYMBOLS_PATH = '__symbols__'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FilesystemService {\n constructor(\n private readonly uriService: UriService,\n private readonly imageService: ImageService,\n @Inject(FILESYSTEM_PLUGIN) private readonly filesystem: FilesystemPlugin,\n @Inject(ZIP_PLUGIN) private readonly zip: ZipPlugin\n ) {}\n\n public async readLazyImage(path: string): Promise<string | undefined> {\n try {\n const { dir, filename } = this.splitPath(path)\n const filesInDir = await this.filesInDir(dir)\n\n if (filesInDir.has(filename)) {\n const data: string = await this.readDataFile({ path }).then((result: ReadFileResult) => result.data as string)\n\n const metadata: Metadata | undefined = filesInDir.has(this.getMetadataFilePath(filename))\n ? await this.readImageMetadata(path)\n : undefined\n\n return this.uriService.data(data, metadata.mediaType, metadata.isBinary)\n } else if (filesInDir.has(this.getLinkFilePath(filename))) {\n return this.downloadRemoteImage(path)\n } else {\n return undefined\n }\n } catch (error) {\n return undefined\n }\n }\n\n public async writeLazyImage(path: string, uri: string): Promise<void> {\n const dataEntry = this.createLazyDataEntry(path, uri)\n await this.saveImageData(dataEntry.path, dataEntry.data, dataEntry.encoding, dataEntry.metadata)\n }\n\n private async downloadRemoteImage(path: string): Promise<string | undefined> {\n const uri: string = await this.readDataFile({\n path: this.getLinkFilePath(path),\n encoding: Encoding.UTF8\n }).then((result: ReadFileResult) => result.data as string)\n\n const base64 = await this.imageService.fetch(uri)\n if (!base64) {\n return undefined\n }\n\n const splitData = this.uriService.splitDataUri(base64)\n\n await this.saveImageData(path, splitData.data, Encoding.UTF8, { mediaType: splitData.mediaType, isBinary: splitData.isBinary })\n\n return base64\n }\n\n private createLazyDataEntry(path: string, uri: string): { path: string; data: string; encoding?: Encoding; metadata?: Metadata } {\n const uriType = this.uriService.resolveUriType(uri)\n // eslint-disable-next-line default-case\n switch (uriType) {\n case 'remote':\n case 'unsupported':\n return {\n path: this.getLinkFilePath(path),\n data: uri,\n encoding: Encoding.UTF8\n }\n case 'data':\n const splitData = this.uriService.splitDataUri(uri)\n\n return {\n path,\n data: splitData.data,\n encoding: Encoding.UTF8,\n metadata: splitData.mediaType ? { mediaType: splitData.mediaType, isBinary: splitData.isBinary } : undefined\n }\n }\n }\n\n public async readIsolatedSymbol(name: string): Promise<string | undefined> {\n try {\n const dir: string = `${ISOLATED_MODULES_PATH}/${ISOLATED_SYMBOLS_PATH}`\n const path: string = `${dir}/${name.toLowerCase()}`\n\n const { data }: ReadFileResult = await this.readDataFile({ path })\n\n const metadata: Metadata = await this.readImageMetadata(path)\n\n return this.uriService.data(data as string, metadata.mediaType, metadata.isBinary)\n } catch (error) {\n return undefined\n }\n }\n\n public async createTempProtocolModule(name: string, path: string): Promise<{ path: string; directory: Directory }> {\n const tempDir = await this.createTempProtocolModuleDir(name)\n\n try {\n await this.zip.unzip({\n from: path,\n to: tempDir.path,\n toDirectory: tempDir.directory\n })\n\n return {\n path: tempDir.path,\n directory: tempDir.directory\n }\n } catch (error) {\n await this.removeTempProtocolModule(tempDir.path, tempDir.directory).catch(() => {\n /* no action */\n })\n throw error\n }\n }\n\n public async removeTempProtocolModule(path: string, directory: Directory): Promise<void> {\n return this.filesystem.rmdir({\n path,\n directory,\n recursive: true\n })\n }\n\n public async findProtocolModuleRoot(path: string, directory: Directory): Promise<string | undefined> {\n const { type } = await this.filesystem.stat({ path, directory })\n if (type === 'directory') {\n const root = await this.findProtocolModuleRootInDir(path, directory)\n\n return root?.replace(`${path}/`, '')\n } else {\n return undefined\n }\n }\n\n private async findProtocolModuleRootInDir(path: string, directory: Directory): Promise<string | undefined> {\n const { files }: ReaddirResult = await this.filesystem.readdir({ path, directory })\n const hasManifest = files.find((file: FileInfo) => file.type === 'file' && file.name === MANIFEST_FILENAME)\n if (hasManifest) {\n return path\n }\n\n for (const file of files) {\n if (file.type === 'directory') {\n const root: string | undefined = await this.findProtocolModuleRootInDir(`${path}/${file.name}`, directory)\n if (root !== undefined) {\n return root\n }\n }\n }\n\n return undefined\n }\n\n public async installProtocolModule(\n identifier: string,\n files: string[],\n symbols: Record<string, string>,\n currentLocation: {\n path: string\n root: string\n directory: Directory\n }\n ): Promise<void> {\n const newPath: string = `${ISOLATED_MODULES_PATH}/${identifier}`\n const newDirectory: Directory = Directory.Data\n\n try {\n for (const file of [MANIFEST_FILENAME, SIGNATURE_FILENAME, ...files]) {\n const lastSegmentIndex: number = file.lastIndexOf('/')\n const parent = file.substring(0, lastSegmentIndex).replace(/^\\/+/, '')\n\n await this.filesystem\n .mkdir({\n path: `${newPath}/${parent}`,\n directory: newDirectory,\n recursive: true\n })\n .catch(() => {\n /* no action */\n })\n\n await this.filesystem.copy({\n from: `${currentLocation.path}/${currentLocation.root}/${file}`,\n directory: currentLocation.directory,\n to: `${newPath}/${file}`,\n toDirectory: newDirectory\n })\n\n const symbolsDir: string = `${ISOLATED_MODULES_PATH}/${ISOLATED_SYMBOLS_PATH}`\n await this.filesystem\n .mkdir({\n path: symbolsDir,\n directory: newDirectory,\n recursive: true\n })\n .catch(() => {\n /* no action */\n })\n\n await Promise.all(\n Object.entries(symbols).map(async ([symbol, uri]: [string, string]) => {\n const path: string = `${symbolsDir}/${symbol.toLowerCase()}`\n\n if (uri.startsWith('file://')) {\n const resPath: string = uri.replace(/^file:\\/\\//, '')\n const extension: string = uri.split('.').slice(-1)[0].toLocaleLowerCase()\n\n await this.filesystem.copy({\n from: `${currentLocation.path}/${currentLocation.root}/${resPath}`,\n directory: currentLocation.directory,\n to: path,\n toDirectory: newDirectory\n })\n\n await this.saveImageMetadata(path, {\n mediaType: `image/${extension === 'svg' ? 'svg+xml' : extension}`,\n isBinary: true\n })\n } else if (uri.startsWith('data:image')) {\n const splitData = this.uriService.splitDataUri(uri)\n await this.saveImageData(path, splitData.data, Encoding.UTF8, {\n mediaType: splitData.mediaType,\n isBinary: splitData.isBinary\n })\n }\n })\n )\n }\n } catch (error) {\n await this.removeTempProtocolModule(newPath, newDirectory).catch(() => {\n /* no action */\n })\n throw error\n } finally {\n await this.removeTempProtocolModule(currentLocation.path, currentLocation.directory).catch(() => {\n /* no action */\n })\n }\n }\n\n private async saveImageData(path: string, data: string, encoding?: Encoding, metadata?: Metadata): Promise<void> {\n await this.writeDataFile({\n path,\n data,\n encoding\n })\n\n if (metadata) {\n await this.saveImageMetadata(path, metadata)\n }\n }\n\n private async saveImageMetadata(path: string, metadata: Metadata): Promise<void> {\n await this.writeDataFile({\n path: this.getMetadataFilePath(path),\n data: JSON.stringify(metadata),\n encoding: Encoding.UTF8\n })\n }\n\n private async readImageMetadata(path: string): Promise<Metadata> {\n return this.readDataFile({\n path: this.getMetadataFilePath(path),\n encoding: Encoding.UTF8\n }).then((result: ReadFileResult) => JSON.parse(result.data as string))\n }\n\n private async readDataFile(options: ReadFileOptions): Promise<ReadFileResult> {\n return this.filesystem.readFile({\n directory: Directory.Data,\n ...options\n })\n }\n\n private async writeDataFile(options: WriteFileOptions): Promise<WriteFileResult> {\n return this.filesystem.writeFile({\n directory: Directory.Data,\n ...options,\n recursive: true\n })\n }\n\n private async filesInDir(path: string, directory: Directory = Directory.Data): Promise<Set<string>> {\n return this.filesystem\n .readdir({\n path,\n directory\n })\n .then((result: ReaddirResult) => new Set(result.files.map((fileInfo: FileInfo) => fileInfo.uri)))\n }\n\n private getLinkFilePath(path: string): string {\n return `${path}.link`\n }\n\n private getMetadataFilePath(path: string): string {\n return `${path}.metadata`\n }\n\n private splitPath(path: string): { dir: string; filename: string } {\n const dirEnd = path.lastIndexOf('/')\n\n return dirEnd !== -1 ? { dir: path.slice(0, dirEnd), filename: path.slice(dirEnd + 1) } : { dir: '/', filename: path }\n }\n\n private async createTempProtocolModuleDir(moduleName: string): Promise<{ path: string; directory: Directory }> {\n const tempDir: string = `protocolmodule_${moduleName.replace(/\\.zip$/, '')}_${Date.now()}`\n const directory: Directory = Directory.Cache\n\n await this.filesystem.mkdir({\n path: tempDir,\n directory\n })\n\n return { path: tempDir, directory }\n }\n}\n","import { AirGapWallet } from '@wallfree-dev/coinlib-core'\nimport { Inject, Injectable } from '@angular/core'\nimport {\n AirGapAnyProtocol,\n AirGapBlockExplorer,\n AirGapV3SerializerCompanion,\n ProtocolConfiguration,\n ProtocolNetwork\n} from '@wallfree-dev/module-kit'\nimport { ISOLATED_MODULES_PLUGIN } from '../../../../capacitor-plugins/injection-tokens'\nimport {\n CallMethodResult,\n IsolatedModulesPlugin,\n LoadAllModulesResult,\n PreviewDynamicModuleResult,\n ReadAssetModuleResult,\n ReadDynamicModuleResult\n} from '../../../../capacitor-plugins/definitions'\nimport { IsolatedModule, IsolatedProtocol } from '../../../../types/isolated-modules/IsolatedModule'\nimport { IsolatedAirGapV3SerializerCompanion } from '../../../../protocol/isolated/v3-serializer-companion-isolated'\nimport { flattened } from '../../../../utils/array'\nimport { IsolatedAirGapOfflineProtocol } from '../../../../protocol/isolated/protocol-offline-isolated'\nimport { IsolatedAirGapOnlineProtocol } from '../../../../protocol/isolated/protocol-online-isolated'\nimport { IsolatedAirGapBlockExplorer } from '../../../../protocol/isolated/block-explorer-isolated'\nimport {\n IsolatedModuleAssetMetadata,\n IsolatedModuleInstalledMetadata,\n IsolatedModuleMetadata,\n IsolatedModulePreviewMetadata\n} from '../../../../types/isolated-modules/IsolatedModuleMetadata'\nimport { BaseModulesController, LoadedModule, LoadedProtocol } from '../base-modules.controller'\nimport { FilesystemService } from '../../../filesystem/filesystem.service'\n\nconst AIRGAP_PUBLIC_KEY: string = ''\n\n@Injectable({\n providedIn: 'root'\n})\nexport class IsolatedModulesController implements BaseModulesController {\n private readonly staticModules: Map<string, IsolatedModule> = new Map()\n private readonly dynamicModules: Map<string, IsolatedModule> = new Map()\n\n private readonly supportedProtocols: Set<string> = new Set()\n\n constructor(\n @Inject(ISOLATED_MODULES_PLUGIN) private readonly isolatedModules: IsolatedModulesPlugin,\n private readonly filesystemService: FilesystemService\n ) {}\n\n public async loadModules(protocolType?: ProtocolConfiguration['type'], ignoreProtocols: string[] = []): Promise<LoadedModule[]> {\n const { modules }: LoadAllModulesResult = await this.isolatedModules.loadAllModules({ protocolType, ignoreProtocols })\n modules.forEach((module: IsolatedModule) => {\n if (module.type === 'static') {\n this.staticModules.set(module.identifier, module)\n } else {\n this.dynamicModules.set(module.identifier, module)\n }\n })\n\n return this.processIsolatedModules(modules, protocolType, new Set(ignoreProtocols))\n }\n\n private async processIsolatedModules(\n modules: IsolatedModule[],\n type?: ProtocolConfiguration['type'],\n ignore: Set<string> = new Set()\n ): Promise<LoadedModule[]> {\n const loadedModules: (LoadedModule | undefined)[] = await Promise.all(\n modules.map((module: IsolatedModule) => this.processIsolatedModule(module, type, ignore))\n )\n\n return loadedModules.filter((module: LoadedModule | undefined) => module !== undefined)\n }\n\n private async processIsolatedModule(\n module: IsolatedModule,\n type?: ProtocolConfiguration['type'],\n ignore: Set<string> = new Set()\n ): Promise<LoadedModule | undefined> {\n const protocols: LoadedProtocol[] = module.protocols\n .filter((protocol: IsolatedProtocol) => !ignore.has(protocol.identifier) && (type ? protocol.mode === type : true))\n .map((protocol: IsolatedProtocol) => {\n const wrappedProtocol: AirGapAnyProtocol =\n protocol.mode === 'offline'\n ? new IsolatedAirGapOfflineProtocol(this.isolatedModules, protocol)\n : new IsolatedAirGapOnlineProtocol(this.isolatedModules, protocol)\n\n const wrappedBlockExplorer: AirGapBlockExplorer = new IsolatedAirGapBlockExplorer(\n this.isolatedModules,\n protocol.identifier,\n protocol.network,\n protocol.blockExplorerMetadata\n )\n\n this.supportedProtocols.add(protocol.identifier)\n\n return { identifier: protocol.identifier, protocol: wrappedProtocol, blockExplorer: wrappedBlockExplorer }\n })\n\n if (protocols.length === 0) {\n return undefined\n }\n\n const v3SerializerCompanion: AirGapV3SerializerCompanion = new IsolatedAirGapV3SerializerCompanion(\n this.isolatedModules,\n module.v3SchemaConfigurations,\n module.identifier\n )\n\n return {\n protocols,\n v3SerializerCompanion\n }\n }\n\n public isProtocolSupported(identifier: string): boolean {\n return this.supportedProtocols.has(identifier)\n }\n\n public async getProtocolNetwork(protocolIdentifier: string, networkId?: string): Promise<ProtocolNetwork | undefined> {\n const { value }: CallMethodResult = await this.isolatedModules.callMethod({\n target: 'onlineProtocol',\n method: 'getNetwork',\n protocolIdentifier,\n networkId\n })\n\n return value as ProtocolNetwork\n }\n\n public async getProtocolBlockExplorer(\n protocolIdentifier: string,\n network: string | ProtocolNetwork\n ): Promise<AirGapBlockExplorer | undefined> {\n const networkObject: ProtocolNetwork =\n typeof network === 'string' ? await this.getProtocolNetwork(protocolIdentifier, network) : network\n\n return new IsolatedAirGapBlockExplorer(this.isolatedModules, protocolIdentifier, networkObject)\n }\n\n public async deriveAddresses(wallets: AirGapWallet[], amount: number = 50): Promise<Record<string, string[]>> {\n // TODO: optimize?\n const addressesByKey: Record<string, string[]>[] = await Promise.all(\n wallets.map(async (wallet: AirGapWallet) => {\n const addresses: string[] = await wallet.deriveAddresses(amount)\n\n return { [`${await wallet.protocol.getIdentifier()}_${wallet.publicKey}`]: addresses }\n })\n )\n\n return addressesByKey.reduce((obj: Record<string, string[]>, next: Record<string, string[]>) => Object.assign(obj, next), {})\n }\n\n public async getModulesMetadata(): Promise<IsolatedModuleMetadata[]> {\n const metadata: [IsolatedModuleAssetMetadata[], IsolatedModuleInstalledMetadata[]] = await Promise.all([\n this.getAssetModulesMetadata(),\n this.getDynamicModulesMetadata()\n ])\n\n return flattened<IsolatedModuleMetadata>(metadata)\n }\n\n private async getAssetModulesMetadata(): Promise<IsolatedModuleAssetMetadata[]> {\n return Promise.all(\n Array.from(this.staticModules.values()).map(async (module: IsolatedModule): Promise<IsolatedModuleAssetMetadata> => {\n const { manifest }: ReadAssetModuleResult = await this.isolatedModules.readAssetModule({\n identifier: module.identifier\n })\n\n return {\n type: 'asset',\n manifest,\n module,\n source: manifest.publicKey === AIRGAP_PUBLIC_KEY ? 'airgap' : '3rd_party'\n }\n })\n )\n }\n\n private async getDynamicModulesMetadata(): Promise<IsolatedModuleInstalledMetadata[]> {\n return Promise.all(\n Array.from(this.dynamicModules.values()).map(async (module: IsolatedModule): Promise<IsolatedModuleInstalledMetadata> => {\n const { manifest, installedAt }: ReadDynamicModuleResult = await this.isolatedModules.readDynamicModule({\n identifier: module.identifier\n })\n\n return {\n type: 'installed',\n manifest,\n module,\n installedAt,\n source: manifest.publicKey === AIRGAP_PUBLIC_KEY ? 'airgap' : '3rd_party'\n }\n })\n )\n }\n\n public async readModuleMetadata(name: string, path: string): Promise<IsolatedModulePreviewMetadata> {\n if (!name.endsWith('.zip')) {\n throw new Error('Invalid protocol module format, expected .zip')\n }\n\n const tempDir = await this.filesystemService.createTempProtocolModule(name, path)\n\n try {\n const root: string | undefined = await this.filesystemService.findProtocolModuleRoot(tempDir.path, tempDir.directory)\n if (root === undefined) {\n throw new Error('Invalid protocol module structure, manifest not found')\n }\n\n const preview: PreviewDynamicModuleResult = await this.isolatedModules.previewDynamicModule({\n path: `${tempDir.path}/${root}`.replace(/\\/+$/, ''),\n directory: tempDir.directory\n })\n\n return {\n type: 'preview',\n module: preview.module,\n manifest: preview.manifest,\n path: tempDir.path,\n root,\n directory: tempDir.directory,\n source: preview.manifest.publicKey === AIRGAP_PUBLIC_KEY ? 'airgap' : '3rd_party'\n }\n } catch (error) {\n await this.filesystemService.removeTempProtocolModule(tempDir.path, tempDir.directory).catch(() => {\n /* no action */\n })\n throw error\n }\n }\n\n public async installModule(metadata: IsolatedModulePreviewMetadata): Promise<LoadedModule> {\n const newIdentifier: string = metadata.manifest.name\n .replace(/\\s+/, '_')\n .replace(/[^a-zA-Z\\d_-]/g, '')\n .toLocaleLowerCase()\n\n await this.filesystemService.installProtocolModule(newIdentifier, metadata.manifest.include, metadata.manifest.res?.symbol ?? {}, {\n path: metadata.path,\n root: metadata.root,\n directory: metadata.directory\n })\n\n await this.isolatedModules.registerDynamicModule({\n identifier: newIdentifier,\n protocolIdentifiers: metadata.module.protocols.map((protocol) => protocol.identifier)\n })\n\n this.dynamicModules.set(newIdentifier, {\n ...metadata.module,\n identifier: newIdentifier\n })\n\n return this.processIsolatedModule(metadata.module)\n }\n\n public async removeInstalledModules(identifiers: string[]): Promise<string[]> {\n await this.isolatedModules.removeDynamicModules({ identifiers })\n const protocolIdentifiers: string[] = flattened(\n identifiers.map(\n (identifier: string) =>\n this.dynamicModules.get(identifier)?.protocols.map((protocol: IsolatedProtocol) => protocol.identifier) ?? []\n )\n )\n\n identifiers.forEach((identifier: string) => {\n this.dynamicModules.delete(identifier)\n })\n\n return protocolIdentifiers\n }\n\n public async removeAllInstalledModules(): Promise<string[]> {\n await this.isolatedModules.removeDynamicModules()\n const protocolIdentifiers: string[] = flattened(\n Array.from(this.dynamicModules.values()).map((module: IsolatedModule) =>\n module.protocols.map((protocol: IsolatedProtocol) => protocol.identifier)\n )\n )\n\n this.dynamicModules.clear()\n\n return protocolIdentifiers\n }\n}\n","import { AirGapWallet } from '@wallfree-dev/coinlib-core'\nimport { AirGapBlockExplorer, AirGapModule, ProtocolConfiguration, ProtocolNetwork } from '@wallfree-dev/module-kit'\nimport { Injectable } from '@angular/core'\nimport { IsolatedModuleMetadata, IsolatedModulePreviewMetadata } from '../../../types/isolated-modules/IsolatedModuleMetadata'\nimport { flattened } from '../../../utils/array'\nimport { BaseModulesController, LoadedModule, LoadedProtocol } from './base-modules.controller'\nimport { IntegralModulesController } from './integral/integral-modules.controller'\nimport { IsolatedModulesController } from './isolated/isolated-modules.controller'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ModulesController {\n public isInitialized: boolean = false\n\n constructor(\n private readonly integralModulesController: IntegralModulesController,\n private readonly isolatedModulesController: IsolatedModulesController\n ) {}\n\n public init(integralModules: AirGapModule[]): void {\n this.isInitialized = true\n this.integralModulesController.init(integralModules)\n }\n\n public async loadModules(protocolType?: ProtocolConfiguration['type'], ignoreProtocols?: string[]): Promise<LoadedModule[]> {\n const integralModules: LoadedModule[] = await this.integralModulesController.loadModules(protocolType, ignoreProtocols)\n const integralProtocols: string[] = flattened(\n await Promise.all(\n integralModules.map((module: LoadedModule) =>\n Promise.all(\n module.protocols.map((protocol: LoadedProtocol) => protocol.protocol.getMetadata().then((metadata) => metadata.identifier))\n )\n )\n )\n )\n\n const isolatedModules: LoadedModule[] = await this.isolatedModulesController.loadModules(\n protocolType,\n ignoreProtocols.concat(integralProtocols)\n )\n\n return integralModules.concat(isolatedModules)\n }\n\n public async getProtocolNetwork(protocolIdentifier: string, networkId?: string): Promise<ProtocolNetwork | undefined> {\n if (this.integralModulesController.isProtocolSupported(protocolIdentifier)) {\n return this.integralModulesController.getProtocolNetwork(protocolIdentifier, networkId)\n } else if (this.isolatedModulesController.isProtocolSupported(protocolIdentifier)) {\n return this.isolatedModulesController.getProtocolNetwork(protocolIdentifier, networkId)\n } else {\n return undefined\n }\n }\n\n public async getProtocolBlockExplorer(\n protocolIdentifier: string,\n network: string | ProtocolNetwork\n ): Promise<AirGapBlockExplorer | undefined> {\n if (this.integralModulesController.isProtocolSupported(protocolIdentifier)) {\n return this.integralModulesController.getProtocolBlockExplorer(protocolIdentifier, network)\n } else if (this.isolatedModulesController.isProtocolSupported(protocolIdentifier)) {\n return this.isolatedModulesController.getProtocolBlockExplorer(protocolIdentifier, network)\n } else {\n return undefined\n }\n }\n\n public async deriveAddresses(wallets: AirGapWallet[], amount?: number): Promise<Record<string, string[]>> {\n const [integralWallets, isolatedWallets]: AirGapWallet[][] = await this.groupWalletsByControllers(wallets, [\n this.integralModulesController,\n this.isolatedModulesController\n ])\n\n const [integralAddresses, isolatedAddresses]: [Record<string, string[]>, Record<string, string[]>] = await Promise.all([\n this.integralModulesController.deriveAddresses(integralWallets, amount),\n this.isolatedModulesController.deriveAddresses(isolatedWallets, amount)\n ])\n\n return Object.assign({}, integralAddresses, isolatedAddresses)\n }\n\n public async getModulesMetadata(): Promise<IsolatedModuleMetadata[]> {\n return this.isolatedModulesController.getModulesMetadata()\n }\n\n public async readModuleMetadata(name: string, path: string): Promise<IsolatedModulePreviewMetadata> {\n return this.isolatedModulesController.readModuleMetadata(name, path)\n }\n\n public async installModule(metadata: IsolatedModulePreviewMetadata): Promise<LoadedModule> {\n return this.isolatedModulesController.installModule(metadata)\n }\n\n public async removeInstalledModules(identifiers: string[]): Promise<string[]> {\n return this.isolatedModulesController.removeInstalledModules(identifiers)\n }\n\n public async removeAllInstalledModules(): Promise<string[]> {\n return this.isolatedModulesController.removeAllInstalledModules()\n }\n\n private async groupWalletsByControllers(wallets: AirGapWallet[], controllers: BaseModulesController[]): Promise<AirGapWallet[][]> {\n const walletsWithProtocolIdentifiers: [AirGapWallet, string][] = await Promise.all(\n wallets.map(async (wallet: AirGapWallet) => [wallet, await wallet.protocol.getIdentifier()] as [AirGapWallet, string])\n )\n\n return controllers.map((controller: BaseModulesController) =>\n walletsWithProtocolIdentifiers\n .filter(([_, protocolIdentifier]: [AirGapWallet, string]) => controller.isProtocolSupported(protocolIdentifier))\n .map(([wallet, _]: [AirGapWallet, string]) => wallet)\n )\n }\n}\n","import { ICoinProtocol, ProtocolNetwork, ProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { Injectable } from '@angular/core'\nimport { RuntimeMode } from '../../../types/RuntimeMode'\nimport { createNotInitialized } from '../../../utils/not-initialized'\nimport { getProtocolAndNetworkIdentifier } from '../../../utils/protocol/protocol-network-identifier'\nimport { getProtocolOptionsByIdentifier } from '../../../utils/protocol/protocol-options'\nimport { BaseEnvironmentService } from '../../environment/base-environment.service'\nimport { ModulesController } from '../../modules/controller/modules.controller'\n\nexport interface BaseProtocolStoreConfig<T> {\n passiveProtocols: T\n activeProtocols: T\n}\n\n@Injectable()\nexport abstract class BaseProtocolStoreService<\n ICoinType = unknown,\n SymbolType = unknown,\n CollectionType = unknown,\n ConfigType = BaseProtocolStoreConfig<CollectionType>\n> {\n protected _supportedProtocols: Promise<CollectionType | undefined>\n\n protected _passiveProtocols: CollectionType | undefined\n protected _activeProtocols: CollectionType | undefined\n\n protected notInitialized: () => never\n\n constructor(\n private readonly _tag: string = '_ProtocolService',\n protected readonly environment: BaseEnvironmentService,\n protected readonly modulesController: ModulesController\n ) {\n this.notInitialized = createNotInitialized(this._tag, 'Call `init` first.')\n }\n\n public get isInitialized(): boolean {\n return this._passiveProtocols !== undefined && this._activeProtocols !== undefined\n }\n\n public get supportedProtocols(): Promise<CollectionType> {\n if (this._supportedProtocols === undefined) {\n const passiveProtocols: CollectionType = this._passiveProtocols ?? this.notInitialized()\n const activeProtocols: CollectionType = this._activeProtocols ?? this.notInitialized()\n\n this._supportedProtocols = this.mergeProtocols(passiveProtocols, activeProtocols)\n }\n\n return this._supportedProtocols\n }\n\n public get passiveProtocols(): CollectionType {\n return this._passiveProtocols ?? this.notInitialized()\n }\n\n public get activeProtocols(): CollectionType {\n return this._activeProtocols ?? this.notInitialized()\n }\n\n public async addActiveProtocols(protocols: CollectionType): Promise<void> {\n const activeProtocols: CollectionType = this._activeProtocols ?? this.notInitialized()\n this._activeProtocols = await this.mergeProtocols(protocols, activeProtocols)\n this._supportedProtocols = undefined\n }\n\n public async init(config: ConfigType): Promise<void> {\n if (this.isInitialized) {\n // eslint-disable-next-line no-console\n console.log(`[${this._tag}] already initialized`)\n\n return\n }\n\n const transformedConfig: BaseProtocolStoreConfig<CollectionType> = await this.transformConfig(config)\n\n this._passiveProtocols = transformedConfig.passiveProtocols\n this._activeProtocols = transformedConfig.activeProtocols\n\n await this.removeProtocolDuplicates()\n }\n\n public abstract removeProtocols(identifiers: SymbolType[]): Promise<void>\n\n public abstract isIdentifierValid(identifier: string): boolean\n\n public abstract getProtocolByIdentifier(\n identifier: SymbolType,\n network?: ProtocolNetwork | string,\n activeOnly?: boolean\n ): Promise<ICoinType | undefined>\n public abstract getNetworksForProtocol(identifier: SymbolType, activeOnly?: boolean): Promise<ProtocolNetwork[]>\n\n protected abstract transformConfig(config: ConfigType): Promise<BaseProtocolStoreConfig<CollectionType>>\n protected abstract mergeProtocols(protocols1: CollectionType, protocols2: CollectionType | undefined): Promise<CollectionType>\n\n protected abstract removeProtocolDuplicates(): Promise<void>\n\n public async getProtocolAndNetworkIdentifier(\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n network?: ProtocolNetwork | string\n ): Promise<string> {\n return getProtocolAndNetworkIdentifier(this.environment.mode, protocolOrIdentifier, network)\n }\n\n public async getTargetNetwork(\n protocolIdentifier: ProtocolSymbols,\n network?: ProtocolNetwork | string\n ): Promise<ProtocolNetwork | string | undefined> {\n return this.environment.mode === RuntimeMode.ONLINE\n ? network ?? (await getProtocolOptionsByIdentifier(this.modulesController, protocolIdentifier)).network\n : undefined\n }\n}\n","import { Injectable } from '@angular/core'\nimport { ICoinProtocol, MainProtocolSymbols, ProtocolNetwork } from '@wallfree-dev/coinlib-core'\nimport { splitProtocolNetworkIdentifier } from '../../../../utils/protocol/protocol-network-identifier'\nimport { BaseProtocolStoreService, BaseProtocolStoreConfig } from '../base-protocol-store.service'\nimport { ModulesController } from '../../../modules/controller/modules.controller'\nimport { BaseEnvironmentService } from '../../../environment/base-environment.service'\n\nexport type ProtocolsMap = Map<string, ICoinProtocol>\n\nexport type MainProtocolStoreConfig = BaseProtocolStoreConfig<ICoinProtocol[]>\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MainProtocolStoreService extends BaseProtocolStoreService<\n ICoinProtocol,\n MainProtocolSymbols,\n ProtocolsMap,\n MainProtocolStoreConfig\n> {\n constructor(environment: BaseEnvironmentService, modulesController: ModulesController) {\n super('MainProtocolService', environment, modulesController)\n }\n\n public async removeProtocols(identifiers: MainProtocolSymbols[]): Promise<void> {\n const identifiersSet: Set<string> = new Set(identifiers)\n const protocolKeys: string[] = Array.from((await this.supportedProtocols).keys()).filter((key: string) => {\n const { protocol: protocolIdentifier } = splitProtocolNetworkIdentifier(key)\n\n return identifiersSet.has(protocolIdentifier)\n })\n\n protocolKeys.forEach((key: string) => {\n this._activeProtocols.delete(key)\n this._passiveProtocols.delete(key)\n })\n\n // reset supported protocols\n this._supportedProtocols = undefined\n }\n\n public isIdentifierValid(identifier: string): boolean {\n return Object.values(MainProtocolSymbols).includes(identifier as MainProtocolSymbols) || !identifier.includes('-')\n }\n\n public async getProtocolByIdentifier(\n identifier: MainProtocolSymbols,\n network?: ProtocolNetwork | string,\n activeOnly: boolean = true,\n retry: boolean = true\n ): Promise<ICoinProtocol | undefined> {\n try {\n const targetNetwork: ProtocolNetwork | string | undefined = await this.getTargetNetwork(identifier, network)\n const protocolAndNetworkIdentifier: string = await this.getProtocolAndNetworkIdentifier(identifier, targetNetwork)\n const protocols: ProtocolsMap = activeOnly ? this.activeProtocols : await this.supportedProtocols\n const found: ICoinProtocol | undefined = protocols.get(protocolAndNetworkIdentifier)\n\n if (!found && retry) {\n return this.getProtocolByIdentifier(identifier, undefined, activeOnly, false)\n }\n\n return found\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('[MainProtocolStore:getProtocolByIdentifer]', error)\n\n return undefined\n }\n }\n\n public async getNetworksForProtocol(identifier: MainProtocolSymbols, activeOnly: boolean = true): Promise<ProtocolNetwork[]> {\n const protocols: ProtocolsMap = activeOnly ? this.activeProtocols : await this.supportedProtocols\n const keys: string[] = Array.from(protocols.keys()).filter((protocolAndNetworkIdentifier: string) => {\n const { protocol: protocolIdentifier } = splitProtocolNetworkIdentifier(protocolAndNetworkIdentifier)\n\n return protocolIdentifier === identifier\n })\n\n return Promise.all(\n keys.map(async (key: string) => {\n const protocol: ICoinProtocol | undefined = protocols.get(key)\n\n return (await protocol.getOptions()).network\n })\n )\n }\n\n protected async transformConfig(config: MainProtocolStoreConfig): Promise<BaseProtocolStoreConfig<ProtocolsMap>> {\n const [passiveProtocols, activeProtocols]: ProtocolsMap[] = await Promise.all([\n this.createProtocolMap(config.passiveProtocols),\n this.createProtocolMap(config.activeProtocols)\n ])\n\n return { ...config, passiveProtocols, activeProtocols }\n }\n\n protected async mergeProtocols(protocols1: ProtocolsMap, protocols2: ProtocolsMap | undefined): Promise<ProtocolsMap> {\n const entries1: [string, ICoinProtocol][] = Array.from(protocols1.entries())\n const entries2: [string, ICoinProtocol][] = protocols2 !== undefined ? Array.from(protocols2.entries()) : []\n\n return new Map(entries1.concat(entries2))\n }\n\n protected async removeProtocolDuplicates(): Promise<void> {\n // if a protocol has been set as passive and active, it's considered active\n const activeIdentifiers: string[] = Array.from(this._activeProtocols.keys())\n activeIdentifiers.forEach((identifier: string) => {\n this._passiveProtocols.delete(identifier)\n })\n }\n\n private async createProtocolMap(protocols: ICoinProtocol[]): Promise<ProtocolsMap> {\n const protocolsWithIdentifiers: [string, ICoinProtocol][] = await Promise.all(\n protocols.map(async (protocol: ICoinProtocol) => {\n const protocolAndNetworkIdentifier = await this.getProtocolAndNetworkIdentifier(protocol)\n\n return [protocolAndNetworkIdentifier, protocol] as [string, ICoinProtocol]\n })\n )\n\n return new Map(protocolsWithIdentifiers)\n }\n}\n","import { Injectable } from '@angular/core'\nimport {\n ICoinProtocol,\n ICoinSubProtocol,\n ProtocolNetwork,\n SubProtocolSymbols,\n MainProtocolSymbols,\n isNetworkEqual\n} from '@wallfree-dev/coinlib-core'\nimport { erc20Tokens } from '@wallfree-dev/ethereum'\nimport { getMainIdentifier } from '../../../../utils/protocol/protocol-identifier'\nimport { splitProtocolNetworkIdentifier } from '../../../../utils/protocol/protocol-network-identifier'\nimport { Token } from '../../../../types/Token'\nimport { BaseProtocolStoreService, BaseProtocolStoreConfig } from '../base-protocol-store.service'\nimport { ModulesController } from '../../../modules/controller/modules.controller'\nimport { BaseEnvironmentService } from '../../../environment/base-environment.service'\n\nexport interface SubProtocolsMap {\n [key: string]: {\n [subProtocolIdentifier in SubProtocolSymbols]?: ICoinSubProtocol\n }\n}\n\nexport interface SubProtocolStoreConfig {\n passiveSubProtocols: [ICoinProtocol, ICoinSubProtocol][]\n activeSubProtocols: [ICoinProtocol, ICoinSubProtocol][]\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SubProtocolStoreService extends BaseProtocolStoreService<\n ICoinSubProtocol,\n SubProtocolSymbols,\n SubProtocolsMap,\n SubProtocolStoreConfig\n> {\n private _ethTokenIdentifers: Set<string> | undefined\n\n constructor(environment: BaseEnvironmentService, modulesController: ModulesController) {\n super('SubProtocolService', environment, modulesController)\n }\n\n private get ethTokenIdentifiers(): Set<string> {\n if (this._ethTokenIdentifers === undefined) {\n this._ethTokenIdentifers = new Set(Object.values(erc20Tokens).map((token: Token) => token.identifier))\n }\n\n return this._ethTokenIdentifers\n }\n\n public async removeProtocols(identifiers: SubProtocolSymbols[]): Promise<void> {\n const identifiersSet: Set<string> = new Set(identifiers)\n const mainIdentifiersSet: Set<string> = new Set(identifiers.map(getMainIdentifier))\n const protocolKeys = Object.keys(await this.supportedProtocols)\n .map((key: string): [string, 'fully' | 'partially'] | undefined => {\n const { protocol: protocolIdentifier } = splitProtocolNetworkIdentifier(key)\n\n return identifiersSet.has(protocolIdentifier)\n ? [key, 'fully']\n : mainIdentifiersSet.has(protocolIdentifier)\n ? [key, 'partially']\n : undefined\n })\n .filter((key) => key !== undefined)\n\n protocolKeys.forEach(([key, mode]) => {\n if (mode === 'fully') {\n delete this._activeProtocols[key]\n delete this._passiveProtocols[key]\n } else {\n identifiers.forEach((identifier: SubProtocolSymbols) => {\n // eslint-disable-next-line no-unused-expressions\n this._activeProtocols[key] && delete this._activeProtocols[key][identifier]\n // eslint-disable-next-line no-unused-expressions\n this._passiveProtocols[key] && delete this._passiveProtocols[key][identifier]\n })\n }\n })\n\n // reset supported protocols\n this._supportedProtocols = undefined\n }\n\n public isIdentifierValid(identifier: string): boolean {\n const mainIdentifier = getMainIdentifier(identifier as SubProtocolSymbols)\n\n return (\n Object.values(SubProtocolSymbols).includes(identifier as SubProtocolSymbols) ||\n this.ethTokenIdentifiers.has(identifier) ||\n (Object.values(MainProtocolSymbols).includes(mainIdentifier) && identifier !== mainIdentifier) ||\n identifier.includes('-')\n )\n }\n\n public async getProtocolByIdentifier(\n identifier: SubProtocolSymbols,\n network?: ProtocolNetwork | string,\n activeOnly: boolean = true,\n retry: boolean = true\n ): Promise<ICoinSubProtocol | undefined> {\n try {\n const mainIdentifier: MainProtocolSymbols = getMainIdentifier(identifier)\n const targetNetwork: ProtocolNetwork | string | undefined = await this.getTargetNetwork(mainIdentifier, network)\n const protocolAndNetworkIdentifier: string = await this.getProtocolAndNetworkIdentifier(mainIdentifier, targetNetwork)\n\n const subProtocolsMap: SubProtocolsMap = activeOnly ? this.activeProtocols : await this.supportedProtocols\n const found = (subProtocolsMap[protocolAndNetworkIdentifier] ?? {})[identifier]\n\n if (!found && retry) {\n const mainnetProtocol: ICoinSubProtocol | undefined = await this.getProtocolByIdentifier(identifier, undefined, activeOnly, false)\n if (mainnetProtocol === undefined) {\n const protocols: (ICoinSubProtocol | undefined)[] = Object.values(subProtocolsMap).map((values) => values[identifier])\n const filtered: (ICoinSubProtocol | undefined)[] = await Promise.all(\n protocols.map(async (protocol: ICoinSubProtocol | undefined) => {\n return protocol && (await protocol.getIdentifier()) === identifier ? protocol : undefined\n })\n )\n\n return filtered.find((protocol: ICoinSubProtocol | undefined) => protocol !== undefined)\n }\n\n return mainnetProtocol\n }\n\n return found\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('[SubProtocolStore:getProtocolByIdentifer]', error)\n\n return undefined\n }\n }\n\n public async getNetworksForProtocol(identifier: SubProtocolSymbols, activeOnly: boolean = true): Promise<ProtocolNetwork[]> {\n const subProtocolsMap: SubProtocolsMap = activeOnly ? this.activeProtocols : await this.supportedProtocols\n const networks: (ProtocolNetwork | undefined)[] = await Promise.all(\n Object.values(subProtocolsMap).map(async (entry) => {\n const protocol = entry[identifier]\n\n return protocol ? (await protocol.getOptions()).network : undefined\n })\n )\n\n return networks.filter((network: ProtocolNetwork | undefined) => network !== undefined)\n }\n\n protected async transformConfig(config: SubProtocolStoreConfig): Promise<BaseProtocolStoreConfig<SubProtocolsMap>> {\n const [passiveProtocols, activeProtocols]: SubProtocolsMap[] = await Promise.all([\n this.createSubProtocolMap(config.passiveSubProtocols),\n this.createSubProtocolMap(config.activeSubProtocols)\n ])\n\n return { ...config, passiveProtocols, activeProtocols }\n }\n\n protected async mergeProtocols(protocols1: SubProtocolsMap, protocols2: SubProtocolsMap): Promise<SubProtocolsMap> {\n return this.mergeSubProtocolMaps(protocols1, protocols2)\n }\n\n protected async removeProtocolDuplicates(): Promise<void> {\n // if a sub protocol has been set as passive and active, it's considered active\n const passiveEntries: [string, SubProtocolSymbols][] = Object.entries(this.passiveProtocols)\n .map(([protocolAndNetworkIdentifier, subProtocols]: [string, { [subProtocolIdentifier in SubProtocolSymbols]?: ICoinSubProtocol }]) =>\n Object.keys(subProtocols).map((subProtocol: string) => [protocolAndNetworkIdentifier, subProtocol] as [string, SubProtocolSymbols])\n )\n .reduce((flatten: [string, SubProtocolSymbols][], toFlatten: [string, SubProtocolSymbols][]) => flatten.concat(toFlatten), [])\n\n const filtered: SubProtocolsMap = {}\n\n passiveEntries.forEach(([protocolAndNetworkIdentifier, subProtocolIdentifier]: [string, SubProtocolSymbols]) => {\n if (\n this.activeProtocols[protocolAndNetworkIdentifier] === undefined ||\n this.activeProtocols[protocolAndNetworkIdentifier][subProtocolIdentifier] === undefined\n ) {\n if (filtered[protocolAndNetworkIdentifier] === undefined) {\n filtered[protocolAndNetworkIdentifier] = {}\n }\n\n filtered[protocolAndNetworkIdentifier][subProtocolIdentifier] =\n this.passiveProtocols[protocolAndNetworkIdentifier][subProtocolIdentifier]\n }\n })\n\n this._passiveProtocols = filtered\n }\n\n private async createSubProtocolMap(protocols: [ICoinProtocol, ICoinSubProtocol][]): Promise<SubProtocolsMap> {\n const subProtocolMap: SubProtocolsMap = {}\n\n for (const [protocol, subProtocol] of protocols) {\n const [protocolIdentifier, protocolOptions, subProtocolIdentifier, subProtocolName, subProtocolOptions] = await Promise.all([\n protocol.getIdentifier(),\n protocol.getOptions(),\n subProtocol.getIdentifier(),\n subProtocol.getName(),\n subProtocol.getOptions()\n ])\n\n if (!subProtocolIdentifier.startsWith(protocolIdentifier)) {\n throw new Error(`Sub protocol ${subProtocolName} is not supported for protocol ${protocolIdentifier}.`)\n }\n\n if (!isNetworkEqual(protocolOptions.network, subProtocolOptions.network)) {\n throw new Error(`Sub protocol ${subProtocolName} must have the same network as the main protocol.`)\n }\n\n const protocolAndNetworkIdentifier: string = await this.getProtocolAndNetworkIdentifier(protocol)\n\n if (subProtocolMap[protocolAndNetworkIdentifier] === undefined) {\n subProtocolMap[protocolAndNetworkIdentifier] = {}\n }\n\n subProtocolMap[protocolAndNetworkIdentifier][subProtocolIdentifier as SubProtocolSymbols] = subProtocol\n }\n\n return subProtocolMap\n }\n\n private async mergeSubProtocolMaps(\n first: [ICoinProtocol, ICoinSubProtocol][] | SubProtocolsMap,\n second: [ICoinProtocol, ICoinSubProtocol][] | SubProtocolsMap\n ): Promise<SubProtocolsMap> {\n if (Array.isArray(first) && Array.isArray(second)) {\n return this.createSubProtocolMap(first.concat(second))\n }\n\n const firstMap: SubProtocolsMap = Array.isArray(first) ? await this.createSubProtocolMap(first) : first\n const secondMap: SubProtocolsMap = Array.isArray(second) ? await this.createSubProtocolMap(second) : second\n\n const mergedMap: SubProtocolsMap = {}\n\n Object.entries(firstMap)\n .concat(Object.entries(secondMap))\n .forEach(\n ([protocolAndNetworkIdentifier, subProtocols]: [string, { [subProtocolIdentifier in SubProtocolSymbols]?: ICoinSubProtocol }]) => {\n if (mergedMap[protocolAndNetworkIdentifier] === undefined) {\n mergedMap[protocolAndNetworkIdentifier] = subProtocols\n } else {\n mergedMap[protocolAndNetworkIdentifier] = {\n ...mergedMap[protocolAndNetworkIdentifier],\n ...subProtocols\n }\n }\n }\n )\n\n return mergedMap\n }\n}\n","import { Injectable } from '@angular/core'\nimport {\n ICoinProtocol,\n ICoinSubProtocol,\n ProtocolNetwork,\n ProtocolSymbols,\n SubProtocolSymbols,\n MainProtocolSymbols\n} from '@wallfree-dev/coinlib-core'\nimport { ProtocolOptions } from '@wallfree-dev/coinlib-core/utils/ProtocolOptions'\nimport { erc20Tokens } from '@wallfree-dev/ethereum'\nimport { ExposedPromise } from '../../utils/ExposedPromise'\nimport { getMainIdentifier } from '../../utils/protocol/protocol-identifier'\nimport { Token } from '../../types/Token'\nimport { MainProtocolStoreConfig, MainProtocolStoreService } from './store/main/main-protocol-store.service'\nimport { SubProtocolStoreConfig, SubProtocolStoreService, SubProtocolsMap } from './store/sub/sub-protocol-store.service'\nimport {\n getDefaultPassiveProtocols,\n getDefaultActiveProtocols,\n getDefaultPassiveSubProtocols,\n getDefaultActiveSubProtocols\n} from './defaults'\n\nexport interface ProtocolServiceConfig extends Partial<MainProtocolStoreConfig & SubProtocolStoreConfig> {\n extraPassiveProtocols?: ICoinProtocol[]\n extraActiveProtocols?: ICoinProtocol[]\n\n extraPassiveSubProtocols?: [ICoinProtocol, ICoinSubProtocol][]\n extraActiveSubProtocols?: [ICoinProtocol, ICoinSubProtocol][]\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ProtocolService {\n private readonly isReady: ExposedPromise<void> = new ExposedPromise()\n private knownProtocolSymbols: Set<string> | undefined\n\n constructor(private readonly mainProtocolStore: MainProtocolStoreService, private readonly subProtocolStore: SubProtocolStoreService) {}\n\n private get isInitialized(): boolean {\n return this.mainProtocolStore.isInitialized && this.subProtocolStore.isInitialized\n }\n\n public async getSupportedProtocols(): Promise<ICoinProtocol[]> {\n await this.waitReady()\n\n return Array.from((await this.mainProtocolStore.supportedProtocols).values())\n }\n\n public async getPassiveProtocols(): Promise<ICoinProtocol[]> {\n await this.waitReady()\n\n return Array.from(this.mainProtocolStore.passiveProtocols.values())\n }\n\n public async getActiveProtocols(): Promise<ICoinProtocol[]> {\n await this.waitReady()\n\n return Array.from(this.mainProtocolStore.activeProtocols.values())\n }\n\n public async getSupportedSubProtocols(): Promise<SubProtocolsMap> {\n await this.waitReady()\n\n return this.subProtocolStore.supportedProtocols\n }\n\n public async getPassiveSubProtocols(): Promise<SubProtocolsMap> {\n await this.waitReady()\n\n return this.subProtocolStore.passiveProtocols\n }\n\n public async getActiveSubProtocols(): Promise<SubProtocolsMap> {\n await this.waitReady()\n\n return this.subProtocolStore.activeProtocols\n }\n\n public async init(config?: ProtocolServiceConfig): Promise<void> {\n if (this.isInitialized) {\n // eslint-disable-next-line no-console\n console.log('[ProtocolService] already initialized')\n\n return\n }\n\n await Promise.all([\n this.mainProtocolStore.init({\n passiveProtocols: (config?.passiveProtocols ?? (await getDefaultPassiveProtocols())).concat(config?.extraPassiveProtocols ?? []),\n activeProtocols: (config?.activeProtocols ?? (await getDefaultActiveProtocols())).concat(config?.extraActiveProtocols ?? [])\n }),\n this.subProtocolStore.init({\n passiveSubProtocols: (config?.passiveSubProtocols ?? (await getDefaultPassiveSubProtocols())).concat(\n config?.extraPassiveSubProtocols ?? []\n ),\n activeSubProtocols: (config?.activeSubProtocols ?? (await getDefaultActiveSubProtocols())).concat(\n config?.extraActiveSubProtocols ?? []\n )\n })\n ])\n\n this.isReady.resolve()\n }\n\n public async waitReady(): Promise<void> {\n return this.isReady.promise\n }\n\n public async isProtocolActive(protocol: ICoinProtocol): Promise<boolean>\n public async isProtocolActive(identifier: ProtocolSymbols, network?: ProtocolNetwork): Promise<boolean>\n public async isProtocolActive(protocolOrIdentifier: ICoinProtocol | ProtocolSymbols, network?: ProtocolNetwork): Promise<boolean> {\n await this.waitReady()\n\n return this.isProtocolRegistered(protocolOrIdentifier, network, true)\n }\n\n public async isProtocolSupported(protocol: ICoinProtocol): Promise<boolean>\n public async isProtocolSupported(identifier: ProtocolSymbols, network?: ProtocolNetwork): Promise<boolean>\n public async isProtocolSupported(protocolOrIdentifier: ICoinProtocol | ProtocolSymbols, network?: ProtocolNetwork): Promise<boolean> {\n await this.waitReady()\n\n return this.isProtocolRegistered(protocolOrIdentifier, network, false)\n }\n\n public async getProtocol(\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n network?: ProtocolNetwork | string,\n activeOnly: boolean = true\n ): Promise<ICoinProtocol> {\n await this.waitReady()\n\n if (typeof protocolOrIdentifier === 'string') {\n let protocol: ICoinProtocol | undefined\n\n if (this.mainProtocolStore.isIdentifierValid(protocolOrIdentifier)) {\n protocol = await this.mainProtocolStore.getProtocolByIdentifier(protocolOrIdentifier as MainProtocolSymbols, network, activeOnly)\n } else if (this.subProtocolStore.isIdentifierValid(protocolOrIdentifier)) {\n protocol = await this.subProtocolStore.getProtocolByIdentifier(protocolOrIdentifier as SubProtocolSymbols, network, activeOnly)\n if (protocol === undefined) {\n const mainProtocolIdentifier = getMainIdentifier(protocolOrIdentifier)\n\n return this.getProtocol(mainProtocolIdentifier, network, activeOnly)\n }\n }\n\n if (protocol === undefined) {\n throw new Error(`Protocol ${protocolOrIdentifier} not supported`)\n }\n\n return protocol\n } else {\n return protocolOrIdentifier\n }\n }\n\n public async addActiveProtocols(protocolOrProtocols: ICoinProtocol | ICoinProtocol[]): Promise<void> {\n const protocols: ICoinProtocol[] = Array.isArray(protocolOrProtocols) ? protocolOrProtocols : [protocolOrProtocols]\n\n const filteredMainProtocols: (ICoinProtocol | undefined)[] = await Promise.all(\n protocols.map(async (protocol: ICoinProtocol) => {\n const protocolIdentifier: ProtocolSymbols = await protocol.getIdentifier()\n\n return this.mainProtocolStore.isIdentifierValid(protocolIdentifier) ? protocol : undefined\n })\n )\n const mainProtocols: ICoinProtocol[] = filteredMainProtocols.filter((protocol: ICoinProtocol | undefined) => protocol !== undefined)\n\n const filteredSubProtocols: (ICoinProtocol | undefined)[] = await Promise.all(\n protocols.map(async (protocol: ICoinProtocol) => {\n const protocolIdentifier: ProtocolSymbols = await protocol.getIdentifier()\n\n return this.subProtocolStore.isIdentifierValid(protocolIdentifier) ? protocol : undefined\n })\n )\n const subProtocols: ICoinProtocol[] = filteredSubProtocols.filter((protocol: ICoinProtocol | undefined) => protocol !== undefined)\n\n await Promise.all([this.addActiveMainProtocols(mainProtocols), this.addActiveSubProtocols(subProtocols)])\n }\n\n public async addActiveMainProtocols(protocolOrProtocols: ICoinProtocol | ICoinProtocol[]): Promise<void> {\n await this.waitReady()\n\n const protocols: ICoinProtocol[] = Array.isArray(protocolOrProtocols) ? protocolOrProtocols : [protocolOrProtocols]\n const filtered: (ICoinProtocol | undefined)[] = await Promise.all(\n protocols.map(async (protocol: ICoinProtocol) => {\n const protocolIdentifier: ProtocolSymbols = await protocol.getIdentifier()\n\n return this.mainProtocolStore.isIdentifierValid(protocolIdentifier) ? protocol : undefined\n })\n )\n const validProtocols: [string, ICoinProtocol][] = await Promise.all(\n filtered\n .filter((protocol: ICoinProtocol | undefined) => protocol !== undefined)\n .map(async (protocol: ICoinProtocol) => {\n const protocolAndNetworkIdentifier: string = await this.mainProtocolStore.getProtocolAndNetworkIdentifier(protocol)\n\n return [protocolAndNetworkIdentifier, protocol] as [string, ICoinProtocol]\n })\n )\n\n await this.mainProtocolStore.addActiveProtocols(new Map(validProtocols))\n }\n\n public async addActiveSubProtocols(protocolOrProtocols: ICoinProtocol | ICoinProtocol[]): Promise<void> {\n await this.waitReady()\n\n const protocols: ICoinProtocol[] = Array.isArray(protocolOrProtocols) ? protocolOrProtocols : [protocolOrProtocols]\n const filtered: (ICoinProtocol | undefined)[] = await Promise.all(\n protocols.map(async (protocol: ICoinProtocol) => {\n const protocolIdentifier: ProtocolSymbols = await protocol.getIdentifier()\n\n return this.subProtocolStore.isIdentifierValid(protocolIdentifier) ? protocol : undefined\n })\n )\n const validProtocols: ICoinProtocol[] = filtered.filter((protocol: ICoinProtocol | undefined) => protocol !== undefined)\n const mapped: [string, [ProtocolSymbols, ICoinProtocol]][] = await Promise.all(\n validProtocols.map(async (protocol: ICoinProtocol) => {\n const protocolIdentifier: ProtocolSymbols = await protocol.getIdentifier()\n const protocolOptions: ProtocolOptions = await protocol.getOptions()\n\n const mainIdentifier: MainProtocolSymbols = getMainIdentifier(protocolIdentifier)\n const protocolAndNetworkIdentifier: string = await this.subProtocolStore.getProtocolAndNetworkIdentifier(\n mainIdentifier,\n protocolOptions.network\n )\n\n return [protocolAndNetworkIdentifier, [protocolIdentifier, protocol]] as [string, [ProtocolSymbols, ICoinProtocol]]\n })\n )\n\n await this.subProtocolStore.addActiveProtocols(\n mapped.reduce(\n (\n obj: SubProtocolsMap,\n [protocolAndNetworkIdentifier, [protocolIdentifier, protocol]]: [string, [ProtocolSymbols, ICoinProtocol]]\n ) =>\n Object.assign(obj, {\n [protocolAndNetworkIdentifier]: Object.assign(obj[protocolAndNetworkIdentifier] ?? {}, { [protocolIdentifier]: protocol })\n }),\n {}\n )\n )\n }\n\n public async removeProtocols(protocolIdentifiers: ProtocolSymbols[]): Promise<void> {\n await Promise.all([\n this.mainProtocolStore.removeProtocols(protocolIdentifiers as MainProtocolSymbols[]),\n this.subProtocolStore.removeProtocols(protocolIdentifiers as SubProtocolSymbols[])\n ])\n }\n\n public async isProtocolAvailable(protocolIdentifier: ProtocolSymbols, networkIdentifier: string): Promise<boolean> {\n await this.waitReady()\n\n const protocol: ICoinProtocol | undefined = this.mainProtocolStore.isIdentifierValid(protocolIdentifier)\n ? await this.mainProtocolStore.getProtocolByIdentifier(protocolIdentifier as MainProtocolSymbols, networkIdentifier, true, false)\n : await this.subProtocolStore.getProtocolByIdentifier(protocolIdentifier as SubProtocolSymbols, networkIdentifier, true, false)\n\n return protocol !== undefined\n }\n\n public async getSubProtocols(\n mainProtocol: ICoinProtocol | MainProtocolSymbols,\n network?: ProtocolNetwork | string,\n activeOnly: boolean = true\n ): Promise<ICoinSubProtocol[]> {\n await this.waitReady()\n\n const mainIdentifier = typeof mainProtocol === 'string' ? mainProtocol : await mainProtocol.getIdentifier()\n const targetNetwork: ProtocolNetwork | string | undefined = await this.subProtocolStore.getTargetNetwork(mainIdentifier, network)\n const protocolAndNetworkIdentifier: string = await this.subProtocolStore.getProtocolAndNetworkIdentifier(mainIdentifier, targetNetwork)\n const subProtocolsMap: SubProtocolsMap = await (activeOnly ? this.getActiveSubProtocols() : this.getSupportedSubProtocols())\n\n return Object.values(subProtocolsMap[protocolAndNetworkIdentifier] ?? {}).filter(\n (subProtocol: ICoinSubProtocol | undefined) => subProtocol !== undefined\n )\n }\n\n public async getAllSubProtocols(\n mainProtocol: ICoinProtocol | MainProtocolSymbols,\n activeOnly: boolean = true\n ): Promise<ICoinSubProtocol[]> {\n await this.waitReady()\n\n const mainIdentifier = typeof mainProtocol === 'string' ? mainProtocol : await mainProtocol.getIdentifier()\n const subProtocolsMap: SubProtocolsMap = await (activeOnly ? this.getActiveSubProtocols() : this.getSupportedSubProtocols())\n\n return Object.keys(subProtocolsMap)\n .filter((key) => key.startsWith(mainIdentifier))\n .map((key) => Object.values(subProtocolsMap[key] ?? {}))\n .reduce((flatten, next) => flatten.concat(next), [])\n }\n\n public async getNetworksForProtocol(\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n activeOnly: boolean = true\n ): Promise<ProtocolNetwork[]> {\n await this.waitReady()\n\n const identifier: ProtocolSymbols =\n typeof protocolOrIdentifier === 'string' ? protocolOrIdentifier : await protocolOrIdentifier.getIdentifier()\n\n return this.mainProtocolStore.isIdentifierValid(identifier)\n ? this.mainProtocolStore.getNetworksForProtocol(identifier as MainProtocolSymbols, activeOnly)\n : this.subProtocolStore.getNetworksForProtocol(identifier as SubProtocolSymbols, activeOnly)\n }\n\n public async getNetworkForProtocol(\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n networkIdentifier: string,\n activeOnly: boolean = true\n ): Promise<ProtocolNetwork | undefined> {\n const networks = await this.getNetworksForProtocol(protocolOrIdentifier, activeOnly)\n\n return networks.find((network: ProtocolNetwork) => network.identifier === networkIdentifier)\n }\n\n public async isAddressOfProtocol(protocolOrIdentifier: ICoinProtocol | ProtocolSymbols, address: string): Promise<boolean> {\n await this.waitReady()\n\n const protocol: ICoinProtocol =\n typeof protocolOrIdentifier === 'string' ? await this.getProtocol(protocolOrIdentifier) : protocolOrIdentifier\n\n return address.match(await protocol.getAddressValidationPattern()) !== null\n }\n\n public async getProtocolsForAddress(address: string): Promise<ICoinProtocol[]> {\n await this.waitReady()\n\n const protocols: ICoinProtocol[] = await this.getSupportedProtocols()\n\n return (\n await Promise.all(\n protocols.map(async (protocol) => {\n const isProtocolAddress: boolean = await this.isAddressOfProtocol(protocol, address)\n\n return isProtocolAddress ? protocol : undefined\n })\n )\n ).filter((protocol: ICoinProtocol | undefined) => protocol !== undefined)\n }\n\n public isKnownProtocolSymbol(symbol: ProtocolSymbols): boolean {\n if (this.knownProtocolSymbols === undefined) {\n this.knownProtocolSymbols = new Set([\n ...Object.values(MainProtocolSymbols),\n ...Object.values(SubProtocolSymbols),\n ...Object.values(erc20Tokens).map((token: Token) => token.identifier)\n ])\n }\n\n return this.knownProtocolSymbols?.has(symbol) ?? false\n }\n\n private async isProtocolRegistered(\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n network?: ProtocolNetwork,\n checkActiveOnly: boolean = true\n ): Promise<boolean> {\n const identifier = typeof protocolOrIdentifier === 'string' ? protocolOrIdentifier : await protocolOrIdentifier.getIdentifier()\n const targetNetwork = this.mainProtocolStore.isIdentifierValid(identifier)\n ? await this.mainProtocolStore.getTargetNetwork(identifier, network)\n : await this.subProtocolStore.getTargetNetwork(identifier, network)\n const targetNetworkIdentifier = typeof targetNetwork === 'string' ? targetNetwork : targetNetwork?.identifier\n\n return this.getProtocol(identifier, targetNetwork, checkActiveOnly)\n .then(async (protocol) => {\n const foundIdentifier = await protocol.getIdentifier()\n const foundNetworkIdentifier = targetNetworkIdentifier !== undefined ? (await protocol.getOptions()).network.identifier : undefined\n\n return foundIdentifier === identifier && foundNetworkIdentifier === targetNetworkIdentifier\n })\n .catch(() => false)\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core'\n// eslint-disable-next-line @typescript-eslint/naming-convention\nimport BigNumber from 'bignumber.js'\nimport { ICoinProtocol, ProtocolNetwork, ProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { ProtocolService } from '../../services/protocol/protocol.service'\n\ntype AmountConverterValue = BigNumber | string | number | null | undefined\n\ninterface AmountConverterArgs {\n protocol: ICoinProtocol | ProtocolSymbols | undefined | null\n maxDigits?: number\n network?: ProtocolNetwork | string\n}\n\ninterface AmountConverterNumberFormat {\n decimalSeparator: string\n groupSeparator: string\n groupSize: number\n}\n\nconst FORMAT_UNITS: Record<string, string> = {\n [1e3]: 'K',\n [1e6]: 'M'\n}\nconst SUPPORTED_FORMAT_DECIMAL_SIZES: string[] = Object.keys(FORMAT_UNITS)\n\n@Pipe({\n name: 'amountConverter'\n})\nexport class AmountConverterPipe implements PipeTransform {\n public static readonly defaultMaxDigits: number = 10\n public static readonly numberFormat: AmountConverterNumberFormat = {\n decimalSeparator: '.',\n groupSeparator: `'`,\n groupSize: 3\n }\n\n constructor(private readonly protocolsService: ProtocolService) {}\n\n public async transform(value: AmountConverterValue, args: AmountConverterArgs): Promise<string> {\n if (!args.protocol) {\n throw new Error('Invalid protocol')\n }\n\n if (!(typeof value === 'string' || typeof value === 'number' || BigNumber.isBigNumber(value))) {\n throw new Error('Invalid amount')\n }\n\n if (args.maxDigits !== undefined && typeof args.maxDigits !== 'number') {\n throw new Error('Invalid maxDigits')\n }\n\n const protocol: ICoinProtocol = await this.protocolsService.getProtocol(args.protocol, args.network)\n const amount = await this.transformValueOnly(value, protocol, args.maxDigits)\n\n return `${amount} ${await protocol.getSymbol()}`\n }\n\n public async transformValueOnly(\n value: string | number | BigNumber,\n protocol: ICoinProtocol,\n maxDigits: number = AmountConverterPipe.defaultMaxDigits\n ): Promise<string | undefined> {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const BN = BigNumber.clone({ FORMAT: AmountConverterPipe.numberFormat })\n const valueBN = new BN(value)\n\n if (valueBN.isNaN() || isNaN(maxDigits)) {\n throw new Error('Invalid amount')\n }\n\n const protocolDecimals: number = await protocol.getDecimals()\n const amount = valueBN.shiftedBy(-1 * protocolDecimals).decimalPlaces(protocolDecimals, BigNumber.ROUND_FLOOR)\n\n return this.formatBigNumber(amount, maxDigits)\n }\n\n public formatBigNumber(value: BigNumber, maxDigits?: number): string {\n if (maxDigits === undefined || value.toFixed().length <= maxDigits) {\n return value.toFormat()\n }\n\n const integerValueLength = value.integerValue().toString().length\n if (integerValueLength >= maxDigits) {\n // We can omit floating point\n return this.abbreviateNumber(value, maxDigits)\n }\n\n // Need regex to remove all unneccesary trailing zeros\n return value.toFormat(maxDigits - integerValueLength).replace(/\\.?0+$/, '')\n }\n\n public abbreviateNumber(value: BigNumber, maxDigits: number): string {\n if (maxDigits === 0) {\n return value.toFormat()\n }\n\n let abbreviated: BigNumber = value\n let suffix: string = ''\n\n let nextDecimalsIndex: number = 0\n while (abbreviated.toFixed().length > Math.max(maxDigits, 3) && nextDecimalsIndex < SUPPORTED_FORMAT_DECIMAL_SIZES.length) {\n const decimals: BigNumber = new BigNumber(SUPPORTED_FORMAT_DECIMAL_SIZES[nextDecimalsIndex])\n abbreviated = value.dividedToIntegerBy(decimals)\n suffix = FORMAT_UNITS[decimals.toString()]\n\n nextDecimalsIndex++\n }\n\n return `${abbreviated.toFormat()}${suffix}`\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core'\nimport BigNumber from 'bignumber.js'\nimport { ICoinProtocol, ProtocolNetwork, ProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { ProtocolService } from '../../services/protocol/protocol.service'\n\ntype FeeConverterValue = BigNumber | string | number | null | undefined\n\ninterface FeeConverterArgs {\n protocol: ICoinProtocol | ProtocolSymbols | undefined | null\n dropSymbol?: boolean\n reverse?: boolean\n network?: ProtocolNetwork | string\n}\n\n@Pipe({\n name: 'feeConverter'\n})\nexport class FeeConverterPipe implements PipeTransform {\n constructor(private readonly protocolsService: ProtocolService) {}\n\n public async transform(value: FeeConverterValue, args: FeeConverterArgs): Promise<string> {\n if (args.protocol === undefined || !args.protocol) {\n throw new Error('Invalid protocol')\n }\n\n if (!(typeof value === 'string' || typeof value === 'number' || BigNumber.isBigNumber(value))) {\n throw new Error('Invalid fee amount')\n }\n\n const protocol: ICoinProtocol = await this.protocolsService.getProtocol(args.protocol, args.network)\n const reverse = args.reverse !== undefined && args.reverse\n\n const shiftDirection: number = !reverse ? -1 : 1\n\n const protocolFeeDecimals: number = await protocol.getFeeDecimals()\n const fee: BigNumber = new BigNumber(value).shiftedBy(shiftDirection * protocolFeeDecimals)\n\n if (fee.isNaN()) {\n throw new Error('Invalid fee amount')\n }\n\n const protocolFeeSymbol: string | undefined = protocol ? await protocol?.getFeeSymbol() : undefined\n\n return `${fee.toFixed()}${args.dropSymbol ? '' : ` ${protocolFeeSymbol?.toUpperCase()}`}`\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core'\nimport { AirGapWallet, AirGapWalletStatus, ProtocolNetwork } from '@wallfree-dev/coinlib-core'\n\ninterface WalletFilterPipeArgs {\n symbol?: string\n status?: AirGapWalletStatus | AirGapWalletStatus[]\n network?: string | ProtocolNetwork\n}\n\n@Pipe({\n name: 'walletFilter'\n})\nexport class WalletFilterPipe implements PipeTransform {\n public async transform(items: AirGapWallet[], args: WalletFilterPipeArgs): Promise<AirGapWallet[]> {\n if (items === null || items?.length === 0) {\n return []\n }\n\n const symbol: string | undefined = args?.symbol\n const status: AirGapWalletStatus | AirGapWalletStatus[] | undefined = args?.status\n const network: string | ProtocolNetwork | undefined = args?.network\n\n if (!symbol && !status && !network) {\n return items\n } else {\n const filtered: (AirGapWallet | undefined)[] = await Promise.all(\n items.map(async (wallet: AirGapWallet) => {\n const symbolCompliant: boolean =\n !symbol ||\n (await wallet.protocol.getSymbol()).toLowerCase().includes(symbol) ||\n (await wallet.protocol.getName()).toLowerCase().includes(symbol)\n const statusCompliant: boolean = !status || (Array.isArray(status) ? status.includes(wallet.status) : wallet.status === status)\n const networkCompliant: boolean =\n !network ||\n (await wallet.protocol.getOptions()).network.identifier === (typeof network === 'string' ? network : network.identifier)\n\n return symbolCompliant && statusCompliant && networkCompliant ? wallet : undefined\n })\n )\n\n return filtered.filter((wallet: AirGapWallet | undefined) => wallet !== undefined)\n }\n }\n}\n","import { NgModule } from '@angular/core'\nimport { AmountConverterPipe } from './amount-converter/amount-converter.pipe'\nimport { FeeConverterPipe } from './fee-converter/fee-converter.pipe'\nimport { WalletFilterPipe } from './wallet-filter/wallet-filter.pipe'\n\n@NgModule({\n declarations: [AmountConverterPipe, FeeConverterPipe, WalletFilterPipe],\n imports: [],\n exports: [AmountConverterPipe, FeeConverterPipe, WalletFilterPipe]\n})\nexport class PipesModule {}\n","/* eslint-disable spaced-comment */\nimport { Directive, OnDestroy, OnInit } from '@angular/core'\nimport { Subject } from 'rxjs'\nimport { BaseFacade } from './base.facade'\n\n@Directive()\nexport abstract class BaseComponent<Facade extends BaseFacade> implements OnInit, OnDestroy {\n private static readonly callSuperNgOnInit: unique symbol = Symbol('Expected to call `super.ngOnInit()`')\n private static readonly callSuperNgOnDestroy: unique symbol = Symbol('Expected to call `super.ngOnDestroy()`')\n\n private _ngDestroyed$: Subject<void> | undefined\n protected get ngDestroyed$(): Subject<void> {\n if (this._ngDestroyed$ === undefined) {\n this._ngDestroyed$ = new Subject()\n }\n\n return this._ngDestroyed$\n }\n\n constructor(public readonly facade: Facade) {\n this.facade.onViewCreate()\n }\n\n /**************** Lifecycle ****************/\n\n public ngOnInit(): typeof BaseComponent.callSuperNgOnDestroy & never {\n this.facade.onViewInit()\n\n // force `super.ngOnInit()` in overriden methods\n return undefined as typeof BaseComponent.callSuperNgOnInit & never\n }\n\n public ngOnDestroy(): typeof BaseComponent.callSuperNgOnDestroy & never {\n this._ngDestroyed$?.next()\n this._ngDestroyed$?.complete()\n this._ngDestroyed$ = undefined\n\n this.facade.onViewDestroy()\n\n // force `super.ngOnDestroy()` in overriden methods\n return undefined as typeof BaseComponent.callSuperNgOnDestroy & never\n }\n}\n","import { ProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { InjectionToken, Injector } from '@angular/core'\nimport { Observable } from 'rxjs'\n\nimport { BaseFacade } from '../../base/base.facade'\n\nexport const DEFAULT_CURRENCY_SYMBOL_URL = './assets/symbols/generic-coin.svg'\n\nexport const CURRENCY_SYMBOL_FACADE = new InjectionToken<CurrencySymbolFacade>('CurrencySymbolFacade')\nexport const CURRENCY_SYMBOL_FACADE_FACTORY = new InjectionToken<(injector: Injector) => CurrencySymbolFacade>(\n 'CurrencySymbolFacadeFactory'\n)\nexport type CurrencySymbolFacade<T extends BaseFacade = BaseFacade> = ICurrencySymbolFacade & T\nexport interface ICurrencySymbolFacade {\n readonly symbolSrc$: Observable<string>\n\n initWithSymbol(symbol: string | undefined, protocolIdentifier: ProtocolSymbols | undefined): void\n onSymbolChanged(symbol: string | undefined, protocolIdentifier: ProtocolSymbols | undefined): void\n onError(symbol: string | undefined, protocolIdentifier: ProtocolSymbols | undefined, src?: string): void\n}\n\nexport function currencySymbolFacade(injector: Injector): CurrencySymbolFacade {\n return injector.get(CURRENCY_SYMBOL_FACADE_FACTORY)(injector)\n}\n","import { ProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { Component, Inject, Injector, Input, OnChanges, SimpleChanges } from '@angular/core'\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser'\nimport { Observable } from 'rxjs'\nimport { first, map } from 'rxjs/operators'\nimport { BaseComponent } from '../../base/base.component'\nimport { currencySymbolFacade, CurrencySymbolFacade, CURRENCY_SYMBOL_FACADE } from './currency-symbol.facade'\n\n@Component({\n selector: 'airgap-currency-symbol',\n templateUrl: './currency-symbol.component.html',\n styleUrls: ['./currency-symbol.component.scss'],\n providers: [{ provide: CURRENCY_SYMBOL_FACADE, useFactory: currencySymbolFacade, deps: [Injector] }]\n})\nexport class CurrencySymbolComponent extends BaseComponent<CurrencySymbolFacade> implements OnChanges {\n @Input()\n public symbol: string | undefined\n\n @Input()\n public protocolIdentifier: ProtocolSymbols | undefined\n\n public readonly symbolSrc$: Observable<SafeUrl>\n\n constructor(@Inject(CURRENCY_SYMBOL_FACADE) facade: CurrencySymbolFacade, private readonly domSanitizer: DomSanitizer) {\n super(facade)\n\n this.symbolSrc$ = facade.symbolSrc$.pipe(map((src: string) => this.domSanitizer.bypassSecurityTrustUrl(src)))\n }\n\n public ngOnInit() {\n this.facade.initWithSymbol(this.symbol, this.protocolIdentifier)\n\n return super.ngOnInit()\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.symbol === undefined || changes.protocolIdentifier === undefined) {\n return\n }\n\n if (\n changes.symbol.previousValue !== changes.symbol.currentValue ||\n changes.protocolIdentifier.previousValue !== changes.protocolIdentifier.currentValue\n ) {\n this.facade.onSymbolChanged(changes.symbol.currentValue, changes.protocolIdentifier.currentValue)\n }\n }\n\n public async onError(): Promise<void> {\n const symbolSrc = await this.facade.symbolSrc$.pipe(first()).toPromise()\n\n this.facade.onError(this.symbol, this.protocolIdentifier, symbolSrc)\n }\n}\n","<img [src]=\"symbolSrc$ | async\" (error)=\"onError()\" />","import { InjectionToken } from '@angular/core'\n\nexport interface AppConfig {\n app: {\n name: string\n urlScheme: string\n universalLink: string\n }\n otherApp: {\n name: string\n urlScheme: string\n universalLink: string\n }\n}\n\nexport const APP_CONFIG = new InjectionToken<AppConfig>('AppConfig')\n","import { Injectable, Inject } from '@angular/core'\nimport { AlertController, LoadingController, ToastController } from '@ionic/angular'\nimport { AlertInput, AlertButton, AlertOptions, ToastOptions, ToastButton, LoadingOptions } from '@ionic/core'\nimport { TranslateService } from '@ngx-translate/core'\nimport { APP_CONFIG, AppConfig } from '../../config/app-config'\n\n/**\n * This class provides helper functions for translated UI elements such as alerts, toasts and loaders.\n *\n * This class should most likely not be called directly and instead be wrapped with something like the UiEventElementsService.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class UiEventService {\n constructor(\n private readonly translateService: TranslateService,\n private readonly alertController: AlertController,\n private readonly toastController: ToastController,\n private readonly loadingController: LoadingController,\n @Inject(APP_CONFIG) private readonly appConfig: AppConfig\n ) {}\n\n /**\n * Create a translated loader and show it. If you want a reference to the loader, use `getTranslatedLoader` instead.\n *\n * @param optionsInput\n */\n public async showTranslatedLoader(optionsInput: LoadingOptions): Promise<void> {\n const loader: HTMLIonLoadingElement = await this.getTranslatedLoader(optionsInput)\n\n return loader.present()\n }\n\n /**\n * Create a translated loader and return it.\n *\n * @param optionsInput\n */\n public async getTranslatedLoader(optionsInput: LoadingOptions): Promise<HTMLIonLoadingElement> {\n const message = optionsInput.message?.toString()\n\n const translationKeys: string[] = [message].filter((key: string | undefined): key is string => key !== undefined)\n\n const options: ToastOptions = {}\n\n if (translationKeys.length > 0) {\n const values = await this.translateService.get(translationKeys, this.appConfig).toPromise()\n\n if (message) {\n options.message = values[message]\n }\n }\n\n const loader = await this.loadingController.create({\n backdropDismiss: false, // Apply defaults\n ...optionsInput, // Overwrite with configuration\n ...options // Overwrite translations\n })\n\n return loader\n }\n\n /**\n * Create a translated toast and show it. If you want a reference to the toast, use `getTranslatedToast` instead.\n *\n * @param optionsInput\n */\n public async showTranslatedToast(optionsInput: ToastOptions): Promise<void> {\n const toast: HTMLIonToastElement = await this.getTranslatedToast(optionsInput)\n\n return toast.present()\n }\n\n /**\n * Create a translated toast and return it.\n *\n * @param optionsInput\n */\n public async getTranslatedToast(optionsInput: ToastOptions): Promise<HTMLIonToastElement> {\n const header = optionsInput.header\n const message = optionsInput.message?.toString()\n const buttons = optionsInput.buttons ?? []\n\n const translationKeys: string[] = [\n header,\n message,\n ...buttons.map((button: string | ToastButton) => (typeof button === 'string' ? button : button.text))\n ].filter((key: string | undefined): key is string => key !== undefined)\n\n const options: ToastOptions = {}\n\n if (translationKeys.length > 0) {\n const values = await this.translateService.get(translationKeys, this.appConfig).toPromise()\n\n if (header) {\n options.header = values[header]\n }\n if (message) {\n options.message = values[message]\n }\n\n const newButtons: (string | ToastButton)[] | undefined = await this.translateButtons<ToastButton>(buttons, values)\n\n if (newButtons) {\n options.buttons = newButtons\n }\n }\n\n const toast = await this.toastController.create({\n duration: 2000, // Apply defaults\n ...optionsInput, // Overwrite with configuration\n ...options // Overwrite translations\n })\n\n return toast\n }\n\n /**\n * Create a translated alert and show it. If you want a reference to the alert, use `getTranslatedAlert` instead.\n *\n * @param optionsInput\n */\n public async showTranslatedAlert(optionsInput: AlertOptions): Promise<void> {\n const alert: HTMLIonAlertElement = await this.getTranslatedAlert(optionsInput)\n\n return alert.present()\n }\n\n /**\n * Create a translated alert and return it.\n *\n * @param optionsInput\n */\n public async getTranslatedAlert(optionsInput: AlertOptions): Promise<HTMLIonAlertElement> {\n const header = optionsInput.header\n const subHeader = optionsInput.subHeader\n const message = optionsInput.message?.toString()\n const inputs = optionsInput.inputs ?? []\n const buttons = optionsInput.buttons ?? []\n\n const translationKeys: string[] = [\n header,\n subHeader,\n message,\n ...inputs.map((input: AlertInput) => input.name),\n ...inputs.map((input: AlertInput) => input.placeholder),\n ...inputs.map((input: AlertInput) => input.value),\n ...inputs.map((input: AlertInput) => input.label),\n ...buttons.map((button: string | AlertButton) => (typeof button === 'string' ? button : button.text))\n ].filter((key: string | undefined): key is string => key !== undefined)\n\n const options: AlertOptions = {}\n\n if (translationKeys.length > 0) {\n const values = await this.translateService.get(translationKeys, this.appConfig).toPromise()\n\n if (header) {\n options.header = values[header]\n }\n if (subHeader) {\n options.subHeader = values[subHeader]\n }\n if (message) {\n options.message = values[message]\n }\n\n if (inputs.length > 0) {\n inputs.forEach((input: AlertInput) => {\n if (input.name !== undefined) {\n input.name = values[input.name]\n }\n if (input.placeholder !== undefined) {\n input.placeholder = values[input.placeholder]\n }\n if (input.value !== undefined) {\n input.value = values[input.value]\n }\n if (input.label !== undefined) {\n input.label = values[input.label]\n }\n })\n\n options.inputs = inputs\n }\n\n const newButtons: (string | AlertButton)[] | undefined = await this.translateButtons<AlertButton>(buttons, values)\n\n if (newButtons) {\n options.buttons = newButtons\n }\n }\n\n const alert = await this.alertController.create({\n backdropDismiss: true, // Apply defaults\n ...optionsInput, // Overwrite with configuration\n ...options // Overwrite translations\n })\n\n return alert\n }\n\n private async translateButtons<T extends AlertButton | ToastButton>(\n buttons: (string | T)[],\n values: { [key: string]: string }\n ): Promise<undefined | (string | T)[]> {\n if (buttons.length > 0) {\n const newButtons: (string | T)[] = []\n buttons.forEach((button: string | T) => {\n if (typeof button === 'string') {\n // eslint-disable-next-line no-param-reassign\n newButtons.push(values[button])\n } else {\n if (button.text) {\n button.text = values[button.text]\n newButtons.push(button)\n }\n }\n })\n\n return newButtons\n } else {\n return undefined\n }\n }\n}\n","import { Injectable } from '@angular/core'\nimport { UiEventService } from '../ui-event/ui-event.service'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UiEventElementsService {\n constructor(private readonly uiEventService: UiEventService) {}\n\n public async showSuccessfullyCopiedToClipboardToast(message: string = 'clipboard.toast.success_text'): Promise<void> {\n await this.uiEventService.showTranslatedToast({\n message,\n position: 'top',\n buttons: [\n {\n text: 'clipboard.toast.ok_label',\n role: 'cancel'\n }\n ]\n })\n }\n\n public async showIACMessageUnknownAlert(relayHandler: () => void, copyHandler: () => void, cancelHandler: () => void): Promise<void> {\n const relayButton = {\n text: 'iac.message-unknown_alert.relay_label',\n handler: relayHandler\n }\n\n const copyButton = {\n text: 'iac.message-unknown_alert.copy_label',\n handler: copyHandler\n }\n\n const cancelButton = {\n text: 'iac.message-unknown_alert.cancel_label',\n role: 'cancel',\n handler: cancelHandler\n }\n\n await this.uiEventService.showTranslatedAlert({\n header: 'iac.message-unknown_alert.header',\n message: 'iac.message-unknown_alert.message',\n buttons: [relayButton, copyButton, cancelButton]\n })\n }\n\n public async showIACMessageNotSupportedAlert(\n relayHandler: () => void,\n copyHandler: () => void,\n cancelHandler: () => void\n ): Promise<void> {\n const relayButton = {\n text: 'iac.message-not-supported_alert.relay_label',\n handler: relayHandler\n }\n\n const copyButton = {\n text: 'iac.message-not-supported_alert.copy_label',\n handler: copyHandler\n }\n\n const cancelButton = {\n text: 'iac.message-not-supported_alert.cancel_label',\n role: 'cancel',\n handler: cancelHandler\n }\n\n await this.uiEventService.showTranslatedAlert({\n header: 'iac.message-not-supported_alert.header',\n message: 'iac.message-not-supported_alert.message',\n buttons: [relayButton, copyButton, cancelButton]\n })\n }\n\n public async showDeeplinkOnlyAvailableOnDevicesAlert(): Promise<void> {\n await this.uiEventService.showTranslatedAlert({\n header: 'deeplink.not-supported-alert.title',\n message: 'deeplink.not-supported-alert.message',\n buttons: [\n {\n text: 'deeplink.not-supported-alert.ok',\n role: 'cancel'\n }\n ]\n })\n }\n\n public async invalidDeeplinkAlert(): Promise<void> {\n await this.uiEventService.showTranslatedAlert({\n header: 'deeplink.invalid.title',\n message: 'deeplink.invalid.message',\n buttons: [\n {\n text: 'deeplink.invalid.ok',\n role: 'cancel'\n }\n ]\n })\n }\n\n public async showOtherAppNotFoundAlert(): Promise<void> {\n await this.uiEventService.showTranslatedAlert({\n header: 'deeplink.app-not-found.title',\n message: 'deeplink.app-not-found.message',\n buttons: [\n {\n text: 'deeplink.app-not-found.ok',\n role: 'cancel'\n }\n ]\n })\n }\n\n public async showOpenSettingsAlert(openSettingsHandler: () => void): Promise<void> {\n await this.uiEventService.showTranslatedAlert({\n header: 'Settings',\n message: 'You can enable the missing permissions in the device settings.',\n buttons: [\n {\n text: 'Cancel',\n role: 'cancel',\n handler: () => undefined\n },\n {\n text: 'Open settings',\n handler: openSettingsHandler\n }\n ]\n })\n }\n}\n","import { Injectable, Inject } from '@angular/core'\nimport { ClipboardPlugin } from '@capacitor/clipboard'\n\n// TODO: import { ErrorCategory, handleErrorLocal } from './../error-handler/error-handler.service'\nimport { CLIPBOARD_PLUGIN } from '../../capacitor-plugins/injection-tokens'\nimport { UiEventElementsService } from '../ui-event-elements/ui-event-elements.service'\n\n@Injectable({ providedIn: 'root' })\nexport class ClipboardService {\n constructor(\n private readonly uiEventElementService: UiEventElementsService,\n @Inject(CLIPBOARD_PLUGIN) private readonly clipboard: ClipboardPlugin\n ) {}\n\n public async copy(text: string): Promise<void> {\n return this.clipboard.write({\n // eslint-disable-next-line id-blacklist\n string: text\n })\n }\n\n public async copyAndShowToast(text: string, toastMessage?: string): Promise<void> {\n try {\n await this.copy(text)\n await this.uiEventElementService.showSuccessfullyCopiedToClipboardToast(toastMessage)\n } catch (copyError) {\n // eslint-disable-next-line no-console\n console.error('Failed to copy: ', copyError)\n }\n }\n\n public async paste(): Promise<string> {\n try {\n const text = await this.clipboard.read()\n\n return text.value\n } catch (pasteError) {\n // eslint-disable-next-line no-console\n console.error('Failed to paste: ', pasteError)\n throw pasteError\n }\n }\n}\n","import { Component, Input } from '@angular/core'\n\n@Component({\n selector: 'airgap-titled-text',\n templateUrl: './titled-text.component.html',\n styleUrls: ['./titled-text.component.scss']\n})\nexport class TitledTextComponent {\n @Input()\n public title: string | undefined | null\n\n @Input()\n public subTitle: string | undefined | null\n\n @Input()\n public text: string | undefined | null\n\n @Input()\n public selectable: boolean = false\n\n @Input()\n public capitalize: boolean = false\n}\n","<ion-label *ngIf=\"title\" class=\"ion-text-uppercase\">{{ title | translate }}</ion-label>\n<div *ngIf=\"subTitle\">\n <span [ngClass]=\"{ 'text-selectable': selectable, 'ion-text-capitalize': capitalize }\" class=\"typography--mono contact-name\">\n {{ subTitle }}\n </span>\n</div>\n<div *ngIf=\"text\">\n <span [ngClass]=\"{ 'text-selectable': selectable, 'ion-text-capitalize': capitalize }\" class=\"typography--mono\">\n {{ text | translate }}\n </span>\n</div>\n","import { Component, Input } from '@angular/core'\nimport { createIcon } from '@download/blockies'\nimport { BigNumber } from 'bignumber.js'\nimport { toDataUrl } from 'myetherwallet-blockies'\nimport { MainProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { ProtocolService } from '../../services/protocol/protocol.service'\n\n@Component({\n selector: 'airgap-identicon',\n templateUrl: './identicon.component.html',\n styleUrls: ['./identicon.component.scss']\n})\nexport class IdenticonComponent {\n private static readonly b52Characters = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\n @Input()\n public set address(value: string | undefined | null) {\n if (!value) {\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.setAddress(value)\n }\n\n public identicon: string | undefined\n\n constructor(private readonly protocolService: ProtocolService) {}\n\n private async setAddress(value: string): Promise<void> {\n if (await this.protocolService.isAddressOfProtocol(MainProtocolSymbols.AE, value)) {\n this.identicon = createIcon({ seed: value }).toDataURL()\n } else if (await this.protocolService.isAddressOfProtocol(MainProtocolSymbols.XTZ, value)) {\n this.identicon = createIcon({\n seed: `0${this.b582int(value)}`,\n spotcolor: '#000'\n }).toDataURL()\n } else {\n this.identicon = toDataUrl(value.toLowerCase())\n }\n }\n\n private b582int(v: string): string {\n let rv = new BigNumber(0)\n for (let i = 0; i < v.length; i++) {\n rv = rv.plus(\n new BigNumber(IdenticonComponent.b52Characters.indexOf(v[v.length - 1 - i])).multipliedBy(\n new BigNumber(IdenticonComponent.b52Characters.length).exponentiatedBy(i)\n )\n )\n }\n\n return rv.toString(16)\n }\n}\n","<img *ngIf=\"identicon\" class=\"identicon\" [src]=\"identicon\" />\n<img *ngIf=\"!identicon\" class=\"identicon--placeholder\" src=\"./assets/img/identicon_placeholder.png\" />\n","import { ProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { Component, Input } from '@angular/core'\n\n@Component({\n selector: 'airgap-titled-address',\n templateUrl: './titled-address.component.html',\n styleUrls: ['./titled-address.component.scss']\n})\nexport class TitledAddressComponent {\n @Input()\n public title: string | undefined\n\n @Input()\n public name: string | undefined\n\n @Input()\n public address: string | undefined\n\n @Input()\n public symbol: string | undefined\n\n @Input()\n public protocolIdentifier: ProtocolSymbols | undefined\n\n @Input()\n public hasSymbol: boolean = false\n}\n","<ion-row lines=\"none\" class=\"ion-no-padding ion-align-items-center\">\n <ion-col size=\"3\">\n <ion-row class=\"ion-justify-content-center\">\n <ion-avatar>\n <airgap-identicon [address]=\"address\"></airgap-identicon>\n </ion-avatar>\n <airgap-currency-symbol\n [symbol]=\"symbol\"\n [protocolIdentifier]=\"protocolIdentifier\"\n *ngIf=\"hasSymbol\"\n class=\"symbol--icon\"\n ></airgap-currency-symbol>\n </ion-row>\n </ion-col>\n <ion-col size=\"9\">\n <airgap-titled-text [title]=\"title\" [subTitle]=\"name\" [text]=\"address\" [selectable]=\"true\"></airgap-titled-text>\n </ion-col>\n</ion-row>\n","import { Component, Input } from '@angular/core'\nimport { ProtocolNetwork, NetworkType } from '@wallfree-dev/coinlib-core'\n\n@Component({\n selector: 'airgap-network-badge',\n templateUrl: './network-badge.component.html',\n styleUrls: ['./network-badge.component.scss']\n})\nexport class NetworkBadgeComponent {\n @Input()\n public network: ProtocolNetwork | undefined\n\n public networkType: typeof NetworkType = NetworkType\n}\n","<ion-item *ngIf=\"network && network.type !== networkType.MAINNET\" class=\"ion-no-padding\" lines=\"none\">\n <ion-badge class=\"badge__margin\" color=\"danger\">{{ network.name }}</ion-badge>\n <ion-badge *ngIf=\"network.type === networkType.CUSTOM\" class=\"badge__margin\">{{ network.rpcUrl }}</ion-badge>\n</ion-item>\n","import { Component, Input } from '@angular/core'\nimport { IAirGapTransaction } from '@wallfree-dev/coinlib-core'\nimport { ClipboardService } from '../../services/clipboard/clipboard.service'\n\n@Component({\n selector: 'airgap-from-to',\n templateUrl: './from-to.component.html',\n styleUrls: ['./from-to.component.scss']\n})\nexport class FromToComponent {\n @Input()\n public transaction: IAirGapTransaction | undefined\n\n @Input()\n public displayRawData: boolean = false\n\n @Input()\n public displayDetails: boolean = false\n\n @Input()\n public interactionData: any | undefined\n\n @Input()\n public hideNetwork: boolean = false\n\n public displayFromTo: boolean = true\n\n public fromTransactions: { name?: string; address: string }[] = []\n public toTransactions: { name?: string; address: string }[] = []\n\n public get type(): string | undefined {\n return this.transaction?.transactionDetails?.parameters?.entrypoint ?? this.transaction?.extra?.type\n }\n\n public get destination(): string | undefined {\n const result: string | undefined = this.transaction?.transactionDetails?.destination ?? this.transaction?.extra?.destination\n if (result && this.transaction?.to.includes(result)) {\n return undefined\n }\n\n return result\n }\n\n public labeled: [string, string][] = []\n\n constructor(private readonly clipboardService: ClipboardService) {}\n\n public ngOnInit(): void {\n if (this.transaction) {\n this.displayFromTo = this.transaction.displayFromTo ?? true\n }\n\n if (!this.displayFromTo) {\n this.displayDetails = true\n }\n }\n\n public ngOnChanges(): void {\n if (this.transaction) {\n // eslint-disable-next-line no-underscore-dangle\n this.labeled = this.transaction.extra?.labeled ? Object.entries(this.transaction.extra?.labeled) : []\n\n this.fromTransactions = []\n for (let i = 0; i < this.transaction.from.length; i++) {\n const from = this.transaction.from[i]\n if (this.transaction.extra?.names && this.transaction.extra?.names?.[from]) {\n this.fromTransactions.push({ name: this.transaction.extra.names[from], address: from })\n } else {\n this.fromTransactions.push({ address: from })\n }\n }\n this.toTransactions = []\n for (let i = 0; i < this.transaction.to.length; i++) {\n const to = this.transaction.to[i]\n if (this.transaction.extra?.names && this.transaction.extra?.names?.[to]) {\n this.toTransactions.push({ name: this.transaction.extra.names[to], address: to })\n } else {\n this.toTransactions.push({ address: to })\n }\n }\n }\n }\n\n public toggleDisplayRawData(): void {\n this.displayRawData = !this.displayRawData\n }\n\n public toggleDisplayDetails(): void {\n this.displayDetails = !this.displayDetails\n }\n\n public copyToClipboard(): void {\n if (this.transaction) {\n this.clipboardService.copyAndShowToast(JSON.stringify(this.transaction.transactionDetails))\n }\n }\n\n public copyRawDataToClipboard(): void {\n if (this.interactionData) {\n this.clipboardService.copyAndShowToast(JSON.stringify(this.interactionData))\n }\n }\n}\n","<ng-container *ngIf=\"transaction\">\n <ng-container *ngIf=\"displayFromTo\">\n <airgap-titled-address\n *ngFor=\"let transaction of fromTransactions\"\n [address]=\"transaction.address\"\n [name]=\"transaction.name\"\n [title]=\"'from-to.from_label' | translate\"\n ></airgap-titled-address>\n </ng-container>\n\n <ion-row *ngIf=\"displayFromTo\" class=\"ion-align-items-center ion-padding-top ion-padding-bottom\">\n <ion-col size=\"3\" class=\"ion-no-padding\">\n <ion-row class=\"ion-justify-content-center\">\n <div class=\"from-to-line\"></div>\n </ion-row>\n </ion-col>\n <ion-col size=\"9\">\n <ng-container *ngIf=\"type\">\n <ion-label class=\"ion-text-uppercase\">{{ 'from-to.type_label' | translate }}</ion-label>\n <div class=\"ion-margin-bottom\">\n <span class=\"typography--mono\">\n <ion-chip>\n <ion-label>{{ type }}</ion-label>\n </ion-chip>\n </span>\n </div>\n </ng-container>\n\n <airgap-titled-text\n *ngIf=\"destination\"\n class=\"ion-padding-bottom\"\n [title]=\"'from-to.destination_label' | translate\"\n [text]=\"destination\"\n ></airgap-titled-text>\n\n <airgap-titled-text\n *ngFor=\"let labeledValue of labeled\"\n class=\"ion-padding-bottom\"\n [title]=\"labeledValue[0]\"\n [text]=\"labeledValue[1]\"\n ></airgap-titled-text>\n\n <airgap-titled-text\n *ngIf=\"transaction.amount\"\n class=\"ion-padding-bottom\"\n [title]=\"'from-to.total_amount_label' | translate\"\n [text]=\"transaction.amount | amountConverter : { protocol: transaction.protocolIdentifier, network: transaction.network } | async\"\n ></airgap-titled-text>\n\n <airgap-titled-text\n *ngIf=\"transaction.fee\"\n [title]=\"'from-to.fee_label' | translate\"\n [text]=\"transaction.fee | feeConverter : { protocol: transaction.protocolIdentifier, network: transaction.network } | async\"\n ></airgap-titled-text>\n\n <airgap-titled-text\n *ngIf=\"transaction.status\"\n class=\"ion-padding-top\"\n [title]=\"'from-to.status_label' | translate\"\n [text]=\"transaction.status\"\n [capitalize]=\"true\"\n ></airgap-titled-text>\n\n <airgap-titled-text\n *ngIf=\"transaction.timestamp\"\n class=\"ion-padding-top\"\n [title]=\"'from-to.time_label' | translate\"\n [text]=\"transaction.timestamp * 1000 | date : 'short'\"\n ></airgap-titled-text>\n\n <airgap-titled-text\n *ngIf=\"transaction.data\"\n class=\"ion-padding-top\"\n [title]=\"'from-to.data_label' | translate\"\n [text]=\"transaction.data\"\n ></airgap-titled-text>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"displayFromTo\">\n <ng-container *ngFor=\"let toTransaction of toTransactions; let i = index\">\n <airgap-titled-address\n [address]=\"toTransaction.address\"\n [name]=\"toTransaction.name\"\n [title]=\"'from-to.to_label' | translate\"\n ></airgap-titled-address>\n\n <ion-row class=\"ion-align-items-center ion-padding-top ion-padding-bottom\" *ngIf=\"transaction.changeAddressInfo\">\n <ion-col size=\"3\" class=\"ion-no-padding\">\n <ion-row class=\"ion-justify-content-center\">\n <div [ngStyle]=\"{ visibility: i === toTransactions.length - 1 ? 'hidden' : 'visible' }\" class=\"from-to-line\"></div>\n </ion-row>\n </ion-col>\n <ion-col size=\"9\">\n <airgap-titled-text\n *ngIf=\"transaction.changeAddressInfo[toTransaction.address].isChangeAddress\"\n class=\"ion-padding-bottom\"\n [title]=\"'from-to.change-address' | translate\"\n [text]=\"\n transaction.changeAddressInfo[toTransaction.address].path != ''\n ? transaction.changeAddressInfo[toTransaction.address].path\n : ('from-to.unknown-change-address' | translate)\n \"\n ></airgap-titled-text>\n <airgap-titled-text\n class=\"ion-padding-bottom\"\n [title]=\"'from-to.amount_label' | translate\"\n [text]=\"\n transaction.changeAddressInfo[toTransaction.address].amount\n | amountConverter : { protocol: transaction.protocolIdentifier, network: transaction.network }\n | async\n \"\n ></airgap-titled-text>\n </ion-col>\n </ion-row>\n </ng-container>\n </ng-container>\n\n <ion-row class=\"ion-align-items-center ion-padding-top\">\n <ion-col size=\"9\" offset=\"3\">\n <airgap-network-badge *ngIf=\"!hideNetwork\" [network]=\"transaction.network\"></airgap-network-badge>\n </ion-col>\n </ion-row>\n\n <div class=\"rawdata--container\">\n <ion-row *ngIf=\"transaction.transactionDetails\">\n <ion-col class=\"ion-no-padding\">\n <ion-item class=\"ion-no-padding\" lines=\"none\">\n <ion-toggle [checked]=\"displayRawData\" (ionChange)=\"toggleDisplayRawData()\" justify=\"space-between\" labelPlacement=\"start\">\n {{ 'from-to.transaction-details_label' | translate }}\n </ion-toggle>\n </ion-item>\n <pre *ngIf=\"displayRawData\" class=\"ion-no-margin\">{{ transaction.transactionDetails | json }}</pre>\n <ion-button *ngIf=\"displayRawData\" (click)=\"copyToClipboard()\">Copy data to clipboard</ion-button>\n </ion-col>\n </ion-row>\n\n <ion-row *ngIf=\"interactionData\">\n <ion-col class=\"ion-no-padding\">\n <ion-item class=\"ion-no-padding\" lines=\"none\">\n <ion-toggle [checked]=\"displayDetails\" (ionChange)=\"toggleDisplayDetails()\" justify=\"space-between\" labelPlacement=\"start\">\n {{ 'from-to.details' | translate }}\n </ion-toggle>\n </ion-item>\n <pre *ngIf=\"displayDetails\" class=\"ion-no-margin\">{{ interactionData | json }}</pre>\n <ion-button *ngIf=\"displayDetails\" (click)=\"copyRawDataToClipboard()\">Copy data to clipboard</ion-button>\n </ion-col>\n </ion-row>\n </div>\n</ng-container>\n","import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'\nimport { AirGapWallet, ProtocolSymbols } from '@wallfree-dev/coinlib-core'\n\n@Component({\n selector: 'airgap-account-item',\n templateUrl: './account-item.component.html',\n styleUrls: ['./account-item.component.scss']\n})\nexport class AccountItemComponent implements OnChanges {\n @Input()\n public wallet: AirGapWallet | undefined\n\n @Input()\n public label: string | undefined\n\n public address: string | undefined\n\n public protocolSymbol: string | undefined\n public protocolIdentifier: ProtocolSymbols | undefined\n public protocolName: string | undefined\n\n public async ngOnChanges(_changes: SimpleChanges): Promise<void> {\n this.address = this.wallet?.receivingPublicAddress\n\n const [protocolSymbol, protocolIdentifier, protocolName]: [string, ProtocolSymbols, string] = await Promise.all([\n this.wallet?.protocol.getSymbol() ?? Promise.resolve(undefined),\n this.wallet?.protocol.getIdentifier() ?? Promise.resolve(undefined),\n this.wallet?.protocol.getName() ?? Promise.resolve(undefined)\n ])\n\n this.protocolSymbol = protocolSymbol\n this.protocolIdentifier = protocolIdentifier\n this.protocolName = protocolName\n }\n}\n","<ng-container *ngIf=\"address && protocolSymbol && protocolIdentifier && protocolName\">\n <ion-item lines=\"none\" class=\"ion-no-padding\">\n <ion-avatar slot=\"start\">\n <airgap-identicon [address]=\"address\"></airgap-identicon>\n <airgap-currency-symbol [symbol]=\"protocolSymbol\" [protocolIdentifier]=\"protocolIdentifier\"></airgap-currency-symbol>\n </ion-avatar>\n <ion-label>\n <div style=\"display: flex; justify-content: space-between; align-items: center\">\n <h2>\n <span class=\"font--weight__med\">{{ protocolName }}</span>\n {{ protocolSymbol }}\n </h2>\n <p>{{ label }}</p>\n </div>\n <p class=\"typography--mono\">{{ wallet.receivingPublicAddress }}</p>\n </ion-label>\n </ion-item>\n</ng-container>\n","import { Component, Input, EventEmitter, Output, SimpleChanges } from '@angular/core'\nimport { AirGapWallet } from '@wallfree-dev/coinlib-core'\n@Component({\n selector: 'airgap-account-selection',\n templateUrl: './account-selection.component.html',\n styleUrls: ['./account-selection.component.scss']\n})\nexport class AccountSelectionComponent {\n @Input()\n public title: string | undefined\n\n @Input()\n public heading: string | undefined\n\n @Input()\n public placeholder: string | undefined\n\n @Input()\n public wallets: AirGapWallet[] | undefined\n\n @Output()\n private readonly walletSetEmitter: EventEmitter<AirGapWallet> = new EventEmitter()\n\n @Output()\n private readonly dismissEmitter: EventEmitter<void> = new EventEmitter()\n\n public symbolFilter: string | undefined\n\n public filteredWallets: AirGapWallet[] = []\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.wallets && changes.wallets.currentValue) {\n // Handle when wallets input changes or is set initially\n this.filteredWallets = [...this.wallets]\n }\n }\n\n public filterItems(event: Event): void {\n const value: unknown = this.isInputElement(event.target) ? event.target.value : undefined\n this.symbolFilter = this.isValidFilterQuery(value) ? value.trim().toLowerCase() : undefined\n }\n\n public filterWallet(event: Event): void {\n const value: unknown = this.isInputElement(event.target) ? event.target.value : undefined\n\n this.filteredWallets = this.isValidFilterQuery(value)\n ? this.wallets?.filter((wallet) => wallet.label?.trim().toLowerCase().startsWith(value.trim().toLowerCase())) || []\n : this.wallets\n ? [...this.wallets]\n : []\n }\n public selectAccount(wallet: AirGapWallet): void {\n this.walletSetEmitter.emit(wallet)\n }\n public dismiss(): void {\n this.dismissEmitter.emit()\n }\n\n private isInputElement(target: EventTarget | null): target is EventTarget & HTMLInputElement {\n return target !== null && 'value' in target\n }\n\n private isValidFilterQuery(data: unknown): data is string {\n return typeof data === 'string' && data.length > 0\n }\n}\n","<ion-header class=\"ion-no-border\">\n <ion-grid fixed=\"true\" class=\"ion-no-padding\">\n <ion-toolbar color=\"secondary\">\n <ion-button (click)=\"dismiss()\" fill=\"clear\" color=\"primary\" float-right>\n <ion-icon name=\"close\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n <ion-title color=\"primary\">{{ title }}</ion-title>\n </ion-toolbar>\n <ion-toolbar color=\"secondary\">\n <ion-searchbar placeholder=\"{{ placeholder }}\" (ionInput)=\"filterWallet($event)\"></ion-searchbar>\n </ion-toolbar>\n </ion-grid>\n</ion-header>\n<ion-content [fullscreen]=\"true\">\n <h3 [innerHTML]=\"heading\" class=\"ion-padding\"></h3>\n <ion-list class=\"ion-padding\" *ngIf=\"wallets\">\n <ng-container *ngFor=\"let wallet of filteredWallets\">\n <airgap-account-item [wallet]=\"wallet\" [label]=\"wallet.label\" (click)=\"selectAccount(wallet)\"></airgap-account-item>\n </ng-container>\n </ion-list>\n</ion-content>\n","import { Component, Input } from '@angular/core'\nimport { QRCodeErrorCorrectionLevel } from 'qrcode'\n\nimport { ClipboardService } from '../../services/clipboard/clipboard.service'\n\n@Component({\n selector: 'airgap-qr',\n templateUrl: './qr.component.html',\n styleUrls: ['./qr.component.scss']\n})\nexport class QrComponent {\n @Input()\n public level: QRCodeErrorCorrectionLevel = 'L'\n\n @Input()\n public size: number = 300\n\n @Input()\n public margin: number = 1\n\n @Input()\n public qrdata: string = ''\n\n @Input()\n public disableClipboard: boolean = false\n\n constructor(private readonly clipboardService: ClipboardService) {}\n\n public async copyToClipboard(): Promise<void> {\n if (!this.disableClipboard) {\n await this.clipboardService.copyAndShowToast(this.qrdata)\n }\n }\n}\n","<qrcode [errorCorrectionLevel]=\"level\" [qrdata]=\"qrdata\" [width]=\"size\" [margin]=\"margin\" (click)=\"copyToClipboard()\"></qrcode>\n","// TODO: Split up into individual files\n\n// https://stackoverflow.com/a/8472700/4790610\nexport function generateGUID(): string {\n // tslint:disable\n if (typeof window.crypto !== 'undefined' && typeof window.crypto.getRandomValues !== 'undefined') {\n // If we have a cryptographically secure PRNG, use that\n // https://stackoverflow.com/questions/6906916/collisions-when-generating-uuids-in-javascript\n const buf = new Uint16Array(8)\n window.crypto.getRandomValues(buf)\n const S4 = function (num: number): string {\n let ret = num.toString(16)\n while (ret.length < 4) {\n ret = `0${ret}`\n }\n\n return ret\n }\n\n return `${S4(buf[0]) + S4(buf[1])}-${S4(buf[2])}-${S4(buf[3])}-${S4(buf[4])}-${S4(buf[5])}${S4(buf[6])}${S4(buf[7])}`\n } else {\n // Otherwise, just use Math.random\n // https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n // eslint-disable-next-line no-bitwise\n const r = (Math.random() * 16) | 0\n // eslint-disable-next-line no-bitwise\n const v = c === 'x' ? r : (r & 0x3) | 0x8\n\n return v.toString(16)\n })\n }\n // tslint:enable\n}\n\nexport async function to<T, U = Error>(promise: Promise<T>, errorExt?: unknown): Promise<[U | null, T | undefined]> {\n return promise\n .then<[null, T]>((data: T) => [null, data])\n .catch<[U, undefined]>((rejectionError: U) => {\n if (errorExt) {\n Object.assign(rejectionError, errorExt)\n }\n\n return [rejectionError, undefined]\n })\n}\n\nfunction readParameterFromUrl(url: string, parameter: string): string {\n try {\n const parsedUrl: URL = new URL(url)\n\n return parsedUrl.searchParams.get(parameter) || ''\n } catch (error) {\n return url\n }\n}\n\nexport function parseIACUrl(url: string | string[], parameter: string): string[] {\n let parseResult: string[] | undefined\n if (Array.isArray(url)) {\n parseResult = url.map((chunk: string) => readParameterFromUrl(chunk, parameter))\n } else {\n try {\n parseResult = readParameterFromUrl(url, parameter).split(',')\n } catch (error) {\n parseResult = url.split(',')\n }\n }\n\n // In case one of the elements contains a chunked string, we have to flatten it.\n parseResult = parseResult.reduce((pv: string[], cv: string) => [...pv, ...cv.split(',')], [])\n\n return parseResult.filter((el: string) => el !== '')\n}\n\nexport function serializedDataToUrlString(data: string, host: string, parameter: string = 'd'): string {\n return `${host}?${parameter}=${data}`\n}\n\nexport function toBoolean(value: unknown): boolean {\n // All falsy and truthy values can be converted to a real boolean by using a double negative (!!)\n return Boolean(value)\n}\n\nexport function assertNever(name: string, arg: never): never {\n throw new Error(`${name} ${arg}`)\n}\n\nexport const TEMP_BTC_REQUEST_IDS = 'TEMP-BTC-REQUEST-IDS'\nexport const TEMP_MM_REQUEST_IDS = 'TEMP-MM-REQUEST-IDS'\n","import { Storage } from '@ionic/storage-angular'\n\nexport class BaseStorage<SettingsKey extends string, SettingsKeyReturnType extends Record<SettingsKey, unknown>> {\n private readonly storage: Promise<Storage>\n\n constructor(\n storage: Storage,\n protected readonly defaultValues: { [key in SettingsKey]: SettingsKeyReturnType[key] },\n drivers: any[] = []\n ) {\n this.storage = Promise.all(drivers.map((driver) => storage.defineDriver(driver))).then(() => storage.create())\n }\n\n protected async getStorage(): Promise<Storage> {\n return this.storage\n }\n\n public async get<K extends SettingsKey>(key: K): Promise<SettingsKeyReturnType[K]> {\n const storage = await this.getStorage()\n const value = await storage.get(key)\n const result: SettingsKeyReturnType[K] = value !== null && value !== undefined ? value : this.defaultValues[key]\n\n return result\n }\n\n public async set<K extends SettingsKey>(key: K, value: SettingsKeyReturnType[K]): Promise<void> {\n const storage = await this.getStorage()\n\n return storage.set(key, value)\n }\n\n public async delete<K extends SettingsKey>(key: K): Promise<boolean> {\n try {\n const storage = await this.getStorage()\n await storage.remove(key)\n\n return true\n } catch (error) {\n return false\n }\n }\n}\n","import { Injectable } from '@angular/core'\nimport { Storage } from '@ionic/storage-angular'\nimport { BaseStorage } from './base.storage'\n\nexport enum InternalStorageKey {\n SETTINGS_SERIALIZER_ENABLE_V3 = 'SETTINGS_SERIALIZER_ENABLE_V3',\n SETTINGS_SERIALIZER_CHUNK_TIME = 'SETTINGS_SERIALIZER_CHUNK_TIME',\n SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE = 'SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE',\n SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE = 'SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE',\n SETTINGS_TRADING_USE_MTPELERIN = 'SETTINGS_TRADING_USE_MTPELERIN'\n}\n\ninterface InternalStorageKeyReturnType {\n [InternalStorageKey.SETTINGS_SERIALIZER_ENABLE_V3]: boolean\n [InternalStorageKey.SETTINGS_SERIALIZER_CHUNK_TIME]: number\n [InternalStorageKey.SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE]: number\n [InternalStorageKey.SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE]: number\n [InternalStorageKey.SETTINGS_TRADING_USE_MTPELERIN]: boolean\n}\n\ntype InternalStorageKeyReturnDefaults = { [key in InternalStorageKey]: InternalStorageKeyReturnType[key] }\n\nexport const defaultValues: InternalStorageKeyReturnDefaults = {\n [InternalStorageKey.SETTINGS_SERIALIZER_ENABLE_V3]: true,\n [InternalStorageKey.SETTINGS_SERIALIZER_CHUNK_TIME]: 200,\n [InternalStorageKey.SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE]: 500,\n [InternalStorageKey.SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE]: 250,\n [InternalStorageKey.SETTINGS_TRADING_USE_MTPELERIN]: true\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class InternalStorageService extends BaseStorage<InternalStorageKey, InternalStorageKeyReturnType> {\n constructor(storage: Storage) {\n super(storage, defaultValues)\n }\n}\n","import { Injectable } from '@angular/core'\nimport {\n AccountShareResponse as AccountShareResponseV3,\n AccountShareResponseV2,\n generateId,\n IACMessageDefinitionObject,\n IACMessageDefinitionObjectV3,\n IACMessages as IACMessagesV3,\n IACMessagesV2,\n IACMessageType,\n Serializer,\n SerializerV3\n} from '@wallfree-dev/serializer'\n\nimport { parseIACUrl } from '../../utils/utils'\nimport { defaultValues, InternalStorageKey, InternalStorageService } from '../storage/storage.service'\n\nexport const convertV2ToV3 = async (chunks: IACMessageDefinitionObject[]): Promise<IACMessageDefinitionObjectV3[]> => {\n return chunks.map((message: IACMessageDefinitionObject) => {\n let newPayload: IACMessagesV3\n switch (message.type) {\n case IACMessageType.AccountShareResponse:\n newPayload = {\n ...message.payload,\n masterFingerprint: '',\n isActive: true,\n groupId: '',\n groupLabel: ''\n }\n break\n\n default:\n newPayload = message.payload as Exclude<IACMessagesV2, AccountShareResponseV2>\n break\n }\n\n return {\n id: generateId(8),\n type: message.type,\n protocol: message.protocol,\n payload: newPayload\n }\n })\n}\n\nexport const convertV3ToV2 = async (chunks: IACMessageDefinitionObjectV3[]): Promise<IACMessageDefinitionObject[]> => {\n return chunks.map((message: IACMessageDefinitionObjectV3) => {\n let newPayload: IACMessagesV2\n switch (message.type) {\n case IACMessageType.AccountShareResponse:\n const { masterFingerprint, isActive, groupId, groupLabel, ...rest } = message.payload as AccountShareResponseV3\n newPayload = {\n ...message.payload\n } as any\n newPayload = rest\n break\n\n default:\n newPayload = message.payload as Exclude<IACMessagesV3, AccountShareResponseV3> as any\n break\n }\n\n return {\n id: message.id.toString().repeat(10).slice(0, 10), // We need to assume the id is \"0\", so we need to repeat it 10 times\n type: message.type,\n protocol: message.protocol,\n payload: newPayload\n }\n })\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SerializerService {\n public _singleChunkSize: number = defaultValues.SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE\n public _multiChunkSize: number = defaultValues.SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE\n\n private readonly serializer: Serializer = Serializer.getInstance()\n private readonly serializerV3: SerializerV3 = SerializerV3.getInstance()\n\n private _useV3: boolean = defaultValues.SETTINGS_SERIALIZER_ENABLE_V3\n private _displayTimePerChunk: number = defaultValues.SETTINGS_SERIALIZER_CHUNK_TIME\n\n public get useV3(): boolean {\n return this._useV3\n }\n\n public set useV3(value: boolean) {\n // eslint-disable-next-line no-console\n this.internalStorageService.set(InternalStorageKey.SETTINGS_SERIALIZER_ENABLE_V3, value).catch(console.error)\n this._useV3 = value\n }\n\n public get singleChunkSize(): number {\n return this._singleChunkSize\n }\n\n public set singleChunkSize(value: number) {\n // eslint-disable-next-line no-console\n this.internalStorageService.set(InternalStorageKey.SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE, value).catch(console.error)\n this._singleChunkSize = value\n }\n\n public get multiChunkSize(): number {\n return this._multiChunkSize\n }\n\n public set multiChunkSize(value: number) {\n // eslint-disable-next-line no-console\n this.internalStorageService.set(InternalStorageKey.SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE, value).catch(console.error)\n this._multiChunkSize = value\n }\n\n public get displayTimePerChunk(): number {\n return this._displayTimePerChunk\n }\n\n public set displayTimePerChunk(value: number) {\n // eslint-disable-next-line no-console\n this.internalStorageService.set(InternalStorageKey.SETTINGS_SERIALIZER_CHUNK_TIME, value).catch(console.error)\n this._displayTimePerChunk = value\n }\n\n constructor(private readonly internalStorageService: InternalStorageService) {\n // eslint-disable-next-line no-console\n this.loadSettings().catch(console.error)\n }\n\n public async resetSettings(): Promise<void> {\n this._useV3 = defaultValues.SETTINGS_SERIALIZER_ENABLE_V3\n this._singleChunkSize = defaultValues.SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE\n this._multiChunkSize = defaultValues.SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE\n this._displayTimePerChunk = defaultValues.SETTINGS_SERIALIZER_CHUNK_TIME\n\n await Promise.all([\n this.internalStorageService.delete(InternalStorageKey.SETTINGS_SERIALIZER_ENABLE_V3),\n this.internalStorageService.delete(InternalStorageKey.SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE),\n this.internalStorageService.delete(InternalStorageKey.SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE),\n this.internalStorageService.delete(InternalStorageKey.SETTINGS_SERIALIZER_CHUNK_TIME)\n ])\n }\n\n public async serialize(chunks: IACMessageDefinitionObjectV3[]): Promise<string[] | string> {\n if (this.useV3) {\n return this.serializeV3(chunks)\n } else {\n return this.serializeV2(chunks)\n }\n }\n\n public async deserialize(chunks: string | string[]): Promise<IACMessageDefinitionObjectV3[]> {\n const parsedChunks: string[] = parseIACUrl(chunks, 'd')\n try {\n return this.deserializeV2(parsedChunks)\n } catch (error) {\n if (error && error.availablePages && error.totalPages) {\n throw error\n }\n\n if (parsedChunks.length === 1) {\n return this.deserializeV3(parsedChunks[0])\n } else {\n throw new Error('Could not deserialize input')\n }\n }\n }\n\n private async loadSettings() {\n this.internalStorageService\n .get(InternalStorageKey.SETTINGS_SERIALIZER_ENABLE_V3)\n .then((setting) => (this._useV3 = setting))\n // eslint-disable-next-line no-console\n .catch(console.error)\n this.internalStorageService\n .get(InternalStorageKey.SETTINGS_SERIALIZER_CHUNK_TIME)\n .then((setting) => (this._displayTimePerChunk = setting))\n // eslint-disable-next-line no-console\n .catch(console.error)\n this.internalStorageService\n .get(InternalStorageKey.SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE)\n .then((setting) => (this._singleChunkSize = setting))\n // eslint-disable-next-line no-console\n .catch(console.error)\n this.internalStorageService\n .get(InternalStorageKey.SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE)\n .then((setting) => (this._multiChunkSize = setting))\n // eslint-disable-next-line no-console\n .catch(console.error)\n }\n\n private async serializeV2(chunks: IACMessageDefinitionObjectV3[]): Promise<string[]> {\n const dataV2 = await convertV3ToV2(chunks)\n\n return this.serializer.serialize(dataV2, this.singleChunkSize, this.multiChunkSize)\n }\n\n private async deserializeV2(chunks: string[]): Promise<IACMessageDefinitionObjectV3[]> {\n const v2Data = await this.serializer.deserialize(chunks)\n\n return convertV2ToV3(v2Data)\n }\n\n private async serializeV3(chunks: IACMessageDefinitionObjectV3[]): Promise<string> {\n return this.serializerV3.serialize(chunks)\n }\n\n private async deserializeV3(chunks: string): Promise<IACMessageDefinitionObjectV3[]> {\n return this.serializerV3.deserialize(chunks)\n }\n}\n","import { Component } from '@angular/core'\nimport { RangeCustomEvent, ToggleCustomEvent } from '@ionic/angular'\nimport { SerializerService } from '../../services/serializer/serializer.service'\n\n@Component({\n selector: 'airgap-qr-settings',\n templateUrl: './qr-settings.component.html',\n styleUrls: ['./qr-settings.component.scss']\n})\nexport class QrSettingsComponent {\n constructor(public readonly serializerService: SerializerService) {}\n\n public onToggleChange(event: Event): void {\n const value = (event as ToggleCustomEvent).detail.checked\n this.serializerService.useV3 = value\n }\n\n public onRangeChange(event: Event, setting: 'displayTimePerChunk' | 'singleChunkSize' | 'multiChunkSize'): void {\n const value = (event as RangeCustomEvent).detail.value\n this.serializerService[setting] = value as number\n }\n\n public resetSettings(): void {\n // eslint-disable-next-line no-console\n this.serializerService.resetSettings().catch(console.error)\n }\n}\n","<ion-content>\n <ion-list no-border lines=\"none\">\n <ion-item>\n <ion-toggle (ionChange)=\"onToggleChange($event)\" [(ngModel)]=\"serializerService.useV3\" justify=\"space-between\" labelPlacement=\"start\">\n {{ 'qr-settings.enable-new-serializer_label' | translate }}\n </ion-toggle>\n </ion-item>\n <ion-item>\n <ion-label>{{ 'qr-settings.page-time_label' | translate }} ({{ serializerService.displayTimePerChunk }} ms)</ion-label>\n </ion-item>\n <ion-item>\n <ion-range\n (ionChange)=\"onRangeChange($event, 'displayTimePerChunk')\"\n [(ngModel)]=\"serializerService.displayTimePerChunk\"\n min=\"50\"\n max=\"500\"\n step=\"25\"\n pin\n snaps=\"false\"\n color=\"secondary\"\n ngDefaultControl\n >\n <ion-label slot=\"start\">50 ms</ion-label>\n <ion-label slot=\"end\">500 ms</ion-label>\n </ion-range>\n </ion-item>\n <ion-item>\n <ion-label>{{ 'qr-settings.single-page-size_label' | translate }} ({{ serializerService.singleChunkSize }} bytes)</ion-label>\n </ion-item>\n <ion-item>\n <ion-range\n (ionChange)=\"onRangeChange($event, 'singleChunkSize')\"\n [(ngModel)]=\"serializerService.singleChunkSize\"\n min=\"100\"\n max=\"2000\"\n step=\"50\"\n pin\n snaps=\"false\"\n color=\"secondary\"\n ngDefaultControl\n >\n <ion-label slot=\"start\">100 bytes</ion-label>\n <ion-label slot=\"end\">2000 bytes</ion-label>\n </ion-range>\n </ion-item>\n <ion-item>\n <ion-label>{{ 'qr-settings.multi-page-size_label' | translate }} ({{ serializerService.multiChunkSize }} bytes)</ion-label>\n </ion-item>\n <ion-item>\n <ion-range\n (ionChange)=\"onRangeChange($event, 'multiChunkSize')\"\n [(ngModel)]=\"serializerService.multiChunkSize\"\n min=\"20\"\n max=\"1000\"\n step=\"20\"\n pin\n snaps=\"false\"\n color=\"secondary\"\n ngDefaultControl\n >\n <ion-label slot=\"start\">20 bytes</ion-label>\n <ion-label slot=\"end\">1000 bytes</ion-label>\n </ion-range>\n </ion-item>\n\n <ion-button color=\"secondary\" (click)=\"resetSettings()\" shape=\"round\">\n <ion-icon slot=\"start\" name=\"add\"></ion-icon>\n <ion-label>{{ 'qr-settings.reset' | translate }}</ion-label>\n </ion-button>\n </ion-list>\n</ion-content>\n","import { IACMessageDefinitionObjectV3 } from '@wallfree-dev/serializer'\nimport { Injectable } from '@angular/core'\nimport { serializedDataToUrlString } from '../../utils/utils'\n\n@Injectable()\nexport abstract class IACQrGenerator {\n abstract create(data: IACMessageDefinitionObjectV3[], multiFragmentLength?: number, singleFragmentLength?: number): Promise<void>\n abstract nextPart(): Promise<string> // handle complete\n abstract getSingle(prefix: string): Promise<string>\n abstract getNumberOfParts(): Promise<number>\n\n protected async prefixSingle(data: string, prefix: string, parameter: string): Promise<string> {\n return serializedDataToUrlString(data, `${prefix}://`, parameter)\n }\n\n public static async canHandle(_data: IACMessageDefinitionObjectV3[]): Promise<boolean> {\n return true\n }\n}\n","import * as bs58check from '@wallfree-dev/coinlib-core/dependencies/src/bs58check-2.1.2/index'\nimport { IACMessageDefinitionObjectV3, SerializerV3 } from '@wallfree-dev/serializer'\nimport { UR, UREncoder } from '@ngraveio/bc-ur'\n\nimport { IACQrGenerator } from '../../iac/qr-generator'\n\nexport class SerializerV3Generator extends IACQrGenerator {\n private encoder: UREncoder | undefined\n\n private ur: UR | undefined\n\n constructor() {\n super()\n }\n\n public async create(data: IACMessageDefinitionObjectV3[], multiFragmentLength: number, singleFragmentLength: number): Promise<void> {\n const serializer = SerializerV3.getInstance()\n const serialized = await serializer.serialize(data)\n const buffer = bs58check.decode(serialized)\n this.ur = UR.fromBuffer(buffer)\n\n // We first try to create a larger \"single chunk\" fragment\n this.encoder = new UREncoder(this.ur, singleFragmentLength)\n\n // If this is not possible, we use the multiFragmentLength\n if (this.encoder.fragmentsLength !== 1) {\n this.encoder = new UREncoder(this.ur, multiFragmentLength)\n }\n }\n\n public async nextPart(): Promise<string> {\n if (this.encoder) {\n return this.encoder.nextPart().toUpperCase()\n } else {\n return ''\n }\n }\n\n public async getSingle(prefix: string): Promise<string> {\n if (this.ur) {\n const part = new UREncoder(this.ur, Number.MAX_SAFE_INTEGER).nextPart()\n const regex = /([^/]+$)/g\n const match = part.match(regex)\n const data = match && match[0] ? match[0] : part\n\n return this.prefixSingle(data.toUpperCase(), prefix, 'ur')\n } else {\n return ''\n }\n }\n\n public async getNumberOfParts(): Promise<number> {\n return this.encoder?.fragmentsLength ?? 0\n }\n}\n","import { IACMessageDefinitionObject, IACMessageDefinitionObjectV3, Serializer } from '@wallfree-dev/serializer'\n\nimport { IACQrGenerator } from '../../iac/qr-generator'\nimport { convertV3ToV2 } from '../../serializer/serializer.service'\n\nconst serializer = Serializer.getInstance()\nexport class SerializerV2Generator extends IACQrGenerator {\n private counter: number = 0\n private parts: string[] = []\n\n private data: IACMessageDefinitionObject[] = []\n\n constructor() {\n super()\n }\n\n public async create(data: IACMessageDefinitionObjectV3[], multiFragmentLength: number, singleFragmentLength: number): Promise<void> {\n this.counter = 0\n this.data = await convertV3ToV2(data)\n\n this.parts = await serializer.serialize(this.data, singleFragmentLength, multiFragmentLength)\n }\n\n public async nextPart(): Promise<string> {\n const next = this.parts[this.counter % this.parts.length]\n this.counter += 1\n\n return next\n }\n\n public async getSingle(prefix: string): Promise<string> {\n const part = this.parts.length === 1 ? this.parts[0] : (await serializer.serialize(this.data))[0]\n\n return this.prefixSingle(part, prefix, 'd')\n }\n\n public async getNumberOfParts(): Promise<number> {\n return this.parts.length\n }\n}\n","/* eslint-disable max-classes-per-file */\nimport { UREncoder } from '@ngraveio/bc-ur'\nimport * as bs58check from 'bs58check'\n// import * as ecc from 'tiny-secp256k1'\nimport * as ecc from '@bitcoinerlab/secp256k1'\n\nimport { BIP32Factory } from 'bip32'\n// import ecc from 'tiny-secp256k1'\n\nimport {\n CryptoKeypath,\n CryptoHDKey,\n CryptoOutput,\n ScriptExpressions,\n CryptoAccount,\n PathComponent,\n CryptoPSBT,\n patchTags\n} from '@keystonehq/bc-ur-registry'\nimport { BitcoinSegwitTransactionSignResponse } from '@wallfree-dev/bitcoin'\nimport { bufferFrom, MainProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { AccountShareResponse, IACMessageDefinitionObjectV3, IACMessageType } from '@wallfree-dev/serializer'\n\nimport { IACQrGenerator } from '../../iac/qr-generator'\nimport { ScriptExpression } from '@keystonehq/bc-ur-registry/dist/ScriptExpression'\n\nclass ExtendedPublicKey {\n private readonly rawKey: Buffer\n\n constructor(extendedPublicKey: string) {\n this.rawKey = bs58check.decode(extendedPublicKey).slice(4)\n }\n\n public toXpub() {\n return this.addPrefix('0488b21e')\n }\n\n public toYPub() {\n return this.addPrefix('049d7cb2')\n }\n\n public toZPub() {\n return this.addPrefix('04b24746')\n }\n\n public getRawKey() {\n return this.rawKey\n }\n\n private addPrefix(prefix: string) {\n const data = Buffer.concat([bufferFrom(prefix, 'hex'), this.rawKey])\n\n return bs58check.encode(data)\n }\n}\n\nexport class BCURTypesGenerator extends IACQrGenerator {\n private encoder: UREncoder | undefined\n\n private data: CryptoAccount | CryptoPSBT | undefined\n private readonly bip32 = BIP32Factory(ecc)\n\n constructor() {\n super()\n }\n\n public async create(data: IACMessageDefinitionObjectV3[], multiFragmentLength: number, singleFragmentLength: number): Promise<void> {\n if (!(await BCURTypesGenerator.canHandle(data))) {\n return\n }\n\n const element = data[0]\n\n if (element.type === IACMessageType.AccountShareResponse) {\n this.data = await this.generateCryptoAccountMessage(element)\n } else if (element.type === IACMessageType.TransactionSignResponse) {\n this.data = await this.generatePSBTMessage(element)\n } else {\n throw new Error('Not Supported')\n }\n\n // We first try to create a larger \"single chunk\" fragment\n this.encoder = this.data.toUREncoder(singleFragmentLength)\n\n // If this is not possible, we use the multiFragmentLength\n if (this.encoder.fragmentsLength !== 1) {\n this.encoder = this.data.toUREncoder(multiFragmentLength)\n }\n }\n\n public static async canHandle(data: IACMessageDefinitionObjectV3[]): Promise<boolean> {\n if (data.length === 1) {\n const element = data[0]\n\n return (\n (element.protocol === MainProtocolSymbols.BTC_SEGWIT || element.protocol === MainProtocolSymbols.BTC_TAPROOT) &&\n [IACMessageType.AccountShareResponse, IACMessageType.TransactionSignResponse].includes(element.type)\n )\n }\n\n return false\n }\n\n public async nextPart(): Promise<string> {\n if (this.encoder) {\n return this.encoder.nextPart().toUpperCase()\n } else {\n return ''\n }\n }\n\n public async getSingle(): Promise<string> {\n if (this.data) {\n return this.data.toUREncoder(Number.MAX_SAFE_INTEGER).nextPart()\n } else {\n return ''\n }\n }\n\n public async getNumberOfParts(): Promise<number> {\n return this.encoder?.fragmentsLength ?? 0\n }\n\n private async generateCryptoAccountMessage(data: IACMessageDefinitionObjectV3) {\n const account = data.payload as AccountShareResponse\n\n const extendedPublicKey = this.bip32.fromBase58(new ExtendedPublicKey(account.publicKey).toXpub())\n\n const cryptoKeyPathComponents = []\n for (const component of account.derivationPath.split('/')) {\n if (component === 'm') continue\n const index = parseInt(component, 10)\n const hardened = component.endsWith('h') || component.endsWith(\"'\")\n cryptoKeyPathComponents.push(new PathComponent({ index, hardened }))\n }\n\n const parentFingerprint = Buffer.alloc(4)\n parentFingerprint.writeUInt32BE(extendedPublicKey.parentFingerprint, 0)\n\n const isTaproot = data.protocol === MainProtocolSymbols.BTC_TAPROOT\n\n let scriptExpressions: ScriptExpression[] = []\n\n if (isTaproot) {\n const TR = new ScriptExpression(409, 'tr')\n patchTags([409])\n scriptExpressions = [TR]\n } else {\n scriptExpressions = [ScriptExpressions.WITNESS_PUBLIC_KEY_HASH]\n }\n\n const cryptoAccount = new CryptoAccount(bufferFrom(account.masterFingerprint, 'hex'), [\n new CryptoOutput(\n scriptExpressions,\n new CryptoHDKey({\n isMaster: false,\n key: Buffer.from(extendedPublicKey.publicKey),\n chainCode: Buffer.from(extendedPublicKey.chainCode),\n origin: new CryptoKeypath(cryptoKeyPathComponents, Buffer.from(extendedPublicKey.fingerprint), extendedPublicKey.depth),\n parentFingerprint,\n name: account.groupLabel\n })\n )\n ])\n\n return cryptoAccount\n }\n\n private async generatePSBTMessage(data: IACMessageDefinitionObjectV3): Promise<CryptoPSBT> {\n const transaction = data.payload as BitcoinSegwitTransactionSignResponse\n\n const psbt = bufferFrom(transaction.transaction, 'hex')\n\n const cryptoPSBT = new CryptoPSBT(psbt)\n\n return cryptoPSBT\n }\n}\n","import { UREncoder } from '@ngraveio/bc-ur'\nimport * as uuid from 'uuid'\n\nimport { CryptoKeypath, PathComponent, CryptoHDKey } from '@keystonehq/bc-ur-registry'\nimport { ETHSignature } from '@keystonehq/bc-ur-registry-eth'\nimport { TransactionFactory } from '@ethereumjs/tx'\nimport { MainProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { EthereumTransactionSignResponse } from '@wallfree-dev/ethereum'\nimport { AccountShareResponse, IACMessageDefinitionObjectV3, IACMessageType, MessageSignResponse } from '@wallfree-dev/serializer'\n\n// import * as ecc from 'tiny-secp256k1'\nimport * as ecc from '@bitcoinerlab/secp256k1'\n\nimport { BIP32Factory } from 'bip32'\n\nimport { IACQrGenerator } from '../../iac/qr-generator'\n\nimport { TEMP_MM_REQUEST_IDS } from '../../../utils/utils'\n\nexport class MetamaskGenerator extends IACQrGenerator {\n private encoder: UREncoder | undefined\n\n private data: CryptoHDKey | ETHSignature | undefined\n private readonly bip32 = BIP32Factory(ecc)\n\n constructor() {\n super()\n }\n\n public async create(data: IACMessageDefinitionObjectV3[], multiFragmentLength: number, singleFragmentLength: number): Promise<void> {\n if (!(await MetamaskGenerator.canHandle(data))) {\n return\n }\n\n const element = data[0]\n\n if (element.type === IACMessageType.AccountShareResponse) {\n this.data = await this.generateCryptoAccountMessage(element)\n } else if (element.type === IACMessageType.TransactionSignResponse) {\n this.data = await this.generateMessage(element)\n } else if (element.type === IACMessageType.MessageSignResponse) {\n this.data = await this.generateMessage(element)\n } else {\n throw new Error('Not Supported')\n }\n\n // We first try to create a larger \"single chunk\" fragment\n this.encoder = this.data.toUREncoder(singleFragmentLength)\n\n // If this is not possible, we use the multiFragmentLength\n if (this.encoder.fragmentsLength !== 1) {\n this.encoder = this.data.toUREncoder(multiFragmentLength)\n }\n }\n\n public static async canHandle(data: IACMessageDefinitionObjectV3[]): Promise<boolean> {\n if (data.length === 1) {\n const element = data[0]\n\n return (\n (element.protocol === MainProtocolSymbols.ETH || element.protocol === MainProtocolSymbols.OPTIMISM) &&\n [IACMessageType.AccountShareResponse, IACMessageType.TransactionSignResponse, IACMessageType.MessageSignResponse].includes(\n element.type\n )\n )\n }\n\n return false\n }\n\n public async nextPart(): Promise<string> {\n if (this.encoder) {\n return this.encoder.nextPart().toUpperCase()\n } else {\n return ''\n }\n }\n\n public async getSingle(): Promise<string> {\n if (this.data) {\n return this.data.toUREncoder(Number.MAX_SAFE_INTEGER).nextPart()\n } else {\n return ''\n }\n }\n\n public async getNumberOfParts(): Promise<number> {\n return this.encoder?.fragmentsLength ?? 0\n }\n\n private async generateCryptoAccountMessage(data: IACMessageDefinitionObjectV3): Promise<CryptoHDKey> {\n const account = data.payload as AccountShareResponse\n const extendedPublicKey = this.bip32.fromBase58(account.publicKey)\n\n const cryptoKeyPathComponents = []\n for (const component of account.derivationPath.split('/')) {\n if (component === 'm') continue\n const index = parseInt(component, 10)\n const hardened = component.endsWith('h') || component.endsWith(\"'\")\n cryptoKeyPathComponents.push(new PathComponent({ index, hardened }))\n }\n\n const cryptoHDKey = new CryptoHDKey({\n isMaster: false,\n key: Buffer.from(extendedPublicKey.publicKey),\n chainCode: Buffer.from(extendedPublicKey.chainCode),\n origin: new CryptoKeypath(cryptoKeyPathComponents, Buffer.from(extendedPublicKey.fingerprint)), // TODO: Define which FP we use\n parentFingerprint: Buffer.from(account.masterFingerprint),\n name: `AirGap - ${account.groupLabel}`\n })\n\n return cryptoHDKey\n }\n\n private async generateMessage(data: IACMessageDefinitionObjectV3): Promise<ETHSignature> {\n let rlpSignatureData: Buffer | undefined\n\n if ((data.payload as any).transaction) {\n const transaction = data.payload as EthereumTransactionSignResponse\n\n const tx = TransactionFactory.fromSerializedData(Buffer.from(transaction.transaction, 'hex'))\n\n const r = Buffer.from(tx.r?.toString(16, 32), 'hex')\n const s = Buffer.from(tx.s?.toString(16, 32), 'hex')\n const v = Buffer.from(tx.v?.toString(16, 2), 'hex')\n\n rlpSignatureData = Buffer.concat([r, s, v])\n } else {\n const transaction = data.payload as MessageSignResponse\n\n rlpSignatureData = Buffer.from(transaction.signature.slice(2), 'hex')\n }\n\n if (!rlpSignatureData) {\n throw new Error('Empty signature')\n }\n\n // TODO: This should be moved to a higher level, probably the \"iac.service\", and properly store context for any kind of request.\n const IDs = JSON.parse(localStorage.getItem(TEMP_MM_REQUEST_IDS) ?? '{}')\n const id = IDs[data.id]\n\n // TODO: We cannot immediately delete the ID because this method might be called multiple times\n // delete IDs[data.id]\n // localStorage.setItem('TEMP-MM-REQUEST-IDS', JSON.stringify(IDs))\n\n const idBuffer = id ? Buffer.from(id, 'hex') : (uuid.parse(uuid.v4()) as Uint8Array)\n\n const ethSignature = new ETHSignature(rlpSignatureData, Buffer.from(idBuffer))\n\n return ethSignature\n }\n}\n","import { MainProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { AccountShareResponse, IACMessageDefinitionObjectV3, IACMessageType } from '@wallfree-dev/serializer'\n\nimport { IACQrGenerator } from '../../iac/qr-generator'\n\nexport class XPubGenerator extends IACQrGenerator {\n private data: string | undefined\n\n constructor() {\n super()\n }\n\n public async create(data: IACMessageDefinitionObjectV3[], _multiFragmentLength: number, _singleFragmentLength: number): Promise<void> {\n if (!(await XPubGenerator.canHandle(data))) {\n return\n }\n\n const element = data[0]\n\n if (element.type === IACMessageType.AccountShareResponse) {\n this.data = (element.payload as AccountShareResponse).publicKey\n } else {\n throw new Error('Not Supported')\n }\n }\n\n public static async canHandle(data: IACMessageDefinitionObjectV3[]): Promise<boolean> {\n if (data.length === 1) {\n const element = data[0]\n\n return (\n (element.protocol === MainProtocolSymbols.BTC_SEGWIT || element.protocol === MainProtocolSymbols.BTC_TAPROOT) &&\n [IACMessageType.AccountShareResponse].includes(element.type)\n )\n }\n\n return false\n }\n\n public async nextPart(): Promise<string> {\n return this.data ?? ''\n }\n\n public async getSingle(): Promise<string> {\n return this.data ?? ''\n }\n\n public async getNumberOfParts(): Promise<number> {\n return this.data ? 1 : 0\n }\n}\n","import { MainProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { AccountShareResponse, IACMessageDefinitionObjectV3, IACMessageType } from '@wallfree-dev/serializer'\n\nimport { IACQrGenerator } from '../../iac/qr-generator'\n\nexport class OutputDescriptorGenerator extends IACQrGenerator {\n private data: string | undefined\n\n constructor() {\n super()\n }\n\n public async create(data: IACMessageDefinitionObjectV3[], _multiFragmentLength: number, _singleFragmentLength: number): Promise<void> {\n if (!(await OutputDescriptorGenerator.canHandle(data))) {\n return\n }\n\n const element = data[0]\n\n if (element.type === IACMessageType.AccountShareResponse) {\n this.data = await this.generateOutputDescriptor(element)\n } else {\n throw new Error('Not Supported')\n }\n }\n\n public static async canHandle(data: IACMessageDefinitionObjectV3[]): Promise<boolean> {\n if (data.length === 1) {\n const element = data[0]\n\n return (\n (element.protocol === MainProtocolSymbols.BTC_SEGWIT || element.protocol === MainProtocolSymbols.BTC_TAPROOT) &&\n [IACMessageType.AccountShareResponse].includes(element.type)\n )\n }\n\n return false\n }\n\n public async nextPart(): Promise<string> {\n return this.data ?? ''\n }\n\n public async getSingle(): Promise<string> {\n return this.data ?? ''\n }\n\n public async getNumberOfParts(): Promise<number> {\n return this.data ? 1 : 0\n }\n\n private async generateOutputDescriptor(data: IACMessageDefinitionObjectV3): Promise<string> {\n // EXAMPLE: DESC=\"wpkh([0f056943/84h/1h/0h]tpubDC7jGaaSE66Pn4dgtbAAstde4bCyhSUs4r3P8WhMVvPByvcRrzrwqSvpF9Ghx83Z1LfVugGRrSBko5UEKELCz9HoMv5qKmGq3fqnnbS5E9r/0/*)#erexmnep\"\n\n const account = data.payload as AccountShareResponse\n\n const dpWithoutPrefix = account.derivationPath.slice(1)\n const dpWithoutUnhardened = dpWithoutPrefix.slice(0, dpWithoutPrefix.lastIndexOf(\"'\") + 1)\n\n if (data.protocol === MainProtocolSymbols.BTC_TAPROOT) {\n return `tr([${account.masterFingerprint}${dpWithoutUnhardened}]${account.publicKey}/0/*)`\n }\n // Default to SegWit\n\n return `wpkh([${account.masterFingerprint}${dpWithoutUnhardened}]${account.publicKey}/0/*)`\n }\n}\n","import { Component, Input, OnDestroy, Inject } from '@angular/core'\nimport { IACMessageDefinitionObjectV3 } from '@wallfree-dev/serializer'\nimport { QRCodeErrorCorrectionLevel } from 'qrcode'\n\nimport { ClipboardService } from '../../services/clipboard/clipboard.service'\nimport { SerializerService } from '../../services/serializer/serializer.service'\nimport { APP_CONFIG, AppConfig } from '../../config/app-config'\nimport { IACQrGenerator } from '../../services/iac/qr-generator'\nimport { SerializerV3Generator } from '../../services/qr/qr-generators/serializer-v3-generator'\nimport { SerializerV2Generator } from '../../services/qr/qr-generators/serializer-v2-generator'\nimport { BCURTypesGenerator } from '../../services/qr/qr-generators/bc-ur-generator'\nimport { MetamaskGenerator } from '../../services/qr/qr-generators/metamask-generator'\nimport { defaultValues } from '../../services/storage/storage.service'\nimport { XPubGenerator } from '../../services/qr/qr-generators/xpub-generator'\nimport { OutputDescriptorGenerator } from '../../services/qr/qr-generators/output-descriptor-generator'\nimport { TEMP_BTC_REQUEST_IDS, TEMP_MM_REQUEST_IDS } from '../../utils/utils'\n\nexport enum QRType {\n V2 = 'QR Code V2',\n V3 = 'QR Code V3',\n BC_UR = 'BC UR',\n XPUB = 'xPub',\n OUTPUT_DESCRIPTOR = 'Output Descriptor',\n METAMASK = 'MetaMask'\n}\n\n@Component({\n selector: 'airgap-iac-qr',\n templateUrl: './iac-qr.component.html',\n styleUrls: ['./iac-qr.component.scss']\n})\nexport class IACQrComponent implements OnDestroy {\n public availableQRTypes: QRType[] = []\n public numberOfParts: number = 0\n\n private readonly generatorsMap: Map<string, IACQrGenerator> = new Map()\n\n private readonly singleChunkSize: number = defaultValues.SETTINGS_SERIALIZER_SINGLE_CHUNK_SIZE\n private readonly multiChunkSize: number = defaultValues.SETTINGS_SERIALIZER_MULTI_CHUNK_SIZE\n\n private activeGenerator: IACQrGenerator | undefined\n\n @Input()\n public level: QRCodeErrorCorrectionLevel = 'L'\n\n @Input()\n public size: number = 300\n\n @Input()\n public margin: number = 2\n\n @Input()\n public qrFormatPreference: QRType\n\n @Input()\n public set messageDefinitionObjects(value: IACMessageDefinitionObjectV3[]) {\n this._messageDefinitionObjects = value\n this.convertToDataArray()\n }\n\n public qrType: QRType\n public qrdata: string = ''\n\n public qrError: string = ''\n\n private _messageDefinitionObjects: IACMessageDefinitionObjectV3[] = []\n\n private timeout?: NodeJS.Timeout\n\n constructor(\n private readonly clipboardService: ClipboardService,\n private readonly serializerService: SerializerService,\n @Inject(APP_CONFIG) private readonly appConfig: AppConfig\n ) {\n this.singleChunkSize = this.serializerService.singleChunkSize\n this.multiChunkSize = this.serializerService.multiChunkSize\n }\n\n public ngOnInit(): void {\n this.timeout = setInterval(async () => {\n this.qrdata = this.activeGenerator ? await this.activeGenerator.nextPart() : ''\n }, this.serializerService.displayTimePerChunk)\n const v3Generator = new SerializerV3Generator()\n const v2Generator = new SerializerV2Generator()\n\n this.generatorsMap.set(QRType.V3, v3Generator)\n this.generatorsMap.set(QRType.V2, v2Generator)\n this.generatorsMap.set(QRType.BC_UR, new BCURTypesGenerator())\n this.generatorsMap.set(QRType.OUTPUT_DESCRIPTOR, new OutputDescriptorGenerator())\n this.generatorsMap.set(QRType.XPUB, new XPubGenerator())\n this.generatorsMap.set(QRType.METAMASK, new MetamaskGenerator())\n\n this.availableQRTypes.push(QRType.V3)\n this.availableQRTypes.push(QRType.V2)\n\n if (this.qrFormatPreference) {\n switch (this.qrFormatPreference) {\n case QRType.BC_UR:\n this.qrType = QRType.BC_UR\n this.activeGenerator = new BCURTypesGenerator()\n break\n\n case QRType.OUTPUT_DESCRIPTOR:\n this.qrType = QRType.OUTPUT_DESCRIPTOR\n this.activeGenerator = new OutputDescriptorGenerator()\n break\n\n case QRType.XPUB:\n this.qrType = QRType.XPUB\n this.activeGenerator = new XPubGenerator()\n break\n\n case QRType.METAMASK:\n this.qrType = QRType.METAMASK\n this.activeGenerator = new MetamaskGenerator()\n break\n\n default:\n this.activeGenerator = v3Generator\n this.qrType = QRType.V3\n break\n }\n } else {\n if (this.serializerService.useV3) {\n this.activeGenerator = v3Generator\n this.qrType = QRType.V3\n } else {\n this.activeGenerator = v2Generator\n this.qrType = QRType.V2\n }\n }\n }\n\n public updateGenerator(value: QRType): void {\n const generator = this.generatorsMap.get(value)\n if (generator) {\n this.qrType = value\n this.activeGenerator = generator\n this.convertToDataArray()\n } else {\n console.error('NO GENERATOR FOUND FOR ', value)\n }\n }\n\n public ngOnDestroy(): void {\n if (this.timeout) {\n clearInterval(this.timeout)\n }\n }\n\n public async copyToClipboard(): Promise<void> {\n const copyString: string = this.activeGenerator ? await this.activeGenerator.getSingle(this.appConfig.otherApp.urlScheme) : ''\n\n await this.clipboardService.copyAndShowToast(copyString)\n }\n\n private async convertToDataArray(): Promise<void> {\n // Add BC_UR type, if supported\n if (!this.availableQRTypes.includes(QRType.BC_UR) && (await BCURTypesGenerator.canHandle(this._messageDefinitionObjects))) {\n this.availableQRTypes.push(QRType.BC_UR)\n\n // If we know the message ID, we activate the bcur toggle\n this._messageDefinitionObjects.forEach((message) => {\n const IDs = JSON.parse(localStorage.getItem(TEMP_BTC_REQUEST_IDS) ?? '{}')\n\n const id = IDs[message.id]\n\n if (id && id.qrType === QRType.BC_UR) {\n this.updateGenerator(QRType.BC_UR)\n }\n })\n }\n\n // Add Ouput Descriptor, if supported\n if (\n !this.availableQRTypes.includes(QRType.OUTPUT_DESCRIPTOR) &&\n (await OutputDescriptorGenerator.canHandle(this._messageDefinitionObjects))\n ) {\n this.availableQRTypes.push(QRType.OUTPUT_DESCRIPTOR)\n }\n // Add xPub, if supported\n if (!this.availableQRTypes.includes(QRType.XPUB) && (await XPubGenerator.canHandle(this._messageDefinitionObjects))) {\n this.availableQRTypes.push(QRType.XPUB)\n }\n // Add MetaMask, if supported\n if (!this.availableQRTypes.includes(QRType.METAMASK) && (await MetamaskGenerator.canHandle(this._messageDefinitionObjects))) {\n this.availableQRTypes.push(QRType.METAMASK)\n\n // If we know the message ID, we activate the MetaMask toggle\n this._messageDefinitionObjects.forEach((message) => {\n const IDs = JSON.parse(localStorage.getItem(TEMP_MM_REQUEST_IDS) ?? '{}')\n\n const id = IDs[message.id]\n\n if (id) {\n this.updateGenerator(QRType.METAMASK)\n }\n })\n }\n\n this.qrError = ''\n if (this.activeGenerator) {\n try {\n await this.activeGenerator.create(this._messageDefinitionObjects, this.multiChunkSize, this.singleChunkSize)\n this.qrdata = await this.activeGenerator.nextPart()\n this.qrError = ''\n this.numberOfParts = await this.activeGenerator.getNumberOfParts()\n } catch (e) {\n console.log('QR generation error', e)\n this.qrError = 'Message is not compatible with the selected QR code type. Please select another one.'\n }\n } else {\n this.qrdata = ''\n this.qrError = 'No QR type selected.'\n this.numberOfParts = 0\n }\n }\n}\n","<airgap-qr\n *ngIf=\"qrdata\"\n [level]=\"level\"\n [size]=\"size\"\n [margin]=\"margin\"\n [qrdata]=\"qrdata\"\n [disableClipboard]=\"true\"\n (click)=\"copyToClipboard()\"\n></airgap-qr>\n\n<p *ngIf=\"qrError\">{{ qrError }}</p>\n\n<ion-select *ngIf=\"availableQRTypes.length > 0\" slot=\"end\" [ngModel]=\"qrType\" interface=\"popover\" (ngModelChange)=\"updateGenerator($event)\">\n <ion-select-option *ngFor=\"let availableQRType of availableQRTypes\" [value]=\"availableQRType\">\n <ion-text>\n {{ availableQRType }}\n </ion-text>\n </ion-select-option>\n</ion-select>\n\n<p *ngIf=\"numberOfParts > 1\">{{ numberOfParts }} QR codes</p>\n","export enum UIResourceStatus {\n IDLE = 'idle',\n SUCCESS = 'success',\n ERROR = 'error',\n LOADING = 'loading'\n}\n\nexport interface UIResource<T> {\n value: T | undefined\n status: UIResourceStatus\n}\n","import { InjectionToken, Injector } from '@angular/core'\nimport { Observable } from 'rxjs'\nimport { BaseFacade } from '../../base/base.facade'\nimport { IsolatedModuleMetadata } from '../../types/isolated-modules/IsolatedModuleMetadata'\nimport { UIResource } from '../../types/ui/UIResource'\n\nexport const ISOLATED_MODULES_LIST_FACADE = new InjectionToken<IsolatedModulesListFacade>('IsolatedModulesListFacade')\nexport const ISOLATED_MODULES_LIST_FACADE_FACTORY = new InjectionToken<(injector: Injector) => IsolatedModulesListFacade>(\n 'IsolatedModulesListFacadeFactory'\n)\nexport type IsolatedModulesListFacade<T extends BaseFacade = BaseFacade> = IIsolatedModulesListFacade & T\n\nexport interface IIsolatedModulesListFacade {\n readonly modules$: Observable<UIResource<IsolatedModuleMetadata[]>>\n\n updateModules(modules: UIResource<IsolatedModuleMetadata[]>, query: string | undefined)\n filterModules(query: string | undefined): void\n}\n\nexport function isolatedModulesListFacade(injector: Injector): IsolatedModulesListFacade {\n return injector.get(ISOLATED_MODULES_LIST_FACADE_FACTORY)(injector)\n}\n","import { Component, Input } from '@angular/core'\n\nimport { IsolatedModuleMetadata } from '../../types/isolated-modules/IsolatedModuleMetadata'\n\n@Component({\n selector: 'airgap-isolated-modules-badges',\n templateUrl: './isolated-modules-badges.component.html',\n styleUrls: ['./isolated-modules-badges.component.scss']\n})\nexport class IsolatedModulesBadgesComponent {\n @Input()\n public module: IsolatedModuleMetadata\n}\n","<ion-item class=\"ion-no-padding\" lines=\"none\">\n <ion-badge *ngIf=\"module.source === '3rd_party' && module.type === 'asset'\" class=\"badge__margin\" color=\"tertiary\">{{ 'isolated-modules-badges.audited_label' | translate }}</ion-badge>\n <ion-badge *ngIf=\"module.type === 'asset'\" class=\"badge__margin\" color=\"tertiary\">{{ 'isolated-modules-badges.built-in_label' | translate }}</ion-badge>\n <ion-badge *ngIf=\"module.source === '3rd_party'\" class=\"badge__margin\" color=\"medium\">{{ 'isolated-modules-badges.3rd-party_label' | translate }}</ion-badge>\n</ion-item>\n","import { Component, EventEmitter, Inject, Injector, Input, OnChanges, Output, SimpleChanges } from '@angular/core'\nimport { BaseComponent } from '../../base/base.component'\nimport { IsolatedModuleMetadata } from '../../types/isolated-modules/IsolatedModuleMetadata'\nimport { UIResource, UIResourceStatus } from '../../types/ui/UIResource'\nimport { isolatedModulesListFacade, IsolatedModulesListFacade, ISOLATED_MODULES_LIST_FACADE } from './isolated-modules-list.facade'\n\n@Component({\n selector: 'airgap-isolated-modules-list',\n templateUrl: './isolated-modules-list.component.html',\n styleUrls: ['./isolated-modules-list.component.scss'],\n providers: [{ provide: ISOLATED_MODULES_LIST_FACADE, useFactory: isolatedModulesListFacade, deps: [Injector] }]\n})\nexport class IsolatedModulesListComponent extends BaseComponent<IsolatedModulesListFacade> implements OnChanges {\n public readonly UIResourceStatus: typeof UIResourceStatus = UIResourceStatus\n\n @Input()\n public modules: UIResource<IsolatedModuleMetadata[]>\n\n @Input()\n public filter: string | undefined\n\n @Input()\n public theme: 'light' | 'dark' = 'light'\n\n @Output()\n public onModuleSelected: EventEmitter<IsolatedModuleMetadata> = new EventEmitter()\n\n constructor(@Inject(ISOLATED_MODULES_LIST_FACADE) facade: IsolatedModulesListFacade) {\n super(facade)\n }\n\n public ngOnInit() {\n this.facade.updateModules(this.modules, this.filter)\n\n return super.ngOnInit()\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.modules?.previousValue !== changes.modules?.currentValue) {\n this.facade.updateModules(changes.modules.currentValue, changes.filter?.currentValue)\n }\n\n if (changes.filter?.previousValue !== changes.filter?.currentValue) {\n this.facade.filterModules(changes.filter.currentValue)\n }\n }\n\n public selectModule(module: IsolatedModuleMetadata): void {\n this.onModuleSelected.emit(module)\n }\n}\n","<ng-container *ngIf=\"facade.modules$ | async as modules\">\n <div *ngIf=\"modules.status !== UIResourceStatus.LOADING && (modules.value === undefined || modules.value.length === 0)\" class=\"empty-container\">\n <svg\n class=\"ion-margin-bottom\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\" \n height=\"5em\"\n width=\"5em\"\n viewBox=\"0 0 512 512\"\n >\n <!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. -->\n <path d=\"M315.4 15.5C309.7 5.9 299.2 0 288 0s-21.7 5.9-27.4 15.5l-96 160c-5.9 9.9-6.1 22.2-.4 32.2s16.3 16.2 27.8 16.2H384c11.5 0 22.2-6.2 27.8-16.2s5.5-22.3-.4-32.2l-96-160zM288 312V456c0 22.1 17.9 40 40 40H472c22.1 0 40-17.9 40-40V312c0-22.1-17.9-40-40-40H328c-22.1 0-40 17.9-40 40zM128 512a128 128 0 1 0 0-256 128 128 0 1 0 0 256z\"/>\n </svg>\n <h3 class=\"ion-text-center\">{{ 'isolated-modules-list.empty.header' | translate }}</h3>\n <p class=\"ion-text-center ion-no-margin\">{{ 'isolated-modules-list.empty.description' | translate }}</p>\n </div>\n <ion-card *ngFor=\"let module of modules.value\" (click)=\"selectModule(module)\">\n <ion-card-content>\n <div class=\"ion-margin-bottom\">\n <airgap-isolated-modules-badges [module]=\"module\"></airgap-isolated-modules-badges>\n </div>\n <div class=\"ion-margin-bottom\">\n <h3>{{ module.manifest.name }}</h3>\n </div>\n <div class=\"ion-margin-top\">\n <h3>{{ module.manifest.author }}</h3>\n <p>{{ module.manifest.version }}</p>\n </div>\n <ng-container *ngIf=\"module.type === 'installed'\">\n <div class=\"margin-top-sm\" *ngIf=\"module.installedAt | date: 'dd.MM.yyyy HH:mm' as installedAt \">\n <p class=\"date\">\n {{ 'isolated-modules-list.install-date' | translate: { date: installedAt } }}\n </p>\n </div>\n </ng-container>\n </ion-card-content>\n </ion-card>\n</ng-container>","import { Component } from '@angular/core'\n\n@Component({\n selector: 'airgap-isolated-modules-onboarding',\n templateUrl: './isolated-modules-onboarding.component.html',\n styleUrls: ['./isolated-modules-onboarding.component.scss']\n})\nexport class IsolatedModulesOnboardingComponent {\n}","<div class=\"content-container\">\n <div class=\"main-container ion-padding-vertical\">\n <svg\n class=\"ion-margin-bottom\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\" \n height=\"5em\"\n width=\"5em\"\n viewBox=\"0 0 512 512\"\n >\n <!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. -->\n <path d=\"M315.4 15.5C309.7 5.9 299.2 0 288 0s-21.7 5.9-27.4 15.5l-96 160c-5.9 9.9-6.1 22.2-.4 32.2s16.3 16.2 27.8 16.2H384c11.5 0 22.2-6.2 27.8-16.2s5.5-22.3-.4-32.2l-96-160zM288 312V456c0 22.1 17.9 40 40 40H472c22.1 0 40-17.9 40-40V312c0-22.1-17.9-40-40-40H328c-22.1 0-40 17.9-40 40zM128 512a128 128 0 1 0 0-256 128 128 0 1 0 0 256z\"/>\n </svg>\n <h3 class=\"ion-text-center\">{{ 'isolated-modules-onboarding.content.header' | translate }}</h3>\n <p class=\"ion-text-center ion-no-margin\">{{ 'isolated-modules-onboarding.content.description' | translate }}</p>\n </div>\n\n <div class=\"note-container ion-padding-vertical\">\n <p class=\"ion-text-start\" [innerHTML]=\"'isolated-modules-onboarding.content.note' | translate\"></p>\n </div>\n</div>\n","import { InjectionToken, Injector } from '@angular/core'\nimport { Observable } from 'rxjs'\nimport { BaseFacade } from '../../base/base.facade'\nimport { IsolatedModuleManifest } from '../../types/isolated-modules/IsolatedModuleManifest'\nimport { IsolatedModuleMetadata } from '../../types/isolated-modules/IsolatedModuleMetadata'\nimport { UIResource } from '../../types/ui/UIResource'\n\nexport const ISOLATED_MODULES_DETAILS_FACADE = new InjectionToken<IsolatedModulesDetailsFacade>('IsolatedModulesDetailsFacade')\nexport const ISOLATED_MODULES_DETAILS_FACADE_FACTORY = new InjectionToken<(injector: Injector) => IsolatedModulesDetailsFacade>(\n 'IsolatedModulesDetailsFacadeFactory'\n)\nexport type IsolatedModulesDetailsFacade<T extends BaseFacade = BaseFacade> = IIsolatedModulesListDetails & T\n\nexport interface IIsolatedModulesListDetails {\n readonly manifest$: Observable<UIResource<IsolatedModuleManifest>>\n readonly isVerified$: Observable<UIResource<boolean>>\n\n initWithData(metadata: IsolatedModuleMetadata | undefined): void\n onDataChanged(metadata: IsolatedModuleMetadata | undefined): void\n}\n\nexport function isolatedModulesDetailsFacade(injector: Injector): IsolatedModulesDetailsFacade {\n return injector.get(ISOLATED_MODULES_DETAILS_FACADE_FACTORY)(injector)\n}\n","import { Component, EventEmitter, Inject, Injector, Input, OnChanges, Output, SimpleChanges } from '@angular/core'\nimport { takeUntil } from 'rxjs/operators'\nimport { BaseComponent } from '../../base/base.component'\nimport { IsolatedModuleMetadata } from '../../types/isolated-modules/IsolatedModuleMetadata'\nimport { UIResource, UIResourceStatus } from '../../types/ui/UIResource'\nimport {\n isolatedModulesDetailsFacade,\n IsolatedModulesDetailsFacade,\n ISOLATED_MODULES_DETAILS_FACADE\n} from './isolated-modules-details.facade'\n\n@Component({\n selector: 'airgap-isolated-modules-details',\n templateUrl: './isolated-modules-details.component.html',\n styleUrls: ['./isolated-modules-details.component.scss'],\n providers: [{ provide: ISOLATED_MODULES_DETAILS_FACADE, useFactory: isolatedModulesDetailsFacade, deps: [Injector] }]\n})\nexport class IsolatedModulesDetailsComponent extends BaseComponent<IsolatedModulesDetailsFacade> implements OnChanges {\n public readonly UIResourceStatus: typeof UIResourceStatus = UIResourceStatus\n\n @Input()\n public metadata: IsolatedModuleMetadata | undefined\n\n @Output()\n public isVerified: EventEmitter<boolean> = new EventEmitter()\n\n constructor(@Inject(ISOLATED_MODULES_DETAILS_FACADE) facade: IsolatedModulesDetailsFacade) {\n super(facade)\n\n facade.isVerified$.pipe(takeUntil(this.ngDestroyed$)).subscribe((isVerified: UIResource<boolean>) => {\n this.isVerified.emit(isVerified.value ?? false)\n })\n }\n\n public ngOnInit() {\n this.facade.initWithData(this.metadata)\n\n return super.ngOnInit()\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.metadata.previousValue !== changes.metadata.currentValue) {\n this.facade.onDataChanged(changes.metadata.currentValue)\n }\n }\n}\n"," <ng-container *ngIf=\"facade.manifest$ | async as manifest\">\n <ng-container *ngIf=\"manifest.status === UIResourceStatus.SUCCESS && manifest.value\">\n <ion-card>\n <ion-card-content>\n <div class=\"ion-margin-bottom\">\n <airgap-isolated-modules-badges [module]=\"metadata\"></airgap-isolated-modules-badges>\n </div>\n <div class=\"ion-margin-bottom\">\n <h3>{{ 'isolated-modules-details.manifest.name.label' | translate }}</h3>\n <p>{{ manifest.value.name }}</p>\n </div>\n <div class=\"ion-margin-top\">\n <h3 class=\"ion-margin-top\">{{ 'isolated-modules-details.manifest.author.label' | translate }}</h3>\n <p>{{ manifest.value.author }}</p>\n <div *ngIf=\"manifest.value.url\">\n <ion-icon name=\"globe\"></ion-icon>\n <p class=\"inlined\">{{ manifest.value.url }}</p>\n </div>\n <div *ngIf=\"manifest.value.email\">\n <ion-icon name=\"mail\"></ion-icon>\n <p class=\"inlined\">{{ manifest.value.email }}</p>\n </div>\n </div>\n </ion-card-content>\n </ion-card>\n <ion-card>\n <ion-card-content>\n <h3>{{ 'isolated-modules-details.manifest.description.label' | translate }}</h3>\n <p>{{ manifest.value.description }}</p>\n </ion-card-content>\n </ion-card>\n <ion-card>\n <ion-card-content>\n <h3>{{ 'isolated-modules-details.manifest.version.label' | translate }}</h3>\n <p>{{ manifest.value.version }}</p>\n </ion-card-content>\n </ion-card>\n <ion-card>\n <ion-card-content>\n <h3>{{ 'isolated-modules-details.manifest.public-key.label' | translate }}</h3>\n <p>{{ manifest.value.publicKey }}</p>\n\n <ng-container *ngIf=\"facade.isVerified$ | async as isVerified\">\n <p *ngIf=\"isVerified.status === UIResourceStatus.SUCCESS && !isVerified.value\" class=\"error\">\n {{ 'isolated-modules-details.manifest.public-key.not-verified_warning' | translate }}\n </p>\n </ng-container>\n </ion-card-content>\n </ion-card>\n <ion-card>\n <ion-card-content>\n <h3>{{ 'isolated-modules-details.manifest.include.label' | translate }}</h3>\n <ion-list class=\"ion-padding-top\" lines=\"full\">\n <ion-item \n *ngFor=\"let file of manifest.value.include\"\n detail=\"false\" \n class=\"ion-no-padding\"\n >\n <p>{{ file }}</p>\n </ion-item>\n </ion-list>\n </ion-card-content>\n </ion-card>\n </ng-container>\n </ng-container>","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { IonicModule } from '@ionic/angular'\nimport { TranslateModule } from '@ngx-translate/core'\nimport { QRCodeModule } from 'angularx-qrcode'\nimport { FormsModule } from '@angular/forms'\nimport { PipesModule } from '../pipes/pipes.module'\nimport { CurrencySymbolComponent } from './currency-symbol/currency-symbol.component'\nimport { FromToComponent } from './from-to/from-to.component'\nimport { IdenticonComponent } from './identicon/identicon.component'\nimport { NetworkBadgeComponent } from './network-badge/network-badge.component'\nimport { TitledAddressComponent } from './titled-address/titled-address.component'\nimport { TitledTextComponent } from './titled-text/titled-text.component'\nimport { AccountItemComponent } from './account-item/account-item.component'\nimport { AccountSelectionComponent } from './account-selection/account-selection.component'\nimport { QrComponent } from './qr/qr.component'\nimport { QrSettingsComponent } from './qr-settings/qr-settings.component'\nimport { IACQrComponent } from './iac-qr/iac-qr.component'\nimport { IsolatedModulesListComponent } from './isolated-modules-list/isolated-modules-list.component'\nimport { IsolatedModulesOnboardingComponent } from './isolated-modules-onboarding/isolated-modules-onboarding.component'\nimport { IsolatedModulesDetailsComponent } from './isolated-modules-details/isolated-modules-details.component'\nimport { IsolatedModulesBadgesComponent } from './isolated-modules-badges/isolated-modules-badges.component'\n\n@NgModule({\n declarations: [\n FromToComponent,\n IdenticonComponent,\n TitledTextComponent,\n TitledAddressComponent,\n CurrencySymbolComponent,\n NetworkBadgeComponent,\n QrComponent,\n IACQrComponent,\n AccountItemComponent,\n AccountSelectionComponent,\n QrSettingsComponent,\n IsolatedModulesDetailsComponent,\n IsolatedModulesListComponent,\n IsolatedModulesOnboardingComponent,\n IsolatedModulesBadgesComponent\n ],\n imports: [CommonModule, IonicModule, TranslateModule, PipesModule, QRCodeModule, FormsModule],\n exports: [\n FromToComponent,\n IdenticonComponent,\n TitledTextComponent,\n TitledAddressComponent,\n CurrencySymbolComponent,\n NetworkBadgeComponent,\n AccountItemComponent,\n AccountSelectionComponent,\n QrComponent,\n IACQrComponent,\n QrSettingsComponent,\n IsolatedModulesDetailsComponent,\n IsolatedModulesListComponent,\n IsolatedModulesOnboardingComponent,\n IsolatedModulesBadgesComponent\n ]\n})\nexport class ComponentsModule {}\n","import { InjectionToken, Injector } from '@angular/core'\nimport { Observable } from 'rxjs'\nimport { BaseFacade } from '../../base/base.facade'\nimport { IsolatedModuleMetadata } from '../../types/isolated-modules/IsolatedModuleMetadata'\nimport { UIResource } from '../../types/ui/UIResource'\n\nexport const ISOLATED_MODULES_LIST_PAGE_FACADE = new InjectionToken<IsolatedModulesListPageFacade>('IsolatedModulesListPageFacade')\nexport const ISOLATED_MODULES_LIST_PAGE_FACADE_FACTORY = new InjectionToken<(injector: Injector) => IsolatedModulesListPageFacade>(\n 'IsolatedModulesListPageFacadeFactory'\n)\nexport type IsolatedModulesListPageFacade<T extends BaseFacade = BaseFacade> = IIsolatedModulesListPageFacade & T\n\nexport interface IIsolatedModulesListPageFacade {\n readonly modules$: Observable<UIResource<IsolatedModuleMetadata[]>>\n readonly filter$: Observable<string | undefined>\n\n onViewWillEnter(): void\n onFilterQueryChanged(query: string | undefined): void\n}\n\nexport function isolatedModulesListPageFacade(injector: Injector): IsolatedModulesListPageFacade {\n return injector.get(ISOLATED_MODULES_LIST_PAGE_FACADE_FACTORY)(injector)\n}\n","import { Injector, ModuleWithProviders, NgModule } from '@angular/core'\nimport { TranslateModule } from '@ngx-translate/core'\n\nimport { ComponentsModule } from './components/components.module'\nimport { PipesModule } from './pipes/pipes.module'\nimport { AmountConverterPipe } from './pipes/amount-converter/amount-converter.pipe'\nimport { CurrencySymbolFacade, CURRENCY_SYMBOL_FACADE_FACTORY } from './components/currency-symbol/currency-symbol.facade'\nimport {\n IsolatedModulesDetailsFacade,\n ISOLATED_MODULES_DETAILS_FACADE_FACTORY\n} from './components/isolated-modules-details/isolated-modules-details.facade'\nimport {\n IsolatedModulesListFacade,\n ISOLATED_MODULES_LIST_FACADE_FACTORY\n} from './components/isolated-modules-list/isolated-modules-list.facade'\nimport {\n IsolatedModulesListPageFacade,\n ISOLATED_MODULES_LIST_PAGE_FACADE_FACTORY\n} from './pages/isolated-modules-list/isolated-modules-list.facade'\n\nexport interface AirGapAngularCoreModuleConfig {\n factories?: {\n currencySymbolFacade?: (injector: Injector) => CurrencySymbolFacade\n\n isolatedModulesDetailsFacade?: (injector: Injector) => IsolatedModulesDetailsFacade\n\n isolatedModulesListFacade?: (injector: Injector) => IsolatedModulesListFacade\n isolatedModulesListPageFacade?: (injector: Injector) => IsolatedModulesListPageFacade\n }\n}\n\n@NgModule({\n declarations: [],\n imports: [\n TranslateModule.forChild({\n extend: true,\n isolate: false\n }),\n ComponentsModule,\n PipesModule\n ],\n exports: [ComponentsModule, PipesModule],\n providers: [AmountConverterPipe]\n})\nexport class AirGapAngularCoreModule {\n public static factories: AirGapAngularCoreModuleConfig['factories'] = {}\n\n public static forRoot(config: AirGapAngularCoreModuleConfig = {}): ModuleWithProviders<AirGapAngularCoreModule> {\n const createFactoryPlaceholder = (target: keyof AirGapAngularCoreModuleConfig['factories']) => {\n return (_injector: Injector) => {\n throw new Error(`Factory for \\`${target.charAt(0).toUpperCase() + target.slice(1)}\\` not found.`)\n }\n }\n\n AirGapAngularCoreModule.factories = {\n currencySymbolFacade: createFactoryPlaceholder('currencySymbolFacade'),\n isolatedModulesDetailsFacade: createFactoryPlaceholder('isolatedModulesDetailsFacade'),\n isolatedModulesListFacade: createFactoryPlaceholder('isolatedModulesListFacade'),\n isolatedModulesListPageFacade: createFactoryPlaceholder('isolatedModulesListPageFacade'),\n ...(config?.factories ?? {})\n }\n\n return {\n ngModule: AirGapAngularCoreModule,\n providers: [\n { provide: CURRENCY_SYMBOL_FACADE_FACTORY, useValue: AirGapAngularCoreModule.factories.currencySymbolFacade },\n { provide: ISOLATED_MODULES_DETAILS_FACADE_FACTORY, useValue: AirGapAngularCoreModule.factories.isolatedModulesDetailsFacade },\n { provide: ISOLATED_MODULES_LIST_FACADE_FACTORY, useValue: AirGapAngularCoreModule.factories.isolatedModulesListFacade },\n { provide: ISOLATED_MODULES_LIST_PAGE_FACADE_FACTORY, useValue: AirGapAngularCoreModule.factories.isolatedModulesListPageFacade }\n ]\n }\n }\n}\n","/* eslint-disable spaced-comment */\nimport { Injectable } from '@angular/core'\nimport { Subject } from 'rxjs'\n\n@Injectable()\nexport abstract class BaseFacade {\n private static readonly callSuperOnViewCreate: unique symbol = Symbol('Expected to call `super.onViewCreate()`')\n private static readonly callSuperOnViewInit: unique symbol = Symbol('Expected to call `super.onViewInit()`')\n private static readonly callSuperOnViewDestroy: unique symbol = Symbol('Expected to call `super.onViewDestroy()`')\n\n private _viewDestroyed$: Subject<void>\n protected get viewDestroyed$(): Subject<void> {\n if (this._viewDestroyed$ === undefined) {\n this._viewDestroyed$ = new Subject()\n }\n\n return this._viewDestroyed$\n }\n\n /**************** Lifecycle ****************/\n\n public onViewCreate(): typeof BaseFacade.callSuperOnViewCreate & never {\n // force `super.onViewCreate()` in overriden methods\n return undefined as typeof BaseFacade.callSuperOnViewCreate & never\n }\n\n public onViewInit(): typeof BaseFacade.callSuperOnViewInit & never {\n // force `super.onViewInit()` in overriden methods\n return undefined as typeof BaseFacade.callSuperOnViewInit & never\n }\n\n public onViewDestroy(): typeof BaseFacade.callSuperOnViewDestroy & never {\n this._viewDestroyed$?.next()\n this._viewDestroyed$?.complete()\n this._viewDestroyed$ = undefined\n\n // force `super.onViewDestroy()` in overriden methods\n return undefined as typeof BaseFacade.callSuperOnViewDestroy & never\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { HttpClient } from '@angular/common/http'\nimport { TranslateLoader } from '@ngx-translate/core'\nimport { forkJoin, Observable, of } from 'rxjs'\nimport { catchError, map } from 'rxjs/operators'\n\ninterface TranslateResource {\n prefix: string\n suffix: string\n}\n\nexport class AirGapTranslateLoader implements TranslateLoader {\n private readonly translateResources: TranslateResource[]\n\n constructor(\n private readonly httpClient: HttpClient,\n resources: TranslateResource | TranslateResource[] = { prefix: './assets/i18n/', suffix: '.json' }\n ) {\n const externalResources: TranslateResource[] = Array.isArray(resources) ? resources : [resources]\n const commonResources: TranslateResource[] = [\n {\n prefix: './assets/i18n-common/',\n suffix: '.json'\n }\n ]\n\n this.translateResources = commonResources.concat(externalResources)\n }\n\n public getTranslation(lang: string): Observable<any> {\n return forkJoin(\n this.translateResources.map((resource: TranslateResource) => {\n const resourcePath = `${resource.prefix}${lang}${resource.suffix}`\n\n return this.httpClient.get(resourcePath).pipe(\n catchError((error) => {\n // eslint-disable-next-line no-console\n console.warn(`[CommonTranslateLoader:getTranslation] could not load translation file ${resourcePath}: ${error}`)\n\n return of({})\n })\n )\n })\n ).pipe(map((translations: any[]) => translations.reduce((object: any, next: any) => Object.assign(object, next), {})))\n }\n}\n","import { ICoinProtocol, ProtocolNetwork, ProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { Injectable } from '@angular/core'\nimport { ExternalAliasResolver } from '../../types/ExternalAliasResolver'\nimport { getProtocolAndNetworkIdentifier } from '../../utils/protocol/protocol-network-identifier'\nimport { BaseEnvironmentService } from '../environment/base-environment.service'\nimport { ProtocolService } from '../protocol/protocol.service'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AddressService {\n private readonly externalResolvers: Map<string, ExternalAliasResolver[]> = new Map()\n\n constructor(private readonly protocolService: ProtocolService, private readonly environment: BaseEnvironmentService) {}\n\n public async registerExternalAliasResolver(externalResolver: ExternalAliasResolver, protocol: ICoinProtocol): Promise<void>\n public async registerExternalAliasResolver(\n externalResolver: ExternalAliasResolver,\n protocol: ProtocolSymbols,\n network: string | ProtocolNetwork\n ): Promise<void>\n public async registerExternalAliasResolver(\n externalResolver: ExternalAliasResolver,\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n network?: string | ProtocolNetwork\n ): Promise<void> {\n const protocolNetworkIdentifier: string = await getProtocolAndNetworkIdentifier(this.environment.mode, protocolOrIdentifier, network)\n\n if (!this.externalResolvers.has(protocolNetworkIdentifier)) {\n this.externalResolvers.set(protocolNetworkIdentifier, [])\n }\n\n // eslint-disable-next-line no-unused-expressions\n this.externalResolvers.get(protocolNetworkIdentifier)?.push(externalResolver)\n }\n\n public async validate(addressOrAlias: string, protocol: ICoinProtocol): Promise<boolean>\n public async validate(addressOrAlias: string, protocol: ProtocolSymbols, network: string | ProtocolNetwork): Promise<boolean>\n public async validate(\n addressOrAlias: string,\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n network?: string | ProtocolNetwork\n ): Promise<boolean> {\n const protocol: ICoinProtocol = await this.protocolService.getProtocol(protocolOrIdentifier, network, false)\n\n return (await this.isAddress(addressOrAlias, protocol)) || this.isAlias(addressOrAlias, protocol)\n }\n\n public async isAddress(data: string, protocol: ICoinProtocol): Promise<boolean>\n public async isAddress(data: string, protocol: ProtocolSymbols, network: string | ProtocolNetwork): Promise<boolean>\n public async isAddress(\n data: string,\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n network?: string | ProtocolNetwork\n ): Promise<boolean> {\n const protocol: ICoinProtocol = await this.protocolService.getProtocol(protocolOrIdentifier, network, false)\n\n return this.protocolService.isAddressOfProtocol(await protocol.getIdentifier(), data)\n }\n\n public async isAlias(data: string, protocol: ICoinProtocol): Promise<boolean>\n public async isAlias(data: string, protocol: ProtocolSymbols, network: string | ProtocolNetwork): Promise<boolean>\n public async isAlias(\n data: string,\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n network?: string | ProtocolNetwork\n ): Promise<boolean> {\n const protocol: ICoinProtocol = await this.protocolService.getProtocol(protocolOrIdentifier, network, false)\n const protocolNetworkIdentifier: string = await getProtocolAndNetworkIdentifier(this.environment.mode, protocol)\n\n const externalValidations: boolean[] = await Promise.all(\n this.externalResolvers.get(protocolNetworkIdentifier)?.map((resolver: ExternalAliasResolver) => resolver.validateReceiver(data)) ?? []\n )\n\n return externalValidations.includes(true)\n }\n\n public async getAddress(addressOrAlias: string, protocol: ICoinProtocol): Promise<string | undefined>\n public async getAddress(addressOrAlias: string, protocol: ProtocolSymbols, network: string | ProtocolNetwork): Promise<string | undefined>\n public async getAddress(\n addressOrAlias: string,\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n network?: string | ProtocolNetwork\n ): Promise<string | undefined> {\n const protocol: ICoinProtocol = await this.protocolService.getProtocol(protocolOrIdentifier, network, false)\n\n if (await this.isAddress(addressOrAlias, protocol)) {\n return addressOrAlias\n }\n\n const protocolNetworkIdentifier: string = await getProtocolAndNetworkIdentifier(this.environment.mode, protocol)\n const externalResolvers: ExternalAliasResolver[] = this.externalResolvers.get(protocolNetworkIdentifier) ?? []\n\n for (const resolver of externalResolvers) {\n const resolved: string | undefined = await resolver.resolveAlias(addressOrAlias)\n if (resolved !== undefined) {\n return resolved\n }\n }\n\n return undefined\n }\n\n public async getAlias(addressOrAlias: string, protocol: ICoinProtocol): Promise<string | undefined>\n public async getAlias(addressOrAlias: string, protocol: ProtocolSymbols, network: string | ProtocolNetwork): Promise<string | undefined>\n public async getAlias(\n addressOrAlias: string,\n protocolOrIdentifier: ICoinProtocol | ProtocolSymbols,\n network?: string | ProtocolNetwork\n ): Promise<string | undefined> {\n const protocol: ICoinProtocol = await this.protocolService.getProtocol(protocolOrIdentifier, network, false)\n\n if (await this.isAddress(addressOrAlias, protocol)) {\n const protocolNetworkIdentifier: string = await getProtocolAndNetworkIdentifier(this.environment.mode, protocol)\n const externalResolvers: ExternalAliasResolver[] = this.externalResolvers.get(protocolNetworkIdentifier) ?? []\n\n for (const resolver of externalResolvers) {\n const resolved: string | undefined = await resolver.getAlias(addressOrAlias)\n if (resolved !== undefined) {\n return resolved\n }\n }\n } else if (await this.isAlias(addressOrAlias, protocol)) {\n const resolvedAddress: string | undefined = await this.getAddress(addressOrAlias, protocol)\n if (resolvedAddress !== undefined) {\n return addressOrAlias\n }\n }\n\n return undefined\n }\n}\n","import { IACMessageDefinitionObjectV3 } from '@wallfree-dev/serializer'\nimport { Injectable, Inject } from '@angular/core'\nimport { AppLauncherPlugin } from '@capacitor/app-launcher'\n\nimport { AppConfig, APP_CONFIG } from '../../config/app-config'\nimport { APP_LAUNCHER_PLUGIN } from '../../capacitor-plugins/injection-tokens'\nimport { UiEventElementsService } from '../ui-event-elements/ui-event-elements.service'\nimport { IACQrGenerator } from '../iac/qr-generator'\nimport { SerializerV3Generator } from '../qr/qr-generators/serializer-v3-generator'\nimport { SerializerService } from '../serializer/serializer.service'\nimport { SerializerV2Generator } from '../qr/qr-generators/serializer-v2-generator'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DeeplinkService {\n constructor(\n private readonly uiEventElementsService: UiEventElementsService,\n private readonly serializerService: SerializerService,\n @Inject(APP_LAUNCHER_PLUGIN) private readonly appLauncher: AppLauncherPlugin,\n @Inject(APP_CONFIG) private readonly appConfig: AppConfig\n ) {}\n\n public async sameDeviceDeeplink(data: string | IACMessageDefinitionObjectV3[]): Promise<void> {\n const deeplinkUrl = await this.generateDeepLinkUrl(data)\n\n return new Promise((resolve, reject) => {\n this.appLauncher\n .openUrl({ url: deeplinkUrl })\n .then(() => {\n // eslint-disable-next-line no-console\n console.log('Deeplink called', deeplinkUrl)\n resolve()\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.error('deeplink error', deeplinkUrl, error)\n // eslint-disable-next-line no-console\n this.uiEventElementsService.showOtherAppNotFoundAlert().catch(console.error)\n\n reject()\n })\n })\n }\n\n public async generateDeepLinkUrl(data: string | IACMessageDefinitionObjectV3[]): Promise<string> {\n let generator: IACQrGenerator\n if (data && typeof data !== 'string') {\n try {\n generator = this.serializerService.useV3 ? new SerializerV3Generator() : new SerializerV2Generator()\n await generator.create(data, Number.MAX_SAFE_INTEGER)\n } catch (error) {\n try {\n generator = this.serializerService.useV3 ? new SerializerV2Generator() : new SerializerV3Generator()\n await generator.create(data, Number.MAX_SAFE_INTEGER)\n } catch (error) {\n this.uiEventElementsService.invalidDeeplinkAlert().catch(console.error)\n }\n }\n\n return await generator!.getSingle(this.appConfig.otherApp.urlScheme)\n } else if (typeof data === 'string') {\n return data\n }\n\n return ''\n }\n}\n","import { Injectable } from '@angular/core'\n\nexport enum IACMessageTransport {\n QR_SCANNER = 'QR_SCANNER',\n DEEPLINK = 'DEEPLINK',\n PASTE = 'CLIPBOARD'\n}\nexport enum IACHandlerStatus {\n SUCCESS = 0,\n PARTIAL = 1,\n UNSUPPORTED = 2\n}\n\nexport interface IACContext {\n requestId?: string\n derivationPath?: string\n sourceFingerprint?: string\n}\n\nexport interface IACMessageWrapper<T> {\n result: T\n data: string\n // TODO: Instead of this, create an internal message for every protocol/message that can contain additional data, which is not in the serializer messages.\n context?: IACContext\n}\n\n@Injectable()\nexport abstract class IACMessageHandler<T> {\n abstract name: string\n\n abstract canHandle(data: string): Promise<boolean>\n\n abstract receive(data: string): Promise<IACHandlerStatus> // internally store\n\n abstract handleComplete(): Promise<IACMessageWrapper<T>> // handle complete\n\n abstract getProgress(): Promise<number>\n\n abstract getResult(): Promise<IACMessageWrapper<T> | undefined>\n\n abstract getDataSingle(): Promise<string | undefined>\n\n abstract reset(): Promise<void>\n}\n","import { UR, URDecoder, UREncoder } from '@ngraveio/bc-ur'\nimport * as bs58check from '@wallfree-dev/coinlib-core/dependencies/src/bs58check-2.1.2/index'\nimport { CryptoKeypath, CryptoPSBT } from '@keystonehq/bc-ur-registry'\nimport { EthSignRequest, DataType } from '@keystonehq/bc-ur-registry-eth'\nimport * as rlp from '@ethereumjs/rlp'\nimport { Transaction, TransactionFactory } from '@ethereumjs/tx'\nimport { BitcoinSegwitTransactionSignRequest, BitcoinTaprootTransactionSignRequest } from '@wallfree-dev/bitcoin'\nimport { MainProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport { IACMessageDefinitionObjectV3, SerializerV3, generateId, IACMessageType, MessageSignRequest } from '@wallfree-dev/serializer'\nimport { IACHandlerStatus, IACMessageHandler, IACMessageWrapper } from '../../iac/message-handler'\nimport { QRType } from '../../../../public-api'\nimport { TEMP_BTC_REQUEST_IDS, TEMP_MM_REQUEST_IDS } from '../../../utils/utils'\nimport * as bitcoinJS from 'bitcoinjs-lib'\n\nexport class SerializerV3Handler implements IACMessageHandler<IACMessageDefinitionObjectV3[]> {\n public readonly name: string = 'SerializerV3Handler'\n private readonly serializer: SerializerV3\n private decoder: URDecoder = new URDecoder()\n\n private readonly callback: (data: IACMessageWrapper<IACMessageDefinitionObjectV3[]>) => void = (): void => undefined\n\n private parts: Set<string> = new Set()\n\n private combinedData: Buffer | undefined\n\n private resultCache: IACMessageWrapper<IACMessageDefinitionObjectV3[]> | undefined\n\n constructor(callback: (data: IACMessageWrapper<IACMessageDefinitionObjectV3[]>) => void = (): void => undefined) {\n this.serializer = SerializerV3.getInstance()\n this.callback = callback\n // completion callback\n }\n\n public async canHandle(data: string): Promise<boolean> {\n if (data.toUpperCase().startsWith('UR:')) {\n return true\n } else {\n try {\n const ur = this.getParsedData(data)\n\n return ur && ur.length > 0 ? true : false\n } catch (e) {\n return false\n }\n }\n }\n\n public getParsedData(data: string): string {\n if (data.toUpperCase().startsWith('UR:')) {\n return data\n }\n let ur: string | null = data\n try {\n const url = new URL(data)\n ur = `UR:BYTES/${url.searchParams.get('ur')}`\n } catch (e) {}\n\n return ur ?? ''\n }\n\n public async receive(_data: string): Promise<IACHandlerStatus> {\n const data = this.getParsedData(_data)\n if (this.parts.has(data)) {\n return IACHandlerStatus.PARTIAL\n }\n this.parts.add(data)\n const canHandle = await this.canHandle(data)\n if (!canHandle) {\n return IACHandlerStatus.UNSUPPORTED\n }\n\n try {\n const res = this.decoder.receivePart(data)\n if (!res) {\n // If we already have progress, but the scanner scans a \"new set of QRs\", it should reset itself and handle the part.\n this.reset()\n\n return this.receive(_data)\n }\n } catch (e) {\n return IACHandlerStatus.UNSUPPORTED\n }\n\n if (this.decoder.isComplete() && this.decoder.isSuccess()) {\n return IACHandlerStatus.SUCCESS\n }\n\n return IACHandlerStatus.PARTIAL\n }\n\n public async handleComplete(): Promise<IACMessageWrapper<IACMessageDefinitionObjectV3[]>> {\n const result = await this.getResult()\n if (!result) {\n throw new Error('Data not complete!')\n }\n this.callback(result)\n\n return result\n }\n\n public async getProgress(): Promise<number> {\n return Number(this.decoder.estimatedPercentComplete().toFixed(2))\n }\n\n public async getResult(): Promise<IACMessageWrapper<IACMessageDefinitionObjectV3[]> | undefined> {\n if (this.resultCache) {\n return this.resultCache\n }\n\n if (this.decoder.isComplete() && this.decoder.isSuccess()) {\n const decoded = this.decoder.resultUR()\n this.combinedData = decoded.decodeCBOR()\n\n if (decoded.type === 'crypto-psbt') {\n const cryptoPsbt = CryptoPSBT.fromCBOR(decoded.cbor)\n const psbt = cryptoPsbt.getPSBT().toString('hex')\n\n return this.convertPSBT(psbt)\n }\n\n if (decoded.type === 'eth-sign-request') {\n const signRequest = EthSignRequest.fromCBOR(decoded.cbor)\n\n return this.convertMetaMaskSignRequest(signRequest)\n }\n\n const resultUr = bs58check.encode(this.combinedData)\n\n return { result: await this.serializer.deserialize(resultUr), data: await this.getDataSingle() }\n }\n\n return undefined\n }\n\n /*\n * If we scan an animated QR, but the result is not a serializer message we get the result back\n */\n public async getDataSingle(): Promise<string | undefined> {\n if (!this.combinedData) {\n return undefined\n }\n const ur = UR.fromBuffer(this.combinedData)\n const part = new UREncoder(ur, Number.MAX_SAFE_INTEGER).nextPart()\n\n return part.toUpperCase()\n }\n\n public async reset(): Promise<void> {\n this.decoder = new URDecoder()\n this.parts = new Set()\n\n return\n }\n\n private async convertPSBT(psbt: string): Promise<IACMessageWrapper<IACMessageDefinitionObjectV3[]>> {\n const decodedPSBT = bitcoinJS.Psbt.fromHex(psbt)\n const isTaproot = decodedPSBT.data.inputs.some((input) => input.tapBip32Derivation)\n\n const payload = {\n transaction: { psbt },\n publicKey: ''\n }\n\n if (isTaproot) {\n payload as BitcoinTaprootTransactionSignRequest\n } else {\n payload as BitcoinSegwitTransactionSignRequest\n }\n\n const ownRequestId: number = generateId(8)\n const IDs = JSON.parse(localStorage.getItem(TEMP_BTC_REQUEST_IDS) ?? '{}')\n IDs[ownRequestId] = { qrType: QRType.BC_UR }\n localStorage.setItem(TEMP_BTC_REQUEST_IDS, JSON.stringify(IDs))\n\n return {\n result: [\n {\n id: ownRequestId,\n protocol: isTaproot ? MainProtocolSymbols.BTC_TAPROOT : MainProtocolSymbols.BTC_SEGWIT,\n type: IACMessageType.TransactionSignRequest,\n payload\n }\n ],\n data: await this.getDataSingle()\n }\n }\n\n private async convertMetaMaskSignRequest(request: EthSignRequest): Promise<IACMessageWrapper<IACMessageDefinitionObjectV3[]>> {\n const signData = request.getSignData()\n\n const sourceFingerprint = ((request as any).derivationPath as CryptoKeypath).getSourceFingerprint().toString('hex')\n\n const ownRequestId: number = generateId(8)\n\n const metamaskRequestId: string = request.getRequestId().toString('hex')\n\n // TODO: This should be moved to a higher level, probably the \"iac.service\", and properly store context for any kind of request.\n const IDs = JSON.parse(localStorage.getItem(TEMP_MM_REQUEST_IDS) ?? '{}')\n IDs[ownRequestId] = metamaskRequestId\n localStorage.setItem(TEMP_MM_REQUEST_IDS, JSON.stringify(IDs))\n\n const context = { requestId: metamaskRequestId, derivationPath: request.getDerivationPath(), sourceFingerprint }\n\n const chainId = request.getChainId()\n\n const protocol =\n chainId === 10 /* Optimism Mainnet */ || chainId === 420 /* Optimism Goerli */\n ? MainProtocolSymbols.OPTIMISM\n : MainProtocolSymbols.ETH\n\n switch (request.getDataType()) {\n case DataType.transaction: {\n // Metamask uses `Transaction#getMessageToSign` to get the transaction bytes which will be later encoded with RLP.\n // This method returns data that is already prepared to be hashed and signed,\n // for EIP-155 compliant transactions it means there's `chainId` put where the `v` component is usually placed.\n // However, the data prepared in that way is not meant to be used to recreate the `Transaction` object.\n // To construct the `Transaction` object on our side we have to use the transaction data to replicate the\n // output we would get with `Transaction#serialized`. This means that we first have to decode the data,\n // drop the EIP-155 compliant parts and finally encode the reduced array of bytes again.\n const rawTx = rlp.decode(signData)\n const [nonce, gasPrice, gasLimit, to, value, data] = rawTx\n const serializedTx = rlp.encode([\n nonce,\n gasPrice,\n gasLimit,\n to,\n value,\n data,\n Buffer.from([]) /* v */,\n Buffer.from([]) /* r */,\n Buffer.from([]) /* s */\n ])\n\n const ethTx = TransactionFactory.fromSerializedData(Buffer.from(serializedTx))\n const tx: Transaction = ethTx as Transaction\n\n return {\n result: [\n {\n id: ownRequestId,\n protocol,\n type: IACMessageType.TransactionSignRequest,\n payload: {\n transaction: {\n nonce: `0x${tx.nonce.toString(16)}`,\n gasPrice: `0x${tx.gasPrice.toString(16)}`,\n gasLimit: `0x${tx.gasLimit.toString(16)}`,\n to: tx.to.toString(),\n value: `0x${tx.value.toString(16)}`,\n chainId: request.getChainId(),\n data: `0x${tx.data.toString('hex')}`\n },\n publicKey: ''\n }\n }\n ],\n data: await this.getDataSingle(),\n context\n }\n }\n\n case DataType.typedData:\n const typedDataSignRequest: MessageSignRequest = {\n message: signData.toString(),\n publicKey: ''\n }\n\n return {\n result: [\n {\n id: ownRequestId,\n protocol,\n type: IACMessageType.MessageSignRequest,\n payload: typedDataSignRequest\n }\n ],\n data: await this.getDataSingle(),\n context\n }\n case DataType.personalMessage:\n const signRequest: MessageSignRequest = {\n message: `0x${signData.toString('hex')}`,\n publicKey: ''\n }\n\n return {\n result: [\n {\n id: ownRequestId,\n protocol,\n type: IACMessageType.MessageSignRequest,\n payload: signRequest\n }\n ],\n data: await this.getDataSingle(),\n context\n }\n\n case DataType.typedTransaction: {\n return {\n result: [\n {\n id: ownRequestId,\n protocol,\n type: IACMessageType.TransactionSignRequest,\n payload: {\n transaction: {\n serialized: signData.toString('hex'),\n derivationPath: request.getDerivationPath(),\n masterFingerprint: sourceFingerprint\n },\n publicKey: ''\n }\n }\n ],\n data: await this.getDataSingle(),\n context\n }\n }\n\n default:\n throw new Error(`Unable to handle data type \"${request.getDataType()}\"`)\n }\n }\n}\n","import { IACMessageDefinitionObjectV3, IACMessageDefinitionObject, Serializer } from '@wallfree-dev/serializer'\nimport { IACHandlerStatus, IACMessageHandler, IACMessageWrapper } from '../../iac/message-handler'\nimport { convertV2ToV3 } from '../../serializer/serializer.service'\n\nexport class SerializerV2Handler implements IACMessageHandler<IACMessageDefinitionObjectV3[]> {\n public readonly name: string = 'SerializerV2Handler'\n private readonly serializer: Serializer\n\n private readonly callback: (data: IACMessageWrapper<IACMessageDefinitionObjectV3[]>) => void = (): void => undefined\n\n private progress: number = 0\n private parts: Set<string> = new Set<string>()\n private completeDeserialized: IACMessageDefinitionObject[] | undefined\n\n constructor(callback: (data: IACMessageWrapper<IACMessageDefinitionObjectV3[]>) => void = (): void => undefined) {\n this.serializer = Serializer.getInstance()\n this.callback = callback\n }\n\n public async canHandle(_part: string): Promise<boolean> {\n const part = this.getParsedData(_part)\n try {\n await this.serializer.deserialize([part])\n\n return true\n } catch (error) {\n try {\n await this.serializer.deserialize(part.split(','))\n\n return true\n } catch (error) {\n if (error.availablePages && error.totalPages) {\n return true\n } else {\n return false\n }\n }\n }\n }\n\n public getParsedData(data: string): string {\n if (!data.includes('://')) {\n return data\n }\n let parsedData: string | null = data\n try {\n const url = new URL(data)\n parsedData = url.searchParams.get('d')\n } catch (e) {}\n\n return parsedData ?? ''\n }\n\n public async receive(data: string): Promise<IACHandlerStatus> {\n const parsedData = await this.getParsedData(data)\n if (!parsedData) {\n return IACHandlerStatus.UNSUPPORTED\n }\n\n // Handle multiple parts\n const splits = parsedData.split(',')\n if (splits.length > 1) {\n for (const split of splits) {\n if (this.parts.has(split)) {\n return IACHandlerStatus.PARTIAL\n }\n\n const valid = await this.canHandle(split)\n\n if (valid) {\n this.parts.add(split)\n } else {\n return IACHandlerStatus.UNSUPPORTED\n }\n }\n // End multiple parts\n } else {\n const canHandle = await this.canHandle(parsedData)\n if (!canHandle) {\n return IACHandlerStatus.UNSUPPORTED\n }\n this.parts.add(parsedData)\n }\n\n try {\n const deserialized = await this.serializer.deserialize(Array.from(this.parts))\n if (deserialized) {\n this.completeDeserialized = deserialized\n\n return IACHandlerStatus.SUCCESS\n }\n } catch (error) {\n if (error.availablePages && error.totalPages) {\n this.progress = error.availablePages.length / error.totalPages\n }\n }\n\n return IACHandlerStatus.PARTIAL\n }\n\n public async getProgress(): Promise<number> {\n return Number(this.progress.toFixed(2))\n }\n\n public async handleComplete(): Promise<IACMessageWrapper<IACMessageDefinitionObjectV3[]>> {\n const result = await this.getResult()\n if (!result) {\n throw new Error('Data not complete!')\n }\n this.callback(result)\n\n return result\n }\n\n public async getDataSingle(): Promise<string | undefined> {\n return Array.from(this.parts.values()).join(',') // Serializer V2 used commas to separate parts\n }\n\n public async getResult(): Promise<IACMessageWrapper<IACMessageDefinitionObjectV3[]> | undefined> {\n return this.completeDeserialized\n ? { result: await convertV2ToV3(this.completeDeserialized), data: await this.getDataSingle() }\n : undefined\n }\n\n public async reset(): Promise<void> {\n this.parts = new Set()\n this.progress = 0\n this.completeDeserialized = undefined\n }\n}\n","import { IACMessageDefinitionObjectV3, IACMessageType } from '@wallfree-dev/serializer'\nimport { Inject, Injectable } from '@angular/core'\nimport { UiEventElementsService } from '../ui-event-elements/ui-event-elements.service'\nimport { ClipboardService } from '../clipboard/clipboard.service'\nimport { SerializerV3Generator } from '../qr/qr-generators/serializer-v3-generator'\nimport { SerializerV3Handler } from '../qr/qr-handler/serializer-v3-handler'\nimport { SerializerV2Handler } from '../qr/qr-handler/serializer-v2-handler'\nimport { DeeplinkService } from '../deeplink/deeplink.service'\nimport { AppConfig, APP_CONFIG } from '../../config/app-config'\nimport { IACMessageHandler, IACMessageTransport, IACHandlerStatus, IACMessageWrapper } from './message-handler'\n\nexport type ScanAgainCallback = (progress?: number) => void\n\nexport type RelayMessage = string\n\n@Injectable()\nexport abstract class BaseIACService {\n protected readonly handlers: IACMessageHandler<unknown>[]\n private transport: IACMessageTransport | undefined = undefined\n private scanAgainCallback: ScanAgainCallback | undefined = undefined\n\n protected readonly serializerMessageHandlers: {\n [key in IACMessageType]: (\n deserializedSync: IACMessageWrapper<IACMessageDefinitionObjectV3[]>,\n transport: IACMessageTransport,\n scanAgainCallback: ScanAgainCallback\n ) => Promise<boolean>\n }\n\n constructor(\n protected readonly uiEventElementService: UiEventElementsService,\n protected readonly clipboard: ClipboardService,\n protected readonly isReady: Promise<void>,\n protected readonly customHandlers: IACMessageHandler<unknown>[],\n protected readonly deeplinkService: DeeplinkService,\n @Inject(APP_CONFIG) protected readonly appConfig: AppConfig\n ) {\n this.serializerMessageHandlers = {\n [IACMessageType.AccountShareRequest]: this.syncTypeNotSupportedAlert.bind(this),\n [IACMessageType.AccountShareResponse]: this.syncTypeNotSupportedAlert.bind(this),\n [IACMessageType.TransactionSignRequest]: this.syncTypeNotSupportedAlert.bind(this),\n [IACMessageType.TransactionSignResponse]: this.syncTypeNotSupportedAlert.bind(this),\n [IACMessageType.MessageSignRequest]: this.syncTypeNotSupportedAlert.bind(this),\n [IACMessageType.MessageSignResponse]: this.syncTypeNotSupportedAlert.bind(this)\n }\n\n this.handlers = [\n new SerializerV3Handler((deserializedSync: IACMessageWrapper<IACMessageDefinitionObjectV3[]>) => this.deserialize(deserializedSync)),\n new SerializerV2Handler((deserializedSync: IACMessageWrapper<IACMessageDefinitionObjectV3[]>) => this.deserialize(deserializedSync))\n ]\n\n this.handlers.push(...customHandlers)\n }\n\n public async storeResult(\n message: IACMessageWrapper<unknown>,\n status: IACHandlerStatus,\n transport: IACMessageTransport\n ): Promise<IACHandlerStatus> {\n console.debug('STORE_RESULT', message, status, transport)\n\n return status\n }\n\n // check if we already have part, scanning same QR advances progress bar\n\n public async handleRequest(\n data: string,\n transport: IACMessageTransport,\n scanAgainCallback: ScanAgainCallback = (): void => undefined\n ): Promise<IACHandlerStatus> {\n this.transport = transport\n this.scanAgainCallback = scanAgainCallback\n await this.isReady\n for (let i = 0; i < this.handlers.length; i++) {\n const handler = this.handlers[i]\n try {\n const canHandle = await handler.canHandle(data)\n if (canHandle) {\n const handlerStatus: IACHandlerStatus = await handler.receive(data)\n if (handlerStatus === IACHandlerStatus.SUCCESS) {\n try {\n const result: IACMessageWrapper<unknown> = await handler.getResult()\n const status: IACHandlerStatus = IACHandlerStatus.SUCCESS\n await handler.handleComplete()\n await this.resetHandlers()\n\n return this.storeResult(result, status, transport)\n } catch (e) {\n console.error('Error while handling result', e)\n const dataSingle: string = (await handler.getDataSingle()) ?? data\n\n await this.messageUnknownAlert(dataSingle, this.scanAgainCallback)\n await this.resetHandlers()\n\n return this.storeResult({ result: undefined, data: dataSingle }, IACHandlerStatus.UNSUPPORTED, transport)\n }\n } else if (handlerStatus === IACHandlerStatus.PARTIAL) {\n scanAgainCallback(await handler.getProgress())\n\n return this.storeResult({ result: data, data: await handler.getDataSingle() }, IACHandlerStatus.PARTIAL, transport)\n }\n }\n } catch (handlerError) {\n console.log(`Error while handling message in ${handler.name}`, handlerError)\n }\n }\n await this.resetHandlers()\n\n await this.messageUnknownAlert(data, this.scanAgainCallback)\n\n return this.storeResult({ result: undefined, data }, IACHandlerStatus.UNSUPPORTED, this.transport)\n }\n\n public async resetHandlers(): Promise<void> {\n await Promise.all(\n this.handlers.map((handler) => {\n handler.reset()\n })\n )\n }\n\n private async deserialize(deserializedSync: IACMessageWrapper<IACMessageDefinitionObjectV3[]>): Promise<IACHandlerStatus> {\n const data = deserializedSync.result\n if (data && data.length > 0) {\n const groupedByType: { [key in IACMessageType]?: IACMessageDefinitionObjectV3[] } = data.reduce(\n (grouped, message) => Object.assign(grouped, { [message.type]: (grouped[message.type] || []).concat(message) }),\n {} as { [key in IACMessageType]?: IACMessageDefinitionObjectV3[] }\n )\n\n for (const type in groupedByType) {\n if (type in IACMessageType) {\n // TODO: Improve types\n const typedType: IACMessageType = parseInt(type, 10)\n // eslint-disable-next-line no-console\n this.serializerMessageHandlers[typedType](\n { result: groupedByType[typedType] ?? [], data: deserializedSync.data, context: deserializedSync.context },\n this.transport,\n this.scanAgainCallback\n ).catch(console.error)\n } else {\n // TODO: Improve types\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-console\n this.syncTypeNotSupportedAlert(deserializedSync, this.transport, this.scanAgainCallback).catch(console.error)\n\n return IACHandlerStatus.UNSUPPORTED\n }\n }\n\n return IACHandlerStatus.SUCCESS\n } else {\n throw new Error('Empty message received!')\n }\n }\n\n protected async messageUnknownAlert(data: string, scanAgainCallback: ScanAgainCallback): Promise<void> {\n const relayHandler = () => {\n // eslint-disable-next-line no-console\n this.relay(data).catch(console.error)\n }\n\n const copyHandler = () => {\n // eslint-disable-next-line no-console\n this.clipboard.copyAndShowToast(data).catch(console.error)\n }\n\n const cancelHandler = () => {\n scanAgainCallback()\n }\n\n // eslint-disable-next-line no-console\n this.uiEventElementService.showIACMessageUnknownAlert(relayHandler, copyHandler, cancelHandler).catch(console.error)\n }\n\n protected async syncTypeNotSupportedAlert(\n messageWrapper: IACMessageWrapper<IACMessageDefinitionObjectV3[]>,\n _transport: IACMessageTransport,\n scanAgainCallback: ScanAgainCallback\n ): Promise<boolean> {\n const relayHandler = () => {\n // eslint-disable-next-line no-console\n this.relay(messageWrapper.data).catch(console.error)\n }\n\n const copyHandler = () => {\n // eslint-disable-next-line no-console\n this.clipboard.copyAndShowToast(messageWrapper.data).catch(console.error)\n }\n\n const cancelHandler = () => {\n scanAgainCallback()\n }\n\n // eslint-disable-next-line no-console\n this.uiEventElementService.showIACMessageNotSupportedAlert(relayHandler, copyHandler, cancelHandler).catch(console.error)\n\n return false\n }\n\n private async serialize(messageDefinitionObject: IACMessageDefinitionObjectV3[], prefix: string): Promise<string> {\n const generator = new SerializerV3Generator()\n await generator.create(messageDefinitionObject, 100, 100)\n\n return generator.getSingle(prefix)\n }\n\n /**\n * This method should relay the message to the other app. The app is responsibe\n * for navigating away from the scanner because scanning will not be resumed.\n *\n * @param data The data that will be relayed\n */\n public abstract relay(data: RelayMessage): Promise<void>\n}\n","import { Injectable } from '@angular/core'\nimport { IACHandlerStatus, IACMessageHandler, IACMessageWrapper } from './message-handler'\n\n/**\n * Handles requests that can only be in a single QR\n */\n@Injectable()\nexport abstract class IACSinglePartHandler<T> extends IACMessageHandler<T> {\n protected payload: T | undefined\n protected rawData: string | undefined\n\n constructor() {\n super()\n }\n\n public async canHandle(data: string): Promise<boolean> {\n const processed = await this.processData(data)\n if (processed) {\n return true\n } else {\n return false\n }\n }\n\n public async receive(data: string): Promise<IACHandlerStatus> {\n const processed = await this.processData(data)\n\n if (!processed) {\n return IACHandlerStatus.UNSUPPORTED\n }\n\n this.rawData = data\n this.payload = processed\n\n return IACHandlerStatus.SUCCESS\n }\n\n public async getProgress(): Promise<number> {\n return 1\n }\n\n public async getResult(): Promise<IACMessageWrapper<T> | undefined> {\n return { result: this.payload, data: await this.getDataSingle() }\n }\n\n public async getDataSingle(): Promise<string> {\n return this.rawData\n }\n\n public async reset(): Promise<void> {\n this.payload = undefined\n\n return\n }\n\n abstract processData(data: string): Promise<T | undefined>\n}\n","import { AirGapWallet, ICoinProtocol, ICoinSubProtocol, ProtocolSymbols } from '@wallfree-dev/coinlib-core'\nimport {\n AirGapAnyProtocol,\n AirGapModule,\n AirGapV3SerializerCompanion,\n isOnlineProtocol,\n isSubProtocol,\n ProtocolConfiguration,\n ProtocolNetwork,\n protocolNetworkIdentifier,\n V3SchemaConfiguration\n} from '@wallfree-dev/module-kit'\nimport { SerializerV3, TransactionValidator } from '@wallfree-dev/serializer'\nimport { Injectable } from '@angular/core'\nimport {\n createICoinProtocolAdapter,\n createICoinSubProtocolAdapter,\n ICoinProtocolAdapter,\n ICoinSubProtocolAdapter,\n TransactionValidatorAdapter\n} from '../../protocol/adapter/protocol-v0-adapter'\nimport { IsolatedModuleMetadata, IsolatedModulePreviewMetadata } from '../../types/isolated-modules/IsolatedModuleMetadata'\nimport { flattened } from '../../utils/array'\nimport { ProtocolService } from '../protocol/protocol.service'\nimport { LoadedModule, LoadedProtocol } from './controller/base-modules.controller'\nimport { ModulesController } from './controller/modules.controller'\n\ntype AdaptedProtocolStatus = 'active' | 'passive'\n\ninterface AdaptedMainProtocol {\n type: 'main'\n status: AdaptedProtocolStatus\n value: ICoinProtocolAdapter\n}\n\ninterface AdaptedSubProtocol {\n type: 'sub'\n status: AdaptedProtocolStatus\n value: [ICoinProtocolAdapter, ICoinSubProtocolAdapter]\n}\n\ntype AdaptedProtocol = AdaptedMainProtocol | AdaptedSubProtocol\n\ninterface Protocols {\n activeProtocols: ICoinProtocol[]\n passiveProtocols: ICoinProtocol[]\n activeSubProtocols: [ICoinProtocol, ICoinSubProtocol][]\n passiveSubProtocols: [ICoinProtocol, ICoinSubProtocol][]\n}\n\n@Injectable()\nexport abstract class BaseModulesService {\n private get isInitialized(): boolean {\n return this.modulesController.isInitialized\n }\n\n constructor(protected readonly modulesController: ModulesController, protected readonly protocolService: ProtocolService) {}\n\n public init(integralModules: AirGapModule[] = []): void {\n if (this.isInitialized) {\n // eslint-disable-next-line no-console\n console.log('[ModulesService] already initialized')\n\n return\n }\n\n this.modulesController.init(integralModules)\n }\n\n public async loadProtocols(type?: ProtocolConfiguration['type'], ignore: string[] = []): Promise<Protocols> {\n const modules: LoadedModule[] = await this.modulesController.loadModules(type, ignore)\n const adaptedProtocols: AdaptedProtocol[] = await this.adaptProtocols(modules, type)\n\n return this.processAdaptedProtocols(adaptedProtocols)\n }\n\n public async deriveAddresses(walletOrWallets: AirGapWallet | AirGapWallet[], amount: number = 50): Promise<Record<string, string[]>> {\n const wallets: AirGapWallet[] = Array.isArray(walletOrWallets) ? walletOrWallets : [walletOrWallets]\n\n return this.modulesController.deriveAddresses(wallets, amount)\n }\n\n public async getModulesMetadata(): Promise<IsolatedModuleMetadata[]> {\n return this.modulesController.getModulesMetadata()\n }\n\n public async readModuleMetadata(name: string, path: string): Promise<IsolatedModulePreviewMetadata> {\n return this.modulesController.readModuleMetadata(name, path)\n }\n\n public async installModule(metadata: IsolatedModulePreviewMetadata): Promise<void> {\n const loadedModule: LoadedModule = await this.modulesController.installModule(metadata)\n const adaptedProtocols: AdaptedProtocol[] = await this.adaptProtocols([loadedModule])\n const protocols: Protocols = this.processAdaptedProtocols(adaptedProtocols)\n\n await this.protocolService.addActiveMainProtocols(protocols.activeProtocols)\n await this.protocolService.addActiveSubProtocols(protocols.activeSubProtocols.map(([_, protocol]) => protocol))\n }\n\n public async removeInstalledModules(identifiers: string[]): Promise<void> {\n const removedIdentifiers: string[] = await this.modulesController.removeInstalledModules(identifiers)\n await this.protocolService.removeProtocols(removedIdentifiers as ProtocolSymbols[])\n }\n\n public async removeAllInstalledModules(): Promise<void> {\n const removedIdentifiers: string[] = await this.modulesController.removeAllInstalledModules()\n await this.protocolService.removeProtocols(removedIdentifiers as ProtocolSymbols[])\n }\n\n private async adaptProtocols(modules: LoadedModule[], type?: ProtocolConfiguration['type']): Promise<AdaptedProtocol[]> {\n const adaptedProtocols: AdaptedProtocol[][] = await Promise.all(\n modules.map(async (module: LoadedModule) => {\n this.loadSerializerCompanion(module.v3SerializerCompanion)\n\n const activeProtocols: Record<string, ICoinProtocolAdapter> = {}\n const activeSubProtocols: [ICoinProtocolAdapter, ICoinSubProtocolAdapter][] = []\n\n const groupedProtocols: Record<string, LoadedProtocol> = await Promise.all(\n module.protocols.map(async (protocol: LoadedProtocol) => [await this.getProtocolKey(protocol.protocol, type), protocol])\n ).then((pairs: [string, LoadedProtocol][]) => {\n return pairs.reduce(\n (obj: Record<string, LoadedProtocol>, next: [string, LoadedProtocol]) => Object.assign(obj, { [next[0]]: next[1] }),\n {}\n )\n })\n\n for (const { protocol, blockExplorer } of Object.values(groupedProtocols)) {\n if (isSubProtocol(protocol)) {\n const adapter: ICoinSubProtocolAdapter = await createICoinSubProtocolAdapter(\n protocol,\n blockExplorer,\n module.v3SerializerCompanion,\n { type }\n )\n\n const mainKey: string = await this.getProtocolKey(\n await adapter.protocolV1.mainProtocol(),\n isOnlineProtocol(adapter.protocolV1) && (type === 'online' || type === 'full')\n ? await adapter.protocolV1.getNetwork()\n : undefined\n )\n\n if (!(mainKey in activeProtocols)) {\n const mainAdapter: ICoinProtocolAdapter = await createICoinProtocolAdapter(\n groupedProtocols[mainKey].protocol,\n groupedProtocols[mainKey].blockExplorer,\n module.v3SerializerCompanion,\n { type }\n )\n activeProtocols[mainKey] = mainAdapter\n }\n\n activeSubProtocols.push([activeProtocols[mainKey], adapter])\n } else {\n const key: string = await this.getProtocolKey(protocol, type)\n if (activeProtocols[key] !== undefined) {\n continue\n }\n\n const adapter: ICoinProtocolAdapter = await createICoinProtocolAdapter(protocol, blockExplorer, module.v3SerializerCompanion, {\n type\n })\n activeProtocols[key] = adapter\n }\n }\n\n const adaptedMainProtocols: AdaptedProtocol[] = Object.values(activeProtocols).map(\n (protocol): AdaptedMainProtocol => ({\n type: 'main',\n status: 'active',\n value: protocol\n })\n )\n\n const adaptedSubProtocols: AdaptedProtocol[] = activeSubProtocols.map(\n (protocol): AdaptedSubProtocol => ({\n type: 'sub',\n status: 'active',\n value: protocol\n })\n )\n\n return adaptedMainProtocols.concat(adaptedSubProtocols)\n })\n )\n\n return flattened(adaptedProtocols)\n }\n\n private loadSerializerCompanion(v3SerializerCompanion: AirGapV3SerializerCompanion) {\n v3SerializerCompanion.schemas.forEach((configuration: V3SchemaConfiguration) => {\n SerializerV3.addSchema(configuration.type, configuration.schema, configuration.protocolIdentifier as ProtocolSymbols)\n\n if (configuration.protocolIdentifier) {\n SerializerV3.addValidator(configuration.protocolIdentifier as ProtocolSymbols, {\n create(): TransactionValidator {\n return new TransactionValidatorAdapter(configuration.protocolIdentifier, v3SerializerCompanion)\n }\n })\n }\n })\n }\n\n private processAdaptedProtocols(protocols: AdaptedProtocol[]): Protocols {\n const activeProtocols: ICoinProtocol[] = []\n const passiveProtocols: ICoinProtocol[] = []\n\n const activeSubProtocols: [ICoinProtocol, ICoinSubProtocol][] = []\n const passiveSubProtocols: [ICoinProtocol, ICoinSubProtocol][] = []\n\n for (const protocol of protocols) {\n if (protocol.type === 'main' && protocol.status === 'active') {\n activeProtocols.push(protocol.value)\n }\n\n if (protocol.type === 'main' && protocol.status === 'passive') {\n passiveProtocols.push(protocol.value)\n }\n\n if (protocol.type === 'sub' && protocol.status === 'active') {\n activeSubProtocols.push(protocol.value)\n }\n\n if (protocol.type === 'sub' && protocol.status === 'passive') {\n passiveSubProtocols.push(protocol.value)\n }\n }\n\n return {\n activeProtocols,\n passiveProtocols,\n activeSubProtocols,\n passiveSubProtocols\n }\n }\n\n private async getProtocolKey(protocol: AirGapAnyProtocol, type?: ProtocolConfiguration['type']): Promise<string>\n private async getProtocolKey(protocolIdentifier: string, network: ProtocolNetwork | undefined): Promise<string>\n private async getProtocolKey(\n protocolOrIdentifier: AirGapAnyProtocol | string,\n networkOrTypeOrUndefined?: ProtocolNetwork | ProtocolConfiguration['type'] | undefined\n ): Promise<string> {\n const protocolIdentifier: string =\n typeof protocolOrIdentifier === 'string' ? protocolOrIdentifier : (await protocolOrIdentifier.getMetadata()).identifier\n\n const type: ProtocolConfiguration['type'] | undefined =\n typeof networkOrTypeOrUndefined === 'string' ? networkOrTypeOrUndefined : undefined\n\n const network: ProtocolNetwork | undefined =\n isOnlineProtocol(protocolOrIdentifier) && (type === 'online' || type === 'full')\n ? await protocolOrIdentifier.getNetwork()\n : typeof networkOrTypeOrUndefined === 'object'\n ? networkOrTypeOrUndefined\n : undefined\n\n if (!network) {\n return protocolIdentifier\n }\n\n return `${protocolIdentifier}_${protocolNetworkIdentifier(network)}`\n }\n}\n","import { AirGapWallet, ICoinProtocol, MainProtocolSymbols, UnsignedTransaction } from '@wallfree-dev/coinlib-core'\nimport { MessageSignRequest } from '@wallfree-dev/serializer'\nimport { Injectable } from '@angular/core'\nimport { ICoinProtocolAdapter } from '../../protocol/adapter/protocol-v0-adapter'\n\ntype Unsigned = UnsignedTransaction | MessageSignRequest\n\n@Injectable({\n providedIn: 'root'\n})\nexport class KeyPairService {\n public async signWithWallet(wallet: AirGapWallet, unsigned: Unsigned, mnemonic: string, password: string): Promise<string> {\n return this.signWithProtocol(wallet.protocol, unsigned, mnemonic, password, wallet.isExtendedPublicKey, wallet.derivationPath)\n }\n\n public async signWithProtocol(\n protocol: ICoinProtocol,\n unsigned: Unsigned,\n mnemonic: string,\n password: string,\n withExtendedPrivateKey: boolean = false,\n optionalDerivationPath?: string,\n childDerivationPath?: string\n ): Promise<string> {\n const derivationPath: string = optionalDerivationPath ?? (await protocol.getStandardDerivationPath())\n if (!(await this.checkPassword(protocol, unsigned, mnemonic, withExtendedPrivateKey, derivationPath, password))) {\n throw new Error('Invalid BIP-39 passphrase')\n }\n\n if (withExtendedPrivateKey) {\n const extendedPrivateKey: string = await protocol.getExtendedPrivateKeyFromMnemonic(mnemonic, derivationPath, password)\n\n if (this.isUnsignedTransaction(unsigned)) {\n return protocol.signWithExtendedPrivateKey(extendedPrivateKey, unsigned.transaction, childDerivationPath)\n } else {\n const privateKey = (await protocol.getIdentifier()).startsWith(MainProtocolSymbols.ETH)\n ? protocol instanceof ICoinProtocolAdapter\n ? await protocol.getPrivateKeyFromExtendedPrivateKey(extendedPrivateKey, childDerivationPath)\n : await (protocol as any).getPrivateKeyFromExtendedPrivateKey(extendedPrivateKey, childDerivationPath) // This only exists on ETH\n : extendedPrivateKey\n\n return protocol.signMessage(unsigned.message, { privateKey })\n }\n } else {\n const privateKey: string = await protocol.getPrivateKeyFromMnemonic(mnemonic, derivationPath, password)\n\n return this.isUnsignedTransaction(unsigned)\n ? protocol.signWithPrivateKey(privateKey, unsigned.transaction)\n : protocol.signMessage(unsigned.message, { privateKey })\n }\n }\n\n public async checkPassword(\n protocol: ICoinProtocol,\n unsigned: Unsigned,\n mnemonic: string,\n withExtendedPrivateKey: boolean = false,\n derivationPath: string,\n password: string\n ): Promise<boolean> {\n if (unsigned.publicKey.length === 0) {\n // the password can't be verified\n return true\n }\n\n const publicKey: string =\n withExtendedPrivateKey && (await protocol.getSupportsHD())\n ? await protocol.getExtendedPublicKeyFromMnemonic(mnemonic, derivationPath, password)\n : await protocol.getPublicKeyFromMnemonic(mnemonic, derivationPath, password)\n\n return publicKey === unsigned.publicKey\n }\n\n private isUnsignedTransaction(unsigned: Unsigned): unsigned is UnsignedTransaction {\n return 'transaction' in unsigned\n }\n}\n","import { Injectable } from '@angular/core'\nimport { TranslateService } from '@ngx-translate/core'\nimport { SupportedLanguage } from '../../types/SupportedLanguage'\n\nexport interface LanguageServiceConfig {\n supportedLanguages: SupportedLanguage[]\n defaultLanguage: SupportedLanguage\n useBrowserLanguage?: boolean\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LanguageService {\n private static readonly defaultLanguage: SupportedLanguage = 'en'\n\n public get supportedLanguages(): string[] {\n return this.translateService.getLangs()\n }\n\n constructor(private readonly translateService: TranslateService) {}\n\n public async init(\n config: LanguageServiceConfig = {\n supportedLanguages: [LanguageService.defaultLanguage],\n defaultLanguage: LanguageService.defaultLanguage,\n useBrowserLanguage: true\n }\n ): Promise<void> {\n const supportedLanguages: SupportedLanguage[] = config.supportedLanguages\n const defaultLanguage: SupportedLanguage = config.defaultLanguage\n const useBrowserLanguage: boolean = config.useBrowserLanguage ?? true\n\n if (supportedLanguages.find((supported: SupportedLanguage) => supported === defaultLanguage) === undefined) {\n supportedLanguages.push(defaultLanguage)\n }\n\n this.translateService.addLangs(supportedLanguages)\n this.translateService.setDefaultLang(defaultLanguage)\n\n const language: string = useBrowserLanguage ? this.translateService.getBrowserLang().toLowerCase() : defaultLanguage\n\n return this.changeLanguage(language)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n public loadTranslation(language: string, translation: any, merge: boolean = true): void {\n this.translateService.setTranslation(language, translation, merge)\n }\n\n public async changeLanguage(language: string): Promise<void> {\n return this.translateService.use(language).toPromise()\n }\n\n public isLanguageSupported(language: string): boolean {\n return this.supportedLanguages.find((supported: string) => supported === language) !== undefined\n }\n}\n","import { Injectable } from '@angular/core'\nimport { Diagnostic } from '@ionic-native/diagnostic/ngx'\nimport { Platform } from '@ionic/angular'\nimport { UiEventElementsService } from '../ui-event-elements/ui-event-elements.service'\n// import { ErrorCategory, handleErrorLocal } from '../error-handler/error-handler.service'\n\nexport enum PermissionStatus {\n GRANTED = 'GRANTED',\n NOT_REQUESTED = 'NOT_REQUESTED',\n DENIED_ALWAYS = 'DENIED_ALWAYS',\n DENIED = 'DENIED',\n UNKNOWN = 'UNKNOWN'\n}\n\nexport enum PermissionTypes {\n CAMERA = 'CAMERA',\n MICROPHONE = 'MICROPHONE'\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PermissionsService {\n constructor(\n private readonly uiEventElementsService: UiEventElementsService,\n private readonly platform: Platform,\n private readonly diagnostic: Diagnostic\n ) {}\n\n public async hasCameraPermission(): Promise<PermissionStatus> {\n const permission: PermissionStatus = await this.diagnostic.getCameraAuthorizationStatus(false)\n\n return this.getPermissionStatus(permission)\n }\n\n public async hasMicrophonePermission(): Promise<PermissionStatus> {\n const permission: PermissionStatus = await this.diagnostic.getMicrophoneAuthorizationStatus()\n\n return this.getPermissionStatus(permission)\n }\n\n public async requestPermissions(permissions: PermissionTypes[]): Promise<void> {\n if (this.platform.is('android')) {\n const permissionsToRequest: string[] = []\n if (permissions.indexOf(PermissionTypes.CAMERA) >= 0) {\n permissionsToRequest.push(this.diagnostic.permission.CAMERA)\n }\n if (permissions.indexOf(PermissionTypes.MICROPHONE) >= 0) {\n permissionsToRequest.push(this.diagnostic.permission.RECORD_AUDIO)\n }\n await this.diagnostic.requestRuntimePermissions(permissionsToRequest)\n } else if (this.platform.is('ios')) {\n if (permissions.indexOf(PermissionTypes.CAMERA) >= 0) {\n await this.diagnostic.requestCameraAuthorization(false)\n }\n if (permissions.indexOf(PermissionTypes.MICROPHONE) >= 0) {\n await this.diagnostic.requestMicrophoneAuthorization()\n }\n } else {\n // eslint-disable-next-line no-console\n console.warn('requesting permission in browser')\n }\n }\n\n /**\n * The user actively wants to give permissions. This means we first check if we\n * can ask him for the permissions natively, otherwise we show an alert with a\n * link to the settings.\n */\n public async userRequestsPermissions(permissions: PermissionTypes[]): Promise<void> {\n let canRequestPermission: boolean = false\n for (const p of permissions) {\n canRequestPermission = (await this.canAskForPermission(p)) || canRequestPermission\n }\n if (canRequestPermission) {\n await this.requestPermissions(permissions)\n } else {\n await this.uiEventElementsService.showOpenSettingsAlert(() => {\n // eslint-disable-next-line no-console\n this.diagnostic.switchToSettings().catch(console.error)\n })\n }\n }\n\n private async canAskForPermission(permission: PermissionTypes): Promise<boolean> {\n let canAskForPermission: boolean = true\n if (this.platform.is('android')) {\n if (permission === PermissionTypes.CAMERA) {\n const permissionStatus: PermissionStatus = await this.hasCameraPermission()\n canAskForPermission = !(permissionStatus === PermissionStatus.DENIED_ALWAYS)\n } else if (permission === PermissionTypes.MICROPHONE) {\n const permissionStatus: PermissionStatus = await this.hasMicrophonePermission()\n canAskForPermission = !(permissionStatus === PermissionStatus.DENIED_ALWAYS)\n }\n } else if (this.platform.is('ios')) {\n if (permission === PermissionTypes.CAMERA) {\n const permissionStatus: PermissionStatus = await this.hasCameraPermission()\n canAskForPermission = !(permissionStatus === PermissionStatus.DENIED)\n } else if (permission === PermissionTypes.MICROPHONE) {\n const permissionStatus: PermissionStatus = await this.hasMicrophonePermission()\n canAskForPermission = !(permissionStatus === PermissionStatus.DENIED)\n }\n }\n\n return canAskForPermission\n }\n\n private async getPermissionStatus(permission: PermissionStatus): Promise<PermissionStatus> {\n if (this.isGranted(permission)) {\n return PermissionStatus.GRANTED\n } else if (this.isNotRequested(permission)) {\n return PermissionStatus.NOT_REQUESTED\n } else if (this.isDeniedAlways(permission)) {\n return PermissionStatus.DENIED_ALWAYS\n } else if (this.isDenied(permission)) {\n return PermissionStatus.DENIED\n } else {\n return PermissionStatus.UNKNOWN\n }\n }\n\n private isGranted(permission: PermissionStatus): boolean {\n return permission === this.diagnostic.permissionStatus.GRANTED || permission === this.diagnostic.permissionStatus.GRANTED_WHEN_IN_USE\n }\n\n private isNotRequested(permission: PermissionStatus): boolean {\n return permission === this.diagnostic.permissionStatus.NOT_REQUESTED\n }\n\n private isDeniedAlways(permission: PermissionStatus): boolean {\n return permission === this.diagnostic.permissionStatus.DENIED_ALWAYS || permission === this.diagnostic.permissionStatus.RESTRICTED\n }\n\n private isDenied(permission: PermissionStatus): boolean {\n return !(this.isGranted(permission) || this.isNotRequested(permission))\n }\n}\n","import { Injectable } from '@angular/core'\nimport { Platform } from '@ionic/angular'\n\ndeclare let QRScanner: any\n@Injectable({\n providedIn: 'root'\n})\nexport class QrScannerService {\n /**\n * Shows if the scanner is currently active (scanning) or not\n */\n public isActive: boolean = false\n\n private readonly isMobile: boolean\n\n constructor(private readonly platform: Platform) {\n this.isMobile = this.platform.is('hybrid')\n }\n\n /**\n * Start the QR scanner. It will make the background of the page transparent and scan until a QR is detected.\n *\n * @param successCallback\n * @param errorCallback\n */\n public scan(successCallback: (text: string) => void, errorCallback: ((text: string) => void) | null = null): void {\n this.show()\n const scanCallback = (scanError: Error, text: string) => {\n if (scanError) {\n // eslint-disable-next-line no-console\n console.error('Scanner scan error', scanError)\n if (errorCallback) {\n // TODO: Check type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n errorCallback(scanError as any)\n }\n }\n\n // eslint-disable-next-line no-console\n console.log('Scanner scan success', text)\n successCallback(text)\n }\n\n QRScanner.scan(scanCallback)\n }\n\n public destroy(): void {\n if (this.isMobile) {\n this.isActive = false\n QRScanner.destroy()\n }\n }\n\n private show(): void {\n if (this.isMobile) {\n if (this.isActive) {\n return\n }\n this.isActive = true\n QRScanner.show()\n }\n }\n}\n","import { IAirGapTransaction, ICoinProtocol, SignedTransaction, UnsignedTransaction } from '@wallfree-dev/coinlib-core'\nimport { ERC20TokenMetadata, erc20Tokens } from '@wallfree-dev/ethereum'\nimport { Injectable } from '@angular/core'\n\nimport { Token } from '../../types/Token'\nimport { createV0EthereumERC20Token } from '../../utils/protocol/protocol-v0-adapter'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TokenService {\n public getRecipientToken(tx: IAirGapTransaction): Token | undefined {\n // Guard against undefined tx.to[0] (e.g., Solana transactions may have empty to array)\n if (!tx.to || !tx.to[0]) {\n return undefined\n }\n return Object.values(erc20Tokens).find((token: ERC20TokenMetadata) => token.contractAddress.toLowerCase() === tx.to[0].toLowerCase())\n }\n\n public async getTokenTransferDetailsFromSigned(\n tx: IAirGapTransaction,\n signedTransaction: SignedTransaction,\n recipientToken?: Token\n ): Promise<IAirGapTransaction> {\n const token: Token | undefined = recipientToken ?? this.getRecipientToken(tx)\n if (token !== undefined) {\n const genericErc20: ICoinProtocol = await createV0EthereumERC20Token(token)\n\n try {\n const transactions: IAirGapTransaction[] = await genericErc20.getTransactionDetailsFromSigned(signedTransaction)\n\n if (transactions.length !== 1) {\n throw Error('`getTransactionDetailsFromSigned` returned more than 1 transaction!')\n }\n\n return transactions[0]\n } catch (error) {}\n }\n\n return tx\n }\n\n public async getTokenTransferDetails(\n tx: IAirGapTransaction,\n unsignedTransaction: UnsignedTransaction,\n recipientToken?: Token\n ): Promise<IAirGapTransaction> {\n const token: Token | undefined = recipientToken ?? this.getRecipientToken(tx)\n if (token !== undefined) {\n const genericErc20: ICoinProtocol = await createV0EthereumERC20Token(token)\n\n try {\n const transactions: IAirGapTransaction[] = await genericErc20.getTransactionDetails(unsignedTransaction)\n if (transactions.length !== 1) {\n throw Error('`getTransactionDetails` returned more than 1 transaction!')\n }\n\n return transactions[0]\n } catch (error) {}\n }\n\n return tx\n }\n}\n","import { IAirGapTransaction, ICoinProtocol, SignedTransaction, UnsignedTransaction } from '@wallfree-dev/coinlib-core'\nimport { IACMessageDefinitionObjectV3, IACMessageType } from '@wallfree-dev/serializer'\nimport { Injectable } from '@angular/core'\n\nimport { Token } from '../../types/Token'\nimport { flattened } from '../../utils/array'\nimport { ProtocolService } from '../protocol/protocol.service'\nimport { TokenService } from '../token/token.service'\n\ninterface IACMessagesDetailsConfig {\n overrideProtocol?: ICoinProtocol\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TransactionService {\n constructor(private readonly protocolService: ProtocolService, private readonly tokenService: TokenService) {}\n\n public async getDetailsFromIACMessages(\n messages: IACMessageDefinitionObjectV3[],\n config?: IACMessagesDetailsConfig\n ): Promise<IAirGapTransaction[]> {\n const supportedMessageTypes: IACMessageType[] = [IACMessageType.TransactionSignRequest, IACMessageType.TransactionSignResponse]\n const details: IAirGapTransaction[][] = await Promise.all(\n messages.map(async (message: IACMessageDefinitionObjectV3) => {\n if (!supportedMessageTypes.includes(message.type)) {\n return []\n }\n\n const protocol: ICoinProtocol = config?.overrideProtocol ?? (await this.protocolService.getProtocol(message.protocol))\n\n switch (message.type) {\n case IACMessageType.TransactionSignRequest:\n return this.getDetailsFromUnsigned(protocol, message.payload as UnsignedTransaction, config?.data)\n case IACMessageType.TransactionSignResponse:\n return this.getDetailsFromSigned(protocol, message.payload as SignedTransaction, config?.data)\n default:\n return []\n }\n })\n )\n\n return flattened(details)\n }\n\n private async getDetailsFromUnsigned(\n protocol: ICoinProtocol,\n unsignedTransaction: UnsignedTransaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any\n ): Promise<IAirGapTransaction[]> {\n const unsignedDetails: IAirGapTransaction[] = await protocol.getTransactionDetails(unsignedTransaction, data)\n\n return Promise.all(\n unsignedDetails.map((details: IAirGapTransaction) => {\n const token: Token | undefined = this.tokenService.getRecipientToken(details)\n if (token !== undefined) {\n return this.tokenService.getTokenTransferDetails(details, unsignedTransaction, token)\n } else {\n return details\n }\n })\n )\n }\n\n private async getDetailsFromSigned(\n protocol: ICoinProtocol,\n signedTransaction: SignedTransaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data?: any\n ): Promise<IAirGapTransaction[]> {\n const unsignedDetails: IAirGapTransaction[] = await protocol.getTransactionDetailsFromSigned(signedTransaction, data)\n\n return Promise.all(\n unsignedDetails.map((details: IAirGapTransaction) => {\n const token: Token | undefined = this.tokenService.getRecipientToken(details)\n if (token !== undefined) {\n return this.tokenService.getTokenTransferDetailsFromSigned(details, signedTransaction, token)\n } else {\n return details\n }\n })\n )\n }\n}\n","export enum UIActionStatus {\n PENDING = 'pending',\n HANDLED = 'handled'\n}\n\nexport interface UIAction<T> {\n id: string\n value: T\n status: UIActionStatus\n}\n","import { implementsInterface } from '@wallfree-dev/module-kit'\nimport { IsolatedModuleMetadata } from '../../../types/isolated-modules/IsolatedModuleMetadata'\n\nexport function isIsolatedModuleMetadata(object: unknown): object is IsolatedModuleMetadata {\n return implementsInterface<IsolatedModuleMetadata>(object, {\n type: 'required',\n module: 'required',\n manifest: 'required',\n source: 'required'\n })\n}\n","import { IAirGapTransaction } from '@wallfree-dev/coinlib-core'\nimport BigNumber from 'bignumber.js'\n\nimport { flattened } from './array'\n\nexport function flattenAirGapTxAddresses(airGapTxs: IAirGapTransaction[], field: keyof Pick<IAirGapTransaction, 'from' | 'to'>): string[] {\n if (!airGapTxs || !Array.isArray(airGapTxs)) {\n return []\n }\n return flattened(airGapTxs.map((tx: IAirGapTransaction) => tx[field]))\n}\n\nexport function sumAirGapTxValues(airGapTxs: IAirGapTransaction[], field: keyof Pick<IAirGapTransaction, 'amount' | 'fee'>): string {\n if (!airGapTxs || !Array.isArray(airGapTxs)) {\n return '0'\n }\n return airGapTxs\n .reduce((sum: BigNumber, next: IAirGapTransaction) => {\n let nextValue: BigNumber = new BigNumber(next[field])\n if (nextValue.isNaN()) {\n nextValue = new BigNumber(0)\n }\n\n return sum.plus(nextValue)\n }, new BigNumber(0))\n .toFixed()\n}\n","import { Platform } from '@ionic/angular'\nimport {\n BatchCallMethodOptions,\n BatchCallMethodResult,\n BatchCallMethodSingleResult,\n CallMethodOptions,\n CallMethodResult,\n IsolatedModulesPlugin,\n LoadAllModulesOptions,\n LoadAllModulesResult,\n PreviewDynamicModuleOptions,\n PreviewDynamicModuleResult,\n ReadAssetModuleOptions,\n ReadAssetModuleResult,\n ReadDynamicModuleOptions,\n ReadDynamicModuleResult,\n RegisterDynamicModuleOptions,\n RemoveDynamicModulesOptions,\n VerifyDynamicModuleOptions,\n VerifyDynamicModuleResult\n} from '../definitions'\n\nconst UNDEFINED_STRING = 'it.airgap.__UNDEFINED__'\n\nexport class IsolatedModulesPluginWrapper implements IsolatedModulesPlugin {\n private readonly isMobile: boolean\n\n constructor(private readonly plugin: IsolatedModulesPlugin, platform: Platform) {\n this.isMobile = platform.is('hybrid')\n }\n\n public async previewDynamicModule(options: PreviewDynamicModuleOptions): Promise<PreviewDynamicModuleResult> {\n return this.plugin.previewDynamicModule(options)\n }\n\n public async verifyDynamicModule(options: VerifyDynamicModuleOptions): Promise<VerifyDynamicModuleResult> {\n return this.plugin.verifyDynamicModule(options)\n }\n\n public async registerDynamicModule(options: RegisterDynamicModuleOptions): Promise<void> {\n return this.plugin.registerDynamicModule(options)\n }\n\n public async readDynamicModule(options: ReadDynamicModuleOptions): Promise<ReadDynamicModuleResult> {\n return this.plugin.readDynamicModule(options)\n }\n\n public async removeDynamicModules(options?: RemoveDynamicModulesOptions): Promise<void> {\n return this.plugin.removeDynamicModules(options)\n }\n\n public async readAssetModule(options?: ReadAssetModuleOptions): Promise<ReadAssetModuleResult> {\n return this.plugin.readAssetModule(options)\n }\n\n public async loadAllModules(options: LoadAllModulesOptions): Promise<LoadAllModulesResult> {\n return this.plugin.loadAllModules(options)\n }\n\n private batchedCalls: CallMethodOptions[] = []\n private batchedCallsPromise: Promise<BatchCallMethodSingleResult[]> | undefined = undefined\n public async callMethod<T = unknown>(options: CallMethodOptions<T>): Promise<CallMethodResult> {\n const newLength = this.batchedCalls.push(options)\n const index = newLength - 1\n if (this.batchedCallsPromise === undefined) {\n this.batchedCallsPromise = new Promise<BatchCallMethodSingleResult[]>((resolve, reject) => {\n setTimeout(() => {\n this.batchCallMethod({ options: this.batchedCalls })\n .then(({ values }) => resolve(values))\n .catch(reject)\n\n this.batchedCalls = []\n this.batchedCallsPromise = undefined\n }, 100)\n })\n }\n const promise = this.batchedCallsPromise\n\n const singleResult: BatchCallMethodSingleResult = (await promise)[index]\n if (singleResult.type === 'success') {\n return { value: singleResult.value }\n } else {\n throw singleResult.error\n }\n }\n\n public async batchCallMethod(options: BatchCallMethodOptions): Promise<BatchCallMethodResult> {\n const newOptions: BatchCallMethodOptions = this.isMobile ? this.replaceUndefined(options) : options\n\n return this.plugin.batchCallMethod(newOptions)\n }\n\n private replaceUndefined<T>(value: T): T {\n if (Array.isArray(value)) {\n return value.map((v) => this.replaceUndefined(v)) as any as T\n }\n\n if (typeof value === 'object' && typeof value !== 'undefined' && value !== null) {\n return Object.entries(value).reduce((obj, [k, v]) => Object.assign(obj, { [k]: this.replaceUndefined(v) }), {} as T)\n }\n\n return (typeof value === 'undefined' ? UNDEFINED_STRING : value) as T\n }\n}\n","/* eslint-disable spaced-comment */\nimport {\n AirGapBlockExplorer,\n AirGapOfflineProtocol,\n AirGapOnlineProtocol,\n AirGapV3SerializerCompanion,\n ProtocolConfiguration\n} from '@wallfree-dev/module-kit'\nimport { registerPlugin } from '@capacitor/core'\nimport { Directory } from '@capacitor/filesystem'\nimport { Platform } from '@ionic/angular'\nimport { IsolatedModule } from '../types/isolated-modules/IsolatedModule'\nimport { IsolatedModuleManifest } from '../types/isolated-modules/IsolatedModuleManifest'\nimport { IsolatedModulesPluginWrapper } from './isolated-modules/isolated-modules.plugin-wrapper'\n\n/**************** AppInfoPlugin ****************/\n\nexport type AndroidFlavor = 'playstore' | 'fdroid'\n\nexport interface AppInfoPlugin {\n get(): Promise<{ appName: string; packageName: string; versionName: string; versionCode: number; productFlavor?: AndroidFlavor }>\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const AppInfo: AppInfoPlugin = registerPlugin('AppInfo')\n\n/**************** ZipPlugin ****************/\n\nexport interface ZipPlugin {\n unzip(params: { from: string; to: string; directory?: Directory; toDirectory?: Directory }): Promise<void>\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const Zip: ZipPlugin = registerPlugin('Zip')\n\n/**************** IsolatedModulesPlugin ****************/\n\nexport interface PreviewDynamicModuleOptions {\n path: string\n directory: Directory\n}\n\nexport interface PreviewDynamicModuleResult {\n module: IsolatedModule\n manifest: IsolatedModuleManifest\n}\n\nexport interface VerifyDynamicModuleOptions {\n path: string\n directory: Directory\n}\n\nexport interface VerifyDynamicModuleResult {\n verified: boolean\n}\n\nexport interface RegisterDynamicModuleOptions {\n identifier: string\n protocolIdentifiers: string[]\n}\n\nexport interface ReadDynamicModuleOptions {\n identifier: string\n}\n\nexport interface ReadDynamicModuleResult {\n manifest: IsolatedModuleManifest\n installedAt: string\n}\n\nexport interface RemoveDynamicModulesOptions {\n identifiers?: string[]\n}\n\nexport interface ReadAssetModuleOptions {\n identifier: string\n}\n\nexport interface ReadAssetModuleResult {\n manifest: IsolatedModuleManifest\n}\n\nexport interface LoadAllModulesOptions {\n protocolType?: ProtocolConfiguration['type']\n ignoreProtocols?: string[]\n}\n\nexport interface LoadAllModulesResult {\n modules: IsolatedModule[]\n}\n\ninterface AnyCallMethodOptions<T extends string, M> {\n target: T\n method: M\n args?: unknown[]\n}\n\nexport interface OfflineProtocolCallMethodOptions<T extends AirGapOfflineProtocol = AirGapOfflineProtocol>\n extends AnyCallMethodOptions<'offlineProtocol', keyof T> {\n protocolIdentifier: string\n}\nexport interface OnlineProtocolCallMethodOptions<T extends AirGapOnlineProtocol = AirGapOnlineProtocol>\n extends AnyCallMethodOptions<'onlineProtocol', keyof T> {\n protocolIdentifier: string\n networkId?: string\n}\nexport interface BlockExplorerCallMethodOptions<T extends AirGapBlockExplorer = AirGapBlockExplorer>\n extends AnyCallMethodOptions<'blockExplorer', keyof T> {\n protocolIdentifier: string\n networkId?: string\n}\nexport interface V3SerializerCompanionCallMethodOptions<T extends AirGapV3SerializerCompanion = AirGapV3SerializerCompanion>\n extends AnyCallMethodOptions<'v3SerializerCompanion', Exclude<keyof T, 'schemas'>> {\n moduleIdentifier: string\n}\n\nexport type CallMethodOptions<T = any> =\n | OfflineProtocolCallMethodOptions<T extends AirGapOfflineProtocol ? T : AirGapOfflineProtocol>\n | OnlineProtocolCallMethodOptions<T extends AirGapOnlineProtocol ? T : AirGapOnlineProtocol>\n | BlockExplorerCallMethodOptions<T extends AirGapBlockExplorer ? T : AirGapBlockExplorer>\n | V3SerializerCompanionCallMethodOptions<T extends AirGapV3SerializerCompanion ? T : AirGapV3SerializerCompanion>\n\nexport interface CallMethodResult {\n value: unknown\n}\n\nexport interface BatchCallMethodOptions {\n options: CallMethodOptions[]\n}\n\ninterface BatchCallMethodSingleSuccessResult {\n type: 'success'\n value: unknown\n}\ninterface BatchCallMethodSingleFailureResult {\n type: 'error'\n error: unknown\n}\n\nexport type BatchCallMethodSingleResult = BatchCallMethodSingleSuccessResult | BatchCallMethodSingleFailureResult\nexport interface BatchCallMethodResult {\n values: BatchCallMethodSingleResult[]\n}\n\nexport interface IsolatedModulesPlugin {\n previewDynamicModule(options: PreviewDynamicModuleOptions): Promise<PreviewDynamicModuleResult>\n verifyDynamicModule(options: VerifyDynamicModuleOptions): Promise<VerifyDynamicModuleResult>\n registerDynamicModule(options: RegisterDynamicModuleOptions): Promise<void>\n readDynamicModule(options: ReadDynamicModuleOptions): Promise<ReadDynamicModuleResult>\n\n removeDynamicModules(options?: RemoveDynamicModulesOptions): Promise<void>\n\n readAssetModule(options: ReadAssetModuleOptions): Promise<ReadAssetModuleResult>\n\n loadAllModules(options?: LoadAllModulesOptions): Promise<LoadAllModulesResult>\n\n callMethod<T = unknown>(options: CallMethodOptions<T>): Promise<CallMethodResult>\n batchCallMethod(options: BatchCallMethodOptions): Promise<BatchCallMethodResult>\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle\nconst _IsolatedModules: IsolatedModulesPlugin = registerPlugin('IsolatedModules', {\n web: () => import('./isolated-modules/isolated-modules.plugin').then((m) => new m.IsolatedModules())\n})\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function isolatedModules(platform: Platform): IsolatedModulesPlugin {\n return new IsolatedModulesPluginWrapper(_IsolatedModules, platform)\n}\n","/* eslint-disable max-lines */\n/* eslint-disable max-classes-per-file */\nimport { WebPlugin } from '@capacitor/core'\nimport { AeternityModule } from '@wallfree-dev/aeternity'\nimport { AstarModule } from '@wallfree-dev/astar'\nimport { BitcoinModule } from '@wallfree-dev/bitcoin'\nimport { CosmosModule } from '@wallfree-dev/cosmos'\nimport { EthereumModule } from '@wallfree-dev/ethereum'\nimport { GroestlcoinModule } from '@wallfree-dev/groestlcoin'\nimport { ICPModule } from '@wallfree-dev/icp'\nimport { CoreumModule } from '@wallfree-dev/coreum'\nimport { AcurastModule } from '@wallfree-dev/acurast'\nimport { StellarModule } from '@wallfree-dev/stellar'\nimport { TronModule } from '@wallfree-dev/tron'\n\nimport {\n AirGapAnyProtocol,\n AirGapBlockExplorer,\n AirGapModule,\n AirGapOfflineProtocol,\n AirGapOnlineProtocol,\n AirGapV3SerializerCompanion,\n BlockExplorerMetadata,\n CryptoConfiguration,\n hasConfigurableContract,\n isSubProtocol,\n OfflineProtocolConfiguration,\n OnlineProtocolConfiguration,\n ProtocolConfiguration,\n ProtocolMetadata,\n ProtocolNetwork,\n SubProtocolType\n} from '@wallfree-dev/module-kit'\nimport { MoonbeamModule } from '@wallfree-dev/moonbeam'\nimport { OptimismModule } from '@wallfree-dev/optimism'\nimport { PolkadotModule } from '@wallfree-dev/polkadot'\nimport { TezosModule } from '@wallfree-dev/tezos'\n\nimport {\n BatchCallMethodOptions,\n BatchCallMethodResult,\n BatchCallMethodSingleResult,\n BlockExplorerCallMethodOptions,\n CallMethodOptions,\n CallMethodResult,\n IsolatedModulesPlugin,\n LoadAllModulesOptions,\n LoadAllModulesResult,\n OfflineProtocolCallMethodOptions,\n OnlineProtocolCallMethodOptions,\n PreviewDynamicModuleOptions,\n PreviewDynamicModuleResult,\n ReadAssetModuleOptions,\n ReadAssetModuleResult,\n ReadDynamicModuleOptions,\n ReadDynamicModuleResult,\n RegisterDynamicModuleOptions,\n RemoveDynamicModulesOptions,\n V3SerializerCompanionCallMethodOptions,\n VerifyDynamicModuleOptions,\n VerifyDynamicModuleResult\n} from '../definitions'\nimport { flattened } from '../../utils/array'\nimport { assertNever } from '../../utils/utils'\nimport { IsolatedModule, IsolatedProtocol } from '../../types/isolated-modules/IsolatedModule'\nimport { getOfflineProtocolConfiguration, getOnlineProtocolConfiguration } from '../../utils/modules/load-protocol'\n\nexport class IsolatedModules extends WebPlugin implements IsolatedModulesPlugin {\n private readonly offlineProtocols: Record<string, AirGapOfflineProtocol> = {}\n private readonly onlineProtocols: Record<string, AirGapOnlineProtocol> = {}\n private readonly blockExplorers: Record<string, AirGapBlockExplorer> = {}\n private readonly v3SerializerCompanions: Record<string, AirGapV3SerializerCompanion> = {}\n\n private readonly moduleIndices: Record<string, number> = {}\n\n constructor(\n private readonly modules: AirGapModule[] = [\n new BitcoinModule(),\n new EthereumModule(),\n new TezosModule(),\n new PolkadotModule(),\n new CosmosModule(),\n new AeternityModule(),\n new GroestlcoinModule(),\n new MoonbeamModule(),\n new AstarModule(),\n new ICPModule(),\n new CoreumModule(),\n new OptimismModule(),\n new AcurastModule(),\n new StellarModule(),\n new TronModule()\n ]\n ) {\n super()\n }\n\n public async previewDynamicModule(_options: PreviewDynamicModuleOptions): Promise<PreviewDynamicModuleResult> {\n throw new Error('Dynamic isolated module preview not supported in a browser')\n }\n\n public async verifyDynamicModule(_options: VerifyDynamicModuleOptions): Promise<VerifyDynamicModuleResult> {\n throw new Error('Dynamic isolated module verification not supported in a browser')\n }\n\n public async registerDynamicModule(_options: RegisterDynamicModuleOptions): Promise<void> {\n throw new Error('Dynamic isolated module registration not supported in a browser')\n }\n\n public async readDynamicModule(_options: ReadDynamicModuleOptions): Promise<ReadDynamicModuleResult> {\n throw new Error('Dynamic isolated module read not supported in a browser')\n }\n\n public async removeDynamicModules(_options: RemoveDynamicModulesOptions): Promise<void> {\n throw new Error('Dynamic isolated module removal not supported in a browser')\n }\n\n public async readAssetModule(_options: ReadAssetModuleOptions): Promise<ReadAssetModuleResult> {\n throw new Error('Asset isolated module read not supported in a browser')\n }\n\n public async loadAllModules(options: LoadAllModulesOptions = {}): Promise<LoadAllModulesResult> {\n const modules: IsolatedModule[] = await Promise.all(\n this.modules.map((module: AirGapModule, index: number) =>\n this.loadModule(module, index, options.protocolType, new Set(options.ignoreProtocols ?? []))\n )\n )\n\n return { modules }\n }\n\n private async loadModule(\n module: AirGapModule,\n index: number,\n protocolType: ProtocolConfiguration['type'] | undefined,\n ignoreProtocols: Set<string>\n ): Promise<IsolatedModule> {\n const moduleIdentifier: string = index.toString()\n const v3SerializerCompanion: AirGapV3SerializerCompanion = await module.createV3SerializerCompanion()\n\n this.v3SerializerCompanions[moduleIdentifier] = v3SerializerCompanion\n\n const protocols: IsolatedProtocol[][] = await Promise.all(\n Object.entries(module.supportedProtocols)\n .filter(([identifier, _]) => !ignoreProtocols.has(identifier))\n .map(([identifier, configuration]: [string, ProtocolConfiguration]) =>\n this.loadModuleProtocols(module, index, identifier, configuration, protocolType)\n )\n )\n\n return {\n identifier: moduleIdentifier,\n type: 'static',\n protocols: flattened(protocols),\n v3SchemaConfigurations: v3SerializerCompanion.schemas\n }\n }\n\n private async loadModuleProtocols(\n module: AirGapModule,\n moduleIndex: number,\n identifier: string,\n configuration: ProtocolConfiguration,\n protocolType?: ProtocolConfiguration['type']\n ): Promise<IsolatedProtocol[]> {\n const offlineConfiguration: OfflineProtocolConfiguration | undefined = getOfflineProtocolConfiguration(configuration, protocolType)\n const onlineConfiguration: OnlineProtocolConfiguration | undefined = getOnlineProtocolConfiguration(configuration, protocolType)\n\n const [offlineProtocols, onlineProtocols]: [IsolatedProtocol[], IsolatedProtocol[]] = await Promise.all([\n offlineConfiguration ? this.loadOfflineProtocols(module, moduleIndex, identifier, offlineConfiguration) : Promise.resolve([]),\n onlineConfiguration ? this.loadOnlineProtocols(module, moduleIndex, identifier, onlineConfiguration) : Promise.resolve([])\n ])\n\n return offlineProtocols.concat(onlineProtocols)\n }\n\n private async loadOfflineProtocols(\n module: AirGapModule,\n moduleIndex: number,\n identifier: string,\n _configuration: OfflineProtocolConfiguration\n ): Promise<IsolatedProtocol[]> {\n const protocol: AirGapOfflineProtocol | undefined = await module.createOfflineProtocol(identifier)\n if (protocol === undefined) {\n return []\n }\n\n this.moduleIndices[identifier] = moduleIndex\n this.offlineProtocols[this.protocolKey(identifier)] = protocol\n\n const crypto: CryptoConfiguration = await protocol.getCryptoConfiguration()\n\n return [await this.getIsolatedProtocolConfiguration(protocol, 'offline', undefined, undefined, crypto)]\n }\n\n private async loadOnlineProtocols(\n module: AirGapModule,\n moduleIndex: number,\n identifier: string,\n configuration: OnlineProtocolConfiguration\n ): Promise<IsolatedProtocol[]> {\n const protocols: (IsolatedProtocol | undefined)[] = await Promise.all(\n Object.entries(configuration.networks).map(async ([networkId, _]: [string, ProtocolNetwork]) => {\n const [protocol, blockExplorer]: [AirGapOnlineProtocol | undefined, AirGapBlockExplorer | undefined] = await Promise.all([\n module.createOnlineProtocol(identifier, networkId),\n module.createBlockExplorer(identifier, networkId)\n ])\n if (protocol === undefined) {\n return undefined\n }\n\n this.moduleIndices[identifier] = moduleIndex\n this.onlineProtocols[this.protocolKey(identifier, networkId)] = protocol\n\n if (blockExplorer !== undefined) {\n this.blockExplorers[this.protocolKey(identifier, networkId)] = blockExplorer\n }\n\n const [network, blockExplorerMetadata]: [ProtocolNetwork, BlockExplorerMetadata | undefined] = await Promise.all([\n protocol.getNetwork(),\n blockExplorer?.getMetadata() ?? Promise.resolve(undefined)\n ])\n\n return this.getIsolatedProtocolConfiguration(protocol, 'online', blockExplorerMetadata, network)\n })\n )\n\n return protocols.filter((protocol: IsolatedProtocol | undefined) => protocol !== undefined)\n }\n\n private async getIsolatedProtocolConfiguration(\n protocol: AirGapAnyProtocol,\n mode: IsolatedProtocol['mode'],\n blockExplorerMetadata?: BlockExplorerMetadata,\n network?: ProtocolNetwork,\n crypto?: CryptoConfiguration\n ): Promise<IsolatedProtocol> {\n const protocolMetadata: ProtocolMetadata = await protocol.getMetadata()\n\n const configuration: Omit<IsolatedProtocol, 'type'> = {\n mode,\n identifier: protocolMetadata.identifier,\n protocolMetadata,\n blockExplorerMetadata: blockExplorerMetadata ?? null,\n network: network ?? null,\n methods: this.collectMethods(protocol),\n cachedValues: {\n getCryptoConfiguration: crypto\n }\n }\n\n if (isSubProtocol(protocol)) {\n const [subType, mainProtocol, contractAddress]: [SubProtocolType, string, string | undefined] = await Promise.all([\n protocol.getType(),\n protocol.mainProtocol(),\n hasConfigurableContract(protocol) ? protocol.getContractAddress() : Promise.resolve(undefined)\n ])\n\n return {\n ...configuration,\n type: 'sub',\n cachedValues: Object.assign(configuration.cachedValues, {\n getType: subType,\n mainProtocol,\n getContractAddress: contractAddress\n }),\n subType,\n mainProtocolIdentifier: mainProtocol,\n contractAddress: contractAddress ?? null\n }\n } else {\n return {\n ...configuration,\n type: 'main'\n }\n }\n }\n\n private collectMethods(protocol: AirGapAnyProtocol): string[] {\n let propertyNames: string[] = []\n let obj = protocol\n while (obj) {\n propertyNames = propertyNames.concat(Object.getOwnPropertyNames(obj))\n obj = Object.getPrototypeOf(obj)\n }\n\n return propertyNames.filter((key: string) => typeof protocol[key] === 'function')\n }\n\n public async callMethod(options: CallMethodOptions): Promise<CallMethodResult> {\n switch (options.target) {\n case 'offlineProtocol':\n return this.callOfflineProtocolMethod(options)\n case 'onlineProtocol':\n return this.callOnlineProtocolMethod(options)\n case 'blockExplorer':\n return this.callBlockExplorerMethod(options)\n case 'v3SerializerCompanion':\n return this.callV3SerializerCompanionMethod(options)\n default:\n assertNever('options', options)\n }\n }\n\n private async callOfflineProtocolMethod(options: OfflineProtocolCallMethodOptions): Promise<CallMethodResult> {\n const protocol: AirGapOfflineProtocol = await this.getOfflineProtocol(options.protocolIdentifier)\n const method = protocol[options.method].bind(protocol)\n\n return { value: await method(...(options.args ?? [])) }\n }\n\n private async callOnlineProtocolMethod(options: OnlineProtocolCallMethodOptions): Promise<CallMethodResult> {\n const protocol: AirGapOnlineProtocol = await this.getOnlineProtocol(options.protocolIdentifier, options.networkId)\n const method = protocol[options.method].bind(protocol)\n\n return { value: await method(...(options.args ?? [])) }\n }\n\n private async callBlockExplorerMethod(options: BlockExplorerCallMethodOptions): Promise<CallMethodResult> {\n const blockExplorer: AirGapBlockExplorer = await this.getBlockExplorer(options.protocolIdentifier, options.networkId)\n const method = blockExplorer[options.method].bind(blockExplorer)\n\n return { value: await method(...(options.args ?? [])) }\n }\n\n private async callV3SerializerCompanionMethod(options: V3SerializerCompanionCallMethodOptions): Promise<CallMethodResult> {\n const v3SerializerCompanion: AirGapV3SerializerCompanion = await this.getV3SerializerCompanion(options.moduleIdentifier)\n const method = v3SerializerCompanion[options.method].bind(v3SerializerCompanion)\n\n return { value: await method(...(options.args ?? [])) }\n }\n\n private async getOfflineProtocol(protocolIdentifier: string): Promise<AirGapOfflineProtocol | undefined> {\n return this.getModuleComponent(\n protocolIdentifier,\n undefined,\n this.offlineProtocols,\n (module: AirGapModule) => module.createOfflineProtocol(protocolIdentifier),\n (identifier: string) => this.moduleIndices[identifier]\n )\n }\n\n private async getOnlineProtocol(protocolIdentifier: string, networkId?: string): Promise<AirGapOnlineProtocol | undefined> {\n return this.getModuleComponent(\n protocolIdentifier,\n networkId,\n this.onlineProtocols,\n (module: AirGapModule) => module.createOnlineProtocol(protocolIdentifier, networkId),\n (identifier: string) => this.moduleIndices[identifier]\n )\n }\n\n private async getBlockExplorer(protocolIdentifier: string, networkId?: string): Promise<AirGapBlockExplorer | undefined> {\n return this.getModuleComponent(\n protocolIdentifier,\n networkId,\n this.blockExplorers,\n (module: AirGapModule) => module.createBlockExplorer(protocolIdentifier, networkId),\n (identifier: string) => this.moduleIndices[identifier]\n )\n }\n\n private async getV3SerializerCompanion(moduleIdentifier: string): Promise<AirGapV3SerializerCompanion | undefined> {\n return this.getModuleComponent(\n moduleIdentifier,\n undefined,\n this.v3SerializerCompanions,\n (module: AirGapModule) => module.createV3SerializerCompanion(),\n (identifier: string) => parseInt(identifier, 10)\n )\n }\n\n private async getModuleComponent<T>(\n identifier: string,\n networkId: string | undefined,\n componentCollection: Record<string, T>,\n createComponent: (module: AirGapModule) => Promise<T | undefined>,\n identifierToModuleIndex: (id: string) => number | undefined\n ): Promise<T | undefined> {\n const protocolKey: string = this.protocolKey(identifier, networkId)\n if (componentCollection[protocolKey] === undefined) {\n const moduleIndex: number | undefined = identifierToModuleIndex(identifier)\n if (moduleIndex === undefined) {\n return undefined\n }\n\n componentCollection[protocolKey] = await createComponent(this.modules[moduleIndex])\n }\n\n return componentCollection[protocolKey]\n }\n\n public async batchCallMethod(options: BatchCallMethodOptions): Promise<BatchCallMethodResult> {\n const values: BatchCallMethodSingleResult[] = await Promise.all(\n options.options.map(async (o: CallMethodOptions): Promise<BatchCallMethodSingleResult> => {\n try {\n const { value } = await this.callMethod(o)\n\n return { type: 'success', value }\n } catch (error) {\n return { type: 'error', error }\n }\n })\n )\n\n return { values }\n }\n\n private protocolKey(identifier: string, networkId?: string): string {\n return networkId ? `${identifier}_${networkId}` : identifier\n }\n}\n","/*\n * Public API Surface of core\n */\n\n// Core module\nexport * from './lib/airgap-angular-core.module'\n\n// Base\nexport * from './lib/base/base.component'\nexport * from './lib/base/base.facade'\n\n// Components\nexport * from './lib/components/components.module'\nexport * from './lib/components/currency-symbol/currency-symbol.component'\nexport * from './lib/components/currency-symbol/currency-symbol.facade'\nexport * from './lib/components/currency-symbol/currency-symbol.types'\nexport * from './lib/components/from-to/from-to.component'\nexport * from './lib/components/iac-qr/iac-qr.component'\nexport * from './lib/components/identicon/identicon.component'\nexport * from './lib/components/isolated-modules-badges/isolated-modules-badges.component'\nexport * from './lib/components/isolated-modules-details/isolated-modules-details.component'\nexport * from './lib/components/isolated-modules-details/isolated-modules-details.facade'\nexport * from './lib/components/isolated-modules-list/isolated-modules-list.component'\nexport * from './lib/components/isolated-modules-list/isolated-modules-list.facade'\nexport * from './lib/components/isolated-modules-onboarding/isolated-modules-onboarding.component'\nexport * from './lib/components/network-badge/network-badge.component'\nexport * from './lib/components/titled-address/titled-address.component'\nexport * from './lib/components/titled-text/titled-text.component'\nexport * from './lib/components/account-item/account-item.component'\nexport * from './lib/components/account-selection/account-selection.component'\nexport * from './lib/components/qr/qr.component'\nexport * from './lib/components/qr-settings/qr-settings.component'\n\n// Config\nexport * from './lib/config/app-config'\n\n// Translation\nexport * from './lib/translation/AirGapTranslateLoader'\n\n// Pages\nexport * from './lib/pages/isolated-modules-list/isolated-modules-list.facade'\n\n// Pipes\nexport * from './lib/pipes/pipes.module'\nexport * from './lib/pipes/amount-converter/amount-converter.pipe'\nexport * from './lib/pipes/fee-converter/fee-converter.pipe'\nexport * from './lib/pipes/wallet-filter/wallet-filter.pipe'\n\n// Protocol\nexport * from './lib/protocol/isolated/block-explorer-isolated'\nexport * from './lib/protocol/isolated/protocol-offline-isolated'\nexport * from './lib/protocol/isolated/protocol-online-isolated'\nexport * from './lib/protocol/isolated/v3-serializer-companion-isolated'\nexport * from './lib/protocol/adapter/protocol-v0-adapter'\n\n// Services\nexport * from './lib/services/address/address.service'\nexport * from './lib/services/clipboard/clipboard.service'\nexport * from './lib/services/deeplink/deeplink.service'\nexport * from './lib/services/environment/base-environment.service'\nexport * from './lib/services/filesystem/filesystem.service'\nexport * from './lib/services/iac/base.iac.service'\nexport * from './lib/services/iac/message-handler'\nexport * from './lib/services/iac/message-handler-single'\nexport * from './lib/services/modules/base-modules.service'\nexport * from './lib/services/modules/controller/modules.controller'\nexport * from './lib/services/modules/controller/integral/integral-modules.controller'\nexport * from './lib/services/modules/controller/isolated/isolated-modules.controller'\nexport * from './lib/services/key-pair/key-pair.service'\nexport * from './lib/services/language/language.service'\nexport * from './lib/services/permissions/permissions.service'\nexport * from './lib/services/protocol/protocol.service'\nexport * from './lib/services/protocol/store/main/main-protocol-store.service'\nexport * from './lib/services/protocol/store/sub/sub-protocol-store.service'\nexport * from './lib/services/qr-scanner/qr-scanner.service'\nexport * from './lib/services/serializer/serializer.service'\nexport * from './lib/services/storage/base.storage'\nexport * from './lib/services/storage/storage.service'\nexport * from './lib/services/transaction/transaction.service'\nexport * from './lib/services/ui-event/ui-event.service'\nexport * from './lib/services/ui-event-elements/ui-event-elements.service'\nexport * from './lib/services/uri/uri.service'\n\n// Types\nexport * from './lib/types/isolated-modules/IsolatedModule'\nexport * from './lib/types/isolated-modules/IsolatedModuleManifest'\nexport * from './lib/types/isolated-modules/IsolatedModuleMetadata'\nexport * from './lib/types/ui/UIAction'\nexport * from './lib/types/ui/UIResource'\nexport * from './lib/types/Either'\nexport * from './lib/types/ExternalAliasResolver'\nexport * from './lib/types/RuntimeMode'\nexport * from './lib/types/SupportedLanguage'\nexport * from './lib/types/Token'\n\n// Utils\nexport * from './lib/utils/modules/isolated/isolated-modules-metadata'\nexport * from './lib/utils/modules/load-protocol'\nexport * from './lib/utils/protocol/delegation'\nexport * from './lib/utils/protocol/protocol-identifier'\nexport * from './lib/utils/protocol/protocol-network-identifier'\nexport * from './lib/utils/protocol/protocol-v0-adapter'\nexport * from './lib/utils/airgap-transaction'\nexport * from './lib/utils/array'\nexport * from './lib/utils/ExposedPromise'\nexport * from './lib/utils/not-initialized'\nexport * from './lib/utils/utils'\nexport * from './lib/utils/worker'\n\n// Capacitor\nexport * from './lib/capacitor-plugins/definitions'\nexport * from './lib/capacitor-plugins/injection-tokens'\nexport { IsolatedModules as WebIsolatedModules } from './lib/capacitor-plugins/isolated-modules/isolated-modules.plugin'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ProtocolBlockExplorerV0","ProtocolNetworkV0","NetworkTypeV0","SubProtocolTypeV0","ProtocolNetworkTypeV0","createEthereumERC20Token","createOptimismERC20Token","AirGapTransactionStatusV0","BigNumber","i1.UriService","i2.ImageService","i1.FilesystemService","i1.IntegralModulesController","i2.IsolatedModulesController","i1.BaseEnvironmentService","i2.ModulesController","i1.MainProtocolStoreService","i2.SubProtocolStoreService","i1.ProtocolService","i2","i1.UiEventService","i1","i3","i3.IdenticonComponent","i4.TitledTextComponent","i5.CurrencySymbolComponent","i1.ClipboardService","i5.TitledAddressComponent","i6.NetworkBadgeComponent","i7","i8.AmountConverterPipe","i9.FeeConverterPipe","i4.CurrencySymbolComponent","i3.AccountItemComponent","i1.InternalStorageService","i1.SerializerService","i4","bs58check","i5","i6.QrComponent","i3.IsolatedModulesBadgesComponent","i2.BaseEnvironmentService","i1.UiEventElementsService","i2.SerializerService","i1.ModulesController","i2.ProtocolService","i2.TokenService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAEY;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,oBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,oBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,GAAA,EAAA,CAAA,CAAA;AAShC,MAAM,cAAc,GAAG,MAAY;AACjC,IAAA,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC;AACxD,CAAC;MAEY,cAAc,CAAA;AASzB,IAAA,IAAW,OAAO,GAAA;QAChB,OAAO,IAAI,CAAC,QAAQ;IACtB;AAEA,IAAA,IAAW,OAAO,GAAA;QAChB,OAAO,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