@ledgerhq/context-module 0.0.0-develop-20240926001103

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 (358) hide show
  1. package/README.md +118 -0
  2. package/lib/cjs/index.d.ts +3 -0
  3. package/lib/cjs/index.d.ts.map +1 -0
  4. package/lib/cjs/index.js +20 -0
  5. package/lib/cjs/index.js.map +1 -0
  6. package/lib/cjs/package.json +63 -0
  7. package/lib/cjs/src/ContextModule.d.ts +9 -0
  8. package/lib/cjs/src/ContextModule.d.ts.map +1 -0
  9. package/lib/cjs/src/ContextModule.js +3 -0
  10. package/lib/cjs/src/ContextModule.js.map +1 -0
  11. package/lib/cjs/src/ContextModuleBuilder.d.ts +35 -0
  12. package/lib/cjs/src/ContextModuleBuilder.d.ts.map +1 -0
  13. package/lib/cjs/src/ContextModuleBuilder.js +67 -0
  14. package/lib/cjs/src/ContextModuleBuilder.js.map +1 -0
  15. package/lib/cjs/src/DefaultContextModule.d.ts +20 -0
  16. package/lib/cjs/src/DefaultContextModule.d.ts.map +1 -0
  17. package/lib/cjs/src/DefaultContextModule.js +21 -0
  18. package/lib/cjs/src/DefaultContextModule.js.map +1 -0
  19. package/lib/cjs/src/di.d.ts +3 -0
  20. package/lib/cjs/src/di.d.ts.map +1 -0
  21. package/lib/cjs/src/di.js +16 -0
  22. package/lib/cjs/src/di.js.map +1 -0
  23. package/lib/cjs/src/external-plugin/data/DAppDto.d.ts +38 -0
  24. package/lib/cjs/src/external-plugin/data/DAppDto.d.ts.map +1 -0
  25. package/lib/cjs/src/external-plugin/data/DAppDto.js +3 -0
  26. package/lib/cjs/src/external-plugin/data/DAppDto.js.map +1 -0
  27. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.d.ts +12 -0
  28. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +1 -0
  29. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js +3 -0
  30. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js.map +1 -0
  31. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +8 -0
  32. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +1 -0
  33. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js +71 -0
  34. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js.map +1 -0
  35. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.d.ts +3 -0
  36. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +1 -0
  37. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js +13 -0
  38. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js.map +1 -0
  39. package/lib/cjs/src/external-plugin/di/externalPluginTypes.d.ts +5 -0
  40. package/lib/cjs/src/external-plugin/di/externalPluginTypes.d.ts.map +1 -0
  41. package/lib/cjs/src/external-plugin/di/externalPluginTypes.js +8 -0
  42. package/lib/cjs/src/external-plugin/di/externalPluginTypes.js.map +1 -0
  43. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.d.ts +15 -0
  44. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +1 -0
  45. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js +136 -0
  46. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js.map +1 -0
  47. package/lib/cjs/src/external-plugin/model/DappInfos.d.ts +6 -0
  48. package/lib/cjs/src/external-plugin/model/DappInfos.d.ts.map +1 -0
  49. package/lib/cjs/src/external-plugin/model/DappInfos.js +3 -0
  50. package/lib/cjs/src/external-plugin/model/DappInfos.js.map +1 -0
  51. package/lib/cjs/src/external-plugin/model/SelectorDetails.d.ts +8 -0
  52. package/lib/cjs/src/external-plugin/model/SelectorDetails.d.ts.map +1 -0
  53. package/lib/cjs/src/external-plugin/model/SelectorDetails.js +3 -0
  54. package/lib/cjs/src/external-plugin/model/SelectorDetails.js.map +1 -0
  55. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.d.ts +9 -0
  56. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +1 -0
  57. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.js +3 -0
  58. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.js.map +1 -0
  59. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.d.ts +6 -0
  60. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +1 -0
  61. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js +40 -0
  62. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js.map +1 -0
  63. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.d.ts +3 -0
  64. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +1 -0
  65. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js +13 -0
  66. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js.map +1 -0
  67. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.d.ts +5 -0
  68. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.d.ts.map +1 -0
  69. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js +8 -0
  70. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js.map +1 -0
  71. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.d.ts +11 -0
  72. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +1 -0
  73. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js +66 -0
  74. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js.map +1 -0
  75. package/lib/cjs/src/index.d.ts +13 -0
  76. package/lib/cjs/src/index.d.ts.map +1 -0
  77. package/lib/cjs/src/index.js +29 -0
  78. package/lib/cjs/src/index.js.map +1 -0
  79. package/lib/cjs/src/nft/data/HttpNftDataSource.d.ts +7 -0
  80. package/lib/cjs/src/nft/data/HttpNftDataSource.d.ts.map +1 -0
  81. package/lib/cjs/src/nft/data/HttpNftDataSource.js +57 -0
  82. package/lib/cjs/src/nft/data/HttpNftDataSource.js.map +1 -0
  83. package/lib/cjs/src/nft/data/NftDataSource.d.ts +15 -0
  84. package/lib/cjs/src/nft/data/NftDataSource.d.ts.map +1 -0
  85. package/lib/cjs/src/nft/data/NftDataSource.js +3 -0
  86. package/lib/cjs/src/nft/data/NftDataSource.js.map +1 -0
  87. package/lib/cjs/src/nft/di/nftModuleFactory.d.ts +3 -0
  88. package/lib/cjs/src/nft/di/nftModuleFactory.d.ts.map +1 -0
  89. package/lib/cjs/src/nft/di/nftModuleFactory.js +13 -0
  90. package/lib/cjs/src/nft/di/nftModuleFactory.js.map +1 -0
  91. package/lib/cjs/src/nft/di/nftTypes.d.ts +5 -0
  92. package/lib/cjs/src/nft/di/nftTypes.d.ts.map +1 -0
  93. package/lib/cjs/src/nft/di/nftTypes.js +8 -0
  94. package/lib/cjs/src/nft/di/nftTypes.js.map +1 -0
  95. package/lib/cjs/src/nft/domain/NftContextLoader.d.ts +11 -0
  96. package/lib/cjs/src/nft/domain/NftContextLoader.d.ts.map +1 -0
  97. package/lib/cjs/src/nft/domain/NftContextLoader.js +111 -0
  98. package/lib/cjs/src/nft/domain/NftContextLoader.js.map +1 -0
  99. package/lib/cjs/src/shared/domain/ContextLoader.d.ts +6 -0
  100. package/lib/cjs/src/shared/domain/ContextLoader.d.ts.map +1 -0
  101. package/lib/cjs/src/shared/domain/ContextLoader.js +3 -0
  102. package/lib/cjs/src/shared/domain/ContextLoader.js.map +1 -0
  103. package/lib/cjs/src/shared/model/ClearSignContext.d.ts +21 -0
  104. package/lib/cjs/src/shared/model/ClearSignContext.d.ts.map +1 -0
  105. package/lib/cjs/src/shared/model/ClearSignContext.js +13 -0
  106. package/lib/cjs/src/shared/model/ClearSignContext.js.map +1 -0
  107. package/lib/cjs/src/shared/model/TransactionContext.d.ts +6 -0
  108. package/lib/cjs/src/shared/model/TransactionContext.d.ts.map +1 -0
  109. package/lib/cjs/src/shared/model/TransactionContext.js +3 -0
  110. package/lib/cjs/src/shared/model/TransactionContext.js.map +1 -0
  111. package/lib/cjs/src/shared/model/TransactionSubset.d.ts +6 -0
  112. package/lib/cjs/src/shared/model/TransactionSubset.d.ts.map +1 -0
  113. package/lib/cjs/src/shared/model/TransactionSubset.js +3 -0
  114. package/lib/cjs/src/shared/model/TransactionSubset.js.map +1 -0
  115. package/lib/cjs/src/shared/model/TypedDataClearSignContext.d.ts +33 -0
  116. package/lib/cjs/src/shared/model/TypedDataClearSignContext.d.ts.map +1 -0
  117. package/lib/cjs/src/shared/model/TypedDataClearSignContext.js +6 -0
  118. package/lib/cjs/src/shared/model/TypedDataClearSignContext.js.map +1 -0
  119. package/lib/cjs/src/shared/model/TypedDataContext.d.ts +16 -0
  120. package/lib/cjs/src/shared/model/TypedDataContext.d.ts.map +1 -0
  121. package/lib/cjs/src/shared/model/TypedDataContext.js +3 -0
  122. package/lib/cjs/src/shared/model/TypedDataContext.js.map +1 -0
  123. package/lib/cjs/src/shared/utils/HexStringUtils.d.ts +4 -0
  124. package/lib/cjs/src/shared/utils/HexStringUtils.d.ts.map +1 -0
  125. package/lib/cjs/src/shared/utils/HexStringUtils.js +15 -0
  126. package/lib/cjs/src/shared/utils/HexStringUtils.js.map +1 -0
  127. package/lib/cjs/src/token/data/HttpTokenDataSource.d.ts +6 -0
  128. package/lib/cjs/src/token/data/HttpTokenDataSource.d.ts.map +1 -0
  129. package/lib/cjs/src/token/data/HttpTokenDataSource.js +70 -0
  130. package/lib/cjs/src/token/data/HttpTokenDataSource.js.map +1 -0
  131. package/lib/cjs/src/token/data/TokenDataSource.d.ts +9 -0
  132. package/lib/cjs/src/token/data/TokenDataSource.d.ts.map +1 -0
  133. package/lib/cjs/src/token/data/TokenDataSource.js +3 -0
  134. package/lib/cjs/src/token/data/TokenDataSource.js.map +1 -0
  135. package/lib/cjs/src/token/data/TokenDto.d.ts +6 -0
  136. package/lib/cjs/src/token/data/TokenDto.d.ts.map +1 -0
  137. package/lib/cjs/src/token/data/TokenDto.js +3 -0
  138. package/lib/cjs/src/token/data/TokenDto.js.map +1 -0
  139. package/lib/cjs/src/token/di/tokenModuleFactory.d.ts +3 -0
  140. package/lib/cjs/src/token/di/tokenModuleFactory.d.ts.map +1 -0
  141. package/lib/cjs/src/token/di/tokenModuleFactory.js +13 -0
  142. package/lib/cjs/src/token/di/tokenModuleFactory.js.map +1 -0
  143. package/lib/cjs/src/token/di/tokenTypes.d.ts +5 -0
  144. package/lib/cjs/src/token/di/tokenTypes.d.ts.map +1 -0
  145. package/lib/cjs/src/token/di/tokenTypes.js +8 -0
  146. package/lib/cjs/src/token/di/tokenTypes.js.map +1 -0
  147. package/lib/cjs/src/token/domain/TokenContextLoader.d.ts +15 -0
  148. package/lib/cjs/src/token/domain/TokenContextLoader.d.ts.map +1 -0
  149. package/lib/cjs/src/token/domain/TokenContextLoader.js +74 -0
  150. package/lib/cjs/src/token/domain/TokenContextLoader.js.map +1 -0
  151. package/lib/cjs/src/typed-data/data/FiltersDto.d.ts +35 -0
  152. package/lib/cjs/src/typed-data/data/FiltersDto.d.ts.map +1 -0
  153. package/lib/cjs/src/typed-data/data/FiltersDto.js +3 -0
  154. package/lib/cjs/src/typed-data/data/FiltersDto.js.map +1 -0
  155. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.d.ts +10 -0
  156. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +1 -0
  157. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js +128 -0
  158. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js.map +1 -0
  159. package/lib/cjs/src/typed-data/data/TypedDataDataSource.d.ts +17 -0
  160. package/lib/cjs/src/typed-data/data/TypedDataDataSource.d.ts.map +1 -0
  161. package/lib/cjs/src/typed-data/data/TypedDataDataSource.js +3 -0
  162. package/lib/cjs/src/typed-data/data/TypedDataDataSource.js.map +1 -0
  163. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.d.ts +3 -0
  164. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.d.ts.map +1 -0
  165. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js +13 -0
  166. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js.map +1 -0
  167. package/lib/cjs/src/typed-data/di/typedDataTypes.d.ts +5 -0
  168. package/lib/cjs/src/typed-data/di/typedDataTypes.d.ts.map +1 -0
  169. package/lib/cjs/src/typed-data/di/typedDataTypes.js +8 -0
  170. package/lib/cjs/src/typed-data/di/typedDataTypes.js.map +1 -0
  171. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +13 -0
  172. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +1 -0
  173. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js +127 -0
  174. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +1 -0
  175. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.d.ts +6 -0
  176. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.d.ts.map +1 -0
  177. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js +3 -0
  178. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js.map +1 -0
  179. package/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -0
  180. package/lib/esm/index.d.ts +3 -0
  181. package/lib/esm/index.d.ts.map +1 -0
  182. package/lib/esm/index.js +4 -0
  183. package/lib/esm/index.js.map +1 -0
  184. package/lib/esm/package.json +63 -0
  185. package/lib/esm/src/ContextModule.d.ts +9 -0
  186. package/lib/esm/src/ContextModule.d.ts.map +1 -0
  187. package/lib/esm/src/ContextModule.js +2 -0
  188. package/lib/esm/src/ContextModule.js.map +1 -0
  189. package/lib/esm/src/ContextModuleBuilder.d.ts +35 -0
  190. package/lib/esm/src/ContextModuleBuilder.d.ts.map +1 -0
  191. package/lib/esm/src/ContextModuleBuilder.js +63 -0
  192. package/lib/esm/src/ContextModuleBuilder.js.map +1 -0
  193. package/lib/esm/src/DefaultContextModule.d.ts +20 -0
  194. package/lib/esm/src/DefaultContextModule.d.ts.map +1 -0
  195. package/lib/esm/src/DefaultContextModule.js +17 -0
  196. package/lib/esm/src/DefaultContextModule.js.map +1 -0
  197. package/lib/esm/src/di.d.ts +3 -0
  198. package/lib/esm/src/di.d.ts.map +1 -0
  199. package/lib/esm/src/di.js +12 -0
  200. package/lib/esm/src/di.js.map +1 -0
  201. package/lib/esm/src/external-plugin/data/DAppDto.d.ts +38 -0
  202. package/lib/esm/src/external-plugin/data/DAppDto.d.ts.map +1 -0
  203. package/lib/esm/src/external-plugin/data/DAppDto.js +2 -0
  204. package/lib/esm/src/external-plugin/data/DAppDto.js.map +1 -0
  205. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts +12 -0
  206. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +1 -0
  207. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js +2 -0
  208. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js.map +1 -0
  209. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +8 -0
  210. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +1 -0
  211. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js +65 -0
  212. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js.map +1 -0
  213. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts +3 -0
  214. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +1 -0
  215. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js +9 -0
  216. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js.map +1 -0
  217. package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts +5 -0
  218. package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts.map +1 -0
  219. package/lib/esm/src/external-plugin/di/externalPluginTypes.js +5 -0
  220. package/lib/esm/src/external-plugin/di/externalPluginTypes.js.map +1 -0
  221. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts +15 -0
  222. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +1 -0
  223. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js +133 -0
  224. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js.map +1 -0
  225. package/lib/esm/src/external-plugin/model/DappInfos.d.ts +6 -0
  226. package/lib/esm/src/external-plugin/model/DappInfos.d.ts.map +1 -0
  227. package/lib/esm/src/external-plugin/model/DappInfos.js +2 -0
  228. package/lib/esm/src/external-plugin/model/DappInfos.js.map +1 -0
  229. package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts +8 -0
  230. package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts.map +1 -0
  231. package/lib/esm/src/external-plugin/model/SelectorDetails.js +2 -0
  232. package/lib/esm/src/external-plugin/model/SelectorDetails.js.map +1 -0
  233. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts +9 -0
  234. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +1 -0
  235. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js +2 -0
  236. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js.map +1 -0
  237. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts +6 -0
  238. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +1 -0
  239. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js +34 -0
  240. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js.map +1 -0
  241. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts +3 -0
  242. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +1 -0
  243. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js +9 -0
  244. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js.map +1 -0
  245. package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts +5 -0
  246. package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts.map +1 -0
  247. package/lib/esm/src/forward-domain/di/forwardDomainTypes.js +5 -0
  248. package/lib/esm/src/forward-domain/di/forwardDomainTypes.js.map +1 -0
  249. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts +11 -0
  250. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +1 -0
  251. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js +63 -0
  252. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js.map +1 -0
  253. package/lib/esm/src/index.d.ts +13 -0
  254. package/lib/esm/src/index.d.ts.map +1 -0
  255. package/lib/esm/src/index.js +13 -0
  256. package/lib/esm/src/index.js.map +1 -0
  257. package/lib/esm/src/nft/data/HttpNftDataSource.d.ts +7 -0
  258. package/lib/esm/src/nft/data/HttpNftDataSource.d.ts.map +1 -0
  259. package/lib/esm/src/nft/data/HttpNftDataSource.js +51 -0
  260. package/lib/esm/src/nft/data/HttpNftDataSource.js.map +1 -0
  261. package/lib/esm/src/nft/data/NftDataSource.d.ts +15 -0
  262. package/lib/esm/src/nft/data/NftDataSource.d.ts.map +1 -0
  263. package/lib/esm/src/nft/data/NftDataSource.js +2 -0
  264. package/lib/esm/src/nft/data/NftDataSource.js.map +1 -0
  265. package/lib/esm/src/nft/di/nftModuleFactory.d.ts +3 -0
  266. package/lib/esm/src/nft/di/nftModuleFactory.d.ts.map +1 -0
  267. package/lib/esm/src/nft/di/nftModuleFactory.js +9 -0
  268. package/lib/esm/src/nft/di/nftModuleFactory.js.map +1 -0
  269. package/lib/esm/src/nft/di/nftTypes.d.ts +5 -0
  270. package/lib/esm/src/nft/di/nftTypes.d.ts.map +1 -0
  271. package/lib/esm/src/nft/di/nftTypes.js +5 -0
  272. package/lib/esm/src/nft/di/nftTypes.js.map +1 -0
  273. package/lib/esm/src/nft/domain/NftContextLoader.d.ts +11 -0
  274. package/lib/esm/src/nft/domain/NftContextLoader.d.ts.map +1 -0
  275. package/lib/esm/src/nft/domain/NftContextLoader.js +108 -0
  276. package/lib/esm/src/nft/domain/NftContextLoader.js.map +1 -0
  277. package/lib/esm/src/shared/domain/ContextLoader.d.ts +6 -0
  278. package/lib/esm/src/shared/domain/ContextLoader.d.ts.map +1 -0
  279. package/lib/esm/src/shared/domain/ContextLoader.js +2 -0
  280. package/lib/esm/src/shared/domain/ContextLoader.js.map +1 -0
  281. package/lib/esm/src/shared/model/ClearSignContext.d.ts +21 -0
  282. package/lib/esm/src/shared/model/ClearSignContext.d.ts.map +1 -0
  283. package/lib/esm/src/shared/model/ClearSignContext.js +10 -0
  284. package/lib/esm/src/shared/model/ClearSignContext.js.map +1 -0
  285. package/lib/esm/src/shared/model/TransactionContext.d.ts +6 -0
  286. package/lib/esm/src/shared/model/TransactionContext.d.ts.map +1 -0
  287. package/lib/esm/src/shared/model/TransactionContext.js +2 -0
  288. package/lib/esm/src/shared/model/TransactionContext.js.map +1 -0
  289. package/lib/esm/src/shared/model/TransactionSubset.d.ts +6 -0
  290. package/lib/esm/src/shared/model/TransactionSubset.d.ts.map +1 -0
  291. package/lib/esm/src/shared/model/TransactionSubset.js +2 -0
  292. package/lib/esm/src/shared/model/TransactionSubset.js.map +1 -0
  293. package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts +33 -0
  294. package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts.map +1 -0
  295. package/lib/esm/src/shared/model/TypedDataClearSignContext.js +3 -0
  296. package/lib/esm/src/shared/model/TypedDataClearSignContext.js.map +1 -0
  297. package/lib/esm/src/shared/model/TypedDataContext.d.ts +16 -0
  298. package/lib/esm/src/shared/model/TypedDataContext.d.ts.map +1 -0
  299. package/lib/esm/src/shared/model/TypedDataContext.js +2 -0
  300. package/lib/esm/src/shared/model/TypedDataContext.js.map +1 -0
  301. package/lib/esm/src/shared/utils/HexStringUtils.d.ts +4 -0
  302. package/lib/esm/src/shared/utils/HexStringUtils.d.ts.map +1 -0
  303. package/lib/esm/src/shared/utils/HexStringUtils.js +11 -0
  304. package/lib/esm/src/shared/utils/HexStringUtils.js.map +1 -0
  305. package/lib/esm/src/token/data/HttpTokenDataSource.d.ts +6 -0
  306. package/lib/esm/src/token/data/HttpTokenDataSource.d.ts.map +1 -0
  307. package/lib/esm/src/token/data/HttpTokenDataSource.js +64 -0
  308. package/lib/esm/src/token/data/HttpTokenDataSource.js.map +1 -0
  309. package/lib/esm/src/token/data/TokenDataSource.d.ts +9 -0
  310. package/lib/esm/src/token/data/TokenDataSource.d.ts.map +1 -0
  311. package/lib/esm/src/token/data/TokenDataSource.js +2 -0
  312. package/lib/esm/src/token/data/TokenDataSource.js.map +1 -0
  313. package/lib/esm/src/token/data/TokenDto.d.ts +6 -0
  314. package/lib/esm/src/token/data/TokenDto.d.ts.map +1 -0
  315. package/lib/esm/src/token/data/TokenDto.js +2 -0
  316. package/lib/esm/src/token/data/TokenDto.js.map +1 -0
  317. package/lib/esm/src/token/di/tokenModuleFactory.d.ts +3 -0
  318. package/lib/esm/src/token/di/tokenModuleFactory.d.ts.map +1 -0
  319. package/lib/esm/src/token/di/tokenModuleFactory.js +9 -0
  320. package/lib/esm/src/token/di/tokenModuleFactory.js.map +1 -0
  321. package/lib/esm/src/token/di/tokenTypes.d.ts +5 -0
  322. package/lib/esm/src/token/di/tokenTypes.d.ts.map +1 -0
  323. package/lib/esm/src/token/di/tokenTypes.js +5 -0
  324. package/lib/esm/src/token/di/tokenTypes.js.map +1 -0
  325. package/lib/esm/src/token/domain/TokenContextLoader.d.ts +15 -0
  326. package/lib/esm/src/token/domain/TokenContextLoader.d.ts.map +1 -0
  327. package/lib/esm/src/token/domain/TokenContextLoader.js +71 -0
  328. package/lib/esm/src/token/domain/TokenContextLoader.js.map +1 -0
  329. package/lib/esm/src/typed-data/data/FiltersDto.d.ts +35 -0
  330. package/lib/esm/src/typed-data/data/FiltersDto.d.ts.map +1 -0
  331. package/lib/esm/src/typed-data/data/FiltersDto.js +2 -0
  332. package/lib/esm/src/typed-data/data/FiltersDto.js.map +1 -0
  333. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts +10 -0
  334. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +1 -0
  335. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js +122 -0
  336. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js.map +1 -0
  337. package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts +17 -0
  338. package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts.map +1 -0
  339. package/lib/esm/src/typed-data/data/TypedDataDataSource.js +2 -0
  340. package/lib/esm/src/typed-data/data/TypedDataDataSource.js.map +1 -0
  341. package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts +3 -0
  342. package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts.map +1 -0
  343. package/lib/esm/src/typed-data/di/typedDataModuleFactory.js +9 -0
  344. package/lib/esm/src/typed-data/di/typedDataModuleFactory.js.map +1 -0
  345. package/lib/esm/src/typed-data/di/typedDataTypes.d.ts +5 -0
  346. package/lib/esm/src/typed-data/di/typedDataTypes.d.ts.map +1 -0
  347. package/lib/esm/src/typed-data/di/typedDataTypes.js +5 -0
  348. package/lib/esm/src/typed-data/di/typedDataTypes.js.map +1 -0
  349. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +13 -0
  350. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +1 -0
  351. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js +124 -0
  352. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +1 -0
  353. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts +6 -0
  354. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts.map +1 -0
  355. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js +2 -0
  356. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js.map +1 -0
  357. package/lib/esm/tsconfig.esm.tsbuildinfo +1 -0
  358. package/package.json +62 -0
