@hsuite/native-connect-angular 2.1.0 → 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 (277) hide show
  1. package/LICENSE +146 -0
  2. package/dist/fesm2022/hsuite-native-connect-angular.mjs +854 -308
  3. package/dist/fesm2022/hsuite-native-connect-angular.mjs.map +1 -1
  4. package/dist/index.d.ts +456 -30
  5. package/package.json +30 -13
  6. package/USAGE_EXAMPLES.md +0 -476
  7. package/assets/wallets/extension.svg +0 -7
  8. package/assets/wallets/hashpack.svg +0 -6
  9. package/assets/wallets/hsuite.svg +0 -11
  10. package/assets/wallets/kabila.svg +0 -11
  11. package/assets/wallets/walletconnect.svg +0 -13
  12. package/coverage/base.css +0 -224
  13. package/coverage/block-navigation.js +0 -87
  14. package/coverage/coverage-summary.json +0 -50
  15. package/coverage/favicon.png +0 -0
  16. package/coverage/index.html +0 -476
  17. package/coverage/lcov-report/base.css +0 -224
  18. package/coverage/lcov-report/block-navigation.js +0 -87
  19. package/coverage/lcov-report/favicon.png +0 -0
  20. package/coverage/lcov-report/index.html +0 -476
  21. package/coverage/lcov-report/lib/components/account-selector/account-actions/account-actions.component.ts.html +0 -868
  22. package/coverage/lcov-report/lib/components/account-selector/account-actions/index.html +0 -116
  23. package/coverage/lcov-report/lib/components/account-selector/account-filter/account-filter.component.ts.html +0 -1288
  24. package/coverage/lcov-report/lib/components/account-selector/account-filter/index.html +0 -116
  25. package/coverage/lcov-report/lib/components/account-selector/account-formatting.service.ts.html +0 -685
  26. package/coverage/lcov-report/lib/components/account-selector/account-grouping.service.ts.html +0 -766
  27. package/coverage/lcov-report/lib/components/account-selector/account-list/account-list.component.ts.html +0 -1495
  28. package/coverage/lcov-report/lib/components/account-selector/account-list/index.html +0 -116
  29. package/coverage/lcov-report/lib/components/account-selector/account-selector.component.ts.html +0 -1495
  30. package/coverage/lcov-report/lib/components/account-selector/account-selector.service.ts.html +0 -1588
  31. package/coverage/lcov-report/lib/components/account-selector/index.html +0 -161
  32. package/coverage/lcov-report/lib/components/wallet-account-display/index.html +0 -116
  33. package/coverage/lcov-report/lib/components/wallet-account-display/wallet-account-display.component.ts.html +0 -505
  34. package/coverage/lcov-report/lib/components/wallet-connect-button/index.html +0 -116
  35. package/coverage/lcov-report/lib/components/wallet-connect-button/wallet-connect-button.component.ts.html +0 -829
  36. package/coverage/lcov-report/lib/components/wallet-connect-prompt/index.html +0 -116
  37. package/coverage/lcov-report/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts.html +0 -409
  38. package/coverage/lcov-report/lib/components/wallet-connected-guard/index.html +0 -116
  39. package/coverage/lcov-report/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts.html +0 -304
  40. package/coverage/lcov-report/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts.html +0 -436
  41. package/coverage/lcov-report/lib/components/wallet-connection-modal/connection-method-step/index.html +0 -116
  42. package/coverage/lcov-report/lib/components/wallet-connection-modal/index.html +0 -116
  43. package/coverage/lcov-report/lib/components/wallet-connection-modal/qr-pairing-step/index.html +0 -116
  44. package/coverage/lcov-report/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts.html +0 -2287
  45. package/coverage/lcov-report/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts.html +0 -2470
  46. package/coverage/lcov-report/lib/components/wallet-session-display/index.html +0 -116
  47. package/coverage/lcov-report/lib/components/wallet-session-display/wallet-session-display.component.ts.html +0 -676
  48. package/coverage/lcov-report/lib/components/wallet-transaction-status/index.html +0 -116
  49. package/coverage/lcov-report/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts.html +0 -703
  50. package/coverage/lcov-report/lib/directives/index.html +0 -146
  51. package/coverage/lcov-report/lib/directives/wallet-connected.directive.ts.html +0 -670
  52. package/coverage/lcov-report/lib/directives/wallet-context.directive.ts.html +0 -547
  53. package/coverage/lcov-report/lib/directives/wallet-events.directive.ts.html +0 -781
  54. package/coverage/lcov-report/lib/hsuite-wallet.module.ts.html +0 -715
  55. package/coverage/lcov-report/lib/index.html +0 -116
  56. package/coverage/lcov-report/lib/models/connection-config.model.ts.html +0 -280
  57. package/coverage/lcov-report/lib/models/index.html +0 -131
  58. package/coverage/lcov-report/lib/models/provider-types.ts.html +0 -577
  59. package/coverage/lcov-report/lib/providers/base-wallet-provider.ts.html +0 -1138
  60. package/coverage/lcov-report/lib/providers/hsuite-native/channel-client.service.ts.html +0 -2671
  61. package/coverage/lcov-report/lib/providers/hsuite-native/index.html +0 -116
  62. package/coverage/lcov-report/lib/providers/hsuite-native-provider.ts.html +0 -2347
  63. package/coverage/lcov-report/lib/providers/index.html +0 -146
  64. package/coverage/lcov-report/lib/providers/p2p-native/index.html +0 -131
  65. package/coverage/lcov-report/lib/providers/p2p-native/p2p-native.provider.ts.html +0 -2254
  66. package/coverage/lcov-report/lib/providers/p2p-native/p2p-session-manager.ts.html +0 -2170
  67. package/coverage/lcov-report/lib/providers/wallet-error-handler.ts.html +0 -1132
  68. package/coverage/lcov-report/lib/providers/walletconnect/core/index.html +0 -176
  69. package/coverage/lcov-report/lib/providers/walletconnect/core/session-health.ts.html +0 -673
  70. package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-client-manager.ts.html +0 -1177
  71. package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-provider.ts.html +0 -2563
  72. package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-session-store.ts.html +0 -904
  73. package/coverage/lcov-report/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts.html +0 -982
  74. package/coverage/lcov-report/lib/providers/walletconnect/signers/hedera-signer.ts.html +0 -1915
  75. package/coverage/lcov-report/lib/providers/walletconnect/signers/index.html +0 -146
  76. package/coverage/lcov-report/lib/providers/walletconnect/signers/signer-factory.ts.html +0 -445
  77. package/coverage/lcov-report/lib/providers/walletconnect/signers/xrpl-signer.ts.html +0 -1519
  78. package/coverage/lcov-report/lib/services/index.html +0 -191
  79. package/coverage/lcov-report/lib/services/logger.service.ts.html +0 -463
  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 -161
  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 -116
  93. package/coverage/lcov-report/lib/utils/ledger-icons.util.ts.html +0 -319
  94. package/coverage/lcov-report/prettify.css +0 -1
  95. package/coverage/lcov-report/prettify.js +0 -2
  96. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  97. package/coverage/lcov-report/sorter.js +0 -210
  98. package/coverage/lcov.info +0 -18695
  99. package/coverage/lib/components/account-selector/account-actions/account-actions.component.ts.html +0 -868
  100. package/coverage/lib/components/account-selector/account-actions/index.html +0 -116
  101. package/coverage/lib/components/account-selector/account-filter/account-filter.component.ts.html +0 -1288
  102. package/coverage/lib/components/account-selector/account-filter/index.html +0 -116
  103. package/coverage/lib/components/account-selector/account-formatting.service.ts.html +0 -685
  104. package/coverage/lib/components/account-selector/account-grouping.service.ts.html +0 -766
  105. package/coverage/lib/components/account-selector/account-list/account-list.component.ts.html +0 -1495
  106. package/coverage/lib/components/account-selector/account-list/index.html +0 -116
  107. package/coverage/lib/components/account-selector/account-selector.component.ts.html +0 -1495
  108. package/coverage/lib/components/account-selector/account-selector.service.ts.html +0 -1588
  109. package/coverage/lib/components/account-selector/index.html +0 -161
  110. package/coverage/lib/components/wallet-account-display/index.html +0 -116
  111. package/coverage/lib/components/wallet-account-display/wallet-account-display.component.ts.html +0 -505
  112. package/coverage/lib/components/wallet-connect-button/index.html +0 -116
  113. package/coverage/lib/components/wallet-connect-button/wallet-connect-button.component.ts.html +0 -829
  114. package/coverage/lib/components/wallet-connect-prompt/index.html +0 -116
  115. package/coverage/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts.html +0 -409
  116. package/coverage/lib/components/wallet-connected-guard/index.html +0 -116
  117. package/coverage/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts.html +0 -304
  118. package/coverage/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts.html +0 -436
  119. package/coverage/lib/components/wallet-connection-modal/connection-method-step/index.html +0 -116
  120. package/coverage/lib/components/wallet-connection-modal/index.html +0 -116
  121. package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/index.html +0 -116
  122. package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts.html +0 -2287
  123. package/coverage/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts.html +0 -2470
  124. package/coverage/lib/components/wallet-session-display/index.html +0 -116
  125. package/coverage/lib/components/wallet-session-display/wallet-session-display.component.ts.html +0 -676
  126. package/coverage/lib/components/wallet-transaction-status/index.html +0 -116
  127. package/coverage/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts.html +0 -703
  128. package/coverage/lib/directives/index.html +0 -146
  129. package/coverage/lib/directives/wallet-connected.directive.ts.html +0 -670
  130. package/coverage/lib/directives/wallet-context.directive.ts.html +0 -547
  131. package/coverage/lib/directives/wallet-events.directive.ts.html +0 -781
  132. package/coverage/lib/hsuite-wallet.module.ts.html +0 -715
  133. package/coverage/lib/index.html +0 -116
  134. package/coverage/lib/models/connection-config.model.ts.html +0 -280
  135. package/coverage/lib/models/index.html +0 -131
  136. package/coverage/lib/models/provider-types.ts.html +0 -577
  137. package/coverage/lib/providers/base-wallet-provider.ts.html +0 -1138
  138. package/coverage/lib/providers/hsuite-native/channel-client.service.ts.html +0 -2671
  139. package/coverage/lib/providers/hsuite-native/index.html +0 -116
  140. package/coverage/lib/providers/hsuite-native-provider.ts.html +0 -2347
  141. package/coverage/lib/providers/index.html +0 -146
  142. package/coverage/lib/providers/p2p-native/index.html +0 -131
  143. package/coverage/lib/providers/p2p-native/p2p-native.provider.ts.html +0 -2254
  144. package/coverage/lib/providers/p2p-native/p2p-session-manager.ts.html +0 -2170
  145. package/coverage/lib/providers/wallet-error-handler.ts.html +0 -1132
  146. package/coverage/lib/providers/walletconnect/core/index.html +0 -176
  147. package/coverage/lib/providers/walletconnect/core/session-health.ts.html +0 -673
  148. package/coverage/lib/providers/walletconnect/core/walletconnect-client-manager.ts.html +0 -1177
  149. package/coverage/lib/providers/walletconnect/core/walletconnect-provider.ts.html +0 -2563
  150. package/coverage/lib/providers/walletconnect/core/walletconnect-session-store.ts.html +0 -904
  151. package/coverage/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts.html +0 -982
  152. package/coverage/lib/providers/walletconnect/signers/hedera-signer.ts.html +0 -1915
  153. package/coverage/lib/providers/walletconnect/signers/index.html +0 -146
  154. package/coverage/lib/providers/walletconnect/signers/signer-factory.ts.html +0 -445
  155. package/coverage/lib/providers/walletconnect/signers/xrpl-signer.ts.html +0 -1519
  156. package/coverage/lib/services/index.html +0 -191
  157. package/coverage/lib/services/logger.service.ts.html +0 -463
  158. package/coverage/lib/services/transaction-builders/base-transaction-builder.service.ts.html +0 -1840
  159. package/coverage/lib/services/transaction-builders/hedera-amount-utils.ts.html +0 -337
  160. package/coverage/lib/services/transaction-builders/hedera-transaction-builder.service.ts.html +0 -3940
  161. package/coverage/lib/services/transaction-builders/index.html +0 -161
  162. package/coverage/lib/services/transaction-builders/xrpl-transaction-builder.service.ts.html +0 -2581
  163. package/coverage/lib/services/transaction.service.ts.html +0 -1120
  164. package/coverage/lib/services/unified-wallet.service.ts.html +0 -2638
  165. package/coverage/lib/services/wallet-context.service.ts.html +0 -637
  166. package/coverage/lib/services/wallet-event-bus.service.ts.html +0 -643
  167. package/coverage/lib/services/wallet-providers.service.ts.html +0 -493
  168. package/coverage/lib/transports/chrome-extension-transport.ts.html +0 -823
  169. package/coverage/lib/transports/index.html +0 -116
  170. package/coverage/lib/utils/index.html +0 -116
  171. package/coverage/lib/utils/ledger-icons.util.ts.html +0 -319
  172. package/coverage/prettify.css +0 -1
  173. package/coverage/prettify.js +0 -2
  174. package/coverage/sort-arrow-sprite.png +0 -0
  175. package/coverage/sorter.js +0 -210
  176. package/examples/minimal-connect.ts +0 -178
  177. package/examples/multi-protocol.ts +0 -495
  178. package/examples/transaction-signing.ts +0 -361
  179. package/jest.config.json +0 -45
  180. package/karma.conf.js +0 -42
  181. package/ng-package.json +0 -20
  182. package/src/index.ts +0 -203
  183. package/src/lib/components/account-selector/account-actions/account-actions.component.ts +0 -261
  184. package/src/lib/components/account-selector/account-filter/account-filter.component.ts +0 -401
  185. package/src/lib/components/account-selector/account-formatting.service.ts +0 -200
  186. package/src/lib/components/account-selector/account-grouping.service.ts +0 -227
  187. package/src/lib/components/account-selector/account-list/account-list.component.ts +0 -470
  188. package/src/lib/components/account-selector/account-selector.component.html +0 -135
  189. package/src/lib/components/account-selector/account-selector.component.scss +0 -2039
  190. package/src/lib/components/account-selector/account-selector.component.ts +0 -470
  191. package/src/lib/components/account-selector/account-selector.service.ts +0 -501
  192. package/src/lib/components/wallet-account-display/wallet-account-display.component.html +0 -34
  193. package/src/lib/components/wallet-account-display/wallet-account-display.component.scss +0 -99
  194. package/src/lib/components/wallet-account-display/wallet-account-display.component.ts +0 -140
  195. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.html +0 -14
  196. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.scss +0 -272
  197. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.spec.ts +0 -89
  198. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.ts +0 -248
  199. package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.html +0 -24
  200. package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.scss +0 -50
  201. package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts +0 -108
  202. package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.html +0 -24
  203. package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts +0 -73
  204. package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.html +0 -56
  205. package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.scss +0 -218
  206. package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts +0 -117
  207. package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.html +0 -94
  208. package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.scss +0 -272
  209. package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts +0 -734
  210. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.html +0 -192
  211. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.scss +0 -678
  212. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.spec.ts +0 -173
  213. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts +0 -795
  214. package/src/lib/components/wallet-session-display/wallet-session-display.component.html +0 -110
  215. package/src/lib/components/wallet-session-display/wallet-session-display.component.scss +0 -179
  216. package/src/lib/components/wallet-session-display/wallet-session-display.component.ts +0 -197
  217. package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.html +0 -65
  218. package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.scss +0 -254
  219. package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts +0 -206
  220. package/src/lib/directives/wallet-connected.directive.ts +0 -195
  221. package/src/lib/directives/wallet-context.directive.ts +0 -154
  222. package/src/lib/directives/wallet-events.directive.ts +0 -232
  223. package/src/lib/hsuite-wallet.module.ts +0 -210
  224. package/src/lib/models/connection-config.model.ts +0 -65
  225. package/src/lib/models/provider-types.ts +0 -164
  226. package/src/lib/models/unified-account.model.ts +0 -76
  227. package/src/lib/models/wallet-context.model.ts +0 -121
  228. package/src/lib/models/wallet-events.model.ts +0 -158
  229. package/src/lib/providers/base-wallet-provider.ts +0 -351
  230. package/src/lib/providers/hsuite-native/channel-client.service.spec.ts +0 -73
  231. package/src/lib/providers/hsuite-native/channel-client.service.ts +0 -862
  232. package/src/lib/providers/hsuite-native/index.ts +0 -8
  233. package/src/lib/providers/hsuite-native-provider.ts +0 -754
  234. package/src/lib/providers/mobile-native/mobile-native.provider.spec.ts +0 -19
  235. package/src/lib/providers/p2p-native/index.ts +0 -30
  236. package/src/lib/providers/p2p-native/p2p-native.provider.spec.ts +0 -523
  237. package/src/lib/providers/p2p-native/p2p-native.provider.ts +0 -723
  238. package/src/lib/providers/p2p-native/p2p-session-manager.ts +0 -695
  239. package/src/lib/providers/wallet-error-handler.ts +0 -349
  240. package/src/lib/providers/walletconnect/core/base-signer.interface.ts +0 -122
  241. package/src/lib/providers/walletconnect/core/session-health.ts +0 -196
  242. package/src/lib/providers/walletconnect/core/walletconnect-client-manager.ts +0 -364
  243. package/src/lib/providers/walletconnect/core/walletconnect-provider.integration.spec.ts +0 -348
  244. package/src/lib/providers/walletconnect/core/walletconnect-provider.ts +0 -826
  245. package/src/lib/providers/walletconnect/core/walletconnect-session-store.ts +0 -273
  246. package/src/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts +0 -299
  247. package/src/lib/providers/walletconnect/core/walletconnect-types.ts +0 -48
  248. package/src/lib/providers/walletconnect/index.ts +0 -33
  249. package/src/lib/providers/walletconnect/signers/hedera-signer.spec.ts +0 -367
  250. package/src/lib/providers/walletconnect/signers/hedera-signer.ts +0 -610
  251. package/src/lib/providers/walletconnect/signers/signer-factory.spec.ts +0 -62
  252. package/src/lib/providers/walletconnect/signers/signer-factory.ts +0 -120
  253. package/src/lib/providers/walletconnect/signers/xrpl-signer.spec.ts +0 -296
  254. package/src/lib/providers/walletconnect/signers/xrpl-signer.ts +0 -478
  255. package/src/lib/services/logger.service.ts +0 -126
  256. package/src/lib/services/transaction-builders/base-transaction-builder.service.ts +0 -585
  257. package/src/lib/services/transaction-builders/hedera-amount-utils.ts +0 -84
  258. package/src/lib/services/transaction-builders/hedera-transaction-builder.service.spec.ts +0 -741
  259. package/src/lib/services/transaction-builders/hedera-transaction-builder.service.ts +0 -1285
  260. package/src/lib/services/transaction-builders/index.ts +0 -54
  261. package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.spec.ts +0 -937
  262. package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.ts +0 -832
  263. package/src/lib/services/transaction.service.ts +0 -345
  264. package/src/lib/services/unified-wallet.service.spec.ts +0 -1382
  265. package/src/lib/services/unified-wallet.service.ts +0 -851
  266. package/src/lib/services/wallet-context.service.ts +0 -184
  267. package/src/lib/services/wallet-event-bus.service.ts +0 -186
  268. package/src/lib/services/wallet-providers.service.ts +0 -136
  269. package/src/lib/transports/chrome-extension-transport.ts +0 -246
  270. package/src/lib/utils/index.ts +0 -14
  271. package/src/lib/utils/ledger-icons.util.ts +0 -78
  272. package/test/test-setup.ts +0 -21
  273. package/test-setup.ts +0 -63
  274. package/tsconfig.build.json +0 -11
  275. package/tsconfig.json +0 -29
  276. package/tsconfig.spec.json +0 -15
  277. package/vitest.config.ts +0 -48
