@hsuite/native-connect-angular 2.1.1 → 2.1.2

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 (287) hide show
  1. package/LICENSE +146 -0
  2. package/package.json +30 -13
  3. package/USAGE_EXAMPLES.md +0 -476
  4. package/assets/wallets/extension.svg +0 -7
  5. package/assets/wallets/hashpack.svg +0 -6
  6. package/assets/wallets/hsuite.svg +0 -11
  7. package/assets/wallets/kabila.svg +0 -11
  8. package/assets/wallets/walletconnect.svg +0 -13
  9. package/coverage/base.css +0 -224
  10. package/coverage/block-navigation.js +0 -87
  11. package/coverage/coverage-summary.json +0 -54
  12. package/coverage/favicon.png +0 -0
  13. package/coverage/index.html +0 -476
  14. package/coverage/lcov-report/base.css +0 -224
  15. package/coverage/lcov-report/block-navigation.js +0 -87
  16. package/coverage/lcov-report/favicon.png +0 -0
  17. package/coverage/lcov-report/index.html +0 -476
  18. package/coverage/lcov-report/lib/components/account-selector/account-actions/account-actions.component.ts.html +0 -868
  19. package/coverage/lcov-report/lib/components/account-selector/account-actions/index.html +0 -116
  20. package/coverage/lcov-report/lib/components/account-selector/account-filter/account-filter.component.ts.html +0 -1288
  21. package/coverage/lcov-report/lib/components/account-selector/account-filter/index.html +0 -116
  22. package/coverage/lcov-report/lib/components/account-selector/account-formatting.service.ts.html +0 -679
  23. package/coverage/lcov-report/lib/components/account-selector/account-grouping.service.ts.html +0 -766
  24. package/coverage/lcov-report/lib/components/account-selector/account-list/account-list.component.ts.html +0 -1495
  25. package/coverage/lcov-report/lib/components/account-selector/account-list/index.html +0 -116
  26. package/coverage/lcov-report/lib/components/account-selector/account-selector.component.ts.html +0 -1495
  27. package/coverage/lcov-report/lib/components/account-selector/account-selector.service.ts.html +0 -1588
  28. package/coverage/lcov-report/lib/components/account-selector/index.html +0 -161
  29. package/coverage/lcov-report/lib/components/wallet-account-display/index.html +0 -116
  30. package/coverage/lcov-report/lib/components/wallet-account-display/wallet-account-display.component.ts.html +0 -505
  31. package/coverage/lcov-report/lib/components/wallet-connect-button/index.html +0 -116
  32. package/coverage/lcov-report/lib/components/wallet-connect-button/wallet-connect-button.component.ts.html +0 -829
  33. package/coverage/lcov-report/lib/components/wallet-connect-prompt/index.html +0 -116
  34. package/coverage/lcov-report/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts.html +0 -409
  35. package/coverage/lcov-report/lib/components/wallet-connected-guard/index.html +0 -116
  36. package/coverage/lcov-report/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts.html +0 -304
  37. package/coverage/lcov-report/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts.html +0 -436
  38. package/coverage/lcov-report/lib/components/wallet-connection-modal/connection-method-step/index.html +0 -116
  39. package/coverage/lcov-report/lib/components/wallet-connection-modal/index.html +0 -116
  40. package/coverage/lcov-report/lib/components/wallet-connection-modal/qr-pairing-step/index.html +0 -116
  41. package/coverage/lcov-report/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts.html +0 -2287
  42. package/coverage/lcov-report/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts.html +0 -2518
  43. package/coverage/lcov-report/lib/components/wallet-session-display/index.html +0 -116
  44. package/coverage/lcov-report/lib/components/wallet-session-display/wallet-session-display.component.ts.html +0 -676
  45. package/coverage/lcov-report/lib/components/wallet-transaction-status/index.html +0 -116
  46. package/coverage/lcov-report/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts.html +0 -703
  47. package/coverage/lcov-report/lib/directives/index.html +0 -146
  48. package/coverage/lcov-report/lib/directives/wallet-connected.directive.ts.html +0 -670
  49. package/coverage/lcov-report/lib/directives/wallet-context.directive.ts.html +0 -547
  50. package/coverage/lcov-report/lib/directives/wallet-events.directive.ts.html +0 -781
  51. package/coverage/lcov-report/lib/hsuite-wallet.module.ts.html +0 -715
  52. package/coverage/lcov-report/lib/index.html +0 -116
  53. package/coverage/lcov-report/lib/models/connection-config.model.ts.html +0 -280
  54. package/coverage/lcov-report/lib/models/index.html +0 -131
  55. package/coverage/lcov-report/lib/models/provider-types.ts.html +0 -583
  56. package/coverage/lcov-report/lib/providers/base-wallet-provider.ts.html +0 -1138
  57. package/coverage/lcov-report/lib/providers/hsuite-native/channel-client.service.ts.html +0 -2674
  58. package/coverage/lcov-report/lib/providers/hsuite-native/index.html +0 -116
  59. package/coverage/lcov-report/lib/providers/hsuite-native-provider.ts.html +0 -2347
  60. package/coverage/lcov-report/lib/providers/index.html +0 -146
  61. package/coverage/lcov-report/lib/providers/p2p-native/index.html +0 -131
  62. package/coverage/lcov-report/lib/providers/p2p-native/p2p-native.provider.ts.html +0 -2254
  63. package/coverage/lcov-report/lib/providers/p2p-native/p2p-session-manager.ts.html +0 -2173
  64. package/coverage/lcov-report/lib/providers/wallet-error-handler.ts.html +0 -1132
  65. package/coverage/lcov-report/lib/providers/walletconnect/core/index.html +0 -176
  66. package/coverage/lcov-report/lib/providers/walletconnect/core/session-health.ts.html +0 -673
  67. package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-client-manager.ts.html +0 -1177
  68. package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-provider.ts.html +0 -2566
  69. package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-session-store.ts.html +0 -904
  70. package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts.html +0 -982
  71. package/coverage/lcov-report/lib/providers/walletconnect/signers/hedera-signer.ts.html +0 -1915
  72. package/coverage/lcov-report/lib/providers/walletconnect/signers/index.html +0 -146
  73. package/coverage/lcov-report/lib/providers/walletconnect/signers/signer-factory.ts.html +0 -445
  74. package/coverage/lcov-report/lib/providers/walletconnect/signers/xrpl-signer.ts.html +0 -1519
  75. package/coverage/lcov-report/lib/services/hsuite-auth.interceptor.ts.html +0 -568
  76. package/coverage/lcov-report/lib/services/index.html +0 -221
  77. package/coverage/lcov-report/lib/services/logger.service.ts.html +0 -463
  78. package/coverage/lcov-report/lib/services/smart-session.service.ts.html +0 -1264
  79. package/coverage/lcov-report/lib/services/transaction-builders/active-account-source.ts.html +0 -250
  80. package/coverage/lcov-report/lib/services/transaction-builders/base-transaction-builder.service.ts.html +0 -1840
  81. package/coverage/lcov-report/lib/services/transaction-builders/hedera-amount-utils.ts.html +0 -337
  82. package/coverage/lcov-report/lib/services/transaction-builders/hedera-transaction-builder.service.ts.html +0 -3940
  83. package/coverage/lcov-report/lib/services/transaction-builders/index.html +0 -176
  84. package/coverage/lcov-report/lib/services/transaction-builders/xrpl-transaction-builder.service.ts.html +0 -2581
  85. package/coverage/lcov-report/lib/services/transaction.service.ts.html +0 -1120
  86. package/coverage/lcov-report/lib/services/unified-wallet.service.ts.html +0 -2638
  87. package/coverage/lcov-report/lib/services/wallet-context.service.ts.html +0 -637
  88. package/coverage/lcov-report/lib/services/wallet-event-bus.service.ts.html +0 -643
  89. package/coverage/lcov-report/lib/services/wallet-providers.service.ts.html +0 -493
  90. package/coverage/lcov-report/lib/transports/chrome-extension-transport.ts.html +0 -823
  91. package/coverage/lcov-report/lib/transports/index.html +0 -116
  92. package/coverage/lcov-report/lib/utils/index.html +0 -131
  93. package/coverage/lcov-report/lib/utils/ledger-icons.util.ts.html +0 -412
  94. package/coverage/lcov-report/lib/utils/ledger-ui-registry.ts.html +0 -676
  95. package/coverage/lcov-report/prettify.css +0 -1
  96. package/coverage/lcov-report/prettify.js +0 -2
  97. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  98. package/coverage/lcov-report/sorter.js +0 -210
  99. package/coverage/lcov.info +0 -20366
  100. package/coverage/lib/components/account-selector/account-actions/account-actions.component.ts.html +0 -868
  101. package/coverage/lib/components/account-selector/account-actions/index.html +0 -116
  102. package/coverage/lib/components/account-selector/account-filter/account-filter.component.ts.html +0 -1288
  103. package/coverage/lib/components/account-selector/account-filter/index.html +0 -116
  104. package/coverage/lib/components/account-selector/account-formatting.service.ts.html +0 -679
  105. package/coverage/lib/components/account-selector/account-grouping.service.ts.html +0 -766
  106. package/coverage/lib/components/account-selector/account-list/account-list.component.ts.html +0 -1495
  107. package/coverage/lib/components/account-selector/account-list/index.html +0 -116
  108. package/coverage/lib/components/account-selector/account-selector.component.ts.html +0 -1495
  109. package/coverage/lib/components/account-selector/account-selector.service.ts.html +0 -1588
  110. package/coverage/lib/components/account-selector/index.html +0 -161
  111. package/coverage/lib/components/wallet-account-display/index.html +0 -116
  112. package/coverage/lib/components/wallet-account-display/wallet-account-display.component.ts.html +0 -505
  113. package/coverage/lib/components/wallet-connect-button/index.html +0 -116
  114. package/coverage/lib/components/wallet-connect-button/wallet-connect-button.component.ts.html +0 -829
  115. package/coverage/lib/components/wallet-connect-prompt/index.html +0 -116
  116. package/coverage/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts.html +0 -409
  117. package/coverage/lib/components/wallet-connected-guard/index.html +0 -116
  118. package/coverage/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts.html +0 -304
  119. package/coverage/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts.html +0 -436
  120. package/coverage/lib/components/wallet-connection-modal/connection-method-step/index.html +0 -116
  121. package/coverage/lib/components/wallet-connection-modal/index.html +0 -116
  122. package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/index.html +0 -116
  123. package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts.html +0 -2287
  124. package/coverage/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts.html +0 -2518
  125. package/coverage/lib/components/wallet-session-display/index.html +0 -116
  126. package/coverage/lib/components/wallet-session-display/wallet-session-display.component.ts.html +0 -676
  127. package/coverage/lib/components/wallet-transaction-status/index.html +0 -116
  128. package/coverage/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts.html +0 -703
  129. package/coverage/lib/directives/index.html +0 -146
  130. package/coverage/lib/directives/wallet-connected.directive.ts.html +0 -670
  131. package/coverage/lib/directives/wallet-context.directive.ts.html +0 -547
  132. package/coverage/lib/directives/wallet-events.directive.ts.html +0 -781
  133. package/coverage/lib/hsuite-wallet.module.ts.html +0 -715
  134. package/coverage/lib/index.html +0 -116
  135. package/coverage/lib/models/connection-config.model.ts.html +0 -280
  136. package/coverage/lib/models/index.html +0 -131
  137. package/coverage/lib/models/provider-types.ts.html +0 -583
  138. package/coverage/lib/providers/base-wallet-provider.ts.html +0 -1138
  139. package/coverage/lib/providers/hsuite-native/channel-client.service.ts.html +0 -2674
  140. package/coverage/lib/providers/hsuite-native/index.html +0 -116
  141. package/coverage/lib/providers/hsuite-native-provider.ts.html +0 -2347
  142. package/coverage/lib/providers/index.html +0 -146
  143. package/coverage/lib/providers/p2p-native/index.html +0 -131
  144. package/coverage/lib/providers/p2p-native/p2p-native.provider.ts.html +0 -2254
  145. package/coverage/lib/providers/p2p-native/p2p-session-manager.ts.html +0 -2173
  146. package/coverage/lib/providers/wallet-error-handler.ts.html +0 -1132
  147. package/coverage/lib/providers/walletconnect/core/index.html +0 -176
  148. package/coverage/lib/providers/walletconnect/core/session-health.ts.html +0 -673
  149. package/coverage/lib/providers/walletconnect/core/walletconnect-client-manager.ts.html +0 -1177
  150. package/coverage/lib/providers/walletconnect/core/walletconnect-provider.ts.html +0 -2566
  151. package/coverage/lib/providers/walletconnect/core/walletconnect-session-store.ts.html +0 -904
  152. package/coverage/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts.html +0 -982
  153. package/coverage/lib/providers/walletconnect/signers/hedera-signer.ts.html +0 -1915
  154. package/coverage/lib/providers/walletconnect/signers/index.html +0 -146
  155. package/coverage/lib/providers/walletconnect/signers/signer-factory.ts.html +0 -445
  156. package/coverage/lib/providers/walletconnect/signers/xrpl-signer.ts.html +0 -1519
  157. package/coverage/lib/services/hsuite-auth.interceptor.ts.html +0 -568
  158. package/coverage/lib/services/index.html +0 -221
  159. package/coverage/lib/services/logger.service.ts.html +0 -463
  160. package/coverage/lib/services/smart-session.service.ts.html +0 -1264
  161. package/coverage/lib/services/transaction-builders/active-account-source.ts.html +0 -250
  162. package/coverage/lib/services/transaction-builders/base-transaction-builder.service.ts.html +0 -1840
  163. package/coverage/lib/services/transaction-builders/hedera-amount-utils.ts.html +0 -337
  164. package/coverage/lib/services/transaction-builders/hedera-transaction-builder.service.ts.html +0 -3940
  165. package/coverage/lib/services/transaction-builders/index.html +0 -176
  166. package/coverage/lib/services/transaction-builders/xrpl-transaction-builder.service.ts.html +0 -2581
  167. package/coverage/lib/services/transaction.service.ts.html +0 -1120
  168. package/coverage/lib/services/unified-wallet.service.ts.html +0 -2638
  169. package/coverage/lib/services/wallet-context.service.ts.html +0 -637
  170. package/coverage/lib/services/wallet-event-bus.service.ts.html +0 -643
  171. package/coverage/lib/services/wallet-providers.service.ts.html +0 -493
  172. package/coverage/lib/transports/chrome-extension-transport.ts.html +0 -823
  173. package/coverage/lib/transports/index.html +0 -116
  174. package/coverage/lib/utils/index.html +0 -131
  175. package/coverage/lib/utils/ledger-icons.util.ts.html +0 -412
  176. package/coverage/lib/utils/ledger-ui-registry.ts.html +0 -676
  177. package/coverage/prettify.css +0 -1
  178. package/coverage/prettify.js +0 -2
  179. package/coverage/sort-arrow-sprite.png +0 -0
  180. package/coverage/sorter.js +0 -210
  181. package/examples/minimal-connect.ts +0 -178
  182. package/examples/multi-protocol.ts +0 -495
  183. package/examples/transaction-signing.ts +0 -361
  184. package/jest.config.json +0 -45
  185. package/karma.conf.js +0 -42
  186. package/ng-package.json +0 -20
  187. package/src/index.ts +0 -229
  188. package/src/lib/components/account-selector/account-actions/account-actions.component.ts +0 -261
  189. package/src/lib/components/account-selector/account-filter/account-filter.component.ts +0 -401
  190. package/src/lib/components/account-selector/account-formatting.service.ts +0 -198
  191. package/src/lib/components/account-selector/account-grouping.service.ts +0 -227
  192. package/src/lib/components/account-selector/account-list/account-list.component.ts +0 -470
  193. package/src/lib/components/account-selector/account-selector.component.html +0 -135
  194. package/src/lib/components/account-selector/account-selector.component.scss +0 -2039
  195. package/src/lib/components/account-selector/account-selector.component.ts +0 -470
  196. package/src/lib/components/account-selector/account-selector.service.ts +0 -501
  197. package/src/lib/components/wallet-account-display/wallet-account-display.component.html +0 -34
  198. package/src/lib/components/wallet-account-display/wallet-account-display.component.scss +0 -99
  199. package/src/lib/components/wallet-account-display/wallet-account-display.component.ts +0 -140
  200. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.html +0 -14
  201. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.scss +0 -272
  202. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.spec.ts +0 -89
  203. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.ts +0 -248
  204. package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.html +0 -24
  205. package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.scss +0 -50
  206. package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts +0 -108
  207. package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.html +0 -24
  208. package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts +0 -73
  209. package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.html +0 -56
  210. package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.scss +0 -218
  211. package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts +0 -117
  212. package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.html +0 -94
  213. package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.scss +0 -272
  214. package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts +0 -734
  215. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.html +0 -192
  216. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.scss +0 -678
  217. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.spec.ts +0 -173
  218. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts +0 -811
  219. package/src/lib/components/wallet-session-display/wallet-session-display.component.html +0 -110
  220. package/src/lib/components/wallet-session-display/wallet-session-display.component.scss +0 -179
  221. package/src/lib/components/wallet-session-display/wallet-session-display.component.ts +0 -197
  222. package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.html +0 -65
  223. package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.scss +0 -254
  224. package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts +0 -206
  225. package/src/lib/directives/wallet-connected.directive.ts +0 -195
  226. package/src/lib/directives/wallet-context.directive.ts +0 -154
  227. package/src/lib/directives/wallet-events.directive.ts +0 -232
  228. package/src/lib/hsuite-wallet.module.ts +0 -210
  229. package/src/lib/models/connection-config.model.ts +0 -65
  230. package/src/lib/models/provider-types.ts +0 -166
  231. package/src/lib/models/unified-account.model.ts +0 -79
  232. package/src/lib/models/wallet-context.model.ts +0 -121
  233. package/src/lib/models/wallet-events.model.ts +0 -158
  234. package/src/lib/providers/base-wallet-provider.ts +0 -351
  235. package/src/lib/providers/hsuite-native/channel-client.service.spec.ts +0 -73
  236. package/src/lib/providers/hsuite-native/channel-client.service.ts +0 -863
  237. package/src/lib/providers/hsuite-native/index.ts +0 -8
  238. package/src/lib/providers/hsuite-native-provider.ts +0 -754
  239. package/src/lib/providers/mobile-native/mobile-native.provider.spec.ts +0 -19
  240. package/src/lib/providers/p2p-native/index.ts +0 -30
  241. package/src/lib/providers/p2p-native/p2p-native.provider.spec.ts +0 -523
  242. package/src/lib/providers/p2p-native/p2p-native.provider.ts +0 -723
  243. package/src/lib/providers/p2p-native/p2p-session-manager.ts +0 -696
  244. package/src/lib/providers/wallet-error-handler.ts +0 -349
  245. package/src/lib/providers/walletconnect/core/base-signer.interface.ts +0 -122
  246. package/src/lib/providers/walletconnect/core/session-health.ts +0 -196
  247. package/src/lib/providers/walletconnect/core/walletconnect-client-manager.ts +0 -364
  248. package/src/lib/providers/walletconnect/core/walletconnect-provider.integration.spec.ts +0 -348
  249. package/src/lib/providers/walletconnect/core/walletconnect-provider.ts +0 -827
  250. package/src/lib/providers/walletconnect/core/walletconnect-session-store.ts +0 -273
  251. package/src/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts +0 -299
  252. package/src/lib/providers/walletconnect/core/walletconnect-types.ts +0 -48
  253. package/src/lib/providers/walletconnect/index.ts +0 -33
  254. package/src/lib/providers/walletconnect/signers/hedera-signer.spec.ts +0 -367
  255. package/src/lib/providers/walletconnect/signers/hedera-signer.ts +0 -610
  256. package/src/lib/providers/walletconnect/signers/signer-factory.spec.ts +0 -62
  257. package/src/lib/providers/walletconnect/signers/signer-factory.ts +0 -120
  258. package/src/lib/providers/walletconnect/signers/xrpl-signer.spec.ts +0 -296
  259. package/src/lib/providers/walletconnect/signers/xrpl-signer.ts +0 -478
  260. package/src/lib/services/hsuite-auth.interceptor.ts +0 -159
  261. package/src/lib/services/logger.service.ts +0 -126
  262. package/src/lib/services/smart-session.service.ts +0 -378
  263. package/src/lib/services/transaction-builders/active-account-source.spec.ts +0 -75
  264. package/src/lib/services/transaction-builders/active-account-source.ts +0 -55
  265. package/src/lib/services/transaction-builders/base-transaction-builder.service.ts +0 -585
  266. package/src/lib/services/transaction-builders/hedera-amount-utils.ts +0 -84
  267. package/src/lib/services/transaction-builders/hedera-transaction-builder.service.spec.ts +0 -741
  268. package/src/lib/services/transaction-builders/hedera-transaction-builder.service.ts +0 -1285
  269. package/src/lib/services/transaction-builders/index.ts +0 -55
  270. package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.spec.ts +0 -937
  271. package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.ts +0 -832
  272. package/src/lib/services/transaction.service.ts +0 -349
  273. package/src/lib/services/unified-wallet.service.spec.ts +0 -1382
  274. package/src/lib/services/unified-wallet.service.ts +0 -851
  275. package/src/lib/services/wallet-context.service.ts +0 -184
  276. package/src/lib/services/wallet-event-bus.service.ts +0 -186
  277. package/src/lib/services/wallet-providers.service.ts +0 -136
  278. package/src/lib/transports/chrome-extension-transport.ts +0 -246
  279. package/src/lib/utils/index.ts +0 -15
  280. package/src/lib/utils/ledger-icons.util.ts +0 -109
  281. package/src/lib/utils/ledger-ui-registry.ts +0 -197
  282. package/test/test-setup.ts +0 -21
  283. package/test-setup.ts +0 -63
  284. package/tsconfig.build.json +0 -11
  285. package/tsconfig.json +0 -29
  286. package/tsconfig.spec.json +0 -15
  287. package/vitest.config.ts +0 -48
