@ledgerhq/ledger-wallet-provider-core 0.0.0-develop-20260916004725

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 (488) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +11 -0
  3. package/dist/api/LedgerButtonCore.d.ts +127 -0
  4. package/dist/api/LedgerButtonCore.d.ts.map +1 -0
  5. package/dist/api/blockchain-provider/model/BlockchainProvider.d.ts +41 -0
  6. package/dist/api/blockchain-provider/model/BlockchainProvider.d.ts.map +1 -0
  7. package/dist/api/blockchain-provider/model/BlockchainProviderFactory.d.ts +22 -0
  8. package/dist/api/blockchain-provider/model/BlockchainProviderFactory.d.ts.map +1 -0
  9. package/dist/api/blockchain-provider/model/CoreFacade.d.ts +53 -0
  10. package/dist/api/blockchain-provider/model/CoreFacade.d.ts.map +1 -0
  11. package/dist/api/blockchain-provider/model/CurrencyDescriptor.d.ts +16 -0
  12. package/dist/api/blockchain-provider/model/CurrencyDescriptor.d.ts.map +1 -0
  13. package/dist/api/blockchain-provider/model/types.d.ts +121 -0
  14. package/dist/api/blockchain-provider/model/types.d.ts.map +1 -0
  15. package/dist/api/blockchain-provider/utils/findBlockchainConfig.d.ts +3 -0
  16. package/dist/api/blockchain-provider/utils/findBlockchainConfig.d.ts.map +1 -0
  17. package/dist/api/blockchain-provider/utils/waitForDeviceSession.d.ts +17 -0
  18. package/dist/api/blockchain-provider/utils/waitForDeviceSession.d.ts.map +1 -0
  19. package/dist/api/blockchain-provider/wallet-provider/ledgerProviderIcon.d.ts +10 -0
  20. package/dist/api/blockchain-provider/wallet-provider/ledgerProviderIcon.d.ts.map +1 -0
  21. package/dist/api/errors/DeviceErrors.d.ts +42 -0
  22. package/dist/api/errors/DeviceErrors.d.ts.map +1 -0
  23. package/dist/api/errors/DeviceFlowErrors.d.ts +27 -0
  24. package/dist/api/errors/DeviceFlowErrors.d.ts.map +1 -0
  25. package/dist/api/errors/LedgerButtonError.d.ts +30 -0
  26. package/dist/api/errors/LedgerButtonError.d.ts.map +1 -0
  27. package/dist/api/errors/LedgerSyncErrors.d.ts +25 -0
  28. package/dist/api/errors/LedgerSyncErrors.d.ts.map +1 -0
  29. package/dist/api/errors/NetworkErrors.d.ts +23 -0
  30. package/dist/api/errors/NetworkErrors.d.ts.map +1 -0
  31. package/dist/api/errors/ProviderErrors.d.ts +10 -0
  32. package/dist/api/errors/ProviderErrors.d.ts.map +1 -0
  33. package/dist/api/errors/index.d.ts +10 -0
  34. package/dist/api/errors/index.d.ts.map +1 -0
  35. package/dist/api/index.d.ts +20 -0
  36. package/dist/api/index.d.ts.map +1 -0
  37. package/dist/api/model/Account.d.ts +63 -0
  38. package/dist/api/model/Account.d.ts.map +1 -0
  39. package/dist/api/model/ButtonCoreContext.d.ts +52 -0
  40. package/dist/api/model/ButtonCoreContext.d.ts.map +1 -0
  41. package/dist/api/model/LedgerSyncAuthenticateResponse.d.ts +8 -0
  42. package/dist/api/model/LedgerSyncAuthenticateResponse.d.ts.map +1 -0
  43. package/dist/api/model/TransactionHistory.d.ts +60 -0
  44. package/dist/api/model/TransactionHistory.d.ts.map +1 -0
  45. package/dist/api/model/UserInteractionNeeded.d.ts +5 -0
  46. package/dist/api/model/UserInteractionNeeded.d.ts.map +1 -0
  47. package/dist/api/model/blockchain/GasFee.d.ts +18 -0
  48. package/dist/api/model/blockchain/GasFee.d.ts.map +1 -0
  49. package/dist/api/model/blockchain/ProviderAccount.d.ts +16 -0
  50. package/dist/api/model/blockchain/ProviderAccount.d.ts.map +1 -0
  51. package/dist/api/model/blockchain/ProviderLogger.d.ts +16 -0
  52. package/dist/api/model/blockchain/ProviderLogger.d.ts.map +1 -0
  53. package/dist/api/model/dappConfig/BlockchainConfig.d.ts +34 -0
  54. package/dist/api/model/dappConfig/BlockchainConfig.d.ts.map +1 -0
  55. package/dist/api/model/errors.d.ts +5 -0
  56. package/dist/api/model/errors.d.ts.map +1 -0
  57. package/dist/api/model/index.d.ts +15 -0
  58. package/dist/api/model/index.d.ts.map +1 -0
  59. package/dist/api/model/signing/SignFlowStatus.d.ts +21 -0
  60. package/dist/api/model/signing/SignFlowStatus.d.ts.map +1 -0
  61. package/dist/api/model/signing/SignIntentType.d.ts +12 -0
  62. package/dist/api/model/signing/SignIntentType.d.ts.map +1 -0
  63. package/dist/api/model/signing/SignedTransaction.d.ts +57 -0
  64. package/dist/api/model/signing/SignedTransaction.d.ts.map +1 -0
  65. package/dist/api/model/signing/assertSignedResultRegistry.d.ts +12 -0
  66. package/dist/api/model/signing/assertSignedResultRegistry.d.ts.map +1 -0
  67. package/dist/api/utils/base64Utils.d.ts +2 -0
  68. package/dist/api/utils/base64Utils.d.ts.map +1 -0
  69. package/dist/api/utils/byteUtils.d.ts +2 -0
  70. package/dist/api/utils/byteUtils.d.ts.map +1 -0
  71. package/dist/api/utils/index.d.ts +6 -0
  72. package/dist/api/utils/index.d.ts.map +1 -0
  73. package/dist/index.d.ts +2 -0
  74. package/dist/index.d.ts.map +1 -0
  75. package/dist/index.js +7766 -0
  76. package/dist/internal/account/accountFiatUtils.d.ts +18 -0
  77. package/dist/internal/account/accountFiatUtils.d.ts.map +1 -0
  78. package/dist/internal/account/di/accountModule.d.ts +8 -0
  79. package/dist/internal/account/di/accountModule.d.ts.map +1 -0
  80. package/dist/internal/account/di/accountModuleTypes.d.ts +19 -0
  81. package/dist/internal/account/di/accountModuleTypes.d.ts.map +1 -0
  82. package/dist/internal/account/model/error.d.ts +7 -0
  83. package/dist/internal/account/model/error.d.ts.map +1 -0
  84. package/dist/internal/account/service/AccountService.d.ts +18 -0
  85. package/dist/internal/account/service/AccountService.d.ts.map +1 -0
  86. package/dist/internal/account/service/DefaultAccountService.d.ts +24 -0
  87. package/dist/internal/account/service/DefaultAccountService.d.ts.map +1 -0
  88. package/dist/internal/account/use-case/HydrateAccountWithBalanceUseCase.d.ts +17 -0
  89. package/dist/internal/account/use-case/HydrateAccountWithBalanceUseCase.d.ts.map +1 -0
  90. package/dist/internal/account/use-case/buildNetworksUseCase.d.ts +19 -0
  91. package/dist/internal/account/use-case/buildNetworksUseCase.d.ts.map +1 -0
  92. package/dist/internal/account/use-case/fetchAccountsUseCase.d.ts +10 -0
  93. package/dist/internal/account/use-case/fetchAccountsUseCase.d.ts.map +1 -0
  94. package/dist/internal/account/use-case/fetchAccountsWithBalanceUseCase.d.ts +26 -0
  95. package/dist/internal/account/use-case/fetchAccountsWithBalanceUseCase.d.ts.map +1 -0
  96. package/dist/internal/account/use-case/fetchAccountsWithFiatUseCase.d.ts +18 -0
  97. package/dist/internal/account/use-case/fetchAccountsWithFiatUseCase.d.ts.map +1 -0
  98. package/dist/internal/account/use-case/fetchCloudSyncAccountsUseCase.d.ts +16 -0
  99. package/dist/internal/account/use-case/fetchCloudSyncAccountsUseCase.d.ts.map +1 -0
  100. package/dist/internal/account/use-case/fetchSelectedAccountUseCase.d.ts +31 -0
  101. package/dist/internal/account/use-case/fetchSelectedAccountUseCase.d.ts.map +1 -0
  102. package/dist/internal/account/use-case/filterAccountsByFamilyUseCase.d.ts +11 -0
  103. package/dist/internal/account/use-case/filterAccountsByFamilyUseCase.d.ts.map +1 -0
  104. package/dist/internal/account/use-case/findAccountForNetworkUseCase.d.ts +15 -0
  105. package/dist/internal/account/use-case/findAccountForNetworkUseCase.d.ts.map +1 -0
  106. package/dist/internal/account/use-case/hydrateAccountWithFiatUseCase.d.ts +20 -0
  107. package/dist/internal/account/use-case/hydrateAccountWithFiatUseCase.d.ts.map +1 -0
  108. package/dist/internal/account/use-case/hydrateAccountWithTxHistoryUseCase.d.ts +20 -0
  109. package/dist/internal/account/use-case/hydrateAccountWithTxHistoryUseCase.d.ts.map +1 -0
  110. package/dist/internal/account/use-case/observeAccountGroupsUseCase.d.ts +19 -0
  111. package/dist/internal/account/use-case/observeAccountGroupsUseCase.d.ts.map +1 -0
  112. package/dist/internal/account/use-case/observeAccountsWithFiatUseCase.d.ts +24 -0
  113. package/dist/internal/account/use-case/observeAccountsWithFiatUseCase.d.ts.map +1 -0
  114. package/dist/internal/account/use-case/observeNetworksForSelectedAddressUseCase.d.ts +18 -0
  115. package/dist/internal/account/use-case/observeNetworksForSelectedAddressUseCase.d.ts.map +1 -0
  116. package/dist/internal/account/use-case/sortAccountsByFiatUseCase.d.ts +7 -0
  117. package/dist/internal/account/use-case/sortAccountsByFiatUseCase.d.ts.map +1 -0
  118. package/dist/internal/backend/BackendService.d.ts +9 -0
  119. package/dist/internal/backend/BackendService.d.ts.map +1 -0
  120. package/dist/internal/backend/DefaultBackendService.d.ts +70 -0
  121. package/dist/internal/backend/DefaultBackendService.d.ts.map +1 -0
  122. package/dist/internal/backend/di/backendModule.d.ts +7 -0
  123. package/dist/internal/backend/di/backendModule.d.ts.map +1 -0
  124. package/dist/internal/backend/di/backendModuleTypes.d.ts +4 -0
  125. package/dist/internal/backend/di/backendModuleTypes.d.ts.map +1 -0
  126. package/dist/internal/backend/model/trackEvent.d.ts +186 -0
  127. package/dist/internal/backend/model/trackEvent.d.ts.map +1 -0
  128. package/dist/internal/backend/schemas.d.ts +30 -0
  129. package/dist/internal/backend/schemas.d.ts.map +1 -0
  130. package/dist/internal/backend/types.d.ts +42 -0
  131. package/dist/internal/backend/types.d.ts.map +1 -0
  132. package/dist/internal/backend/utils.d.ts +5 -0
  133. package/dist/internal/backend/utils.d.ts.map +1 -0
  134. package/dist/internal/balance/constants/index.d.ts +2 -0
  135. package/dist/internal/balance/constants/index.d.ts.map +1 -0
  136. package/dist/internal/balance/constants/networkConstants.d.ts +15 -0
  137. package/dist/internal/balance/constants/networkConstants.d.ts.map +1 -0
  138. package/dist/internal/balance/datasource/cal/CalDataSource.d.ts +7 -0
  139. package/dist/internal/balance/datasource/cal/CalDataSource.d.ts.map +1 -0
  140. package/dist/internal/balance/datasource/cal/DefaultCalDataSource.d.ts +22 -0
  141. package/dist/internal/balance/datasource/cal/DefaultCalDataSource.d.ts.map +1 -0
  142. package/dist/internal/balance/datasource/cal/calTypes.d.ts +45 -0
  143. package/dist/internal/balance/datasource/cal/calTypes.d.ts.map +1 -0
  144. package/dist/internal/balance/datasource/coinService/CoinServiceDataSource.d.ts +7 -0
  145. package/dist/internal/balance/datasource/coinService/CoinServiceDataSource.d.ts.map +1 -0
  146. package/dist/internal/balance/datasource/coinService/DefaultCoinServiceDataSource.d.ts +14 -0
  147. package/dist/internal/balance/datasource/coinService/DefaultCoinServiceDataSource.d.ts.map +1 -0
  148. package/dist/internal/balance/datasource/coinService/StubCoinServiceDataSource.d.ts +1 -0
  149. package/dist/internal/balance/datasource/coinService/StubCoinServiceDataSource.d.ts.map +1 -0
  150. package/dist/internal/balance/datasource/coinService/coinServiceTypes.d.ts +46 -0
  151. package/dist/internal/balance/datasource/coinService/coinServiceTypes.d.ts.map +1 -0
  152. package/dist/internal/balance/datasource/countervalue/CounterValueDataSource.d.ts +7 -0
  153. package/dist/internal/balance/datasource/countervalue/CounterValueDataSource.d.ts.map +1 -0
  154. package/dist/internal/balance/datasource/countervalue/DefaultCounterValueDataSource.d.ts +14 -0
  155. package/dist/internal/balance/datasource/countervalue/DefaultCounterValueDataSource.d.ts.map +1 -0
  156. package/dist/internal/balance/datasource/countervalue/counterValueTypes.d.ts +10 -0
  157. package/dist/internal/balance/datasource/countervalue/counterValueTypes.d.ts.map +1 -0
  158. package/dist/internal/balance/di/balanceModule.d.ts +7 -0
  159. package/dist/internal/balance/di/balanceModule.d.ts.map +1 -0
  160. package/dist/internal/balance/di/balanceModuleTypes.d.ts +7 -0
  161. package/dist/internal/balance/di/balanceModuleTypes.d.ts.map +1 -0
  162. package/dist/internal/balance/model/error.d.ts +37 -0
  163. package/dist/internal/balance/model/error.d.ts.map +1 -0
  164. package/dist/internal/balance/model/types.d.ts +29 -0
  165. package/dist/internal/balance/model/types.d.ts.map +1 -0
  166. package/dist/internal/balance/service/BalanceService.d.ts +7 -0
  167. package/dist/internal/balance/service/BalanceService.d.ts.map +1 -0
  168. package/dist/internal/balance/service/DefaultBalanceService.d.ts +17 -0
  169. package/dist/internal/balance/service/DefaultBalanceService.d.ts.map +1 -0
  170. package/dist/internal/blockchain-provider/di/blockchainProviderModule.d.ts +3 -0
  171. package/dist/internal/blockchain-provider/di/blockchainProviderModule.d.ts.map +1 -0
  172. package/dist/internal/blockchain-provider/di/blockchainProviderModuleTypes.d.ts +5 -0
  173. package/dist/internal/blockchain-provider/di/blockchainProviderModuleTypes.d.ts.map +1 -0
  174. package/dist/internal/blockchain-provider/service/BlockchainProviderManager.d.ts +28 -0
  175. package/dist/internal/blockchain-provider/service/BlockchainProviderManager.d.ts.map +1 -0
  176. package/dist/internal/blockchain-provider/service/CoreFacadeService.d.ts +24 -0
  177. package/dist/internal/blockchain-provider/service/CoreFacadeService.d.ts.map +1 -0
  178. package/dist/internal/blockchain-provider/service/DefaultBlockchainProviderManager.d.ts +30 -0
  179. package/dist/internal/blockchain-provider/service/DefaultBlockchainProviderManager.d.ts.map +1 -0
  180. package/dist/internal/blockchain-provider/service/DefaultCoreFacadeService.d.ts +80 -0
  181. package/dist/internal/blockchain-provider/service/DefaultCoreFacadeService.d.ts.map +1 -0
  182. package/dist/internal/cloudsync/di/cloudSyncModuleTypes.d.ts +4 -0
  183. package/dist/internal/cloudsync/di/cloudSyncModuleTypes.d.ts.map +1 -0
  184. package/dist/internal/cloudsync/di/cloudsyncModule.d.ts +7 -0
  185. package/dist/internal/cloudsync/di/cloudsyncModule.d.ts.map +1 -0
  186. package/dist/internal/cloudsync/model/cloudSyncTypes.d.ts +8 -0
  187. package/dist/internal/cloudsync/model/cloudSyncTypes.d.ts.map +1 -0
  188. package/dist/internal/cloudsync/service/CloudSyncService.d.ts +6 -0
  189. package/dist/internal/cloudsync/service/CloudSyncService.d.ts.map +1 -0
  190. package/dist/internal/cloudsync/service/DefaultCloudSyncService.d.ts +15 -0
  191. package/dist/internal/cloudsync/service/DefaultCloudSyncService.d.ts.map +1 -0
  192. package/dist/internal/config/di/configModule.d.ts +6 -0
  193. package/dist/internal/config/di/configModule.d.ts.map +1 -0
  194. package/dist/internal/config/di/configModuleTypes.d.ts +4 -0
  195. package/dist/internal/config/di/configModuleTypes.d.ts.map +1 -0
  196. package/dist/internal/config/model/config.d.ts +29 -0
  197. package/dist/internal/config/model/config.d.ts.map +1 -0
  198. package/dist/internal/consent/di/consentModule.d.ts +3 -0
  199. package/dist/internal/consent/di/consentModule.d.ts.map +1 -0
  200. package/dist/internal/consent/di/consentModuleTypes.d.ts +4 -0
  201. package/dist/internal/consent/di/consentModuleTypes.d.ts.map +1 -0
  202. package/dist/internal/consent/service/ConsentService.d.ts +10 -0
  203. package/dist/internal/consent/service/ConsentService.d.ts.map +1 -0
  204. package/dist/internal/consent/service/DefaultConsentService.d.ts +18 -0
  205. package/dist/internal/consent/service/DefaultConsentService.d.ts.map +1 -0
  206. package/dist/internal/context/ContextService.d.ts +9 -0
  207. package/dist/internal/context/ContextService.d.ts.map +1 -0
  208. package/dist/internal/context/DefaultContextService.d.ts +34 -0
  209. package/dist/internal/context/DefaultContextService.d.ts.map +1 -0
  210. package/dist/internal/context/di/contextModule.d.ts +3 -0
  211. package/dist/internal/context/di/contextModule.d.ts.map +1 -0
  212. package/dist/internal/context/di/contextModuleTypes.d.ts +4 -0
  213. package/dist/internal/context/di/contextModuleTypes.d.ts.map +1 -0
  214. package/dist/internal/context/model/ContextEvent.d.ts +52 -0
  215. package/dist/internal/context/model/ContextEvent.d.ts.map +1 -0
  216. package/dist/internal/cryptographic/di/cryptographicModule.d.ts +7 -0
  217. package/dist/internal/cryptographic/di/cryptographicModule.d.ts.map +1 -0
  218. package/dist/internal/cryptographic/di/cryptographicModuleTypes.d.ts +8 -0
  219. package/dist/internal/cryptographic/di/cryptographicModuleTypes.d.ts.map +1 -0
  220. package/dist/internal/cryptographic/use-case/DecryptKeyPairUseCase.d.ts +9 -0
  221. package/dist/internal/cryptographic/use-case/DecryptKeyPairUseCase.d.ts.map +1 -0
  222. package/dist/internal/cryptographic/use-case/EncryptKeyPairUseCase.d.ts +10 -0
  223. package/dist/internal/cryptographic/use-case/EncryptKeyPairUseCase.d.ts.map +1 -0
  224. package/dist/internal/cryptographic/use-case/GenerateKeyPairUseCase.d.ts +9 -0
  225. package/dist/internal/cryptographic/use-case/GenerateKeyPairUseCase.d.ts.map +1 -0
  226. package/dist/internal/cryptographic/use-case/GetEncryptionKey.d.ts +13 -0
  227. package/dist/internal/cryptographic/use-case/GetEncryptionKey.d.ts.map +1 -0
  228. package/dist/internal/cryptographic/use-case/GetOrCreateKeyPairUseCase.d.ts +19 -0
  229. package/dist/internal/cryptographic/use-case/GetOrCreateKeyPairUseCase.d.ts.map +1 -0
  230. package/dist/internal/currency/constant.d.ts +6 -0
  231. package/dist/internal/currency/constant.d.ts.map +1 -0
  232. package/dist/internal/currency/currencyUtils.d.ts +32 -0
  233. package/dist/internal/currency/currencyUtils.d.ts.map +1 -0
  234. package/dist/internal/currency/datasource/DefaultFiatCurrencyDataSource.d.ts +13 -0
  235. package/dist/internal/currency/datasource/DefaultFiatCurrencyDataSource.d.ts.map +1 -0
  236. package/dist/internal/currency/datasource/FiatCurrencyDataSource.d.ts +6 -0
  237. package/dist/internal/currency/datasource/FiatCurrencyDataSource.d.ts.map +1 -0
  238. package/dist/internal/currency/datasource/fiatCurrencyTypes.d.ts +5 -0
  239. package/dist/internal/currency/datasource/fiatCurrencyTypes.d.ts.map +1 -0
  240. package/dist/internal/currency/di/currencyModule.d.ts +3 -0
  241. package/dist/internal/currency/di/currencyModule.d.ts.map +1 -0
  242. package/dist/internal/currency/di/currencyModuleTypes.d.ts +6 -0
  243. package/dist/internal/currency/di/currencyModuleTypes.d.ts.map +1 -0
  244. package/dist/internal/currency/service/CurrencyService.d.ts +7 -0
  245. package/dist/internal/currency/service/CurrencyService.d.ts.map +1 -0
  246. package/dist/internal/currency/service/DefaultCurrencyService.d.ts +14 -0
  247. package/dist/internal/currency/service/DefaultCurrencyService.d.ts.map +1 -0
  248. package/dist/internal/currency/use-case/ResolveCurrencyDecimalsUseCase.d.ts +20 -0
  249. package/dist/internal/currency/use-case/ResolveCurrencyDecimalsUseCase.d.ts.map +1 -0
  250. package/dist/internal/dAppConfig/datasource/DAppConfigDataSource.d.ts +5 -0
  251. package/dist/internal/dAppConfig/datasource/DAppConfigDataSource.d.ts.map +1 -0
  252. package/dist/internal/dAppConfig/datasource/DefaultDAppConfigDataSource.d.ts +12 -0
  253. package/dist/internal/dAppConfig/datasource/DefaultDAppConfigDataSource.d.ts.map +1 -0
  254. package/dist/internal/dAppConfig/datasource/StubDAppConfigDataSource.d.ts +9 -0
  255. package/dist/internal/dAppConfig/datasource/StubDAppConfigDataSource.d.ts.map +1 -0
  256. package/dist/internal/dAppConfig/di/dAppConfigModule.d.ts +7 -0
  257. package/dist/internal/dAppConfig/di/dAppConfigModule.d.ts.map +1 -0
  258. package/dist/internal/dAppConfig/di/dAppConfigModuleTypes.d.ts +5 -0
  259. package/dist/internal/dAppConfig/di/dAppConfigModuleTypes.d.ts.map +1 -0
  260. package/dist/internal/dAppConfig/mapper/mapConfigResponseToDAppConfig.d.ts +4 -0
  261. package/dist/internal/dAppConfig/mapper/mapConfigResponseToDAppConfig.d.ts.map +1 -0
  262. package/dist/internal/dAppConfig/model/dAppConfigTypes.d.ts +12 -0
  263. package/dist/internal/dAppConfig/model/dAppConfigTypes.d.ts.map +1 -0
  264. package/dist/internal/dAppConfig/use-case/GetDAppConfigUseCase.d.ts +11 -0
  265. package/dist/internal/dAppConfig/use-case/GetDAppConfigUseCase.d.ts.map +1 -0
  266. package/dist/internal/device/__tests__/mocks.d.ts +34 -0
  267. package/dist/internal/device/__tests__/mocks.d.ts.map +1 -0
  268. package/dist/internal/device/di/deviceModule.d.ts +8 -0
  269. package/dist/internal/device/di/deviceModule.d.ts.map +1 -0
  270. package/dist/internal/device/di/deviceModuleTypes.d.ts +10 -0
  271. package/dist/internal/device/di/deviceModuleTypes.d.ts.map +1 -0
  272. package/dist/internal/device/model/Device.d.ts +11 -0
  273. package/dist/internal/device/model/Device.d.ts.map +1 -0
  274. package/dist/internal/device/model/errors.d.ts +4 -0
  275. package/dist/internal/device/model/errors.d.ts.map +1 -0
  276. package/dist/internal/device/service/DefaultDeviceManagementKitService.d.ts +26 -0
  277. package/dist/internal/device/service/DefaultDeviceManagementKitService.d.ts.map +1 -0
  278. package/dist/internal/device/service/DeviceManagementKitService.d.ts +14 -0
  279. package/dist/internal/device/service/DeviceManagementKitService.d.ts.map +1 -0
  280. package/dist/internal/device/service/StubDeviceManagementKitService.d.ts +21 -0
  281. package/dist/internal/device/service/StubDeviceManagementKitService.d.ts.map +1 -0
  282. package/dist/internal/device/use-case/ConnectDevice.d.ts +16 -0
  283. package/dist/internal/device/use-case/ConnectDevice.d.ts.map +1 -0
  284. package/dist/internal/device/use-case/DisconnectDevice.d.ts +10 -0
  285. package/dist/internal/device/use-case/DisconnectDevice.d.ts.map +1 -0
  286. package/dist/internal/device/use-case/ListAvailableDevices.d.ts +11 -0
  287. package/dist/internal/device/use-case/ListAvailableDevices.d.ts.map +1 -0
  288. package/dist/internal/device/use-case/SwitchDevice.d.ts +12 -0
  289. package/dist/internal/device/use-case/SwitchDevice.d.ts.map +1 -0
  290. package/dist/internal/di.d.ts +4 -0
  291. package/dist/internal/di.d.ts.map +1 -0
  292. package/dist/internal/diTypes.d.ts +29 -0
  293. package/dist/internal/diTypes.d.ts.map +1 -0
  294. package/dist/internal/event-tracking/ErrorTrackingUtils.d.ts +12 -0
  295. package/dist/internal/event-tracking/ErrorTrackingUtils.d.ts.map +1 -0
  296. package/dist/internal/event-tracking/EventTrackingUtils.d.ts +88 -0
  297. package/dist/internal/event-tracking/EventTrackingUtils.d.ts.map +1 -0
  298. package/dist/internal/event-tracking/config/ErrorTrackingConfig.d.ts +10 -0
  299. package/dist/internal/event-tracking/config/ErrorTrackingConfig.d.ts.map +1 -0
  300. package/dist/internal/event-tracking/di/eventTrackingModule.d.ts +7 -0
  301. package/dist/internal/event-tracking/di/eventTrackingModule.d.ts.map +1 -0
  302. package/dist/internal/event-tracking/di/eventTrackingModuleTypes.d.ts +21 -0
  303. package/dist/internal/event-tracking/di/eventTrackingModuleTypes.d.ts.map +1 -0
  304. package/dist/internal/event-tracking/service/DefaultEventTrackingService.d.ts +30 -0
  305. package/dist/internal/event-tracking/service/DefaultEventTrackingService.d.ts.map +1 -0
  306. package/dist/internal/event-tracking/service/EventTrackingService.d.ts +6 -0
  307. package/dist/internal/event-tracking/service/EventTrackingService.d.ts.map +1 -0
  308. package/dist/internal/event-tracking/service/StubEventTrackingService.d.ts +7 -0
  309. package/dist/internal/event-tracking/service/StubEventTrackingService.d.ts.map +1 -0
  310. package/dist/internal/event-tracking/use-case/TrackConsentGiven.d.ts +12 -0
  311. package/dist/internal/event-tracking/use-case/TrackConsentGiven.d.ts.map +1 -0
  312. package/dist/internal/event-tracking/use-case/TrackConsentRemoved.d.ts +14 -0
  313. package/dist/internal/event-tracking/use-case/TrackConsentRemoved.d.ts.map +1 -0
  314. package/dist/internal/event-tracking/use-case/TrackCurrencyChanged.d.ts +12 -0
  315. package/dist/internal/event-tracking/use-case/TrackCurrencyChanged.d.ts.map +1 -0
  316. package/dist/internal/event-tracking/use-case/TrackFloatingButtonClick.d.ts +12 -0
  317. package/dist/internal/event-tracking/use-case/TrackFloatingButtonClick.d.ts.map +1 -0
  318. package/dist/internal/event-tracking/use-case/TrackLanguageChanged.d.ts +12 -0
  319. package/dist/internal/event-tracking/use-case/TrackLanguageChanged.d.ts.map +1 -0
  320. package/dist/internal/event-tracking/use-case/TrackLedgerSyncActivated.d.ts +14 -0
  321. package/dist/internal/event-tracking/use-case/TrackLedgerSyncActivated.d.ts.map +1 -0
  322. package/dist/internal/event-tracking/use-case/TrackLedgerSyncOpened.d.ts +12 -0
  323. package/dist/internal/event-tracking/use-case/TrackLedgerSyncOpened.d.ts.map +1 -0
  324. package/dist/internal/event-tracking/use-case/TrackMobileRedirectLedgerWallet.d.ts +12 -0
  325. package/dist/internal/event-tracking/use-case/TrackMobileRedirectLedgerWallet.d.ts.map +1 -0
  326. package/dist/internal/event-tracking/use-case/TrackOnboarding.d.ts +17 -0
  327. package/dist/internal/event-tracking/use-case/TrackOnboarding.d.ts.map +1 -0
  328. package/dist/internal/event-tracking/use-case/TrackOpenSession.d.ts +12 -0
  329. package/dist/internal/event-tracking/use-case/TrackOpenSession.d.ts.map +1 -0
  330. package/dist/internal/event-tracking/use-case/TrackTransactionCompleted.d.ts +15 -0
  331. package/dist/internal/event-tracking/use-case/TrackTransactionCompleted.d.ts.map +1 -0
  332. package/dist/internal/event-tracking/use-case/TrackTransactionStarted.d.ts +14 -0
  333. package/dist/internal/event-tracking/use-case/TrackTransactionStarted.d.ts.map +1 -0
  334. package/dist/internal/event-tracking/use-case/TrackTypedMessageCompleted.d.ts +14 -0
  335. package/dist/internal/event-tracking/use-case/TrackTypedMessageCompleted.d.ts.map +1 -0
  336. package/dist/internal/event-tracking/use-case/TrackTypedMessageStarted.d.ts +14 -0
  337. package/dist/internal/event-tracking/use-case/TrackTypedMessageStarted.d.ts.map +1 -0
  338. package/dist/internal/event-tracking/use-case/TrackViewAllTransactions.d.ts +21 -0
  339. package/dist/internal/event-tracking/use-case/TrackViewAllTransactions.d.ts.map +1 -0
  340. package/dist/internal/event-tracking/use-case/TrackViewTransactionDetailsClick.d.ts +14 -0
  341. package/dist/internal/event-tracking/use-case/TrackViewTransactionDetailsClick.d.ts.map +1 -0
  342. package/dist/internal/event-tracking/use-case/TrackWalletAction.d.ts +15 -0
  343. package/dist/internal/event-tracking/use-case/TrackWalletAction.d.ts.map +1 -0
  344. package/dist/internal/event-tracking/utils.d.ts +2 -0
  345. package/dist/internal/event-tracking/utils.d.ts.map +1 -0
  346. package/dist/internal/ledgersync/di/ledgerSyncModule.d.ts +7 -0
  347. package/dist/internal/ledgersync/di/ledgerSyncModule.d.ts.map +1 -0
  348. package/dist/internal/ledgersync/di/ledgerSyncModuleTypes.d.ts +4 -0
  349. package/dist/internal/ledgersync/di/ledgerSyncModuleTypes.d.ts.map +1 -0
  350. package/dist/internal/ledgersync/model/InternalAuthContext.d.ts +9 -0
  351. package/dist/internal/ledgersync/model/InternalAuthContext.d.ts.map +1 -0
  352. package/dist/internal/ledgersync/model/errors.d.ts +18 -0
  353. package/dist/internal/ledgersync/model/errors.d.ts.map +1 -0
  354. package/dist/internal/ledgersync/service/DefaultLedgerSyncService.d.ts +36 -0
  355. package/dist/internal/ledgersync/service/DefaultLedgerSyncService.d.ts.map +1 -0
  356. package/dist/internal/ledgersync/service/LedgerSyncService.d.ts +9 -0
  357. package/dist/internal/ledgersync/service/LedgerSyncService.d.ts.map +1 -0
  358. package/dist/internal/ledgersync/service/StubLedgerSyncService.d.ts +10 -0
  359. package/dist/internal/ledgersync/service/StubLedgerSyncService.d.ts.map +1 -0
  360. package/dist/internal/logger/di/loggerModule.d.ts +9 -0
  361. package/dist/internal/logger/di/loggerModule.d.ts.map +1 -0
  362. package/dist/internal/logger/di/loggerModuleTypes.d.ts +5 -0
  363. package/dist/internal/logger/di/loggerModuleTypes.d.ts.map +1 -0
  364. package/dist/internal/logger/model/constant.d.ts +10 -0
  365. package/dist/internal/logger/model/constant.d.ts.map +1 -0
  366. package/dist/internal/logger/service/ConsoleLoggerSubscriber.d.ts +12 -0
  367. package/dist/internal/logger/service/ConsoleLoggerSubscriber.d.ts.map +1 -0
  368. package/dist/internal/logger/service/DefaultLoggerPublisher.d.ts +14 -0
  369. package/dist/internal/logger/service/DefaultLoggerPublisher.d.ts.map +1 -0
  370. package/dist/internal/logger/service/ErrorTrackingLoggerSubscriber.d.ts +21 -0
  371. package/dist/internal/logger/service/ErrorTrackingLoggerSubscriber.d.ts.map +1 -0
  372. package/dist/internal/logger/service/LoggerPublisher.d.ts +16 -0
  373. package/dist/internal/logger/service/LoggerPublisher.d.ts.map +1 -0
  374. package/dist/internal/logger/service/LoggerSubscriber.d.ts +5 -0
  375. package/dist/internal/logger/service/LoggerSubscriber.d.ts.map +1 -0
  376. package/dist/internal/modal/di/modalModule.d.ts +3 -0
  377. package/dist/internal/modal/di/modalModule.d.ts.map +1 -0
  378. package/dist/internal/modal/di/modalModuleTypes.d.ts +4 -0
  379. package/dist/internal/modal/di/modalModuleTypes.d.ts.map +1 -0
  380. package/dist/internal/modal/service/ModalService.d.ts +15 -0
  381. package/dist/internal/modal/service/ModalService.d.ts.map +1 -0
  382. package/dist/internal/navigation/di/navigationModule.d.ts +3 -0
  383. package/dist/internal/navigation/di/navigationModule.d.ts.map +1 -0
  384. package/dist/internal/navigation/di/navigationModuleTypes.d.ts +4 -0
  385. package/dist/internal/navigation/di/navigationModuleTypes.d.ts.map +1 -0
  386. package/dist/internal/navigation/service/NavigationIntentService.d.ts +16 -0
  387. package/dist/internal/navigation/service/NavigationIntentService.d.ts.map +1 -0
  388. package/dist/internal/network/DefaultNetworkService.d.ts +15 -0
  389. package/dist/internal/network/DefaultNetworkService.d.ts.map +1 -0
  390. package/dist/internal/network/NetworkService.d.ts +9 -0
  391. package/dist/internal/network/NetworkService.d.ts.map +1 -0
  392. package/dist/internal/network/di/networkModule.d.ts +7 -0
  393. package/dist/internal/network/di/networkModule.d.ts.map +1 -0
  394. package/dist/internal/network/di/networkModuleTypes.d.ts +4 -0
  395. package/dist/internal/network/di/networkModuleTypes.d.ts.map +1 -0
  396. package/dist/internal/network/model/constant.d.ts +7 -0
  397. package/dist/internal/network/model/constant.d.ts.map +1 -0
  398. package/dist/internal/network/model/types.d.ts +2 -0
  399. package/dist/internal/network/model/types.d.ts.map +1 -0
  400. package/dist/internal/network/utils/merge.d.ts +4 -0
  401. package/dist/internal/network/utils/merge.d.ts.map +1 -0
  402. package/dist/internal/pending-transaction/controller/DefaultPendingTransactionController.d.ts +53 -0
  403. package/dist/internal/pending-transaction/controller/DefaultPendingTransactionController.d.ts.map +1 -0
  404. package/dist/internal/pending-transaction/controller/PendingTransactionController.d.ts +20 -0
  405. package/dist/internal/pending-transaction/controller/PendingTransactionController.d.ts.map +1 -0
  406. package/dist/internal/pending-transaction/di/pendingTransactionModule.d.ts +3 -0
  407. package/dist/internal/pending-transaction/di/pendingTransactionModule.d.ts.map +1 -0
  408. package/dist/internal/pending-transaction/di/pendingTransactionModuleTypes.d.ts +8 -0
  409. package/dist/internal/pending-transaction/di/pendingTransactionModuleTypes.d.ts.map +1 -0
  410. package/dist/internal/pending-transaction/model/BroadcastTracking.d.ts +13 -0
  411. package/dist/internal/pending-transaction/model/BroadcastTracking.d.ts.map +1 -0
  412. package/dist/internal/pending-transaction/model/PendingTransaction.d.ts +17 -0
  413. package/dist/internal/pending-transaction/model/PendingTransaction.d.ts.map +1 -0
  414. package/dist/internal/pending-transaction/service/DefaultPendingTransactionStorageService.d.ts +13 -0
  415. package/dist/internal/pending-transaction/service/DefaultPendingTransactionStorageService.d.ts.map +1 -0
  416. package/dist/internal/pending-transaction/service/PendingTransactionStorageService.d.ts +7 -0
  417. package/dist/internal/pending-transaction/service/PendingTransactionStorageService.d.ts.map +1 -0
  418. package/dist/internal/pending-transaction/use-case/ConfirmPendingTransactionsUseCase.d.ts +20 -0
  419. package/dist/internal/pending-transaction/use-case/ConfirmPendingTransactionsUseCase.d.ts.map +1 -0
  420. package/dist/internal/pending-transaction/use-case/HydratePendingTransactionsWithFiatUseCase.d.ts +16 -0
  421. package/dist/internal/pending-transaction/use-case/HydratePendingTransactionsWithFiatUseCase.d.ts.map +1 -0
  422. package/dist/internal/pending-transaction/use-case/TrackBroadcastedTransactionUseCase.d.ts +22 -0
  423. package/dist/internal/pending-transaction/use-case/TrackBroadcastedTransactionUseCase.d.ts.map +1 -0
  424. package/dist/internal/pending-transaction/utils/buildExplorerTransactionUrl.d.ts +2 -0
  425. package/dist/internal/pending-transaction/utils/buildExplorerTransactionUrl.d.ts.map +1 -0
  426. package/dist/internal/platform/di/platformModule.d.ts +3 -0
  427. package/dist/internal/platform/di/platformModule.d.ts.map +1 -0
  428. package/dist/internal/platform/di/platformModuleTypes.d.ts +6 -0
  429. package/dist/internal/platform/di/platformModuleTypes.d.ts.map +1 -0
  430. package/dist/internal/platform/use-case/IsLedgerLiveMobileUseCase.d.ts +4 -0
  431. package/dist/internal/platform/use-case/IsLedgerLiveMobileUseCase.d.ts.map +1 -0
  432. package/dist/internal/platform/use-case/IsMobileUseCase.d.ts +4 -0
  433. package/dist/internal/platform/use-case/IsMobileUseCase.d.ts.map +1 -0
  434. package/dist/internal/platform/use-case/IsSupportedPlatformUseCase.d.ts +9 -0
  435. package/dist/internal/platform/use-case/IsSupportedPlatformUseCase.d.ts.map +1 -0
  436. package/dist/internal/storage/DefaultStorageService.d.ts +54 -0
  437. package/dist/internal/storage/DefaultStorageService.d.ts.map +1 -0
  438. package/dist/internal/storage/StorageService.d.ts +43 -0
  439. package/dist/internal/storage/StorageService.d.ts.map +1 -0
  440. package/dist/internal/storage/di/storageModule.d.ts +7 -0
  441. package/dist/internal/storage/di/storageModule.d.ts.map +1 -0
  442. package/dist/internal/storage/di/storageModuleTypes.d.ts +7 -0
  443. package/dist/internal/storage/di/storageModuleTypes.d.ts.map +1 -0
  444. package/dist/internal/storage/model/FeatureFlags.d.ts +5 -0
  445. package/dist/internal/storage/model/FeatureFlags.d.ts.map +1 -0
  446. package/dist/internal/storage/model/UserConsent.d.ts +5 -0
  447. package/dist/internal/storage/model/UserConsent.d.ts.map +1 -0
  448. package/dist/internal/storage/model/accountDbModel.d.ts +9 -0
  449. package/dist/internal/storage/model/accountDbModel.d.ts.map +1 -0
  450. package/dist/internal/storage/model/constant.d.ts +22 -0
  451. package/dist/internal/storage/model/constant.d.ts.map +1 -0
  452. package/dist/internal/storage/model/errors.d.ts +19 -0
  453. package/dist/internal/storage/model/errors.d.ts.map +1 -0
  454. package/dist/internal/storage/service/DefaultIndexedDbService.d.ts +30 -0
  455. package/dist/internal/storage/service/DefaultIndexedDbService.d.ts.map +1 -0
  456. package/dist/internal/storage/service/IndexedDbService.d.ts +22 -0
  457. package/dist/internal/storage/service/IndexedDbService.d.ts.map +1 -0
  458. package/dist/internal/storage/use-case/KeypairMigrationService.d.ts +18 -0
  459. package/dist/internal/storage/use-case/KeypairMigrationService.d.ts.map +1 -0
  460. package/dist/internal/storage/use-case/MigrateDbUseCase.d.ts +29 -0
  461. package/dist/internal/storage/use-case/MigrateDbUseCase.d.ts.map +1 -0
  462. package/dist/internal/transaction-history/datasource/coinService/DefaultTransactionHistoryDataSource.d.ts +35 -0
  463. package/dist/internal/transaction-history/datasource/coinService/DefaultTransactionHistoryDataSource.d.ts.map +1 -0
  464. package/dist/internal/transaction-history/datasource/coinService/TransactionHistoryDataSource.d.ts +7 -0
  465. package/dist/internal/transaction-history/datasource/coinService/TransactionHistoryDataSource.d.ts.map +1 -0
  466. package/dist/internal/transaction-history/datasource/coinService/coinServiceDtos.d.ts +57 -0
  467. package/dist/internal/transaction-history/datasource/coinService/coinServiceDtos.d.ts.map +1 -0
  468. package/dist/internal/transaction-history/di/transactionHistoryModule.d.ts +7 -0
  469. package/dist/internal/transaction-history/di/transactionHistoryModule.d.ts.map +1 -0
  470. package/dist/internal/transaction-history/di/transactionHistoryModuleTypes.d.ts +6 -0
  471. package/dist/internal/transaction-history/di/transactionHistoryModuleTypes.d.ts.map +1 -0
  472. package/dist/internal/transaction-history/model/TransactionHistoryError.d.ts +10 -0
  473. package/dist/internal/transaction-history/model/TransactionHistoryError.d.ts.map +1 -0
  474. package/dist/internal/transaction-history/model/transactionHistoryTypes.d.ts +40 -0
  475. package/dist/internal/transaction-history/model/transactionHistoryTypes.d.ts.map +1 -0
  476. package/dist/internal/transaction-history/use-case/FetchTransactionHistoryUseCase.d.ts +25 -0
  477. package/dist/internal/transaction-history/use-case/FetchTransactionHistoryUseCase.d.ts.map +1 -0
  478. package/dist/internal/transaction-history/use-case/HydrateTransactionsWithFiatUseCase.d.ts +40 -0
  479. package/dist/internal/transaction-history/use-case/HydrateTransactionsWithFiatUseCase.d.ts.map +1 -0
  480. package/dist/internal/transaction-history/use-case/buildTransactionHistoryItem.d.ts +29 -0
  481. package/dist/internal/transaction-history/use-case/buildTransactionHistoryItem.d.ts.map +1 -0
  482. package/dist/internal/transaction-history/utils/normalizeAddressForCurrency.d.ts +13 -0
  483. package/dist/internal/transaction-history/utils/normalizeAddressForCurrency.d.ts.map +1 -0
  484. package/dist/internal/transaction-history/utils/resolveNetworkSlug.d.ts +12 -0
  485. package/dist/internal/transaction-history/utils/resolveNetworkSlug.d.ts.map +1 -0
  486. package/dist/schemas/event-schemas.d.ts +464 -0
  487. package/dist/schemas/event-schemas.d.ts.map +1 -0
  488. package/package.json +48 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2024-present Ledger
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @ledgerhq/ledger-wallet-provider-core
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build ledger-wallet-provider-core` to build the library.
8
+
9
+ ## Running unit tests
10
+
11
+ Run `nx test ledger-wallet-provider-core` to execute the unit tests via [Vitest](https://vitest.dev/).
@@ -0,0 +1,127 @@
1
+ import { Observable } from 'rxjs';
2
+ import { BlockchainFamily, WalletNavigationIntent } from './blockchain-provider/model/types';
3
+ import { Account, AccountGroup, AccountWithFiat, DetailedAccount, Network } from './model/Account';
4
+ import { ButtonCoreContext } from './model/ButtonCoreContext';
5
+ import { LedgerSyncAuthenticateResponse } from './model/LedgerSyncAuthenticateResponse';
6
+ import { ObserveAccountGroupsOptions } from '../internal/account/use-case/observeAccountGroupsUseCase';
7
+ import { WalletActionType } from '../internal/backend/model/trackEvent';
8
+ import { JSONRPCRequest } from '../internal/backend/types';
9
+ import { Config } from '../internal/config/model/config';
10
+ import { FiatCurrency } from '../internal/currency/datasource/fiatCurrencyTypes';
11
+ import { ConnectionType } from '../internal/device/service/DeviceManagementKitService';
12
+ import { ContainerOptions } from '../internal/diTypes';
13
+ import { TrackViewAllTransactionsParams } from '../internal/event-tracking/use-case/TrackViewAllTransactions';
14
+ import { LOG_LEVELS } from '../internal/logger/model/constant';
15
+ import { BroadcastTracking } from '../internal/pending-transaction/model/BroadcastTracking';
16
+ import { PendingTransaction } from '../internal/pending-transaction/model/PendingTransaction';
17
+ import { FeatureFlags } from '../internal/storage/model/FeatureFlags';
18
+ export type LedgerButtonCoreOptions = ContainerOptions;
19
+ export declare class LedgerButtonCore {
20
+ private readonly opts;
21
+ private container;
22
+ private readonly _logger;
23
+ private readonly _modalService;
24
+ private get _contextService();
25
+ private get _navigationIntentService();
26
+ private deviceConnectionSubscription?;
27
+ constructor(opts: LedgerButtonCoreOptions);
28
+ private initializeContext;
29
+ private listenDevice;
30
+ /**
31
+ * Disconnect a blockchain `family`'s selected account. While other families
32
+ * still have a selected account, only that family's account is removed;
33
+ * once no selected account remains (or when called with no `family`), the
34
+ * whole session is reset. Passing no `family` forces a full reset (used for
35
+ * an expired trust chain or an explicit "log out").
36
+ */
37
+ disconnect(family?: BlockchainFamily): Promise<void>;
38
+ private resetSession;
39
+ connectToDevice(type: ConnectionType): Promise<import('.').Device>;
40
+ disconnectFromDevice(): Promise<void>;
41
+ getReferralUrl(): Promise<string>;
42
+ switchDevice(type: ConnectionType): Promise<void>;
43
+ fetchAccountsFromCloudSync(): Promise<Account[]>;
44
+ observeAccounts(options?: {
45
+ forceRefresh?: boolean;
46
+ family?: BlockchainFamily;
47
+ }): Observable<AccountWithFiat[]>;
48
+ /**
49
+ * Accounts ready to be listed: grouped by address, sorted by fiat value and
50
+ * filtered by `searchQuery$`, with the per-account total and display tokens
51
+ * already computed.
52
+ */
53
+ observeAccountGroups(options?: ObserveAccountGroupsOptions): Observable<AccountGroup[]>;
54
+ /** Networks available for the address of the currently selected account. */
55
+ observeNetworksForSelectedAddress(): Observable<Network[]>;
56
+ /**
57
+ * Switch to the account of the currently selected address on another network.
58
+ * Returns `false` when no such account exists.
59
+ */
60
+ selectAccountForNetwork(currencyId: string): boolean;
61
+ selectAccount(account: Account): void;
62
+ /** Default (ethereum) selected account, or for a specific `family`. */
63
+ getSelectedAccount(family?: BlockchainFamily): Account | undefined;
64
+ /** Selected account for the currently active family (family-agnostic). */
65
+ getActiveSelectedAccount(): Account | undefined;
66
+ /** The currently active blockchain family, if any. */
67
+ getActiveFamily(): BlockchainFamily | undefined;
68
+ /** All blockchain families that currently have a selected account. */
69
+ getConnectedFamilies(): BlockchainFamily[];
70
+ /** Switch the active family (must already have a selected account). */
71
+ setActiveFamily(family: BlockchainFamily): void;
72
+ private resolveFamilyAndChainId;
73
+ getConnectedDevice(): import('.').Device | undefined;
74
+ listAvailableDevices(): Promise<import('@ledgerhq/device-management-kit').DiscoveredDevice[]>;
75
+ hasConsent(): Promise<boolean>;
76
+ hasRespondedToConsent(): Promise<boolean>;
77
+ giveConsent(): Promise<void>;
78
+ refuseConsent(): Promise<void>;
79
+ removeConsent(): Promise<void>;
80
+ setWelcomeScreenCompleted(): Promise<void>;
81
+ isWelcomeScreenCompleted(): boolean;
82
+ enableDeveloperMode(): void;
83
+ hasDeveloperMode(): boolean;
84
+ getFeatureFlags(): FeatureFlags;
85
+ setFeatureFlag(flag: keyof FeatureFlags, enabled: boolean): void;
86
+ getPreferredFiatCurrency(): string;
87
+ getSupportedFiatCurrencies(): FiatCurrency[];
88
+ savePreferredFiatCurrency(currency: string): Promise<void>;
89
+ savePreferredLanguage(language: string): Promise<void>;
90
+ getPreferredLanguage(): Promise<string | undefined>;
91
+ jsonRpcRequest(args: JSONRPCRequest): Promise<import('./model').BroadcastResponse>;
92
+ /** Stream of generic navigation intents emitted by core for the UI to map. */
93
+ observeNavigationIntents(): Observable<WalletNavigationIntent>;
94
+ connectToLedgerSync(): Observable<LedgerSyncAuthenticateResponse>;
95
+ private isAuthContext;
96
+ observeContext(): Observable<ButtonCoreContext>;
97
+ fetchSelectedAccount(family?: BlockchainFamily): Promise<DetailedAccount | undefined>;
98
+ observePendingTransactions(): Observable<PendingTransaction[]>;
99
+ /**
100
+ * Lifecycle of a single broadcasted transaction, from `processing` (once core
101
+ * has registered it and resolved its explorer link) to `validated`.
102
+ */
103
+ observeBroadcastedTransaction(hash: string): Observable<BroadcastTracking>;
104
+ getConfig(): Config;
105
+ setLogLevel(logLevel: keyof typeof LOG_LEVELS): void;
106
+ isMobile(): boolean;
107
+ isSupportedPlatform(): boolean;
108
+ setChainId(chainId: number): void;
109
+ getChainId(): number;
110
+ getCurrencyInfo(currencyId: string): Promise<{
111
+ name: string;
112
+ ticker: string;
113
+ transactionExplorerUrlTemplate?: string;
114
+ }>;
115
+ trackMobileRedirectLedgerWallet(): Promise<void>;
116
+ trackFloatingButtonClick(): Promise<void>;
117
+ trackViewTransactionDetailsClicked(transactionHash: string): Promise<void>;
118
+ trackViewAllTransactionsClicked(params: TrackViewAllTransactionsParams): Promise<void>;
119
+ trackViewAllTransactionsRedirectConfirmed(params: TrackViewAllTransactionsParams): Promise<void>;
120
+ trackViewAllTransactionsRedirectCancelled(params: TrackViewAllTransactionsParams): Promise<void>;
121
+ trackLanguageChanged(languageKey: string): Promise<void>;
122
+ trackCurrencyChanged(currencyCode: string): Promise<void>;
123
+ trackWalletActionClicked(walletAction: WalletActionType): Promise<void>;
124
+ trackWalletRedirectConfirmed(walletAction: WalletActionType): Promise<void>;
125
+ trackWalletRedirectCancelled(walletAction: WalletActionType): Promise<void>;
126
+ }
127
+ //# sourceMappingURL=LedgerButtonCore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LedgerButtonCore.d.ts","sourceRoot":"","sources":["../../src/api/LedgerButtonCore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAqB,MAAM,MAAM,CAAC;AAErD,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,OAAO,EACP,YAAY,EACZ,eAAe,EACf,eAAe,EACf,OAAO,EACR,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EAMlB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,8BAA8B,EAC/B,MAA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EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC;IAQV,+BAA+B,CACnC,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,IAAI,CAAC;IAQV,yCAAyC,CAC7C,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,IAAI,CAAC;IAQV,yCAAyC,CAC7C,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,IAAI,CAAC;IAQV,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxD,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMzD,wBAAwB,CAC5B,YAAY,EAAE,gBAAgB,GAC7B,OAAO,CAAC,IAAI,CAAC;IAMV,4BAA4B,CAChC,YAAY,EAAE,gBAAgB,GAC7B,OAAO,CAAC,IAAI,CAAC;IAMV,4BAA4B,CAChC,YAAY,EAAE,gBAAgB,GAC7B,OAAO,CAAC,IAAI,CAAC;CAKjB"}
@@ -0,0 +1,41 @@
1
+ import { ProviderAccount } from '../../model/blockchain/ProviderAccount';
2
+ import { BlockchainConfig } from '../../model/dappConfig/BlockchainConfig';
3
+ import { CurrencyDescriptor } from './CurrencyDescriptor';
4
+ import { BlockchainFamily } from './types';
5
+ /**
6
+ * Entry point for a concrete blockchain family implementation (EVM, Solana, …).
7
+ *
8
+ * Wired once by {@link DefaultBlockchainProviderManager}; core then pushes
9
+ * selected account / network through the context methods.
10
+ */
11
+ export interface BlockchainProvider<F extends BlockchainFamily = BlockchainFamily> {
12
+ readonly family: F;
13
+ readonly dappConfig: BlockchainConfig;
14
+ /**
15
+ * Wire the provider with the core host and dApp config and announce it to
16
+ * the dApp (EIP-6963 / Wallet Standard).
17
+ *
18
+ * Called once by {@link DefaultBlockchainProviderManager} after the dApp
19
+ * config has been fetched.
20
+ */
21
+ injectWalletProviders(): void;
22
+ /**
23
+ * dApp-initiated disconnect for this family: clear local wallet state,
24
+ * notify the dApp, and ask core to drop the family's selected account.
25
+ */
26
+ disconnect(): Promise<void>;
27
+ setSelectedAccount(account: ProviderAccount | undefined): void;
28
+ setNetwork(chainId: number): void;
29
+ /**
30
+ * Everything this family knows about a Ledger `currencyId` it owns, or
31
+ * `undefined` when the currency belongs to another family. Owned by the
32
+ * provider so core never reaches into family-specific chain tables.
33
+ */
34
+ describeCurrency(currencyId: string): CurrencyDescriptor | undefined;
35
+ /**
36
+ * Reverse lookup of {@link describeCurrency}, keyed by network id (EVM
37
+ * chainId as a string, Solana cluster), for when core only has a network id.
38
+ */
39
+ describeNetwork(networkId: string): CurrencyDescriptor | undefined;
40
+ }
41
+ //# sourceMappingURL=BlockchainProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockchainProvider.d.ts","sourceRoot":"","sources":["../../../../src/api/blockchain-provider/model/BlockchainProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB;IAE7C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACnB,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC;;;;;;OAMG;IACH,qBAAqB,IAAI,IAAI,CAAC;IAC9B;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/D,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;OAIG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAAC;IACrE;;;OAGG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAAC;CACpE"}
@@ -0,0 +1,22 @@
1
+ import { Either } from 'purify-ts';
2
+ import { BlockchainConfig } from '../../model/dappConfig/BlockchainConfig';
3
+ import { BlockchainProvider } from './BlockchainProvider';
4
+ import { CoreFacade } from './CoreFacade';
5
+ import { BlockchainFamily } from './types';
6
+ /**
7
+ * A function that creates a {@link BlockchainProvider} for one blockchain
8
+ * family. It receives the full list of dApp blockchain configs and is
9
+ * responsible for extracting its own slice (e.g. via {@link findBlockchainConfig}).
10
+ *
11
+ * Return `Left(family)` if the family has no matching config — the manager
12
+ * will log the skipped family and move on. Return `Right(provider)` on success.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * initializeLedgerProvider({
17
+ * blockchainProviderFactories: [evmBlockchainProviderFactory],
18
+ * });
19
+ * ```
20
+ */
21
+ export type BlockchainProviderFactory<F extends BlockchainFamily = BlockchainFamily> = (core: CoreFacade, blockchains: BlockchainConfig[]) => Either<F, BlockchainProvider<F>>;
22
+ //# sourceMappingURL=BlockchainProviderFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockchainProviderFactory.d.ts","sourceRoot":"","sources":["../../../../src/api/blockchain-provider/model/BlockchainProviderFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,yBAAyB,CACnC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAC3C,CACF,IAAI,EAAE,UAAU,EAChB,WAAW,EAAE,gBAAgB,EAAE,KAC5B,MAAM,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { ProviderGasFeeEstimation, ProviderTransactionInfo } from '../../model/blockchain/GasFee';
2
+ import { ProviderAccount } from '../../model/blockchain/ProviderAccount';
3
+ import { ProviderLogger } from '../../model/blockchain/ProviderLogger';
4
+ import { SignedResults } from '../../model/signing/SignedTransaction';
5
+ import { SignFlowStatus } from '../../model/signing/SignFlowStatus';
6
+ import { BroadcastResponse, JSONRPCRequest } from '../../../internal/backend/types';
7
+ import { BlockchainFamily, BroadcastedTransactionMetadata, ProviderBlockchain, ProviderDeviceSession, ProviderSdkConfig, WalletNavigationIntent } from './types';
8
+ /**
9
+ * Outbound port the provider CALLS (provider -> core). It is the single set of
10
+ * core capabilities a blockchain provider module depends on; everything else in
11
+ * core stays private to keep the module a candidate for package extraction.
12
+ */
13
+ export interface CoreFacade {
14
+ /**
15
+ * Backend-backed JSON-RPC transport to the node: reads (`eth_getBalance`,
16
+ * `eth_call`, gas, nonce, ...) AND broadcasting a signed raw tx. The provider
17
+ * supplies the target {@link ProviderBlockchain}; core forwards the call to
18
+ * the backend and never interprets the method.
19
+ */
20
+ broadcastRPC(args: JSONRPCRequest, blockchain: ProviderBlockchain): Promise<BroadcastResponse>;
21
+ requestAccount(family: BlockchainFamily): Promise<ProviderAccount>;
22
+ requestSwitchChain(chainId: number): Promise<void>;
23
+ /**
24
+ * Disconnect the calling provider's blockchain `family`: core drops that
25
+ * family's selected account and only tears the whole session down once no
26
+ * selected account remains.
27
+ */
28
+ disconnect(family: BlockchainFamily): Promise<void>;
29
+ /** Scoped logger; `tag` prefixes the provider's log lines. */
30
+ getLogger(tag: string): ProviderLogger;
31
+ /** Shared DMK handle + current device session (core owns connection). */
32
+ getDeviceSession(): ProviderDeviceSession;
33
+ /** Origin token + dApp identifier needed to build the signer/context. */
34
+ getSdkConfig(): ProviderSdkConfig;
35
+ /** Whether the in-flow modal is currently open (broadcast gate). */
36
+ isModalOpen(): boolean;
37
+ trackTransactionStarted(): void;
38
+ trackTransactionCompleted(rawTransaction: string, result: SignedResults): void;
39
+ /** Track an opaque provider-owned message payload without interpreting it. */
40
+ trackTypedMessageStarted(typedData: unknown): void;
41
+ /** Track an opaque provider-owned message payload without interpreting it. */
42
+ trackTypedMessageCompleted(typedData: unknown): void;
43
+ /**
44
+ * Gas-fee estimation via the coin-service, when the chain is supported.
45
+ * Returns `undefined` so the provider can fall back to RPC estimation.
46
+ */
47
+ estimateGasFromCoinService(tx: ProviderTransactionInfo): Promise<ProviderGasFeeEstimation | undefined>;
48
+ /** Emit a UI navigation intent for the current sign / selection phase. */
49
+ emitNavigationIntent(intent: WalletNavigationIntent): void;
50
+ /** Forward a sign-flow status so core can track a broadcasted transaction. */
51
+ trackBroadcastedTransaction(status: SignFlowStatus, metadata: BroadcastedTransactionMetadata): void;
52
+ }
53
+ //# sourceMappingURL=CoreFacade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreFacade.d.ts","sourceRoot":"","sources":["../../../../src/api/blockchain-provider/model/CoreFacade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EACV,gBAAgB,EAChB,8BAA8B,EAC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"}
@@ -0,0 +1,16 @@
1
+ import { BlockchainFamily } from './types';
2
+ /**
3
+ * Everything a blockchain family knows about a Ledger `currencyId` it owns,
4
+ * resolved in a single lookup so core never reaches into family-specific chain
5
+ * tables nor combines several per-field calls.
6
+ */
7
+ export type CurrencyDescriptor = {
8
+ currencyId: string;
9
+ /** Doubles as the blockchain name the backend expects for RPC calls. */
10
+ family: BlockchainFamily;
11
+ /** Backend / UI network id (EVM chainId as string, Solana cluster, …) */
12
+ networkId: string;
13
+ /** Native decimals fallback when CAL has no metadata. */
14
+ nativeDecimals: number;
15
+ };
16
+ //# sourceMappingURL=CurrencyDescriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CurrencyDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/api/blockchain-provider/model/CurrencyDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,MAAM,EAAE,gBAAgB,CAAC;IACzB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { DeviceManagementKit } from '@ledgerhq/device-management-kit';
2
+ import { Observable } from 'rxjs';
3
+ import { SignedResults } from '../../model/signing/SignedTransaction';
4
+ import { SignFlowStatus } from '../../model/signing/SignFlowStatus';
5
+ import { SignIntentType } from '../../model/signing/SignIntentType';
6
+ /**
7
+ * Blockchain family supported by the wallet provider layer.
8
+ *
9
+ * Used by the manager to dispatch to the right provider implementation based on
10
+ * the selected account / currency.
11
+ */
12
+ export type BlockchainFamily = "ethereum" | "solana";
13
+ /**
14
+ * Public, blackbox surface of a wallet provider.
15
+ *
16
+ * Everything the dApp-facing world needs: the {@link BlockchainFamily} it
17
+ * serves and a single `init()` that performs discovery wiring (EIP-6963
18
+ * announce for EVM, `registerWallet` for Solana) and returns a teardown.
19
+ *
20
+ * The provider talks to core only through {@link CoreFacade}; it never
21
+ * imports `LedgerButtonCore`, which keeps `blockchain-provider` a candidate for
22
+ * extraction into its own package.
23
+ */
24
+ export interface WalletProvider {
25
+ readonly family: BlockchainFamily;
26
+ /** Announce / register the provider and wire listeners; returns teardown. */
27
+ init(): () => void;
28
+ }
29
+ export type { SignedResults };
30
+ /**
31
+ * Target blockchain a provider attaches to a backend JSON-RPC call. The
32
+ * provider owns this identity (it knows its own chain); core only forwards it
33
+ * to the backend without interpreting it.
34
+ */
35
+ export type ProviderBlockchain = {
36
+ name: string;
37
+ chainId: string;
38
+ };
39
+ /**
40
+ * Device handle core exposes to a provider module. `dmk` is the shared
41
+ * {@link DeviceManagementKit} peer dependency (core owns the connection);
42
+ * `sessionId` / `isConnected` reflect the currently connected device.
43
+ */
44
+ export type ProviderDeviceSession = {
45
+ dmk: DeviceManagementKit;
46
+ sessionId?: string;
47
+ isConnected: boolean;
48
+ };
49
+ /**
50
+ * Minimal SDK config a provider needs to build its signer / context module.
51
+ */
52
+ export type ProviderSdkConfig = {
53
+ originToken: string;
54
+ dAppIdentifier: string;
55
+ };
56
+ /**
57
+ * Chain-neutral metadata a provider supplies when core tracks a broadcast.
58
+ *
59
+ * Providers own and interpret their signing payloads. Core only needs the
60
+ * family that selected the account and, when readily available, the native
61
+ * amount used to render the pending transaction.
62
+ */
63
+ export type BroadcastedTransactionMetadata = {
64
+ family: BlockchainFamily;
65
+ value?: string;
66
+ };
67
+ /**
68
+ * Payload carried by the `selectAccount` {@link WalletNavigationIntent} when the
69
+ * selection is triggered by a dApp request. The UI uses `family` to only list
70
+ * accounts compatible with the requesting blockchain (EVM vs Solana). Absent
71
+ * when selection is opened manually (floating button), in which case the UI
72
+ * shows every account.
73
+ */
74
+ export type SelectAccountIntentParams = {
75
+ family: BlockchainFamily;
76
+ };
77
+ /**
78
+ * Payload carried by the `signTransaction` {@link WalletNavigationIntent}.
79
+ *
80
+ * Deliberately a small set of decisions rather than the provider's raw
81
+ * signing payload: everything here is something the provider already knows
82
+ * when it emits the intent.
83
+ *
84
+ * The raw payload is not carried. Pending-transaction tracking receives
85
+ * chain-neutral {@link BroadcastedTransactionMetadata} through
86
+ * {@link CoreFacade.trackBroadcastedTransaction}, on a path that does not
87
+ * go through the UI.
88
+ */
89
+ export type SignIntentParams = {
90
+ family: BlockchainFamily;
91
+ /** What the user is approving - drives the success copy. */
92
+ type: SignIntentType;
93
+ /** Whether core broadcasts the transaction once signed. */
94
+ broadcast: boolean;
95
+ };
96
+ type WalletNavigationIntentBase = {
97
+ /** UI subscribes for live progress (like today's SignFlowStatus). */
98
+ status$: Observable<SignFlowStatus>;
99
+ /** UI acknowledges success -> core resolves the host promise. */
100
+ finish: () => void;
101
+ /** UI asks core to re-run the phase after an error. */
102
+ retry: () => void;
103
+ };
104
+ export type SelectAccountNavigationIntent = WalletNavigationIntentBase & {
105
+ name: "selectAccount";
106
+ params: SelectAccountIntentParams;
107
+ };
108
+ export type SignNavigationIntent = WalletNavigationIntentBase & {
109
+ name: "signTransaction";
110
+ params: SignIntentParams;
111
+ };
112
+ /**
113
+ * Core -> UI navigation intent emitted while core runs an account-selection or
114
+ * sign phase. The button package maps `name` to its own navigation; the
115
+ * `status$` / `finish` / `retry` machinery lives here, not on the provider
116
+ * boundary.
117
+ *
118
+ * Discriminated on `name` so the UI reads `params` without casting.
119
+ */
120
+ export type WalletNavigationIntent = SelectAccountNavigationIntent | SignNavigationIntent;
121
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/blockchain-provider/model/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC,OAAO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;AAEF,KAAK,0BAA0B,GAAG;IAChC,qEAAqE;IACrE,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IACpC,iEAAiE;IACjE,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,uDAAuD;IACvD,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,0BAA0B,GAAG;IACvE,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,yBAAyB,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,0BAA0B,GAAG;IAC9D,IAAI,EAAE,iBAAiB,CAAC;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAC9B,6BAA6B,GAC7B,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { BlockchainConfig } from '../../model/dappConfig/BlockchainConfig';
2
+ export declare const findBlockchainConfig: (blockchains: BlockchainConfig[], family: string) => BlockchainConfig | undefined;
3
+ //# sourceMappingURL=findBlockchainConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findBlockchainConfig.d.ts","sourceRoot":"","sources":["../../../../src/api/blockchain-provider/utils/findBlockchainConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,eAAO,MAAM,oBAAoB,GAC/B,aAAa,gBAAgB,EAAE,EAC/B,QAAQ,MAAM,KACb,gBAAgB,GAAG,SAC4B,CAAC"}