package/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # Ledger Context Module Implementation
2
+
3
+ > [!CAUTION]
4
+ > This is still under development and we are free to make new interfaces which may lead to Device Management Kit breaking changes.
5
+
6
+ ## Introduction
7
+
8
+ The purpose of the **Context Module** is to provide all the necessary context for the clear signing operation.
9
+ This module includes the Ledger implementation of the context module and all the default context loaders used to fetch the context of a transaction.
10
+ This open-source module can serve as an example for implementing custom context modules or loaders.
11
+
12
+ ## How does it work
13
+
14
+ The Context Module features an interface utilized by the Signer module to retrieve the context of a transaction. This module comprises multiple loaders, each capable of being specified individually. Each loader attempts to fetch context from the backend relevant to its domain. For example, one loader retrieves information about tokens, another fetches information about NFTs, and so on.
15
+
16
+ The following diagram illustrates the communication between the various modules when the context for a token transaction is successfully retrieved:
17
+
18
+ ```mermaid
19
+ flowchart LR;
20
+ Signer --Transaction--> ContextModule
21
+ ContextModule --Transaction--> TokenContextLoader
22
+ ContextModule --Transaction--> NftContextLoader
23
+ ContextModule --Transaction--> OtherContextLoader
24
+ TokenContextLoader --> Backend1(Backend)
25
+ NftContextLoader --> Backend2(Backend)
26
+ OtherContextLoader --> Backend3(Backend)
27
+ Backend1 --Context--> TokenContextLoader
28
+ TokenContextLoader --Context--> ContextModule
29
+ ContextModule --Context--> Signer
30
+ ```
31
+
32
+ ## Installation
33
+
34
+ To install the context-module package, run the following command:
35
+
36
+ ```sh
37
+ npm install @ledgerhq/context-module
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ ### Main Features
43
+
44
+ It currently supports the following features:
45
+
46
+ - Tokens: provide information about tokens used in the transaction.
47
+ - NFTs: provide information about NFTs used in the transaction.
48
+ - Domain name: provide information about domain names.
49
+ - Custom plugins: provide complex informations to external plugins such as the **1inch** or **paraswap** plugin.
50
+
51
+ > [!NOTE]
52
+ > At the moment the context module is available only for Ethereum blockchain.
53
+
54
+ ### Setting up
55
+
56
+ The context-module package exposes a builder `ContextModuleBuilder` which will be used to initialise the context module with your configuration.
57
+
58
+ ```ts
59
+ const contextModule = new ContextModuleBuilder().build();
60
+ ```
61
+
62
+ It is also possible to instantiate the context module without the default loaders.
63
+
64
+ ```ts
65
+ const contextModule = new ContextModuleBuilder()
66
+ .withoutDefaultLoaders()
67
+ .build();
68
+ ```
69
+
70
+ > [!NOTE]
71
+ > Without loaders, a transaction cannot be clear signed. Use it with caution.
72
+
73
+ You can add a custom list of loader to the context module.
74
+
75
+ ```ts
76
+ // Default Token Loader
77
+ const tokenLoader = new TokenContextLoader(new TokenDataSource());
78
+
79
+ // Custom Loader
80
+ const myCustomLoader = new MyCustomLoader();
81
+
82
+ // Custom datasource for a default Token Loader
83
+ const myCustomTokenDataSource = new MyCustomTokenDataSource();
84
+ const myTokenLoader = new TokenCOntextLoader();
85
+
86
+ const contextModule = new ContextModuleBuilder()
87
+ .withoutDefaultLoaders()
88
+ .addLoader(tokenLoader)
89
+ .addLoader(myTokenLoader)
90
+ .addLoader(myCustomLoader)
91
+ .build();
92
+ ```
93
+
94
+ ### Create a custom loader
95
+
96
+ A custom loader must implement the ContextLoader interface, defined as follows:
97
+
98
+ ```ts
99
+ type ContextLoader = {
100
+ load: (transaction: TransactionContext) => Promise<ClearSignContext[]>;
101
+ };
102
+ ```
103
+
104
+ with ClearSignContextSuccess defined as follows:
105
+
106
+ ```ts
107
+ type ClearSignContextSuccess = {
108
+ type: "token" | "nft" | "domainName" | "plugin" | "externalPlugin";
109
+ payload: string;
110
+ };
111
+ ```
112
+
113
+ The payload should represent the data sent to the device to provide information and must be signed by a trusted authority.
114
+
115
+ ### Errors handling
116
+
117
+ > [!CAUTION]
118
+ > To be defined
@@ -0,0 +1,3 @@
1
+ import "reflect-metadata";
2
+ export * from "./src/index";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // inversify requirement
18
+ require("reflect-metadata");
19
+ __exportStar(require("./src/index"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wBAAwB;AACxB,4BAA0B;AAE1B,8CAA4B"}
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@ledgerhq/context-module",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "exports": {
6
+ ".": {
7
+ "import": "./lib/esm/index.js",
8
+ "require": "./lib/cjs/index.js",
9
+ "default": "./index.ts",
10
+ "types": "./lib/esm/index.d.ts"
11
+ },
12
+ "./*.js": {
13
+ "import": "./lib/esm/*.js",
14
+ "require": "./lib/cjs/*.js",
15
+ "default": "./*.js",
16
+ "types": "./lib/esm/*.d.ts"
17
+ },
18
+ "./*": {
19
+ "import": "./lib/esm/*",
20
+ "require": "./lib/cjs/*",
21
+ "default": "./*",
22
+ "types": "./lib/esm/*"
23
+ }
24
+ },
25
+ "files": [
26
+ "./lib"
27
+ ],
28
+ "scripts": {
29
+ "build": "rimraf lib && zx scripts/build.mjs",
30
+ "dev": "concurrently \"pnpm dev:esm\" \"pnpm dev:cjs\"",
31
+ "dev:esm": "concurrently \"tsc --watch -p tsconfig.esm.json\" \"tsc-alias --watch -p tsconfig.esm.json\"",
32
+ "dev:cjs": "concurrently \"tsc --watch -p tsconfig.cjs.json\" \"tsc-alias --watch -p tsconfig.cjs.json\"",
33
+ "lint": "eslint",
34
+ "lint:fix": "pnpm lint --fix",
35
+ "postpack": "find . -name '*.tgz' -exec cp {} ../../../dist/ \\; ",
36
+ "prettier": "prettier . --check",
37
+ "prettier:fix": "prettier . --write",
38
+ "test": "jest",
39
+ "test:watch": "pnpm test -- --watch",
40
+ "test:coverage": "pnpm test -- --coverage",
41
+ "typecheck": "tsc --noEmit"
42
+ },
43
+ "devDependencies": {
44
+ "@ledgerhq/device-management-kit": "workspace:*",
45
+ "@ledgerhq/eslint-config-dsdk": "workspace:*",
46
+ "@ledgerhq/jest-config-dsdk": "workspace:*",
47
+ "@ledgerhq/prettier-config-dsdk": "workspace:*",
48
+ "@ledgerhq/tsconfig-dsdk": "workspace:*",
49
+ "@types/crypto-js": "^4.2.2",
50
+ "ts-node": "^10.9.2"
51
+ },
52
+ "dependencies": {
53
+ "axios": "^1.7.7",
54
+ "crypto-js": "^4.2.0",
55
+ "ethers": "^6.13.2",
56
+ "inversify": "^6.0.2",
57
+ "purify-ts": "^2.1.0",
58
+ "reflect-metadata": "^0.2.2"
59
+ },
60
+ "peerDependencies": {
61
+ "@ledgerhq/device-management-kit": "workspace:*"
62
+ }
63
+ }
@@ -0,0 +1,9 @@
1
+ import { ClearSignContext } from "./shared/model/ClearSignContext";
2
+ import { TransactionContext } from "./shared/model/TransactionContext";
3
+ import { type TypedDataClearSignContext } from "./shared/model/TypedDataClearSignContext";
4
+ import { type TypedDataContext } from "./shared/model/TypedDataContext";
5
+ export interface ContextModule {
6
+ getContexts(transaction: TransactionContext): Promise<ClearSignContext[]>;
7
+ getTypedDataFilters(typedData: TypedDataContext): Promise<TypedDataClearSignContext>;
8
+ }
9
+ //# sourceMappingURL=ContextModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextModule.d.ts","sourceRoot":"","sources":["../../../src/ContextModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC1E,mBAAmB,CACjB,SAAS,EAAE,gBAAgB,GAC1B,OAAO,CAAC,yBAAyB,CAAC,CAAC;CACvC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ContextModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextModule.js","sourceRoot":"","sources":["../../../src/ContextModule.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import { ContextLoader } from "./shared/domain/ContextLoader";
2
+ import { type TypedDataContextLoader } from "./typed-data/domain/TypedDataContextLoader";
3
+ import { ContextModule } from "./ContextModule";
4
+ export declare class ContextModuleBuilder {
5
+ private customLoaders;
6
+ private defaultLoaders;
7
+ private typedDataLoader;
8
+ constructor();
9
+ /**
10
+ * Remove default loaders from the list of loaders
11
+ *
12
+ * @returns this
13
+ */
14
+ withoutDefaultLoaders(): this;
15
+ /**
16
+ * Add a custom loader to the list of loaders
17
+ *
18
+ * @param loader loader to add to the list of loaders
19
+ * @returns this
20
+ */
21
+ addLoader(loader: ContextLoader): this;
22
+ /**
23
+ * Replace the default loader for typed data clear signing contexts
24
+ *
25
+ * @returns this
26
+ */
27
+ withTypedDataLoader(loader: TypedDataContextLoader): this;
28
+ /**
29
+ * Build the context module
30
+ *
31
+ * @returns the context module
32
+ */
33
+ build(): ContextModule;
34
+ }
35
+ //# sourceMappingURL=ContextModuleBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextModuleBuilder.d.ts","sourceRoot":"","sources":["../../../src/ContextModuleBuilder.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,eAAe,CAAyB;;IAoBhD;;;;OAIG;IACH,qBAAqB;IAKrB;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,aAAa;IAK/B;;;;OAIG;IACH,mBAAmB,CAAC,MAAM,EAAE,sBAAsB;IAKlD;;;;OAIG;IACH,KAAK,IAAI,aAAa;CAOvB"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContextModuleBuilder = void 0;
4
+ const externalPluginTypes_1 = require("./external-plugin/di/externalPluginTypes");
5
+ const forwardDomainTypes_1 = require("./forward-domain/di/forwardDomainTypes");
6
+ const nftTypes_1 = require("./nft/di/nftTypes");
7
+ const tokenTypes_1 = require("./token/di/tokenTypes");
8
+ const typedDataTypes_1 = require("./typed-data/di/typedDataTypes");
9
+ const DefaultContextModule_1 = require("./DefaultContextModule");
10
+ const di_1 = require("./di");
11
+ class ContextModuleBuilder {
12
+ customLoaders = [];
13
+ defaultLoaders = [];
14
+ typedDataLoader;
15
+ constructor() {
16
+ const container = (0, di_1.makeContainer)();
17
+ this.defaultLoaders = [
18
+ container.get(externalPluginTypes_1.externalPluginTypes.ExternalPluginContextLoader),
19
+ container.get(forwardDomainTypes_1.forwardDomainTypes.ForwardDomainContextLoader),
20
+ container.get(nftTypes_1.nftTypes.NftContextLoader),
21
+ container.get(tokenTypes_1.tokenTypes.TokenContextLoader),
22
+ ];
23
+ this.typedDataLoader = container.get(typedDataTypes_1.typedDataTypes.TypedDataContextLoader);
24
+ }
25
+ /**
26
+ * Remove default loaders from the list of loaders
27
+ *
28
+ * @returns this
29
+ */
30
+ withoutDefaultLoaders() {
31
+ this.defaultLoaders = [];
32
+ return this;
33
+ }
34
+ /**
35
+ * Add a custom loader to the list of loaders
36
+ *
37
+ * @param loader loader to add to the list of loaders
38
+ * @returns this
39
+ */
40
+ addLoader(loader) {
41
+ this.customLoaders.push(loader);
42
+ return this;
43
+ }
44
+ /**
45
+ * Replace the default loader for typed data clear signing contexts
46
+ *
47
+ * @returns this
48
+ */
49
+ withTypedDataLoader(loader) {
50
+ this.typedDataLoader = loader;
51
+ return this;
52
+ }
53
+ /**
54
+ * Build the context module
55
+ *
56
+ * @returns the context module
57
+ */
58
+ build() {
59
+ const loaders = [...this.defaultLoaders, ...this.customLoaders];
60
+ return new DefaultContextModule_1.DefaultContextModule({
61
+ loaders,
62
+ typedDataLoader: this.typedDataLoader,
63
+ });
64
+ }
65
+ }
66
+ exports.ContextModuleBuilder = ContextModuleBuilder;
67
+ //# sourceMappingURL=ContextModuleBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextModuleBuilder.js","sourceRoot":"","sources":["../../../src/ContextModuleBuilder.ts"],"names":[],"mappings":";;;AAAA,kFAA+E;AAC/E,+EAA4E;AAC5E,gDAA6C;AAC7C,sDAAmD;AACnD,mEAAgE;AAShE,iEAA8D;AAC9D,6BAAqC;AAErC,MAAa,oBAAoB;IACvB,aAAa,GAAoB,EAAE,CAAC;IACpC,cAAc,GAAoB,EAAE,CAAC;IACrC,eAAe,CAAyB;IAEhD;QACE,MAAM,SAAS,GAAG,IAAA,kBAAa,GAAE,CAAC;QAElC,IAAI,CAAC,cAAc,GAAG;YACpB,SAAS,CAAC,GAAG,CACX,yCAAmB,CAAC,2BAA2B,CAChD;YACD,SAAS,CAAC,GAAG,CACX,uCAAkB,CAAC,0BAA0B,CAC9C;YACD,SAAS,CAAC,GAAG,CAAmB,mBAAQ,CAAC,gBAAgB,CAAC;YAC1D,SAAS,CAAC,GAAG,CAAqB,uBAAU,CAAC,kBAAkB,CAAC;SACjE,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,GAAG,CAClC,+BAAc,CAAC,sBAAsB,CACtC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,qBAAqB;QACnB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,MAAqB;QAC7B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,mBAAmB,CAAC,MAA8B;QAChD,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK;QACH,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;QAChE,OAAO,IAAI,2CAAoB,CAAC;YAC9B,OAAO;YACP,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC,CAAC,CAAC;IACL,CAAC;CACF;AAlED,oDAkEC"}
@@ -0,0 +1,20 @@
1
+ import type { TypedDataClearSignContext } from "./shared/model/TypedDataClearSignContext";
2
+ import type { TypedDataContext } from "./shared/model/TypedDataContext";
3
+ import { ContextLoader } from "./shared/domain/ContextLoader";
4
+ import { ClearSignContext } from "./shared/model/ClearSignContext";
5
+ import { TransactionContext } from "./shared/model/TransactionContext";
6
+ import type { TypedDataContextLoader } from "./typed-data/domain/TypedDataContextLoader";
7
+ import { ContextModule } from "./ContextModule";
8
+ type DefaultContextModuleConstructorArgs = {
9
+ loaders: ContextLoader[];
10
+ typedDataLoader: TypedDataContextLoader;
11
+ };
12
+ export declare class DefaultContextModule implements ContextModule {
13
+ private _loaders;
14
+ private _typedDataLoader;
15
+ constructor(args: DefaultContextModuleConstructorArgs);
16
+ getContexts(transaction: TransactionContext): Promise<ClearSignContext[]>;
17
+ getTypedDataFilters(typedData: TypedDataContext): Promise<TypedDataClearSignContext>;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=DefaultContextModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultContextModule.d.ts","sourceRoot":"","sources":["../../../src/DefaultContextModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,mCAAmC,GAAG;IACzC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,eAAe,EAAE,sBAAsB,CAAC;CACzC,CAAC;AAEF,qBAAa,oBAAqB,YAAW,aAAa;IACxD,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,gBAAgB,CAAyB;gBAErC,IAAI,EAAE,mCAAmC;IAKxC,WAAW,CACtB,WAAW,EAAE,kBAAkB,GAC9B,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAMjB,mBAAmB,CAC9B,SAAS,EAAE,gBAAgB,GAC1B,OAAO,CAAC,yBAAyB,CAAC;CAGtC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DefaultContextModule = void 0;
4
+ class DefaultContextModule {
5
+ _loaders;
6
+ _typedDataLoader;
7
+ constructor(args) {
8
+ this._loaders = args.loaders;
9
+ this._typedDataLoader = args.typedDataLoader;
10
+ }
11
+ async getContexts(transaction) {
12
+ const promises = this._loaders.map((fetcher) => fetcher.load(transaction));
13
+ const responses = await Promise.all(promises);
14
+ return responses.flat();
15
+ }
16
+ async getTypedDataFilters(typedData) {
17
+ return this._typedDataLoader.load(typedData);
18
+ }
19
+ }
20
+ exports.DefaultContextModule = DefaultContextModule;
21
+ //# sourceMappingURL=DefaultContextModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultContextModule.js","sourceRoot":"","sources":["../../../src/DefaultContextModule.ts"],"names":[],"mappings":";;;AAcA,MAAa,oBAAoB;IACvB,QAAQ,CAAkB;IAC1B,gBAAgB,CAAyB;IAEjD,YAAY,IAAyC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;IAC/C,CAAC;IAEM,KAAK,CAAC,WAAW,CACtB,WAA+B;QAE/B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAC3E,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9C,OAAO,SAAS,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAC9B,SAA2B;QAE3B,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;CACF;AAtBD,oDAsBC"}
@@ -0,0 +1,3 @@
1
+ import { Container } from "inversify";
2
+ export declare const makeContainer: () => Container;
3
+ //# sourceMappingURL=di.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"di.d.ts","sourceRoot":"","sources":["../../../src/di.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAQtC,eAAO,MAAM,aAAa,iBAYzB,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeContainer = void 0;
4
+ const inversify_1 = require("inversify");
5
+ const externalPluginModuleFactory_1 = require("./external-plugin/di/externalPluginModuleFactory");
6
+ const forwardDomainModuleFactory_1 = require("./forward-domain/di/forwardDomainModuleFactory");
7
+ const nftModuleFactory_1 = require("./nft/di/nftModuleFactory");
8
+ const tokenModuleFactory_1 = require("./token/di/tokenModuleFactory");
9
+ const typedDataModuleFactory_1 = require("./typed-data/di/typedDataModuleFactory");
10
+ const makeContainer = () => {
11
+ const container = new inversify_1.Container();
12
+ container.load((0, externalPluginModuleFactory_1.externalPluginModuleFactory)(), (0, forwardDomainModuleFactory_1.forwardDomainModuleFactory)(), (0, nftModuleFactory_1.nftModuleFactory)(), (0, tokenModuleFactory_1.tokenModuleFactory)(), (0, typedDataModuleFactory_1.typedDataModuleFactory)());
13
+ return container;
14
+ };
15
+ exports.makeContainer = makeContainer;
16
+ //# sourceMappingURL=di.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"di.js","sourceRoot":"","sources":["../../../src/di.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,kGAA+F;AAC/F,+FAA4F;AAC5F,gEAA6D;AAC7D,sEAAmE;AACnE,mFAAgF;AAEzE,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;IAElC,SAAS,CAAC,IAAI,CACZ,IAAA,yDAA2B,GAAE,EAC7B,IAAA,uDAA0B,GAAE,EAC5B,IAAA,mCAAgB,GAAE,EAClB,IAAA,uCAAkB,GAAE,EACpB,IAAA,+CAAsB,GAAE,CACzB,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAZW,QAAA,aAAa,iBAYxB"}
@@ -0,0 +1,38 @@
1
+ export interface DAppDto {
2
+ b2c: B2c;
3
+ abis: Abis;
4
+ b2c_signatures: B2cSignatures;
5
+ }
6
+ export interface B2c {
7
+ blockchainName: string;
8
+ chainId: number;
9
+ contracts: Contract[];
10
+ name: string;
11
+ }
12
+ interface Contract {
13
+ address: string;
14
+ contractName: string;
15
+ selectors: {
16
+ [selector: string]: ContractSelector;
17
+ };
18
+ }
19
+ interface ContractSelector {
20
+ erc20OfInterest: string[];
21
+ method: string;
22
+ plugin: string;
23
+ }
24
+ export interface Abis {
25
+ [address: string]: object[];
26
+ }
27
+ export interface B2cSignatures {
28
+ [address: string]: {
29
+ [selector: string]: B2cSignature;
30
+ };
31
+ }
32
+ interface B2cSignature {
33
+ plugin: string;
34
+ serialized_data: string;
35
+ signature: string;
36
+ }
37
+ export {};
38
+ //# sourceMappingURL=DAppDto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DAppDto.d.ts","sourceRoot":"","sources":["../../../../../src/external-plugin/data/DAppDto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,IAAI,CAAC;IACX,cAAc,EAAE,aAAa,CAAC;CAC/B;AAED,MAAM,WAAW,GAAG;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,QAAQ;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;CACrD;AAED,UAAU,gBAAgB;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,IAAI;IACnB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,OAAO,EAAE,MAAM,GAAG;QACjB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAAC;KAClC,CAAC;CACH;AAED,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=DAppDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DAppDto.js","sourceRoot":"","sources":["../../../../../src/external-plugin/data/DAppDto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import { HexaString } from "@ledgerhq/device-management-kit";
2
+ import { Either } from "purify-ts";
3
+ import { DappInfos } from "../../external-plugin/model/DappInfos";
4
+ export type GetDappInfos = {
5
+ address: string;
6
+ selector: HexaString;
7
+ chainId: number;
8
+ };
9
+ export interface ExternalPluginDataSource {
10
+ getDappInfos(params: GetDappInfos): Promise<Either<Error, DappInfos | undefined>>;
11
+ }
12
+ //# sourceMappingURL=ExternalPluginDataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExternalPluginDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/external-plugin/data/ExternalPluginDataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE9D,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,YAAY,CACV,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;CAClD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ExternalPluginDataSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExternalPluginDataSource.js","sourceRoot":"","sources":["../../../../../src/external-plugin/data/ExternalPluginDataSource.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { Either } from "purify-ts";
2
+ import { ExternalPluginDataSource, GetDappInfos } from "../../external-plugin/data/ExternalPluginDataSource";
3
+ import { DappInfos } from "../../external-plugin/model/DappInfos";
4
+ export declare class HttpExternalPluginDataSource implements ExternalPluginDataSource {
5
+ constructor();
6
+ getDappInfos({ chainId, address, selector, }: GetDappInfos): Promise<Either<Error, DappInfos | undefined>>;
7
+ }
8
+ //# sourceMappingURL=HttpExternalPluginDataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpExternalPluginDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/external-plugin/data/HttpExternalPluginDataSource.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,WAAW,CAAC;AAGhD,OAAO,EACL,wBAAwB,EACxB,YAAY,EACb,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAI9D,qBACa,4BAA6B,YAAW,wBAAwB;;IAGrE,YAAY,CAAC,EACjB,OAAO,EACP,OAAO,EACP,QAAQ,GACT,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;CAyDhE"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.HttpExternalPluginDataSource = void 0;
16
+ const axios_1 = __importDefault(require("axios"));
17
+ const inversify_1 = require("inversify");
18
+ const purify_ts_1 = require("purify-ts");
19
+ const package_json_1 = __importDefault(require("../../../package.json"));
20
+ let HttpExternalPluginDataSource = class HttpExternalPluginDataSource {
21
+ constructor() { }
22
+ async getDappInfos({ chainId, address, selector, }) {
23
+ try {
24
+ const dappInfos = await axios_1.default.request({
25
+ method: "GET",
26
+ url: "https://crypto-assets-service.api.ledger.com/v1/dapps",
27
+ params: {
28
+ output: "b2c,b2c_signatures,abis",
29
+ chain_id: chainId,
30
+ contracts: address,
31
+ },
32
+ headers: {
33
+ "X-Ledger-Client-Version": `context-module/${package_json_1.default.version}`,
34
+ },
35
+ });
36
+ if (!dappInfos.data[0]) {
37
+ return (0, purify_ts_1.Right)(undefined);
38
+ }
39
+ const { erc20OfInterest, method, plugin } = dappInfos.data[0].b2c?.contracts?.[0]?.selectors?.[selector] || {};
40
+ const { signature, serialized_data: serializedData } = dappInfos.data[0].b2c_signatures?.[address]?.[selector] || {};
41
+ if (!erc20OfInterest ||
42
+ !method ||
43
+ !plugin ||
44
+ !signature ||
45
+ !serializedData) {
46
+ return (0, purify_ts_1.Right)(undefined);
47
+ }
48
+ const abi = dappInfos.data[0].abis?.[address];
49
+ if (!abi) {
50
+ return (0, purify_ts_1.Right)(undefined);
51
+ }
52
+ const selectorDetails = {
53
+ method,
54
+ plugin,
55
+ erc20OfInterest,
56
+ signature,
57
+ serializedData,
58
+ };
59
+ return (0, purify_ts_1.Right)({ selectorDetails, abi });
60
+ }
61
+ catch (_error) {
62
+ return (0, purify_ts_1.Left)(new Error("[ContextModule] HttpExternalPluginDataSource: Error fetching dapp infos"));
63
+ }
64
+ }
65
+ };
66
+ exports.HttpExternalPluginDataSource = HttpExternalPluginDataSource;
67
+ exports.HttpExternalPluginDataSource = HttpExternalPluginDataSource = __decorate([
68
+ (0, inversify_1.injectable)(),
69
+ __metadata("design:paramtypes", [])
70
+ ], HttpExternalPluginDataSource);
71
+ //# sourceMappingURL=HttpExternalPluginDataSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpExternalPluginDataSource.js","sourceRoot":"","sources":["../../../../../src/external-plugin/data/HttpExternalPluginDataSource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,yCAAuC;AACvC,yCAAgD;AAShD,sEAAyC;AAGlC,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACvC,gBAAe,CAAC;IAEhB,KAAK,CAAC,YAAY,CAAC,EACjB,OAAO,EACP,OAAO,EACP,QAAQ,GACK;QACb,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,eAAK,CAAC,OAAO,CAAY;gBAC/C,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,uDAAuD;gBAC5D,MAAM,EAAE;oBACN,MAAM,EAAE,yBAAyB;oBACjC,QAAQ,EAAE,OAAO;oBACjB,SAAS,EAAE,OAAO;iBACnB;gBACD,OAAO,EAAE;oBACP,yBAAyB,EAAE,kBAAkB,sBAAO,CAAC,OAAO,EAAE;iBAC/D;aACF,CAAC,CAAC;YAEH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvB,OAAO,IAAA,iBAAK,EAAC,SAAS,CAAC,CAAC;YAC1B,CAAC;YAED,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,GACvC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACrE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,GAClD,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YAEhE,IACE,CAAC,eAAe;gBAChB,CAAC,MAAM;gBACP,CAAC,MAAM;gBACP,CAAC,SAAS;gBACV,CAAC,cAAc,EACf,CAAC;gBACD,OAAO,IAAA,iBAAK,EAAC,SAAS,CAAC,CAAC;YAC1B,CAAC;YAED,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC;YAE9C,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,OAAO,IAAA,iBAAK,EAAC,SAAS,CAAC,CAAC;YAC1B,CAAC;YAED,MAAM,eAAe,GAAoB;gBACvC,MAAM;gBACN,MAAM;gBACN,eAAe;gBACf,SAAS;gBACT,cAAc;aACf,CAAC;YAEF,OAAO,IAAA,iBAAK,EAAC,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,OAAO,IAAA,gBAAI,EACT,IAAI,KAAK,CACP,yEAAyE,CAC1E,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAhEY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,sBAAU,GAAE;;GACA,4BAA4B,CAgExC"}
@@ -0,0 +1,3 @@
1
+ import { ContainerModule } from "inversify";
2
+ export declare const externalPluginModuleFactory: () => ContainerModule;
3
+ //# sourceMappingURL=externalPluginModuleFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"externalPluginModuleFactory.d.ts","sourceRoot":"","sources":["../../../../../src/external-plugin/di/externalPluginModuleFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAM5C,eAAO,MAAM,2BAA2B,uBAQpC,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.externalPluginModuleFactory = void 0;
4
+ const inversify_1 = require("inversify");
5
+ const HttpExternalPluginDataSource_1 = require("../../external-plugin/data/HttpExternalPluginDataSource");
6
+ const externalPluginTypes_1 = require("../../external-plugin/di/externalPluginTypes");
7
+ const ExternalPluginContextLoader_1 = require("../../external-plugin/domain/ExternalPluginContextLoader");
8
+ const externalPluginModuleFactory = () => new inversify_1.ContainerModule((bind, _unbind, _isBound, _rebind) => {
9
+ bind(externalPluginTypes_1.externalPluginTypes.ExternalPluginDataSource).to(HttpExternalPluginDataSource_1.HttpExternalPluginDataSource);
10
+ bind(externalPluginTypes_1.externalPluginTypes.ExternalPluginContextLoader).to(ExternalPluginContextLoader_1.ExternalPluginContextLoader);
11
+ });
12
+ exports.externalPluginModuleFactory = externalPluginModuleFactory;
13
+ //# sourceMappingURL=externalPluginModuleFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"externalPluginModuleFactory.js","sourceRoot":"","sources":["../../../../../src/external-plugin/di/externalPluginModuleFactory.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAE5C,sGAAmG;AACnG,kFAA+E;AAC/E,sGAAmG;AAE5F,MAAM,2BAA2B,GAAG,GAAG,EAAE,CAC9C,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IACvD,IAAI,CAAC,yCAAmB,CAAC,wBAAwB,CAAC,CAAC,EAAE,CACnD,2DAA4B,CAC7B,CAAC;IACF,IAAI,CAAC,yCAAmB,CAAC,2BAA2B,CAAC,CAAC,EAAE,CACtD,yDAA2B,CAC5B,CAAC;AACJ,CAAC,CAAC,CAAC;AARQ,QAAA,2BAA2B,+BAQnC"}
@@ -0,0 +1,5 @@
1
+ export declare const externalPluginTypes: {
2
+ ExternalPluginDataSource: symbol;
3
+ ExternalPluginContextLoader: symbol;
4
+ };
5
+ //# sourceMappingURL=externalPluginTypes.d.ts.map