@@ -1,248 +0,0 @@
1
- /**
2
- * HSuite Native Connect
3
- * Copyright 2024-2025 HSuite (https://hsuite.finance)
4
- *
5
- * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
6
- *
7
- * This file is part of HSuite Native Connect. For commercial licensing,
8
- * visit https://hsuite.finance/licensing
9
- */
10
-
11
- import { CommonModule } from '@angular/common';
12
- import { Component, EventEmitter, Input, Output, inject } from '@angular/core';
13
- import { getLogger } from '@hsuite/native-connect-sdk';
14
- import { IonButton, IonIcon, IonSpinner, ModalController } from '@ionic/angular/standalone';
15
- import { addIcons } from 'ionicons';
16
- import { walletOutline, linkOutline, checkmarkCircleOutline } from 'ionicons/icons';
17
-
18
- import { DEFAULT_WALLET_URL } from '../../models/provider-types';
19
- import { UnifiedWalletService } from '../../services/unified-wallet.service';
20
- import { WalletConnectionModalComponent } from '../wallet-connection-modal/wallet-connection-modal.component';
21
-
22
- const logger = getLogger().scoped?.('WalletConnectButton') ?? getLogger();
23
-
24
- /**
25
- * @component WalletConnectButtonComponent
26
- * Ready-to-use wallet connection button for dApps with multi-protocol support.
27
- *
28
- * **Features:**
29
- * - Beautiful connection modal with protocol/network selection
30
- * - Support for HSuite Native and WalletConnect
31
- * - Automatic connection state management
32
- * - Loading states
33
- * - Session display
34
- * - One-click connect/disconnect
35
- * - Theme-aware styling
36
- *
37
- * **Design Principles:**
38
- * - Easy configuration
39
- * - Fully customizable appearance
40
- * - Accessible
41
- * - Responsive
42
- */
43
- @Component({
44
- selector: 'wallet-connect-button',
45
- standalone: true,
46
- imports: [CommonModule, IonButton, IonIcon, IonSpinner],
47
- providers: [ModalController],
48
- templateUrl: './wallet-connect-button.component.html',
49
- styleUrls: ['./wallet-connect-button.component.scss'],
50
- })
51
- export class WalletConnectButtonComponent {
52
- /**
53
- * WalletConnect project ID (required for WalletConnect)
54
- */
55
- @Input() walletConnectProjectId?: string;
56
-
57
- /**
58
- * App name for wallet metadata
59
- */
60
- @Input() appName: string = 'HSuite Demo';
61
-
62
- /**
63
- * App description for wallet metadata
64
- */
65
- @Input() appDescription: string = 'Multi-chain wallet connection';
66
-
67
- /**
68
- * Wallet URL for targeting the wallet window
69
- */
70
- @Input() walletUrl = DEFAULT_WALLET_URL;
71
-
72
- /**
73
- * Pins the connection network and hides the network-selection step in the
74
- * modal. When set to `'mainnet'` or `'testnet'`, the dApp decides the network
75
- * and the user never sees the picker. When omitted, the user chooses.
76
- */
77
- @Input() network?: 'mainnet' | 'testnet';
78
-
79
- /**
80
- * Whether to show session information when connected
81
- * @default true
82
- */
83
- @Input() showSessionInfo = true;
84
-
85
- /**
86
- * Button color (Ionic color)
87
- * @default 'primary'
88
- */
89
- @Input() buttonColor: string = 'primary';
90
-
91
- /**
92
- * Button size
93
- * @default 'default'
94
- */
95
- @Input() size: 'small' | 'default' | 'large' = 'default';
96
-
97
- /**
98
- * Custom button text for connect state
99
- */
100
- @Input() connectText = 'Connect Wallet';
101
-
102
- /**
103
- * Custom button text for when wallets are connected (multi-session mode)
104
- */
105
- @Input() connectedText = 'Add Another Wallet';
106
-
107
- /**
108
- * Enable multi-session mode (allows multiple connections)
109
- * @default true
110
- */
111
- @Input() multiSessionMode = true;
112
-
113
- /**
114
- * Emitted when wallet successfully connects
115
- */
116
- @Output() connected = new EventEmitter<unknown>();
117
-
118
- /**
119
- * Emitted when wallet disconnects
120
- */
121
- @Output() disconnected = new EventEmitter<void>();
122
-
123
- /**
124
- * Emitted when connection fails
125
- */
126
- @Output() error = new EventEmitter<Error>();
127
-
128
- protected readonly wallet = inject(UnifiedWalletService);
129
- protected readonly modalController = inject(ModalController);
130
-
131
- protected isConnecting = false;
132
-
133
- /**
134
- *
135
- */
136
- constructor() {
137
- addIcons({ walletOutline, linkOutline, checkmarkCircleOutline });
138
- }
139
-
140
- /**
141
- * Connect to wallet (opens modal - supports multi-session)
142
- */
143
- async connect(): Promise<void> {
144
- if (this.isConnecting) return;
145
-
146
- this.isConnecting = true;
147
- try {
148
- await this.openConnectionModal();
149
- } catch (err) {
150
- const error = err instanceof Error ? err : new Error(String(err));
151
- this.error.emit(error);
152
- logger.error('Connection failed', { error: error.message });
153
- } finally {
154
- this.isConnecting = false;
155
- }
156
- }
157
-
158
- /**
159
- * Open the new multi-protocol connection modal
160
- * Passes wallet configuration including walletUrl and metadata for proper window targeting.
161
- */
162
- private async openConnectionModal(): Promise<void> {
163
- const modal = await this.modalController.create({
164
- component: WalletConnectionModalComponent,
165
- componentProps: {
166
- projectId: this.walletConnectProjectId,
167
- appName: this.appName,
168
- appDescription: this.appDescription,
169
- walletUrl: this.walletUrl,
170
- network: this.network,
171
- },
172
- });
173
-
174
- await modal.present();
175
-
176
- const { data } = await modal.onDidDismiss();
177
-
178
- if (data?.connected) {
179
- // Emit connected event with unified accounts
180
- const accounts = this.wallet.allAccounts();
181
- this.connected.emit({
182
- protocol: data.protocol,
183
- network: data.network,
184
- accounts,
185
- });
186
- }
187
- }
188
-
189
- /**
190
- * Disconnect from wallet
191
- * In multi-session mode, this disconnects ALL sessions
192
- */
193
- async disconnect(): Promise<void> {
194
- try {
195
- // Disconnect all sessions via UnifiedWalletService
196
- await this.wallet.disconnectAll();
197
-
198
- this.disconnected.emit();
199
- } catch (err) {
200
- const error = err instanceof Error ? err : new Error(String(err));
201
- this.error.emit(error);
202
- logger.error('Disconnect failed', { error: error.message });
203
- }
204
- }
205
-
206
- /**
207
- * Check if unknown wallet is connected
208
- */
209
- isConnected(): boolean {
210
- return this.wallet.isAnyConnected();
211
- }
212
-
213
- /**
214
- * Get display text for connection state
215
- */
216
- getButtonText(): string {
217
- if (this.isConnecting) return 'Connecting...';
218
-
219
- if (this.multiSessionMode) {
220
- return this.isConnected() ? this.connectedText : this.connectText;
221
- }
222
- return this.isConnected() ? 'Disconnect' : this.connectText;
223
- }
224
-
225
- /**
226
- * Get icon name for current state
227
- */
228
- getIconName(): string {
229
- if (this.isConnected()) return 'checkmark-circle-outline';
230
- return 'wallet-outline';
231
- }
232
-
233
- /**
234
- * Truncate address for display
235
- * @param address
236
- */
237
- truncateAddress(address: string): string {
238
- if (address.length <= 12) return address;
239
- return `${address.substring(0, 6)}...${address.substring(address.length - 4)}`;
240
- }
241
-
242
- /**
243
- * Get connected accounts (unified)
244
- */
245
- getConnectedAccounts(): any[] {
246
- return this.wallet.allAccounts();
247
- }
248
- }
@@ -1,24 +0,0 @@
1
- <ion-card class="wallet-connect-prompt" [color]="cardColor">
2
- <ion-card-header>
3
- <div class="prompt-header">
4
- <ion-icon *ngIf="showIcon" name="wallet-outline" class="prompt-icon"></ion-icon>
5
- <div>
6
- <ion-card-title>{{ title }}</ion-card-title>
7
- <ion-card-subtitle *ngIf="subtitle">{{ subtitle }}</ion-card-subtitle>
8
- </div>
9
- </div>
10
- </ion-card-header>
11
-
12
- <ion-card-content>
13
- <p class="prompt-message">{{ message }}</p>
14
-
15
- <wallet-connect-button
16
- [walletConnectProjectId]="walletConnectProjectId"
17
- [connectText]="buttonText"
18
- [size]="buttonSize"
19
- [buttonColor]="buttonColor"
20
- class="prompt-button"
21
- />
22
- </ion-card-content>
23
- </ion-card>
24
-
@@ -1,50 +0,0 @@
1
- /**
2
- * Wallet Connect Prompt Component Styles
3
- * @compodoc
4
- * Styles for the wallet connect prompt empty state component
5
- */
6
-
7
- .wallet-connect-prompt {
8
- max-width: 600px;
9
- margin: var(--space-lg, 24px) auto;
10
- text-align: center;
11
- }
12
-
13
- .prompt-header {
14
- display: flex;
15
- flex-direction: column;
16
- align-items: center;
17
- gap: var(--space-sm, 12px);
18
- }
19
-
20
- .prompt-icon {
21
- font-size: 48px;
22
- color: var(--ion-color-primary);
23
- }
24
-
25
- .prompt-message {
26
- margin: var(--space-md, 16px) 0;
27
- color: var(--ion-color-medium);
28
- font-size: 14px;
29
- line-height: 1.6;
30
- }
31
-
32
- .prompt-button {
33
- margin-top: var(--space-md, 16px);
34
-
35
- ::ng-deep ion-button {
36
- margin: 0 auto;
37
- display: block;
38
- }
39
- }
40
-
41
- @media (max-width: 576px) {
42
- .wallet-connect-prompt {
43
- margin: var(--space-md, 16px);
44
- }
45
-
46
- .prompt-icon {
47
- font-size: 36px;
48
- }
49
- }
50
-
@@ -1,108 +0,0 @@
1
- /**
2
- * HSuite Native Connect
3
- * Copyright 2024-2025 HSuite (https://hsuite.finance)
4
- *
5
- * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
6
- *
7
- * This file is part of HSuite Native Connect. For commercial licensing,
8
- * visit https://hsuite.finance/licensing
9
- */
10
-
11
- /**
12
- * @file wallet-connect-prompt.component.ts
13
- * @description Beautiful empty state component with connect button
14
- *
15
- * Pre-built component for showing a professional "connect wallet" prompt.
16
- * Eliminates repetitive empty state boilerplate.
17
- */
18
-
19
- import { Component, Input } from '@angular/core';
20
- import { CommonModule } from '@angular/common';
21
- import {
22
- IonCard,
23
- IonCardHeader,
24
- IonCardTitle,
25
- IonCardSubtitle,
26
- IonCardContent,
27
- IonIcon,
28
- } from '@ionic/angular/standalone';
29
- import { addIcons } from 'ionicons';
30
- import { walletOutline } from 'ionicons/icons';
31
- import { WalletConnectButtonComponent } from '../wallet-connect-button/wallet-connect-button.component';
32
-
33
- /**
34
- * Pre-built component for "connect wallet" empty state
35
- *
36
- * Features:
37
- * - Beautiful, professional design
38
- * - Integrated connect button
39
- * - Customizable message
40
- * - Responsive styling
41
- * - Optional icon
42
- */
43
- @Component({
44
- selector: 'wallet-connect-prompt',
45
- standalone: true,
46
- imports: [
47
- CommonModule,
48
- IonCard,
49
- IonCardHeader,
50
- IonCardTitle,
51
- IonCardSubtitle,
52
- IonCardContent,
53
- IonIcon,
54
- WalletConnectButtonComponent,
55
- ],
56
- templateUrl: './wallet-connect-prompt.component.html',
57
- styleUrls: ['./wallet-connect-prompt.component.scss'],
58
- })
59
- export class WalletConnectPromptComponent {
60
- /**
61
- * Main title text
62
- */
63
- @Input() title = 'Connect Your Wallet';
64
-
65
- /**
66
- * Subtitle text (optional)
67
- */
68
- @Input() subtitle = '';
69
-
70
- /**
71
- * Message explaining why connection is needed
72
- */
73
- @Input() message = 'Connect your wallet to continue';
74
-
75
- /**
76
- * Whether to show the wallet icon
77
- */
78
- @Input() showIcon = true;
79
-
80
- /**
81
- * Text for the connect button
82
- */
83
- @Input() buttonText = 'Connect Wallet';
84
-
85
- /**
86
- * Button size
87
- */
88
- @Input() buttonSize: 'small' | 'default' | 'large' = 'default';
89
-
90
- /**
91
- * Button color
92
- */
93
- @Input() buttonColor = 'primary';
94
-
95
- /**
96
- * Card background color
97
- */
98
- @Input() cardColor: string | undefined = undefined;
99
-
100
- /**
101
- * WalletConnect Project ID (optional)
102
- */
103
- @Input() walletConnectProjectId: string | undefined = undefined;
104
-
105
- constructor() {
106
- addIcons({ walletOutline });
107
- }
108
- }
@@ -1,24 +0,0 @@
1
- <!-- Show content when connected -->
2
- <ng-container *ngIf="isConnected()">
3
- <ng-content></ng-content>
4
- </ng-container>
5
-
6
- <!-- Show empty state when not connected -->
7
- <ng-container *ngIf="!isConnected()">
8
- <!-- Custom empty template if provided -->
9
- <ng-container *ngIf="emptyTemplate; else defaultEmpty">
10
- <ng-container *ngTemplateOutlet="emptyTemplate"></ng-container>
11
- </ng-container>
12
-
13
- <!-- Default empty state: connect prompt -->
14
- <ng-template #defaultEmpty>
15
- <wallet-connect-prompt
16
- [title]="emptyTitle"
17
- [subtitle]="emptySubtitle"
18
- [message]="emptyMessage"
19
- [showIcon]="showIcon"
20
- [walletConnectProjectId]="walletConnectProjectId"
21
- />
22
- </ng-template>
23
- </ng-container>
24
-
@@ -1,73 +0,0 @@
1
- /**
2
- * HSuite Native Connect
3
- * Copyright 2024-2025 HSuite (https://hsuite.finance)
4
- *
5
- * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
6
- *
7
- * This file is part of HSuite Native Connect. For commercial licensing,
8
- * visit https://hsuite.finance/licensing
9
- */
10
-
11
- /**
12
- * @file wallet-connected-guard.component.ts
13
- * @description Component-based guard for wallet connection status
14
- *
15
- * Alternative to `*walletConnected` directive. Shows content only when connected,
16
- * with customizable empty state.
17
- */
18
-
19
- import { Component, Input, computed, inject } from '@angular/core';
20
- import { CommonModule } from '@angular/common';
21
- import { WalletContextService } from '../../services/wallet-context.service';
22
- import { WalletConnectPromptComponent } from '../wallet-connect-prompt/wallet-connect-prompt.component';
23
-
24
- /**
25
- * Component-based guard for wallet connection
26
- *
27
- * Shows projected content when wallet is connected, otherwise shows
28
- * a customizable empty state (default: connect prompt).
29
- */
30
- @Component({
31
- selector: 'wallet-connected-guard',
32
- standalone: true,
33
- imports: [CommonModule, WalletConnectPromptComponent],
34
- templateUrl: './wallet-connected-guard.component.html',
35
- })
36
- export class WalletConnectedGuardComponent {
37
- private readonly contextService = inject(WalletContextService);
38
-
39
- /**
40
- * Custom empty state template
41
- */
42
- @Input() emptyTemplate?: any;
43
-
44
- /**
45
- * Title for default empty state
46
- */
47
- @Input() emptyTitle = 'Connect Your Wallet';
48
-
49
- /**
50
- * Subtitle for default empty state
51
- */
52
- @Input() emptySubtitle = '';
53
-
54
- /**
55
- * Message for default empty state
56
- */
57
- @Input() emptyMessage = 'Please connect your wallet to continue';
58
-
59
- /**
60
- * Whether to show icon in default empty state
61
- */
62
- @Input() showIcon = true;
63
-
64
- /**
65
- * WalletConnect Project ID
66
- */
67
- @Input() walletConnectProjectId: string | undefined = undefined;
68
-
69
- /**
70
- * Computed connection status
71
- */
72
- protected readonly isConnected = computed(() => this.contextService.context().isConnected);
73
- }
@@ -1,56 +0,0 @@
1
- <!-- Connection Method Step -->
2
- <div class="connection-method-step">
3
- <div class="step-header">
4
- <h3 class="step-title">Choose Connection Method</h3>
5
- <p class="step-description">Select how you'd like to connect to HSuite Wallet</p>
6
- </div>
7
-
8
- <div class="method-list">
9
- <button
10
- *ngFor="let method of methods; trackBy: trackByMethodId"
11
- type="button"
12
- class="method-card"
13
- [class.selected]="selectedMethod === method.id"
14
- [class.recommended]="method.recommended"
15
- [class.disabled]="!method.available"
16
- [disabled]="!method.available"
17
- (click)="selectMethod(method)"
18
- >
19
- <!-- Recommended badge -->
20
- <div class="recommended-badge" *ngIf="method.recommended">
21
- <ion-icon name="checkmark-circle"></ion-icon>
22
- <span>Recommended</span>
23
- </div>
24
-
25
- <!-- Icon -->
26
- <div class="method-icon">
27
- <ion-icon [name]="method.icon"></ion-icon>
28
- </div>
29
-
30
- <!-- Content -->
31
- <div class="method-content">
32
- <h4 class="method-name">{{ method.name }}</h4>
33
- <p class="method-description">{{ method.description }}</p>
34
-
35
- <!-- Features list -->
36
- <ul class="method-features" *ngIf="method.features?.length">
37
- <li *ngFor="let feature of method.features">
38
- <ion-icon name="checkmark-circle"></ion-icon>
39
- <span>{{ feature }}</span>
40
- </li>
41
- </ul>
42
- </div>
43
-
44
- <!-- Not available message -->
45
- <div class="not-available" *ngIf="!method.available">
46
- <span>Not available</span>
47
- </div>
48
- </button>
49
- </div>
50
-
51
- <!-- Mobile hint -->
52
- <p class="mobile-hint" *ngIf="isMobile">
53
- <ion-icon name="phone-portrait-outline"></ion-icon>
54
- <span>Scan QR code with the HSuite Wallet app on your mobile device</span>
55
- </p>
56
- </div>