@hsuite/native-connect-angular 2.1.1 → 2.1.3

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 (290) hide show
  1. package/LICENSE +146 -0
  2. package/dist/fesm2022/hsuite-native-connect-angular.mjs +321 -619
  3. package/dist/fesm2022/hsuite-native-connect-angular.mjs.map +1 -1
  4. package/dist/index.d.ts +5 -235
  5. package/package.json +37 -15
  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 -54
  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 -679
  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 -2518
  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 -583
  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 -2674
  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 -2173
  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 -2566
  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/hsuite-auth.interceptor.ts.html +0 -568
  79. package/coverage/lcov-report/lib/services/index.html +0 -221
  80. package/coverage/lcov-report/lib/services/logger.service.ts.html +0 -463
  81. package/coverage/lcov-report/lib/services/smart-session.service.ts.html +0 -1264
  82. package/coverage/lcov-report/lib/services/transaction-builders/active-account-source.ts.html +0 -250
  83. package/coverage/lcov-report/lib/services/transaction-builders/base-transaction-builder.service.ts.html +0 -1840
  84. package/coverage/lcov-report/lib/services/transaction-builders/hedera-amount-utils.ts.html +0 -337
  85. package/coverage/lcov-report/lib/services/transaction-builders/hedera-transaction-builder.service.ts.html +0 -3940
  86. package/coverage/lcov-report/lib/services/transaction-builders/index.html +0 -176
  87. package/coverage/lcov-report/lib/services/transaction-builders/xrpl-transaction-builder.service.ts.html +0 -2581
  88. package/coverage/lcov-report/lib/services/transaction.service.ts.html +0 -1120
  89. package/coverage/lcov-report/lib/services/unified-wallet.service.ts.html +0 -2638
  90. package/coverage/lcov-report/lib/services/wallet-context.service.ts.html +0 -637
  91. package/coverage/lcov-report/lib/services/wallet-event-bus.service.ts.html +0 -643
  92. package/coverage/lcov-report/lib/services/wallet-providers.service.ts.html +0 -493
  93. package/coverage/lcov-report/lib/transports/chrome-extension-transport.ts.html +0 -823
  94. package/coverage/lcov-report/lib/transports/index.html +0 -116
  95. package/coverage/lcov-report/lib/utils/index.html +0 -131
  96. package/coverage/lcov-report/lib/utils/ledger-icons.util.ts.html +0 -412
  97. package/coverage/lcov-report/lib/utils/ledger-ui-registry.ts.html +0 -676
  98. package/coverage/lcov-report/prettify.css +0 -1
  99. package/coverage/lcov-report/prettify.js +0 -2
  100. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  101. package/coverage/lcov-report/sorter.js +0 -210
  102. package/coverage/lcov.info +0 -20366
  103. package/coverage/lib/components/account-selector/account-actions/account-actions.component.ts.html +0 -868
  104. package/coverage/lib/components/account-selector/account-actions/index.html +0 -116
  105. package/coverage/lib/components/account-selector/account-filter/account-filter.component.ts.html +0 -1288
  106. package/coverage/lib/components/account-selector/account-filter/index.html +0 -116
  107. package/coverage/lib/components/account-selector/account-formatting.service.ts.html +0 -679
  108. package/coverage/lib/components/account-selector/account-grouping.service.ts.html +0 -766
  109. package/coverage/lib/components/account-selector/account-list/account-list.component.ts.html +0 -1495
  110. package/coverage/lib/components/account-selector/account-list/index.html +0 -116
  111. package/coverage/lib/components/account-selector/account-selector.component.ts.html +0 -1495
  112. package/coverage/lib/components/account-selector/account-selector.service.ts.html +0 -1588
  113. package/coverage/lib/components/account-selector/index.html +0 -161
  114. package/coverage/lib/components/wallet-account-display/index.html +0 -116
  115. package/coverage/lib/components/wallet-account-display/wallet-account-display.component.ts.html +0 -505
  116. package/coverage/lib/components/wallet-connect-button/index.html +0 -116
  117. package/coverage/lib/components/wallet-connect-button/wallet-connect-button.component.ts.html +0 -829
  118. package/coverage/lib/components/wallet-connect-prompt/index.html +0 -116
  119. package/coverage/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts.html +0 -409
  120. package/coverage/lib/components/wallet-connected-guard/index.html +0 -116
  121. package/coverage/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts.html +0 -304
  122. package/coverage/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts.html +0 -436
  123. package/coverage/lib/components/wallet-connection-modal/connection-method-step/index.html +0 -116
  124. package/coverage/lib/components/wallet-connection-modal/index.html +0 -116
  125. package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/index.html +0 -116
  126. package/coverage/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts.html +0 -2287
  127. package/coverage/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts.html +0 -2518
  128. package/coverage/lib/components/wallet-session-display/index.html +0 -116
  129. package/coverage/lib/components/wallet-session-display/wallet-session-display.component.ts.html +0 -676
  130. package/coverage/lib/components/wallet-transaction-status/index.html +0 -116
  131. package/coverage/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts.html +0 -703
  132. package/coverage/lib/directives/index.html +0 -146
  133. package/coverage/lib/directives/wallet-connected.directive.ts.html +0 -670
  134. package/coverage/lib/directives/wallet-context.directive.ts.html +0 -547
  135. package/coverage/lib/directives/wallet-events.directive.ts.html +0 -781
  136. package/coverage/lib/hsuite-wallet.module.ts.html +0 -715
  137. package/coverage/lib/index.html +0 -116
  138. package/coverage/lib/models/connection-config.model.ts.html +0 -280
  139. package/coverage/lib/models/index.html +0 -131
  140. package/coverage/lib/models/provider-types.ts.html +0 -583
  141. package/coverage/lib/providers/base-wallet-provider.ts.html +0 -1138
  142. package/coverage/lib/providers/hsuite-native/channel-client.service.ts.html +0 -2674
  143. package/coverage/lib/providers/hsuite-native/index.html +0 -116
  144. package/coverage/lib/providers/hsuite-native-provider.ts.html +0 -2347
  145. package/coverage/lib/providers/index.html +0 -146
  146. package/coverage/lib/providers/p2p-native/index.html +0 -131
  147. package/coverage/lib/providers/p2p-native/p2p-native.provider.ts.html +0 -2254
  148. package/coverage/lib/providers/p2p-native/p2p-session-manager.ts.html +0 -2173
  149. package/coverage/lib/providers/wallet-error-handler.ts.html +0 -1132
  150. package/coverage/lib/providers/walletconnect/core/index.html +0 -176
  151. package/coverage/lib/providers/walletconnect/core/session-health.ts.html +0 -673
  152. package/coverage/lib/providers/walletconnect/core/walletconnect-client-manager.ts.html +0 -1177
  153. package/coverage/lib/providers/walletconnect/core/walletconnect-provider.ts.html +0 -2566
  154. package/coverage/lib/providers/walletconnect/core/walletconnect-session-store.ts.html +0 -904
  155. package/coverage/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts.html +0 -982
  156. package/coverage/lib/providers/walletconnect/signers/hedera-signer.ts.html +0 -1915
  157. package/coverage/lib/providers/walletconnect/signers/index.html +0 -146
  158. package/coverage/lib/providers/walletconnect/signers/signer-factory.ts.html +0 -445
  159. package/coverage/lib/providers/walletconnect/signers/xrpl-signer.ts.html +0 -1519
  160. package/coverage/lib/services/hsuite-auth.interceptor.ts.html +0 -568
  161. package/coverage/lib/services/index.html +0 -221
  162. package/coverage/lib/services/logger.service.ts.html +0 -463
  163. package/coverage/lib/services/smart-session.service.ts.html +0 -1264
  164. package/coverage/lib/services/transaction-builders/active-account-source.ts.html +0 -250
  165. package/coverage/lib/services/transaction-builders/base-transaction-builder.service.ts.html +0 -1840
  166. package/coverage/lib/services/transaction-builders/hedera-amount-utils.ts.html +0 -337
  167. package/coverage/lib/services/transaction-builders/hedera-transaction-builder.service.ts.html +0 -3940
  168. package/coverage/lib/services/transaction-builders/index.html +0 -176
  169. package/coverage/lib/services/transaction-builders/xrpl-transaction-builder.service.ts.html +0 -2581
  170. package/coverage/lib/services/transaction.service.ts.html +0 -1120
  171. package/coverage/lib/services/unified-wallet.service.ts.html +0 -2638
  172. package/coverage/lib/services/wallet-context.service.ts.html +0 -637
  173. package/coverage/lib/services/wallet-event-bus.service.ts.html +0 -643
  174. package/coverage/lib/services/wallet-providers.service.ts.html +0 -493
  175. package/coverage/lib/transports/chrome-extension-transport.ts.html +0 -823
  176. package/coverage/lib/transports/index.html +0 -116
  177. package/coverage/lib/utils/index.html +0 -131
  178. package/coverage/lib/utils/ledger-icons.util.ts.html +0 -412
  179. package/coverage/lib/utils/ledger-ui-registry.ts.html +0 -676
  180. package/coverage/prettify.css +0 -1
  181. package/coverage/prettify.js +0 -2
  182. package/coverage/sort-arrow-sprite.png +0 -0
  183. package/coverage/sorter.js +0 -210
  184. package/examples/minimal-connect.ts +0 -178
  185. package/examples/multi-protocol.ts +0 -495
  186. package/examples/transaction-signing.ts +0 -361
  187. package/jest.config.json +0 -45
  188. package/karma.conf.js +0 -42
  189. package/ng-package.json +0 -20
  190. package/src/index.ts +0 -229
  191. package/src/lib/components/account-selector/account-actions/account-actions.component.ts +0 -261
  192. package/src/lib/components/account-selector/account-filter/account-filter.component.ts +0 -401
  193. package/src/lib/components/account-selector/account-formatting.service.ts +0 -198
  194. package/src/lib/components/account-selector/account-grouping.service.ts +0 -227
  195. package/src/lib/components/account-selector/account-list/account-list.component.ts +0 -470
  196. package/src/lib/components/account-selector/account-selector.component.html +0 -135
  197. package/src/lib/components/account-selector/account-selector.component.scss +0 -2039
  198. package/src/lib/components/account-selector/account-selector.component.ts +0 -470
  199. package/src/lib/components/account-selector/account-selector.service.ts +0 -501
  200. package/src/lib/components/wallet-account-display/wallet-account-display.component.html +0 -34
  201. package/src/lib/components/wallet-account-display/wallet-account-display.component.scss +0 -99
  202. package/src/lib/components/wallet-account-display/wallet-account-display.component.ts +0 -140
  203. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.html +0 -14
  204. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.scss +0 -272
  205. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.spec.ts +0 -89
  206. package/src/lib/components/wallet-connect-button/wallet-connect-button.component.ts +0 -248
  207. package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.html +0 -24
  208. package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.scss +0 -50
  209. package/src/lib/components/wallet-connect-prompt/wallet-connect-prompt.component.ts +0 -108
  210. package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.html +0 -24
  211. package/src/lib/components/wallet-connected-guard/wallet-connected-guard.component.ts +0 -73
  212. package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.html +0 -56
  213. package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.scss +0 -218
  214. package/src/lib/components/wallet-connection-modal/connection-method-step/connection-method-step.component.ts +0 -117
  215. package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.html +0 -94
  216. package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.scss +0 -272
  217. package/src/lib/components/wallet-connection-modal/qr-pairing-step/qr-pairing-step.component.ts +0 -734
  218. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.html +0 -192
  219. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.scss +0 -678
  220. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.spec.ts +0 -173
  221. package/src/lib/components/wallet-connection-modal/wallet-connection-modal.component.ts +0 -811
  222. package/src/lib/components/wallet-session-display/wallet-session-display.component.html +0 -110
  223. package/src/lib/components/wallet-session-display/wallet-session-display.component.scss +0 -179
  224. package/src/lib/components/wallet-session-display/wallet-session-display.component.ts +0 -197
  225. package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.html +0 -65
  226. package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.scss +0 -254
  227. package/src/lib/components/wallet-transaction-status/wallet-transaction-status.component.ts +0 -206
  228. package/src/lib/directives/wallet-connected.directive.ts +0 -195
  229. package/src/lib/directives/wallet-context.directive.ts +0 -154
  230. package/src/lib/directives/wallet-events.directive.ts +0 -232
  231. package/src/lib/hsuite-wallet.module.ts +0 -210
  232. package/src/lib/models/connection-config.model.ts +0 -65
  233. package/src/lib/models/provider-types.ts +0 -166
  234. package/src/lib/models/unified-account.model.ts +0 -79
  235. package/src/lib/models/wallet-context.model.ts +0 -121
  236. package/src/lib/models/wallet-events.model.ts +0 -158
  237. package/src/lib/providers/base-wallet-provider.ts +0 -351
  238. package/src/lib/providers/hsuite-native/channel-client.service.spec.ts +0 -73
  239. package/src/lib/providers/hsuite-native/channel-client.service.ts +0 -863
  240. package/src/lib/providers/hsuite-native/index.ts +0 -8
  241. package/src/lib/providers/hsuite-native-provider.ts +0 -754
  242. package/src/lib/providers/mobile-native/mobile-native.provider.spec.ts +0 -19
  243. package/src/lib/providers/p2p-native/index.ts +0 -30
  244. package/src/lib/providers/p2p-native/p2p-native.provider.spec.ts +0 -523
  245. package/src/lib/providers/p2p-native/p2p-native.provider.ts +0 -723
  246. package/src/lib/providers/p2p-native/p2p-session-manager.ts +0 -696
  247. package/src/lib/providers/wallet-error-handler.ts +0 -349
  248. package/src/lib/providers/walletconnect/core/base-signer.interface.ts +0 -122
  249. package/src/lib/providers/walletconnect/core/session-health.ts +0 -196
  250. package/src/lib/providers/walletconnect/core/walletconnect-client-manager.ts +0 -364
  251. package/src/lib/providers/walletconnect/core/walletconnect-provider.integration.spec.ts +0 -348
  252. package/src/lib/providers/walletconnect/core/walletconnect-provider.ts +0 -827
  253. package/src/lib/providers/walletconnect/core/walletconnect-session-store.ts +0 -273
  254. package/src/lib/providers/walletconnect/core/walletconnect-signing-orchestrator.ts +0 -299
  255. package/src/lib/providers/walletconnect/core/walletconnect-types.ts +0 -48
  256. package/src/lib/providers/walletconnect/index.ts +0 -33
  257. package/src/lib/providers/walletconnect/signers/hedera-signer.spec.ts +0 -367
  258. package/src/lib/providers/walletconnect/signers/hedera-signer.ts +0 -610
  259. package/src/lib/providers/walletconnect/signers/signer-factory.spec.ts +0 -62
  260. package/src/lib/providers/walletconnect/signers/signer-factory.ts +0 -120
  261. package/src/lib/providers/walletconnect/signers/xrpl-signer.spec.ts +0 -296
  262. package/src/lib/providers/walletconnect/signers/xrpl-signer.ts +0 -478
  263. package/src/lib/services/hsuite-auth.interceptor.ts +0 -159
  264. package/src/lib/services/logger.service.ts +0 -126
  265. package/src/lib/services/smart-session.service.ts +0 -378
  266. package/src/lib/services/transaction-builders/active-account-source.spec.ts +0 -75
  267. package/src/lib/services/transaction-builders/active-account-source.ts +0 -55
  268. package/src/lib/services/transaction-builders/base-transaction-builder.service.ts +0 -585
  269. package/src/lib/services/transaction-builders/hedera-amount-utils.ts +0 -84
  270. package/src/lib/services/transaction-builders/hedera-transaction-builder.service.spec.ts +0 -741
  271. package/src/lib/services/transaction-builders/hedera-transaction-builder.service.ts +0 -1285
  272. package/src/lib/services/transaction-builders/index.ts +0 -55
  273. package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.spec.ts +0 -937
  274. package/src/lib/services/transaction-builders/xrpl-transaction-builder.service.ts +0 -832
  275. package/src/lib/services/transaction.service.ts +0 -349
  276. package/src/lib/services/unified-wallet.service.spec.ts +0 -1382
  277. package/src/lib/services/unified-wallet.service.ts +0 -851
  278. package/src/lib/services/wallet-context.service.ts +0 -184
  279. package/src/lib/services/wallet-event-bus.service.ts +0 -186
  280. package/src/lib/services/wallet-providers.service.ts +0 -136
  281. package/src/lib/transports/chrome-extension-transport.ts +0 -246
  282. package/src/lib/utils/index.ts +0 -15
  283. package/src/lib/utils/ledger-icons.util.ts +0 -109
  284. package/src/lib/utils/ledger-ui-registry.ts +0 -197
  285. package/test/test-setup.ts +0 -21
  286. package/test-setup.ts +0 -63
  287. package/tsconfig.build.json +0 -11
  288. package/tsconfig.json +0 -29
  289. package/tsconfig.spec.json +0 -15
  290. package/vitest.config.ts +0 -48