@@ -1,254 +0,0 @@
1
- /**
2
- * @component WalletTransactionStatus
3
- * @compodoc
4
- * Theme-aware transaction status display
5
- */
6
-
7
- .status-card {
8
- margin: 0;
9
- background: var(--wallet-session-bg, var(--surface-flat, rgba(var(--ion-color-light-rgb), 0.05)));
10
- border: var(--border-width-thin, 1px) solid var(--wallet-session-border, var(--border-flat, rgba(var(--ion-color-light-rgb), 0.1)));
11
- border-radius: var(--wallet-status-radius, var(--border-radius-lg, 12px));
12
- padding: var(--wallet-status-padding, var(--space-lg, 16px));
13
- box-shadow: var(--wallet-session-shadow, var(--shadow-md));
14
- animation: slideInFade var(--wallet-transition-slow, var(--duration-slow, 0.3s)) ease-out;
15
-
16
- &.status-success {
17
- border-left: var(--wallet-status-border-width, var(--border-width-heavy, 4px)) solid var(--wallet-status-success-border, var(--ion-color-success));
18
- }
19
-
20
- &.status-failed,
21
- &.status-rejected {
22
- border-left: var(--wallet-status-border-width, var(--border-width-heavy, 4px)) solid var(--wallet-status-failed-border, var(--ion-color-danger));
23
- }
24
-
25
- &.status-timeout {
26
- border-left: var(--wallet-status-border-width, var(--border-width-heavy, 4px)) solid var(--wallet-status-warning-border, var(--ion-color-warning));
27
- }
28
-
29
- &.status-processing,
30
- &.status-pending {
31
- border-left: var(--wallet-status-border-width, var(--border-width-heavy, 4px)) solid var(--wallet-status-pending-border, var(--ion-color-primary));
32
- }
33
- }
34
-
35
- .status-header {
36
- display: flex;
37
- align-items: center;
38
- gap: var(--wallet-status-gap, var(--space-md, 12px));
39
- }
40
-
41
- .status-icon {
42
- font-size: var(--wallet-status-icon-size, var(--font-size-3xl, 32px));
43
- flex-shrink: 0;
44
- transition: transform var(--wallet-transition-fast, var(--duration-fast, 0.15s)) ease;
45
- }
46
-
47
- .status-spinner {
48
- width: var(--wallet-status-icon-size, var(--font-size-3xl, 32px));
49
- height: var(--wallet-status-icon-size, var(--font-size-3xl, 32px));
50
- flex-shrink: 0;
51
- }
52
-
53
- .status-description {
54
- font-size: var(--wallet-font-size-base, var(--font-size-sm, 14px));
55
- line-height: var(--wallet-line-height-relaxed, var(--line-height-relaxed, 1.6));
56
- color: var(--wallet-session-text-primary, var(--ion-text-color));
57
- margin-bottom: var(--wallet-spacing-lg, var(--space-lg, 16px));
58
-
59
- p {
60
- margin: 0;
61
- }
62
- }
63
-
64
- .transaction-id-section,
65
- .error-section {
66
- background: var(--wallet-status-section-bg, var(--surface-flat, rgba(var(--ion-color-medium-rgb), 0.05)));
67
- padding: var(--wallet-status-section-padding, var(--space-md, 12px));
68
- border-radius: var(--wallet-status-section-radius, var(--border-radius-md, 8px));
69
- margin-bottom: var(--wallet-spacing-lg, var(--space-lg, 16px));
70
- border: var(--border-width-thin, 1px) solid var(--wallet-session-border, var(--border-flat, rgba(var(--ion-color-light-rgb), 0.1)));
71
- transition: all var(--wallet-transition-normal, var(--transition-all, 0.2s ease));
72
-
73
- &:hover {
74
- background: var(--surface-flat-hover, rgba(var(--ion-color-medium-rgb), 0.08));
75
- transform: translateY(-1px);
76
- box-shadow: var(--wallet-shadow-sm, var(--shadow-sm));
77
- }
78
-
79
- .section-label {
80
- font-size: var(--wallet-font-size-sm, var(--font-size-sm, 13px));
81
- font-weight: var(--wallet-font-weight-semibold, var(--font-weight-semibold, 600));
82
- color: var(--wallet-session-text-primary, var(--ion-text-color));
83
- line-height: var(--wallet-line-height-normal, var(--line-height-normal, 1.4));
84
- margin: 0 0 var(--wallet-spacing-xs, var(--space-xs, 4px)) 0;
85
- }
86
-
87
- .transaction-id {
88
- font-family: var(--wallet-account-font-family, var(--font-family-mono, monospace));
89
- font-size: var(--wallet-font-size-sm, var(--font-size-sm, 13px));
90
- color: var(--wallet-session-text-primary, var(--ion-text-color));
91
- line-height: var(--wallet-line-height-normal, var(--line-height-normal, 1.4));
92
- word-break: break-all;
93
- margin: 0;
94
- }
95
-
96
- .error-message {
97
- font-size: var(--wallet-font-size-sm, var(--font-size-sm, 13px));
98
- color: var(--wallet-session-text-primary, var(--ion-text-color));
99
- line-height: var(--wallet-line-height-normal, var(--line-height-normal, 1.4));
100
- margin: 0;
101
- }
102
- }
103
-
104
- .error-section {
105
- background: var(--wallet-status-error-bg, rgba(var(--ion-color-danger-rgb), 0.05));
106
- border-left: var(--wallet-status-error-border, 3px solid var(--ion-color-danger));
107
-
108
- &:hover {
109
- background: rgba(var(--ion-color-danger-rgb), 0.1);
110
- }
111
- }
112
-
113
- .actions {
114
- display: flex;
115
- flex-direction: column;
116
- gap: var(--wallet-spacing-sm, 8px);
117
- margin-top: var(--wallet-spacing-lg, 16px);
118
-
119
- ion-button {
120
- --border-radius: var(--wallet-button-radius, 12px);
121
- font-weight: var(--wallet-button-font-weight, 600);
122
- transition: all var(--wallet-transition-normal, 0.2s) ease;
123
-
124
- &:hover:not([disabled]) {
125
- transform: translateY(-2px);
126
- box-shadow: var(--shadow-md);
127
- }
128
-
129
- &:active:not([disabled]) {
130
- transform: translateY(0);
131
- }
132
- }
133
- }
134
-
135
- /* Animations */
136
- @keyframes pulse {
137
- 0%, 100% {
138
- opacity: 1;
139
- }
140
- 50% {
141
- opacity: 0.5;
142
- }
143
- }
144
-
145
- .status-processing,
146
- .status-pending {
147
- .status-spinner {
148
- animation: pulse 2s ease-in-out infinite;
149
- }
150
- }
151
-
152
- @keyframes slideInFade {
153
- from {
154
- opacity: 0;
155
- transform: translateY(-10px);
156
- }
157
- to {
158
- opacity: 1;
159
- transform: translateY(0);
160
- }
161
- }
162
-
163
- /* Success confetti effect */
164
- @keyframes celebrate {
165
- 0%, 100% {
166
- transform: scale(1);
167
- }
168
- 25% {
169
- transform: scale(1.1) rotate(-5deg);
170
- }
171
- 50% {
172
- transform: scale(1.05) rotate(5deg);
173
- }
174
- 75% {
175
- transform: scale(1.1) rotate(-5deg);
176
- }
177
- }
178
-
179
- .status-success {
180
- .status-icon {
181
- animation: celebrate 0.6s ease-in-out;
182
- }
183
- }
184
-
185
- /* Failed shake effect */
186
- @keyframes shake {
187
- 0%, 100% {
188
- transform: translateX(0);
189
- }
190
- 25% {
191
- transform: translateX(-5px);
192
- }
193
- 75% {
194
- transform: translateX(5px);
195
- }
196
- }
197
-
198
- .status-failed,
199
- .status-rejected {
200
- .status-icon {
201
- animation: shake 0.4s ease-in-out;
202
- }
203
- }
204
-
205
- /* Responsive */
206
- @media (max-width: 576px) {
207
- .status-header {
208
- flex-direction: column;
209
- text-align: center;
210
- }
211
-
212
- .actions {
213
- flex-direction: column;
214
-
215
- ion-button {
216
- width: 100%;
217
- }
218
- }
219
- }
220
-
221
- /* Reduced Motion Support */
222
- @media (prefers-reduced-motion: reduce) {
223
- *,
224
- *::before,
225
- *::after {
226
- animation-duration: 0.01ms !important;
227
- transition-duration: 0.01ms !important;
228
- }
229
-
230
- @keyframes slideInFade {
231
- from, to {
232
- opacity: 1;
233
- transform: translateY(0);
234
- }
235
- }
236
-
237
- @keyframes celebrate {
238
- from, to {
239
- transform: scale(1) rotate(0);
240
- }
241
- }
242
-
243
- @keyframes shake {
244
- from, to {
245
- transform: translateX(0);
246
- }
247
- }
248
-
249
- @keyframes pulse {
250
- from, to {
251
- opacity: 1;
252
- }
253
- }
254
- }
@@ -1,206 +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 { Component, Input, Output, EventEmitter } from '@angular/core';
12
- import { CommonModule } from '@angular/common';
13
- import {
14
- IonCard,
15
- IonCardHeader,
16
- IonCardTitle,
17
- IonCardContent,
18
- IonText,
19
- IonIcon,
20
- IonSpinner,
21
- IonButton,
22
- } from '@ionic/angular/standalone';
23
- import { addIcons } from 'ionicons';
24
- import {
25
- checkmarkCircleOutline,
26
- closeCircleOutline,
27
- timeOutline,
28
- alertCircleOutline,
29
- hourglassOutline,
30
- openOutline,
31
- refreshOutline,
32
- } from 'ionicons/icons';
33
-
34
- /**
35
- * @component WalletTransactionStatusComponent
36
- * Displays transaction status with user-friendly messaging.
37
- *
38
- * **Features:**
39
- * - Visual status indicators
40
- * - Status-specific colors and icons
41
- * - Transaction hash/ID display
42
- * - Error messages
43
- * - Loading states
44
- * - Action buttons (view explorer, retry)
45
- * - Theme-aware styling
46
- *
47
- * **Status Types:**
48
- * - `pending` - Transaction submitted, awaiting confirmation
49
- * - `processing` - Being processed by wallet
50
- * - `success` - Transaction confirmed
51
- * - `failed` - Transaction failed
52
- * - `rejected` - User rejected transaction
53
- * - `timeout` - Transaction timed out
54
- */
55
- @Component({
56
- selector: 'wallet-transaction-status',
57
- standalone: true,
58
- imports: [
59
- CommonModule,
60
- IonCard,
61
- IonCardHeader,
62
- IonCardTitle,
63
- IonCardContent,
64
- IonText,
65
- IonIcon,
66
- IonSpinner,
67
- IonButton,
68
- ],
69
- templateUrl: './wallet-transaction-status.component.html',
70
- styleUrls: ['./wallet-transaction-status.component.scss'],
71
- })
72
- export class WalletTransactionStatusComponent {
73
- /**
74
- * Transaction status
75
- */
76
- @Input({ required: true }) status!:
77
- | 'pending'
78
- | 'processing'
79
- | 'success'
80
- | 'failed'
81
- | 'rejected'
82
- | 'timeout';
83
-
84
- /**
85
- * Transaction ID/hash (for success state)
86
- */
87
- @Input() transactionId?: string;
88
-
89
- /**
90
- * Error message (for failed state)
91
- */
92
- @Input() error?: string;
93
-
94
- /**
95
- * Link to blockchain explorer
96
- */
97
- @Input() explorerUrl?: string;
98
-
99
- /**
100
- * Custom message to display
101
- */
102
- @Input() message?: string;
103
-
104
- /**
105
- * Whether to show retry button (for failed state)
106
- * @default false
107
- */
108
- @Input() showRetry = false;
109
-
110
- /**
111
- * Emitted when retry button is clicked
112
- */
113
- @Output() retry = new EventEmitter<void>();
114
-
115
- constructor() {
116
- addIcons({
117
- checkmarkCircleOutline,
118
- closeCircleOutline,
119
- timeOutline,
120
- alertCircleOutline,
121
- hourglassOutline,
122
- openOutline,
123
- refreshOutline,
124
- });
125
- }
126
-
127
- /**
128
- * Get status config (color, icon, message)
129
- */
130
- getStatusConfig(): {
131
- color: string;
132
- icon: string;
133
- title: string;
134
- description: string;
135
- } {
136
- switch (this.status) {
137
- case 'success':
138
- return {
139
- color: 'success',
140
- icon: 'checkmark-circle-outline',
141
- title: 'Transaction Successful',
142
- description: this.message || 'Your transaction has been confirmed on the blockchain.',
143
- };
144
- case 'failed':
145
- return {
146
- color: 'danger',
147
- icon: 'close-circle-outline',
148
- title: 'Transaction Failed',
149
- description: this.message || this.error || 'Transaction failed. Please try again.',
150
- };
151
- case 'rejected':
152
- return {
153
- color: 'warning',
154
- icon: 'close-circle-outline',
155
- title: 'Transaction Rejected',
156
- description: this.message || 'You rejected the transaction in your wallet.',
157
- };
158
- case 'timeout':
159
- return {
160
- color: 'warning',
161
- icon: 'time-outline',
162
- title: 'Transaction Timeout',
163
- description: this.message || 'Transaction timed out. Please try again.',
164
- };
165
- case 'processing':
166
- return {
167
- color: 'primary',
168
- icon: 'hourglass-outline',
169
- title: 'Processing Transaction',
170
- description: this.message || 'Please confirm the transaction in your wallet...',
171
- };
172
- case 'pending':
173
- default:
174
- return {
175
- color: 'medium',
176
- icon: 'hourglass-outline',
177
- title: 'Transaction Pending',
178
- description: this.message || 'Waiting for confirmation...',
179
- };
180
- }
181
- }
182
-
183
- /**
184
- * Truncate transaction ID for display
185
- */
186
- formatTransactionId(id: string): string {
187
- if (id.length <= 20) return id;
188
- return `${id.substring(0, 10)}...${id.substring(id.length - 8)}`;
189
- }
190
-
191
- /**
192
- * Open transaction in explorer
193
- */
194
- openExplorer(): void {
195
- if (this.explorerUrl) {
196
- window.open(this.explorerUrl, '_blank', 'noopener,noreferrer');
197
- }
198
- }
199
-
200
- /**
201
- * Handle retry click
202
- */
203
- onRetry(): void {
204
- this.retry.emit();
205
- }
206
- }
@@ -1,195 +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
- * @fileoverview Structural directive that guards content based on wallet connection status.
13
- *
14
- * @module directives/wallet-connected
15
- *
16
- * @description
17
- * WalletConnectedDirective is a structural directive that conditionally renders content
18
- * based on wallet connection status. It acts as a guard, showing the main template when
19
- * a wallet is connected and optionally showing an alternate template when not connected.
20
- *
21
- * **Key Features:**
22
- * - Conditional rendering based on connection status
23
- * - Provides wallet context to the connected template
24
- * - Supports `else` template for disconnected state
25
- * - Automatically updates when connection status changes
26
- *
27
- * **Selector:** `*walletConnected`
28
- */
29
-
30
- import {
31
- Directive,
32
- Input,
33
- TemplateRef,
34
- ViewContainerRef,
35
- inject,
36
- effect,
37
- EmbeddedViewRef,
38
- } from '@angular/core';
39
- import { WalletContextService } from '../services/wallet-context.service';
40
- import type { WalletContext } from '../models/wallet-context.model';
41
-
42
- /**
43
- * Context object passed to the connected template.
44
- *
45
- * @description
46
- * Contains the wallet context that is exposed to the template when using
47
- * the `*walletConnected` structural directive. Both `$implicit` and
48
- * `walletConnected` contain the same context for flexible access.
49
- */
50
- export class WalletConnectedDirectiveContext {
51
- constructor(
52
- public $implicit: WalletContext,
53
- public walletConnected: WalletContext,
54
- ) {}
55
- }
56
-
57
- /**
58
- * Structural directive that conditionally shows content when wallet is connected.
59
- *
60
- * @directive WalletConnectedDirective
61
- * @selector [walletConnected]
62
- *
63
- * @description
64
- * Acts as a guard - shows main template when connected, else template when not.
65
- * Also provides wallet context to the main template for convenience, allowing
66
- * access to active account, all accounts, sessions, and providers.
67
- *
68
- * The directive uses Angular's effect() to reactively update the view when
69
- * the wallet connection status changes.
70
- */
71
- @Directive({
72
- selector: '[walletConnected]',
73
- standalone: true,
74
- })
75
- export class WalletConnectedDirective {
76
- private readonly contextService = inject(WalletContextService);
77
- private readonly templateRef = inject(TemplateRef<WalletConnectedDirectiveContext>);
78
- private readonly viewContainer = inject(ViewContainerRef);
79
-
80
- private connectedViewRef: EmbeddedViewRef<WalletConnectedDirectiveContext> | null = null;
81
- private elseViewRef: EmbeddedViewRef<void> | null = null;
82
- private _elseTemplateRef: TemplateRef<void> | null = null;
83
-
84
- /**
85
- * Template to show when wallet is NOT connected.
86
- *
87
- * @description
88
- * Reference to an ng-template that will be rendered when no wallet is connected.
89
- * Use this to show a login prompt, connect button, or informational message.
90
- *
91
- * @param templateRef - Reference to the else template, or null to clear
92
- */
93
- @Input()
94
- set walletConnectedElse(templateRef: TemplateRef<void> | null) {
95
- this._elseTemplateRef = templateRef;
96
- this.updateView();
97
- }
98
-
99
- constructor() {
100
- // React to connection status changes
101
- effect(() => {
102
- const context = this.contextService.context();
103
- this.updateView(context);
104
- });
105
- }
106
-
107
- /**
108
- * Updates the view based on connection status.
109
- *
110
- * @description
111
- * Determines whether to show the connected template or the else template
112
- * based on the current wallet context. Called automatically when the
113
- * context signal changes.
114
- *
115
- * @param context - Optional wallet context, fetched from service if not provided
116
- */
117
- private updateView(context?: WalletContext): void {
118
- const walletContext = context || this.contextService.context();
119
-
120
- if (walletContext.isConnected) {
121
- // Show connected template
122
- this.showConnectedTemplate(walletContext);
123
- } else {
124
- // Show else template if provided
125
- this.showElseTemplate();
126
- }
127
- }
128
-
129
- /**
130
- * Shows the main template when wallet is connected.
131
- *
132
- * @description
133
- * Creates or updates the connected template view, providing the wallet
134
- * context as both the implicit variable and the named `walletConnected` property.
135
- *
136
- * @param walletContext - The current wallet context to expose to the template
137
- */
138
- private showConnectedTemplate(walletContext: WalletContext): void {
139
- // Clear else template if shown
140
- if (this.elseViewRef) {
141
- this.elseViewRef.destroy();
142
- this.elseViewRef = null;
143
- }
144
-
145
- // Create or update connected template
146
- if (!this.connectedViewRef) {
147
- const context = new WalletConnectedDirectiveContext(walletContext, walletContext);
148
- this.connectedViewRef = this.viewContainer.createEmbeddedView(this.templateRef, context);
149
- } else {
150
- // Update existing context
151
- this.connectedViewRef.context.$implicit = walletContext;
152
- this.connectedViewRef.context.walletConnected = walletContext;
153
- this.connectedViewRef.markForCheck();
154
- }
155
- }
156
-
157
- /**
158
- * Shows the else template when wallet is NOT connected.
159
- *
160
- * @description
161
- * Clears the connected template and renders the else template if one
162
- * was provided via the `walletConnectedElse` input.
163
- */
164
- private showElseTemplate(): void {
165
- // Clear connected template if shown
166
- if (this.connectedViewRef) {
167
- this.connectedViewRef.destroy();
168
- this.connectedViewRef = null;
169
- }
170
-
171
- // Show else template if provided
172
- if (this._elseTemplateRef && !this.elseViewRef) {
173
- this.elseViewRef = this.viewContainer.createEmbeddedView(this._elseTemplateRef);
174
- }
175
- }
176
-
177
- /**
178
- * Static type guard for Angular template type checking.
179
- *
180
- * @description
181
- * Enables TypeScript type inference in templates when using the directive.
182
- * This allows the template to have proper types for the context variable.
183
- *
184
- * @param dir - The directive instance
185
- * @param ctx - The context to type-guard
186
- *
187
- * @returns True, asserting that ctx is WalletConnectedDirectiveContext
188
- */
189
- static ngTemplateContextGuard(
190
- dir: WalletConnectedDirective,
191
- ctx: any,
192
- ): ctx is WalletConnectedDirectiveContext {
193
- return true;
194
- }
195
- }