@@ -1,166 +0,0 @@
1
- /**
2
- * @file Type definitions for wallet connection providers.
3
- *
4
- * @module models/provider-types
5
- *
6
- * @description
7
- * Defines the core type definitions used throughout the Angular SDK for wallet
8
- * provider management. Includes provider types, connection status, metadata
9
- * interfaces, and configuration interfaces for each supported protocol.
10
- *
11
- * **Provider Types:**
12
- * - `hsuite-native` - HSuite Native Connect protocol
13
- * - `walletconnect-v2` - WalletConnect v2 protocol
14
- * - `mobile-native` - P2P Native mobile connections
15
- *
16
- * **Connection Status Lifecycle:**
17
- * ```
18
- * idle -> connecting -> connected -> disconnecting -> disconnected
19
- * \-> error
20
- * ```
21
- */
22
-
23
- import type { SupportedLedger } from '@hsuite/native-connect-sdk';
24
-
25
- /**
26
- * Supported wallet connection protocol types.
27
- *
28
- * @description
29
- * Identifies the wallet connection protocol used by a provider.
30
- * Each type has different capabilities and configuration requirements.
31
- *
32
- * - `hsuite-native` - Direct HSuite wallet connections via Nostr/WebRTC
33
- * - `walletconnect-v2` - WalletConnect v2 protocol for mobile wallets
34
- * - `mobile-native` - Direct P2P connections to mobile wallets
35
- */
36
- export type ProviderType = 'hsuite-native' | 'walletconnect-v2' | 'mobile-native';
37
-
38
- /**
39
- * Connection status for a provider.
40
- *
41
- * @description
42
- * Tracks the lifecycle state of a wallet connection. UI components can
43
- * use this to show appropriate feedback (loading spinners, error messages, etc.).
44
- *
45
- * **Status Values:**
46
- * - `idle` - Not connected, no connection attempt in progress
47
- * - `connecting` - Connection attempt in progress
48
- * - `connected` - Successfully connected to wallet
49
- * - `disconnecting` - Disconnection in progress
50
- * - `disconnected` - Previously connected, now disconnected
51
- * - `error` - Connection failed
52
- */
53
- export type ConnectionStatus =
54
- | 'idle'
55
- | 'connecting'
56
- | 'connected'
57
- | 'disconnecting'
58
- | 'disconnected'
59
- | 'error';
60
-
61
- /**
62
- * Provider metadata for display purposes.
63
- *
64
- * @description
65
- * Contains display information about a wallet provider, used by UI components
66
- * to show provider information in connection dialogs and account selectors.
67
- */
68
- export interface ProviderMetadata {
69
- id?: string;
70
- name: string;
71
- type: ProviderType;
72
- description: string;
73
- iconUrl?: string;
74
- icon?: string;
75
- supportsMultipleAccounts?: boolean;
76
- features?: string[];
77
- }
78
-
79
- /**
80
- * Production HSuite Wallet URL.
81
- *
82
- * @description
83
- * Single source of truth for the wallet origin the SDK targets when a consuming
84
- * dApp does not supply its own `walletUrl`. Point local development at a dev
85
- * server by passing an explicit `walletUrl` (e.g. `http://localhost:8100`) on the
86
- * connection config or UI component; the SDK default must stay production-safe so
87
- * published dApps never open the wallet on localhost.
88
- */
89
- export const DEFAULT_WALLET_URL = 'https://wallet.hsuite.app';
90
-
91
- /**
92
- * HSuite Native Connect configuration.
93
- *
94
- * @description
95
- * Configuration for connecting via the HSuite Native protocol. This protocol
96
- * uses Nostr for discovery and WebRTC for direct P2P communication.
97
- *
98
- * **Required Fields:**
99
- * - `type` - Must be 'hsuite-native'
100
- * - `appId` - Unique identifier for your dApp
101
- * - `appName` - Display name for your dApp
102
- * - `ledgerId` - Target blockchain ('hedera' or 'xrpl')
103
- * - `networkId` - Target network (e.g., 'testnet', 'mainnet')
104
- */
105
- export interface HsuiteNativeConfig {
106
- type: 'hsuite-native';
107
- appId: string;
108
- appName: string;
109
- ledgerId: string;
110
- networkId: string;
111
- appUrl?: string;
112
- appIconUrl?: string;
113
- /** Wallet origin to open. Defaults to {@link DEFAULT_WALLET_URL} (production); set to a dev server for local testing. */
114
- walletUrl?: string;
115
- metadata?: Record<string, unknown>;
116
- }
117
-
118
- /**
119
- * WalletConnect v2 configuration.
120
- *
121
- * @description
122
- * Configuration for connecting via WalletConnect v2 protocol. Requires a
123
- * WalletConnect Cloud project ID obtained from https://cloud.walletconnect.com.
124
- *
125
- * **Required Fields:**
126
- * - `type` - Must be 'walletconnect-v2'
127
- * - `projectId` - WalletConnect Cloud project ID
128
- * - `ledgerId` - Target blockchain ('hedera' or 'xrpl')
129
- * - `networkId` - Target network (e.g., 'hedera:testnet')
130
- */
131
- export interface WalletConnectV2Config {
132
- type: 'walletconnect-v2';
133
- projectId: string; // WalletConnect Cloud project ID - REQUIRED
134
- ledgerId: SupportedLedger; // Which ledger to connect to
135
- networkId: string; // e.g., 'hedera:testnet' or 'xrpl:testnet'
136
- appName?: string;
137
- appDescription?: string;
138
- appIconUrl?: string;
139
- }
140
-
141
- /**
142
- * Mobile Native P2P configuration.
143
- *
144
- * @description
145
- * Configuration for direct P2P connections to mobile wallets. This protocol
146
- * bypasses relay servers for direct device-to-device communication.
147
- *
148
- * All fields are optional as the P2P provider can operate with defaults.
149
- */
150
- export interface MobileNativeConfig {
151
- type: 'mobile-native';
152
- appId?: string;
153
- appName?: string;
154
- ledgerId?: string;
155
- networkId?: string;
156
- metadata?: Record<string, unknown>;
157
- }
158
-
159
- /**
160
- * Union type of all connection configurations.
161
- *
162
- * @description
163
- * Represents any valid connection configuration for the supported wallet providers.
164
- * Use type guards from connection-config.model.ts to narrow to specific config types.
165
- */
166
- export type ConnectionConfig = HsuiteNativeConfig | WalletConnectV2Config | MobileNativeConfig;
@@ -1,79 +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 Unified account model that works across all wallet providers.
13
- *
14
- * @module models/unified-account
15
- *
16
- * @description
17
- * Defines the UnifiedAccount interface that provides a consistent representation
18
- * of blockchain accounts regardless of the underlying wallet provider or ledger type.
19
- * This normalization allows dApps to work with accounts uniformly whether they come
20
- * from HSuite Native, WalletConnect, or P2P Native connections.
21
- *
22
- * **Key Properties:**
23
- * - `id` - Unique identifier combining provider and address
24
- * - `address` - Blockchain-specific account identifier
25
- * - `ledgerId` - Which blockchain ('hedera', 'xrpl')
26
- * - `networkId` - Which network ('testnet', 'mainnet')
27
- * - `providerId` - Which provider manages this account
28
- * - `metadata` - Provider-specific additional data
29
- */
30
-
31
- import type { ProviderType } from './provider-types';
32
-
33
- /**
34
- * Unified account representation across all wallet providers.
35
- *
36
- * @description
37
- * A normalized account interface that provides consistent access to account
38
- * properties regardless of the underlying wallet type. All connected accounts
39
- * from all providers are represented using this interface.
40
- */
41
- export interface UnifiedAccount {
42
- /** Unique identifier for this account */
43
- id: string;
44
-
45
- /** Account address/public key */
46
- address: string;
47
-
48
- /** Public key associated with the account, when available from the provider. */
49
- publicKey?: string;
50
-
51
- /** Human-readable label */
52
- label?: string;
53
-
54
- /** Ledger ID (e.g., 'hedera', 'xrpl') */
55
- ledgerId: string;
56
-
57
- /** Network ID (e.g., 'hedera:testnet', 'xrpl:mainnet') */
58
- networkId: string;
59
-
60
- /** Provider that manages this account */
61
- providerId: string;
62
- providerType: ProviderType;
63
-
64
- /** Optional metadata from the provider */
65
- metadata?: Record<string, unknown>;
66
- }
67
-
68
- /**
69
- * Account with balance information.
70
- *
71
- * @description
72
- * Extension of UnifiedAccount that includes balance data for display purposes.
73
- * Used by UI components that need to show account balances.
74
- */
75
- export interface AccountWithBalance extends UnifiedAccount {
76
- balance?: string;
77
- balanceFormatted?: string;
78
- currencySymbol?: string;
79
- }
@@ -1,121 +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 Unified wallet context model for declarative state access.
13
- *
14
- * @module models/wallet-context
15
- *
16
- * @description
17
- * Defines the WalletContext interface that provides a single, cohesive interface
18
- * for all wallet state. This model eliminates the need to manually track multiple
19
- * signals across different services by aggregating all wallet information.
20
- *
21
- * The WalletContext is the primary data structure used by:
22
- * - {@link WalletContextService} to compute and expose wallet state
23
- * - {@link WalletContextDirective} to provide context to templates
24
- * - {@link WalletConnectedDirective} for conditional rendering
25
- */
26
-
27
- import type { UnifiedAccount } from './unified-account.model';
28
- import type { BaseWalletProvider } from '../providers/base-wallet-provider';
29
-
30
- /**
31
- * Unified wallet context interface.
32
- *
33
- * @description
34
- * Aggregates all wallet state into a single, reactive context object.
35
- * Used by `*walletContext` and `*walletConnected` directives to provide
36
- * declarative state access in templates.
37
- *
38
- * **Properties:**
39
- * - `isConnected` - True if any account is available
40
- * - `activeAccount` - Currently selected account (null if none)
41
- * - `allAccounts` - All accounts from all providers
42
- * - `sessions` - Active sessions with metadata
43
- * - `providers` - All registered providers
44
- * - `connectedProviders` - Only providers with active connections
45
- */
46
- export interface WalletContext {
47
- /**
48
- * Whether unknown wallet provider is currently connected
49
- */
50
- isConnected: boolean;
51
-
52
- /**
53
- * The currently active account across all providers
54
- * Null if no account is selected
55
- */
56
- activeAccount: UnifiedAccount | null;
57
-
58
- /**
59
- * All accounts from all connected providers
60
- * Empty array if no providers are connected
61
- */
62
- allAccounts: UnifiedAccount[];
63
-
64
- /**
65
- * All active sessions across providers
66
- * For HSuite Native: single session with multiple accounts
67
- * For WalletConnect: multiple sessions, one per wallet
68
- */
69
- sessions: WalletSession[];
70
-
71
- /**
72
- * All registered wallet providers
73
- * Includes both connected and disconnected providers
74
- */
75
- providers: BaseWalletProvider[];
76
-
77
- /**
78
- * Only the currently connected providers
79
- */
80
- connectedProviders: BaseWalletProvider[];
81
- }
82
-
83
- /**
84
- * Session information for display and management.
85
- *
86
- * @description
87
- * Represents a single wallet session, which may contain multiple accounts.
88
- * For HSuite Native, there's typically one session with multiple accounts.
89
- * For WalletConnect, there may be multiple sessions (one per paired wallet).
90
- */
91
- export interface WalletSession {
92
- /**
93
- * Unique provider identifier
94
- */
95
- providerId: string;
96
-
97
- /**
98
- * Provider type (hsuite-native, walletconnect-v2)
99
- */
100
- providerType: string;
101
-
102
- /**
103
- * Human-readable provider name
104
- */
105
- providerName: string;
106
-
107
- /**
108
- * Accounts in this session
109
- */
110
- accounts: UnifiedAccount[];
111
-
112
- /**
113
- * Additional session metadata
114
- */
115
- metadata?: {
116
- sessionKey?: string;
117
- topic?: string;
118
- networkId?: string;
119
- [key: string]: any;
120
- };
121
- }
@@ -1,158 +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 Event types for the WalletEventBus system.
13
- *
14
- * @module models/wallet-events
15
- *
16
- * @description
17
- * Defines the event interfaces used by the WalletEventBus system. These events
18
- * allow dApps to react to wallet-level changes that happen outside direct user
19
- * interaction, such as wallet-initiated disconnects, session restorations,
20
- * and account switches.
21
- *
22
- * **Event Types:**
23
- * - {@link ConnectionEvent} - Provider connected
24
- * - {@link DisconnectionEvent} - Provider disconnected
25
- * - {@link AccountChangeEvent} - Active account changed
26
- * - {@link AccountsUpdateEvent} - Account list updated
27
- * - {@link SessionEvent} - Session created/deleted/restored
28
- * - {@link ProviderStatusEvent} - Provider status changed
29
- * - {@link ProviderErrorEvent} - Provider error occurred
30
- *
31
- * All events include a `timestamp` field (Unix milliseconds) for ordering
32
- * and debugging purposes.
33
- */
34
-
35
- import type { UnifiedAccount } from './unified-account.model';
36
-
37
- /**
38
- * Emitted when a provider successfully connects.
39
- *
40
- * @description
41
- * Fired after a wallet connection is established and accounts are available.
42
- * Use this event to update UI, fetch balances, or perform post-connection logic.
43
- */
44
- export interface ConnectionEvent {
45
- providerId: string;
46
- providerType: 'hsuite-native' | 'walletconnect-v2';
47
- accounts: UnifiedAccount[];
48
- timestamp: number;
49
- }
50
-
51
- /**
52
- * Emitted when a provider disconnects.
53
- *
54
- * @description
55
- * Fired when a wallet connection is terminated. Can be user-initiated
56
- * (via disconnect button) or wallet-initiated (remote disconnect).
57
- *
58
- * **Reason Values:**
59
- * - `'user_initiated'` - User clicked disconnect in dApp
60
- * - `'wallet_initiated_disconnect'` - Wallet app terminated session
61
- * - `'session_terminated'` - Session ended by protocol
62
- * - `'session_expired'` - Session timed out
63
- */
64
- export interface DisconnectionEvent {
65
- providerId: string;
66
- providerType: string;
67
- sessionKey?: string;
68
- reason?:
69
- | 'user_initiated'
70
- | 'wallet_initiated_disconnect'
71
- | 'session_terminated'
72
- | 'session_expired'
73
- | string;
74
- timestamp: number;
75
- }
76
-
77
- /**
78
- * Emitted when the active account changes.
79
- *
80
- * @description
81
- * Fired when the user switches between accounts via setActiveAccount() or
82
- * account selector UI. Includes both the previous and new account for
83
- * comparison and transition logic.
84
- */
85
- export interface AccountChangeEvent {
86
- previousAccount: UnifiedAccount | null;
87
- newAccount: UnifiedAccount | null;
88
- timestamp: number;
89
- }
90
-
91
- /**
92
- * Emitted when a provider's account list updates.
93
- *
94
- * @description
95
- * Fired when accounts are added or removed from a provider. This can happen
96
- * when the wallet adds new accounts or when the user grants access to
97
- * additional accounts.
98
- */
99
- export interface AccountsUpdateEvent {
100
- providerId: string;
101
- accounts: UnifiedAccount[];
102
- totalAccounts: number;
103
- timestamp: number;
104
- }
105
-
106
- /**
107
- * Emitted for session lifecycle events (created, deleted, restored).
108
- *
109
- * @description
110
- * Fired when a session is created, deleted, or restored. Sessions represent
111
- * a logical connection to a wallet, which may contain multiple accounts.
112
- *
113
- * This same interface is used for:
114
- * - `sessionCreated` - New session established
115
- * - `sessionDeleted` - Session terminated
116
- * - `sessionRestored` - Session restored from storage
117
- */
118
- export interface SessionEvent {
119
- providerId: string;
120
- sessionKey: string;
121
- accounts: UnifiedAccount[];
122
- metadata?: Record<string, unknown>;
123
- timestamp: number;
124
- }
125
-
126
- /**
127
- * Emitted when a provider's status changes.
128
- *
129
- * @description
130
- * Fired when a provider transitions between connection states. Useful for
131
- * showing loading indicators or status badges.
132
- *
133
- * **Status Values:**
134
- * - `'connecting'` - Connection attempt in progress
135
- * - `'connected'` - Successfully connected
136
- * - `'disconnected'` - Not connected
137
- * - `'error'` - Connection failed
138
- */
139
- export interface ProviderStatusEvent {
140
- providerId: string;
141
- status: 'connecting' | 'connected' | 'disconnected' | 'error';
142
- timestamp: number;
143
- }
144
-
145
- /**
146
- * Emitted when a provider encounters an error.
147
- *
148
- * @description
149
- * Fired when a wallet operation fails. Includes the error details and
150
- * optional context about what operation failed. Use this to display
151
- * error messages to users or for debugging.
152
- */
153
- export interface ProviderErrorEvent {
154
- providerId: string;
155
- error: Error | string;
156
- context?: string;
157
- timestamp: number;
158
- }