@ledgerhq/context-module 0.1.2 → 1.0.0

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 (494) hide show
  1. package/LICENSE.MD +202 -0
  2. package/README.md +127 -0
  3. package/lib/cjs/index.d.ts +3 -0
  4. package/lib/cjs/index.d.ts.map +1 -0
  5. package/lib/cjs/index.js +20 -0
  6. package/lib/cjs/index.js.map +1 -0
  7. package/lib/cjs/package.json +63 -0
  8. package/lib/cjs/src/ContextModule.d.ts +9 -0
  9. package/lib/cjs/src/ContextModule.d.ts.map +1 -0
  10. package/lib/{ContextModule.js.map → cjs/src/ContextModule.js.map} +1 -1
  11. package/lib/cjs/src/ContextModuleBuilder.d.ts +45 -0
  12. package/lib/cjs/src/ContextModuleBuilder.d.ts.map +1 -0
  13. package/lib/cjs/src/ContextModuleBuilder.js +87 -0
  14. package/lib/cjs/src/ContextModuleBuilder.js.map +1 -0
  15. package/lib/{DefaultContextModule.d.ts → cjs/src/DefaultContextModule.d.ts} +7 -1
  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/config/di/configModuleFactory.d.ts +4 -0
  20. package/lib/cjs/src/config/di/configModuleFactory.d.ts.map +1 -0
  21. package/lib/cjs/src/config/di/configModuleFactory.js +10 -0
  22. package/lib/cjs/src/config/di/configModuleFactory.js.map +1 -0
  23. package/lib/cjs/src/config/di/configTypes.d.ts +4 -0
  24. package/lib/cjs/src/config/di/configTypes.d.ts.map +1 -0
  25. package/lib/cjs/src/config/di/configTypes.js +7 -0
  26. package/lib/cjs/src/config/di/configTypes.js.map +1 -0
  27. package/lib/cjs/src/config/model/ContextModuleConfig.d.ts +9 -0
  28. package/lib/cjs/src/config/model/ContextModuleConfig.d.ts.map +1 -0
  29. package/lib/cjs/src/config/model/ContextModuleConfig.js +3 -0
  30. package/lib/cjs/src/config/model/ContextModuleConfig.js.map +1 -0
  31. package/lib/cjs/src/di.d.ts +8 -0
  32. package/lib/cjs/src/di.d.ts.map +1 -0
  33. package/lib/cjs/src/di.js +17 -0
  34. package/lib/cjs/src/di.js.map +1 -0
  35. package/lib/cjs/src/external-plugin/data/DAppDto.d.ts.map +1 -0
  36. package/lib/cjs/src/external-plugin/data/DAppDto.js.map +1 -0
  37. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.d.ts +12 -0
  38. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +1 -0
  39. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js.map +1 -0
  40. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +10 -0
  41. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +1 -0
  42. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js +83 -0
  43. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js.map +1 -0
  44. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.d.ts +3 -0
  45. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +1 -0
  46. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js +13 -0
  47. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js.map +1 -0
  48. package/lib/cjs/src/external-plugin/di/externalPluginTypes.d.ts +5 -0
  49. package/lib/cjs/src/external-plugin/di/externalPluginTypes.d.ts.map +1 -0
  50. package/lib/cjs/src/external-plugin/di/externalPluginTypes.js +8 -0
  51. package/lib/cjs/src/external-plugin/di/externalPluginTypes.js.map +1 -0
  52. package/lib/{external-plugin → cjs/src/external-plugin}/domain/ExternalPluginContextLoader.d.ts +4 -3
  53. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +1 -0
  54. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js +136 -0
  55. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js.map +1 -0
  56. package/lib/cjs/src/external-plugin/model/DappInfos.d.ts +6 -0
  57. package/lib/cjs/src/external-plugin/model/DappInfos.d.ts.map +1 -0
  58. package/lib/cjs/src/external-plugin/model/DappInfos.js.map +1 -0
  59. package/lib/cjs/src/external-plugin/model/SelectorDetails.d.ts.map +1 -0
  60. package/lib/cjs/src/external-plugin/model/SelectorDetails.js.map +1 -0
  61. package/lib/{forward-domain → cjs/src/forward-domain}/data/ForwardDomainDataSource.d.ts +2 -1
  62. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +1 -0
  63. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.js.map +1 -0
  64. package/lib/{forward-domain → cjs/src/forward-domain}/data/HttpForwardDomainDataSource.d.ts +3 -2
  65. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +1 -0
  66. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js +40 -0
  67. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js.map +1 -0
  68. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.d.ts +3 -0
  69. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +1 -0
  70. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js +13 -0
  71. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js.map +1 -0
  72. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.d.ts +5 -0
  73. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.d.ts.map +1 -0
  74. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js +8 -0
  75. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js.map +1 -0
  76. package/lib/{forward-domain → cjs/src/forward-domain}/domain/ForwardDomainContextLoader.d.ts +1 -1
  77. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +1 -0
  78. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js +66 -0
  79. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js.map +1 -0
  80. package/lib/cjs/src/index.d.ts +14 -0
  81. package/lib/cjs/src/index.d.ts.map +1 -0
  82. package/lib/{index.js → cjs/src/index.js} +6 -3
  83. package/lib/cjs/src/index.js.map +1 -0
  84. package/lib/cjs/src/nft/data/HttpNftDataSource.d.ts +7 -0
  85. package/lib/cjs/src/nft/data/HttpNftDataSource.d.ts.map +1 -0
  86. package/lib/cjs/src/nft/data/HttpNftDataSource.js +57 -0
  87. package/lib/cjs/src/nft/data/HttpNftDataSource.js.map +1 -0
  88. package/lib/{nft → cjs/src/nft}/data/NftDataSource.d.ts +3 -2
  89. package/lib/cjs/src/nft/data/NftDataSource.d.ts.map +1 -0
  90. package/lib/cjs/src/nft/data/NftDataSource.js.map +1 -0
  91. package/lib/cjs/src/nft/di/nftModuleFactory.d.ts +3 -0
  92. package/lib/cjs/src/nft/di/nftModuleFactory.d.ts.map +1 -0
  93. package/lib/cjs/src/nft/di/nftModuleFactory.js +13 -0
  94. package/lib/cjs/src/nft/di/nftModuleFactory.js.map +1 -0
  95. package/lib/cjs/src/nft/di/nftTypes.d.ts +5 -0
  96. package/lib/cjs/src/nft/di/nftTypes.d.ts.map +1 -0
  97. package/lib/cjs/src/nft/di/nftTypes.js +8 -0
  98. package/lib/cjs/src/nft/di/nftTypes.js.map +1 -0
  99. package/lib/{nft → cjs/src/nft}/domain/NftContextLoader.d.ts +1 -1
  100. package/lib/cjs/src/nft/domain/NftContextLoader.d.ts.map +1 -0
  101. package/lib/cjs/src/nft/domain/NftContextLoader.js +111 -0
  102. package/lib/cjs/src/nft/domain/NftContextLoader.js.map +1 -0
  103. package/lib/cjs/src/shared/domain/ContextLoader.d.ts +6 -0
  104. package/lib/cjs/src/shared/domain/ContextLoader.d.ts.map +1 -0
  105. package/lib/cjs/src/shared/domain/ContextLoader.js.map +1 -0
  106. package/lib/cjs/src/shared/model/ClearSignContext.d.ts +21 -0
  107. package/lib/cjs/src/shared/model/ClearSignContext.d.ts.map +1 -0
  108. package/lib/cjs/src/shared/model/ClearSignContext.js +13 -0
  109. package/lib/cjs/src/shared/model/ClearSignContext.js.map +1 -0
  110. package/lib/cjs/src/shared/model/TransactionContext.d.ts +6 -0
  111. package/lib/cjs/src/shared/model/TransactionContext.d.ts.map +1 -0
  112. package/lib/cjs/src/shared/model/TransactionContext.js.map +1 -0
  113. package/lib/cjs/src/shared/model/TransactionSubset.d.ts.map +1 -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 +9 -0
  128. package/lib/cjs/src/token/data/HttpTokenDataSource.d.ts.map +1 -0
  129. package/lib/cjs/src/token/data/HttpTokenDataSource.js +83 -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.map +1 -0
  134. package/lib/cjs/src/token/data/TokenDto.d.ts.map +1 -0
  135. package/lib/cjs/src/token/data/TokenDto.js.map +1 -0
  136. package/lib/cjs/src/token/di/tokenModuleFactory.d.ts +3 -0
  137. package/lib/cjs/src/token/di/tokenModuleFactory.d.ts.map +1 -0
  138. package/lib/cjs/src/token/di/tokenModuleFactory.js +13 -0
  139. package/lib/cjs/src/token/di/tokenModuleFactory.js.map +1 -0
  140. package/lib/cjs/src/token/di/tokenTypes.d.ts +5 -0
  141. package/lib/cjs/src/token/di/tokenTypes.d.ts.map +1 -0
  142. package/lib/cjs/src/token/di/tokenTypes.js +8 -0
  143. package/lib/cjs/src/token/di/tokenTypes.js.map +1 -0
  144. package/lib/{token → cjs/src/token}/domain/TokenContextLoader.d.ts +1 -1
  145. package/lib/cjs/src/token/domain/TokenContextLoader.d.ts.map +1 -0
  146. package/lib/cjs/src/token/domain/TokenContextLoader.js +74 -0
  147. package/lib/cjs/src/token/domain/TokenContextLoader.js.map +1 -0
  148. package/lib/cjs/src/typed-data/data/FiltersDto.d.ts +55 -0
  149. package/lib/cjs/src/typed-data/data/FiltersDto.d.ts.map +1 -0
  150. package/lib/cjs/src/typed-data/data/FiltersDto.js +3 -0
  151. package/lib/cjs/src/typed-data/data/FiltersDto.js.map +1 -0
  152. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.d.ts +14 -0
  153. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +1 -0
  154. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js +163 -0
  155. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js.map +1 -0
  156. package/lib/cjs/src/typed-data/data/TypedDataDataSource.d.ts +17 -0
  157. package/lib/cjs/src/typed-data/data/TypedDataDataSource.d.ts.map +1 -0
  158. package/lib/cjs/src/typed-data/data/TypedDataDataSource.js +3 -0
  159. package/lib/cjs/src/typed-data/data/TypedDataDataSource.js.map +1 -0
  160. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.d.ts +3 -0
  161. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.d.ts.map +1 -0
  162. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js +13 -0
  163. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js.map +1 -0
  164. package/lib/cjs/src/typed-data/di/typedDataTypes.d.ts +5 -0
  165. package/lib/cjs/src/typed-data/di/typedDataTypes.d.ts.map +1 -0
  166. package/lib/cjs/src/typed-data/di/typedDataTypes.js +8 -0
  167. package/lib/cjs/src/typed-data/di/typedDataTypes.js.map +1 -0
  168. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +13 -0
  169. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +1 -0
  170. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js +127 -0
  171. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +1 -0
  172. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.d.ts +6 -0
  173. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.d.ts.map +1 -0
  174. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js +3 -0
  175. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js.map +1 -0
  176. package/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -0
  177. package/lib/esm/index.d.ts +3 -0
  178. package/lib/esm/index.d.ts.map +1 -0
  179. package/lib/esm/index.js +4 -0
  180. package/lib/esm/index.js.map +1 -0
  181. package/lib/esm/package.json +63 -0
  182. package/lib/esm/src/ContextModule.d.ts +9 -0
  183. package/lib/esm/src/ContextModule.d.ts.map +1 -0
  184. package/lib/esm/src/ContextModule.js +2 -0
  185. package/lib/esm/src/ContextModule.js.map +1 -0
  186. package/lib/esm/src/ContextModuleBuilder.d.ts +45 -0
  187. package/lib/esm/src/ContextModuleBuilder.d.ts.map +1 -0
  188. package/lib/esm/src/ContextModuleBuilder.js +83 -0
  189. package/lib/esm/src/ContextModuleBuilder.js.map +1 -0
  190. package/lib/esm/src/DefaultContextModule.d.ts +20 -0
  191. package/lib/esm/src/DefaultContextModule.d.ts.map +1 -0
  192. package/lib/esm/src/DefaultContextModule.js +17 -0
  193. package/lib/esm/src/DefaultContextModule.js.map +1 -0
  194. package/lib/esm/src/config/di/configModuleFactory.d.ts +4 -0
  195. package/lib/esm/src/config/di/configModuleFactory.d.ts.map +1 -0
  196. package/lib/esm/src/config/di/configModuleFactory.js +6 -0
  197. package/lib/esm/src/config/di/configModuleFactory.js.map +1 -0
  198. package/lib/esm/src/config/di/configTypes.d.ts +4 -0
  199. package/lib/esm/src/config/di/configTypes.d.ts.map +1 -0
  200. package/lib/esm/src/config/di/configTypes.js +4 -0
  201. package/lib/esm/src/config/di/configTypes.js.map +1 -0
  202. package/lib/esm/src/config/model/ContextModuleConfig.d.ts +9 -0
  203. package/lib/esm/src/config/model/ContextModuleConfig.d.ts.map +1 -0
  204. package/lib/esm/src/config/model/ContextModuleConfig.js +2 -0
  205. package/lib/esm/src/config/model/ContextModuleConfig.js.map +1 -0
  206. package/lib/esm/src/di.d.ts +8 -0
  207. package/lib/esm/src/di.d.ts.map +1 -0
  208. package/lib/esm/src/di.js +13 -0
  209. package/lib/esm/src/di.js.map +1 -0
  210. package/lib/esm/src/external-plugin/data/DAppDto.d.ts +38 -0
  211. package/lib/esm/src/external-plugin/data/DAppDto.d.ts.map +1 -0
  212. package/lib/esm/src/external-plugin/data/DAppDto.js +2 -0
  213. package/lib/esm/src/external-plugin/data/DAppDto.js.map +1 -0
  214. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts +12 -0
  215. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +1 -0
  216. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js +2 -0
  217. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js.map +1 -0
  218. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +10 -0
  219. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +1 -0
  220. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js +77 -0
  221. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js.map +1 -0
  222. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts +3 -0
  223. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +1 -0
  224. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js +9 -0
  225. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js.map +1 -0
  226. package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts +5 -0
  227. package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts.map +1 -0
  228. package/lib/esm/src/external-plugin/di/externalPluginTypes.js +5 -0
  229. package/lib/esm/src/external-plugin/di/externalPluginTypes.js.map +1 -0
  230. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts +15 -0
  231. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +1 -0
  232. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js +133 -0
  233. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js.map +1 -0
  234. package/lib/esm/src/external-plugin/model/DappInfos.d.ts +6 -0
  235. package/lib/esm/src/external-plugin/model/DappInfos.d.ts.map +1 -0
  236. package/lib/esm/src/external-plugin/model/DappInfos.js +2 -0
  237. package/lib/esm/src/external-plugin/model/DappInfos.js.map +1 -0
  238. package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts +8 -0
  239. package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts.map +1 -0
  240. package/lib/esm/src/external-plugin/model/SelectorDetails.js +2 -0
  241. package/lib/esm/src/external-plugin/model/SelectorDetails.js.map +1 -0
  242. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts +9 -0
  243. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +1 -0
  244. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js +2 -0
  245. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js.map +1 -0
  246. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts +6 -0
  247. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +1 -0
  248. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js +34 -0
  249. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js.map +1 -0
  250. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts +3 -0
  251. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +1 -0
  252. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js +9 -0
  253. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js.map +1 -0
  254. package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts +5 -0
  255. package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts.map +1 -0
  256. package/lib/esm/src/forward-domain/di/forwardDomainTypes.js +5 -0
  257. package/lib/esm/src/forward-domain/di/forwardDomainTypes.js.map +1 -0
  258. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts +11 -0
  259. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +1 -0
  260. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js +63 -0
  261. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js.map +1 -0
  262. package/lib/esm/src/index.d.ts +14 -0
  263. package/lib/esm/src/index.d.ts.map +1 -0
  264. package/lib/{index.d.ts → esm/src/index.js} +7 -4
  265. package/lib/esm/src/index.js.map +1 -0
  266. package/lib/esm/src/nft/data/HttpNftDataSource.d.ts +7 -0
  267. package/lib/esm/src/nft/data/HttpNftDataSource.d.ts.map +1 -0
  268. package/lib/esm/src/nft/data/HttpNftDataSource.js +51 -0
  269. package/lib/esm/src/nft/data/HttpNftDataSource.js.map +1 -0
  270. package/lib/esm/src/nft/data/NftDataSource.d.ts +15 -0
  271. package/lib/esm/src/nft/data/NftDataSource.d.ts.map +1 -0
  272. package/lib/esm/src/nft/data/NftDataSource.js +2 -0
  273. package/lib/esm/src/nft/data/NftDataSource.js.map +1 -0
  274. package/lib/esm/src/nft/di/nftModuleFactory.d.ts +3 -0
  275. package/lib/esm/src/nft/di/nftModuleFactory.d.ts.map +1 -0
  276. package/lib/esm/src/nft/di/nftModuleFactory.js +9 -0
  277. package/lib/esm/src/nft/di/nftModuleFactory.js.map +1 -0
  278. package/lib/esm/src/nft/di/nftTypes.d.ts +5 -0
  279. package/lib/esm/src/nft/di/nftTypes.d.ts.map +1 -0
  280. package/lib/esm/src/nft/di/nftTypes.js +5 -0
  281. package/lib/esm/src/nft/di/nftTypes.js.map +1 -0
  282. package/lib/esm/src/nft/domain/NftContextLoader.d.ts +11 -0
  283. package/lib/esm/src/nft/domain/NftContextLoader.d.ts.map +1 -0
  284. package/lib/esm/src/nft/domain/NftContextLoader.js +108 -0
  285. package/lib/esm/src/nft/domain/NftContextLoader.js.map +1 -0
  286. package/lib/esm/src/shared/domain/ContextLoader.d.ts +6 -0
  287. package/lib/esm/src/shared/domain/ContextLoader.d.ts.map +1 -0
  288. package/lib/esm/src/shared/domain/ContextLoader.js +2 -0
  289. package/lib/esm/src/shared/domain/ContextLoader.js.map +1 -0
  290. package/lib/esm/src/shared/model/ClearSignContext.d.ts +21 -0
  291. package/lib/esm/src/shared/model/ClearSignContext.d.ts.map +1 -0
  292. package/lib/esm/src/shared/model/ClearSignContext.js +10 -0
  293. package/lib/esm/src/shared/model/ClearSignContext.js.map +1 -0
  294. package/lib/esm/src/shared/model/TransactionContext.d.ts +6 -0
  295. package/lib/esm/src/shared/model/TransactionContext.d.ts.map +1 -0
  296. package/lib/esm/src/shared/model/TransactionContext.js +2 -0
  297. package/lib/esm/src/shared/model/TransactionContext.js.map +1 -0
  298. package/lib/esm/src/shared/model/TransactionSubset.d.ts +6 -0
  299. package/lib/esm/src/shared/model/TransactionSubset.d.ts.map +1 -0
  300. package/lib/esm/src/shared/model/TransactionSubset.js +2 -0
  301. package/lib/esm/src/shared/model/TransactionSubset.js.map +1 -0
  302. package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts +33 -0
  303. package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts.map +1 -0
  304. package/lib/esm/src/shared/model/TypedDataClearSignContext.js +3 -0
  305. package/lib/esm/src/shared/model/TypedDataClearSignContext.js.map +1 -0
  306. package/lib/esm/src/shared/model/TypedDataContext.d.ts +16 -0
  307. package/lib/esm/src/shared/model/TypedDataContext.d.ts.map +1 -0
  308. package/lib/esm/src/shared/model/TypedDataContext.js +2 -0
  309. package/lib/esm/src/shared/model/TypedDataContext.js.map +1 -0
  310. package/lib/esm/src/shared/utils/HexStringUtils.d.ts +4 -0
  311. package/lib/esm/src/shared/utils/HexStringUtils.d.ts.map +1 -0
  312. package/lib/esm/src/shared/utils/HexStringUtils.js +11 -0
  313. package/lib/esm/src/shared/utils/HexStringUtils.js.map +1 -0
  314. package/lib/esm/src/token/data/HttpTokenDataSource.d.ts +9 -0
  315. package/lib/esm/src/token/data/HttpTokenDataSource.d.ts.map +1 -0
  316. package/lib/esm/src/token/data/HttpTokenDataSource.js +77 -0
  317. package/lib/esm/src/token/data/HttpTokenDataSource.js.map +1 -0
  318. package/lib/esm/src/token/data/TokenDataSource.d.ts +9 -0
  319. package/lib/esm/src/token/data/TokenDataSource.d.ts.map +1 -0
  320. package/lib/esm/src/token/data/TokenDataSource.js +2 -0
  321. package/lib/esm/src/token/data/TokenDataSource.js.map +1 -0
  322. package/lib/esm/src/token/data/TokenDto.d.ts +6 -0
  323. package/lib/esm/src/token/data/TokenDto.d.ts.map +1 -0
  324. package/lib/esm/src/token/data/TokenDto.js +2 -0
  325. package/lib/esm/src/token/data/TokenDto.js.map +1 -0
  326. package/lib/esm/src/token/di/tokenModuleFactory.d.ts +3 -0
  327. package/lib/esm/src/token/di/tokenModuleFactory.d.ts.map +1 -0
  328. package/lib/esm/src/token/di/tokenModuleFactory.js +9 -0
  329. package/lib/esm/src/token/di/tokenModuleFactory.js.map +1 -0
  330. package/lib/esm/src/token/di/tokenTypes.d.ts +5 -0
  331. package/lib/esm/src/token/di/tokenTypes.d.ts.map +1 -0
  332. package/lib/esm/src/token/di/tokenTypes.js +5 -0
  333. package/lib/esm/src/token/di/tokenTypes.js.map +1 -0
  334. package/lib/esm/src/token/domain/TokenContextLoader.d.ts +15 -0
  335. package/lib/esm/src/token/domain/TokenContextLoader.d.ts.map +1 -0
  336. package/lib/esm/src/token/domain/TokenContextLoader.js +71 -0
  337. package/lib/esm/src/token/domain/TokenContextLoader.js.map +1 -0
  338. package/lib/esm/src/typed-data/data/FiltersDto.d.ts +55 -0
  339. package/lib/esm/src/typed-data/data/FiltersDto.d.ts.map +1 -0
  340. package/lib/esm/src/typed-data/data/FiltersDto.js +2 -0
  341. package/lib/esm/src/typed-data/data/FiltersDto.js.map +1 -0
  342. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts +14 -0
  343. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +1 -0
  344. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js +157 -0
  345. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js.map +1 -0
  346. package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts +17 -0
  347. package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts.map +1 -0
  348. package/lib/esm/src/typed-data/data/TypedDataDataSource.js +2 -0
  349. package/lib/esm/src/typed-data/data/TypedDataDataSource.js.map +1 -0
  350. package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts +3 -0
  351. package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts.map +1 -0
  352. package/lib/esm/src/typed-data/di/typedDataModuleFactory.js +9 -0
  353. package/lib/esm/src/typed-data/di/typedDataModuleFactory.js.map +1 -0
  354. package/lib/esm/src/typed-data/di/typedDataTypes.d.ts +5 -0
  355. package/lib/esm/src/typed-data/di/typedDataTypes.d.ts.map +1 -0
  356. package/lib/esm/src/typed-data/di/typedDataTypes.js +5 -0
  357. package/lib/esm/src/typed-data/di/typedDataTypes.js.map +1 -0
  358. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +13 -0
  359. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +1 -0
  360. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js +124 -0
  361. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +1 -0
  362. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts +6 -0
  363. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts.map +1 -0
  364. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js +2 -0
  365. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js.map +1 -0
  366. package/lib/esm/tsconfig.esm.tsbuildinfo +1 -0
  367. package/package.json +50 -20
  368. package/LICENSE.txt +0 -21
  369. package/lib/ContextModule.d.ts +0 -6
  370. package/lib/ContextModule.d.ts.map +0 -1
  371. package/lib/ContextModuleBuilder.d.ts +0 -27
  372. package/lib/ContextModuleBuilder.d.ts.map +0 -1
  373. package/lib/ContextModuleBuilder.js +0 -54
  374. package/lib/ContextModuleBuilder.js.map +0 -1
  375. package/lib/ContextModuleBuilder.test.d.ts +0 -2
  376. package/lib/ContextModuleBuilder.test.d.ts.map +0 -1
  377. package/lib/ContextModuleBuilder.test.js +0 -18
  378. package/lib/ContextModuleBuilder.test.js.map +0 -1
  379. package/lib/DefaultContextModule.d.ts.map +0 -1
  380. package/lib/DefaultContextModule.js +0 -26
  381. package/lib/DefaultContextModule.js.map +0 -1
  382. package/lib/DefaultContextModule.test.d.ts +0 -2
  383. package/lib/DefaultContextModule.test.d.ts.map +0 -1
  384. package/lib/DefaultContextModule.test.js +0 -55
  385. package/lib/DefaultContextModule.test.js.map +0 -1
  386. package/lib/external-plugin/__tests__/abi.json +0 -92
  387. package/lib/external-plugin/data/DAppDto.d.ts.map +0 -1
  388. package/lib/external-plugin/data/DAppDto.js.map +0 -1
  389. package/lib/external-plugin/data/ExternalPluginDataSource.d.ts +0 -10
  390. package/lib/external-plugin/data/ExternalPluginDataSource.d.ts.map +0 -1
  391. package/lib/external-plugin/data/ExternalPluginDataSource.js.map +0 -1
  392. package/lib/external-plugin/data/HttpExternalPluginDataSource.d.ts +0 -7
  393. package/lib/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +0 -1
  394. package/lib/external-plugin/data/HttpExternalPluginDataSource.js +0 -55
  395. package/lib/external-plugin/data/HttpExternalPluginDataSource.js.map +0 -1
  396. package/lib/external-plugin/data/HttpExternalPluginDataSource.test.d.ts +0 -2
  397. package/lib/external-plugin/data/HttpExternalPluginDataSource.test.d.ts.map +0 -1
  398. package/lib/external-plugin/data/HttpExternalPluginDataSource.test.js +0 -268
  399. package/lib/external-plugin/data/HttpExternalPluginDataSource.test.js.map +0 -1
  400. package/lib/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +0 -1
  401. package/lib/external-plugin/domain/ExternalPluginContextLoader.js +0 -96
  402. package/lib/external-plugin/domain/ExternalPluginContextLoader.js.map +0 -1
  403. package/lib/external-plugin/domain/ExternalPluginContextLoader.test.d.ts +0 -2
  404. package/lib/external-plugin/domain/ExternalPluginContextLoader.test.d.ts.map +0 -1
  405. package/lib/external-plugin/domain/ExternalPluginContextLoader.test.js +0 -344
  406. package/lib/external-plugin/domain/ExternalPluginContextLoader.test.js.map +0 -1
  407. package/lib/external-plugin/model/DappInfos.d.ts +0 -6
  408. package/lib/external-plugin/model/DappInfos.d.ts.map +0 -1
  409. package/lib/external-plugin/model/DappInfos.js.map +0 -1
  410. package/lib/external-plugin/model/SelectorDetails.d.ts.map +0 -1
  411. package/lib/external-plugin/model/SelectorDetails.js.map +0 -1
  412. package/lib/forward-domain/data/ForwardDomainDataSource.d.ts.map +0 -1
  413. package/lib/forward-domain/data/ForwardDomainDataSource.js.map +0 -1
  414. package/lib/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +0 -1
  415. package/lib/forward-domain/data/HttpForwardDomainDataSource.js +0 -36
  416. package/lib/forward-domain/data/HttpForwardDomainDataSource.js.map +0 -1
  417. package/lib/forward-domain/data/HttpForwardDomainDataSource.test.d.ts +0 -2
  418. package/lib/forward-domain/data/HttpForwardDomainDataSource.test.d.ts.map +0 -1
  419. package/lib/forward-domain/data/HttpForwardDomainDataSource.test.js +0 -53
  420. package/lib/forward-domain/data/HttpForwardDomainDataSource.test.js.map +0 -1
  421. package/lib/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +0 -1
  422. package/lib/forward-domain/domain/ForwardDomainContextLoader.js +0 -54
  423. package/lib/forward-domain/domain/ForwardDomainContextLoader.js.map +0 -1
  424. package/lib/forward-domain/domain/ForwardDomainContextLoader.test.d.ts +0 -2
  425. package/lib/forward-domain/domain/ForwardDomainContextLoader.test.d.ts.map +0 -1
  426. package/lib/forward-domain/domain/ForwardDomainContextLoader.test.js +0 -83
  427. package/lib/forward-domain/domain/ForwardDomainContextLoader.test.js.map +0 -1
  428. package/lib/index.d.ts.map +0 -1
  429. package/lib/index.js.map +0 -1
  430. package/lib/nft/data/HttpNftDataSource.d.ts +0 -6
  431. package/lib/nft/data/HttpNftDataSource.d.ts.map +0 -1
  432. package/lib/nft/data/HttpNftDataSource.js +0 -51
  433. package/lib/nft/data/HttpNftDataSource.js.map +0 -1
  434. package/lib/nft/data/HttpNftDataSource.test.d.ts +0 -2
  435. package/lib/nft/data/HttpNftDataSource.test.d.ts.map +0 -1
  436. package/lib/nft/data/HttpNftDataSource.test.js +0 -62
  437. package/lib/nft/data/HttpNftDataSource.test.js.map +0 -1
  438. package/lib/nft/data/NftDataSource.d.ts.map +0 -1
  439. package/lib/nft/data/NftDataSource.js.map +0 -1
  440. package/lib/nft/domain/NftContextLoader.d.ts.map +0 -1
  441. package/lib/nft/domain/NftContextLoader.js +0 -79
  442. package/lib/nft/domain/NftContextLoader.js.map +0 -1
  443. package/lib/nft/domain/NftContextLoader.test.d.ts +0 -2
  444. package/lib/nft/domain/NftContextLoader.test.d.ts.map +0 -1
  445. package/lib/nft/domain/NftContextLoader.test.js +0 -106
  446. package/lib/nft/domain/NftContextLoader.test.js.map +0 -1
  447. package/lib/shared/domain/ContextLoader.d.ts +0 -6
  448. package/lib/shared/domain/ContextLoader.d.ts.map +0 -1
  449. package/lib/shared/domain/ContextLoader.js.map +0 -1
  450. package/lib/shared/model/ClearSignContext.d.ts +0 -11
  451. package/lib/shared/model/ClearSignContext.d.ts.map +0 -1
  452. package/lib/shared/model/ClearSignContext.js +0 -3
  453. package/lib/shared/model/ClearSignContext.js.map +0 -1
  454. package/lib/shared/model/TransactionContext.d.ts +0 -6
  455. package/lib/shared/model/TransactionContext.d.ts.map +0 -1
  456. package/lib/shared/model/TransactionContext.js.map +0 -1
  457. package/lib/shared/model/TransactionSubset.d.ts.map +0 -1
  458. package/lib/shared/model/TransactionSubset.js.map +0 -1
  459. package/lib/token/data/HttpTokenDataSource.d.ts +0 -5
  460. package/lib/token/data/HttpTokenDataSource.d.ts.map +0 -1
  461. package/lib/token/data/HttpTokenDataSource.js +0 -68
  462. package/lib/token/data/HttpTokenDataSource.js.map +0 -1
  463. package/lib/token/data/HttpTokenDataSource.test.d.ts +0 -2
  464. package/lib/token/data/HttpTokenDataSource.test.d.ts.map +0 -1
  465. package/lib/token/data/HttpTokenDataSource.test.js +0 -87
  466. package/lib/token/data/HttpTokenDataSource.test.js.map +0 -1
  467. package/lib/token/data/TokenDataSource.d.ts +0 -8
  468. package/lib/token/data/TokenDataSource.d.ts.map +0 -1
  469. package/lib/token/data/TokenDataSource.js.map +0 -1
  470. package/lib/token/data/TokenDto.d.ts.map +0 -1
  471. package/lib/token/data/TokenDto.js.map +0 -1
  472. package/lib/token/domain/TokenContextLoader.d.ts.map +0 -1
  473. package/lib/token/domain/TokenContextLoader.js +0 -52
  474. package/lib/token/domain/TokenContextLoader.js.map +0 -1
  475. package/lib/token/domain/TokenContextLoader.test.d.ts +0 -2
  476. package/lib/token/domain/TokenContextLoader.test.d.ts.map +0 -1
  477. package/lib/token/domain/TokenContextLoader.test.js +0 -96
  478. package/lib/token/domain/TokenContextLoader.test.js.map +0 -1
  479. /package/lib/{ContextModule.js → cjs/src/ContextModule.js} +0 -0
  480. /package/lib/{external-plugin → cjs/src/external-plugin}/data/DAppDto.d.ts +0 -0
  481. /package/lib/{external-plugin → cjs/src/external-plugin}/data/DAppDto.js +0 -0
  482. /package/lib/{external-plugin → cjs/src/external-plugin}/data/ExternalPluginDataSource.js +0 -0
  483. /package/lib/{external-plugin → cjs/src/external-plugin}/model/DappInfos.js +0 -0
  484. /package/lib/{external-plugin → cjs/src/external-plugin}/model/SelectorDetails.d.ts +0 -0
  485. /package/lib/{external-plugin → cjs/src/external-plugin}/model/SelectorDetails.js +0 -0
  486. /package/lib/{forward-domain → cjs/src/forward-domain}/data/ForwardDomainDataSource.js +0 -0
  487. /package/lib/{nft → cjs/src/nft}/data/NftDataSource.js +0 -0
  488. /package/lib/{shared → cjs/src/shared}/domain/ContextLoader.js +0 -0
  489. /package/lib/{shared → cjs/src/shared}/model/TransactionContext.js +0 -0
  490. /package/lib/{shared → cjs/src/shared}/model/TransactionSubset.d.ts +0 -0
  491. /package/lib/{shared → cjs/src/shared}/model/TransactionSubset.js +0 -0
  492. /package/lib/{token → cjs/src/token}/data/TokenDataSource.js +0 -0
  493. /package/lib/{token → cjs/src/token}/data/TokenDto.d.ts +0 -0
  494. /package/lib/{token → cjs/src/token}/data/TokenDto.js +0 -0
@@ -0,0 +1,133 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { isHexaString } from "@ledgerhq/device-management-kit";
14
+ import { Interface } from "ethers";
15
+ import { inject, injectable } from "inversify";
16
+ import { EitherAsync, Left, Right } from "purify-ts";
17
+ import { externalPluginTypes } from "../../external-plugin/di/externalPluginTypes";
18
+ import { ClearSignContextType, } from "../../shared/model/ClearSignContext";
19
+ import { tokenTypes } from "../../token/di/tokenTypes";
20
+ let ExternalPluginContextLoader = class ExternalPluginContextLoader {
21
+ _externalPluginDataSource;
22
+ _tokenDataSource;
23
+ constructor(externalPluginDataSource, tokenDataSource) {
24
+ this._externalPluginDataSource = externalPluginDataSource;
25
+ this._tokenDataSource = tokenDataSource;
26
+ }
27
+ async load(transaction) {
28
+ if (!transaction.to || !transaction.data || transaction.data === "0x") {
29
+ return [];
30
+ }
31
+ const selector = transaction.data.slice(0, 10);
32
+ if (!isHexaString(selector)) {
33
+ return [
34
+ {
35
+ type: ClearSignContextType.ERROR,
36
+ error: new Error("Invalid selector"),
37
+ },
38
+ ];
39
+ }
40
+ const eitherDappInfos = await this._externalPluginDataSource.getDappInfos({
41
+ address: transaction.to,
42
+ chainId: transaction.chainId,
43
+ selector,
44
+ });
45
+ return EitherAsync(async ({ liftEither }) => {
46
+ const dappInfos = await liftEither(eitherDappInfos);
47
+ // if the dappInfos is null, return an empty array
48
+ // this means that the selector is not a known selector
49
+ if (!dappInfos) {
50
+ return [];
51
+ }
52
+ const externalPluginContext = {
53
+ type: ClearSignContextType.EXTERNAL_PLUGIN,
54
+ payload: dappInfos.selectorDetails.serializedData.concat(dappInfos.selectorDetails.signature),
55
+ };
56
+ const decodedCallData = this.getDecodedCallData(dappInfos.abi, dappInfos.selectorDetails.method, transaction.data);
57
+ // if the call data cannot be decoded, return the error
58
+ // but also the externalPluginContext because it is still valid
59
+ if (decodedCallData.isLeft()) {
60
+ return [
61
+ {
62
+ type: ClearSignContextType.ERROR,
63
+ error: decodedCallData.extract(),
64
+ },
65
+ externalPluginContext,
66
+ ];
67
+ }
68
+ // decodedCallData is a Right so we can extract it safely
69
+ const extractedDecodedCallData = decodedCallData.extract();
70
+ // get the token payload for each erc20OfInterest
71
+ // and return the payload or the error
72
+ const promises = dappInfos.selectorDetails.erc20OfInterest.map(async (erc20Path) => this.getTokenPayload(transaction, erc20Path, extractedDecodedCallData));
73
+ const tokensPayload = await Promise.all(promises);
74
+ // map the payload or the error to a ClearSignContext
75
+ const contexts = tokensPayload.map((eitherToken) => eitherToken.caseOf({
76
+ Left: (error) => ({ type: ClearSignContextType.ERROR, error }),
77
+ Right: (payload) => ({ type: ClearSignContextType.TOKEN, payload }),
78
+ }));
79
+ return [...contexts, externalPluginContext];
80
+ }).caseOf({
81
+ // parse all errors into ClearSignContext
82
+ Left: (error) => [{ type: ClearSignContextType.ERROR, error }],
83
+ Right: (contexts) => contexts,
84
+ });
85
+ }
86
+ getTokenPayload(transaction, erc20Path, decodedCallData) {
87
+ const address = this.getAddressFromPath(erc20Path, decodedCallData);
88
+ return EitherAsync(({ fromPromise }) => fromPromise(this._tokenDataSource.getTokenInfosPayload({
89
+ address,
90
+ chainId: transaction.chainId,
91
+ })));
92
+ }
93
+ getDecodedCallData(abi, method, data) {
94
+ try {
95
+ const contractInterface = new Interface(abi);
96
+ return Right(contractInterface.decodeFunctionData(method, data));
97
+ }
98
+ catch (_error) {
99
+ return Left(new Error("[ContextModule] ExternalPluginContextLoader: Unable to parse abi"));
100
+ }
101
+ }
102
+ getAddressFromPath(path, decodedCallData) {
103
+ // ethers.Result is a record string, any
104
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
105
+ let value = decodedCallData;
106
+ for (const key of path.split(".")) {
107
+ // In Solidity, a struct cannot begin with a number
108
+ // Additionally, when we use -1, it signifies the last element of the array.
109
+ if (key === "-1") {
110
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
111
+ value = value[value.length - 1];
112
+ }
113
+ else {
114
+ // This access can throw a RangeError error in case of an invalid key
115
+ // but is correctly caught by the liftEither above
116
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
117
+ value = value[key];
118
+ }
119
+ }
120
+ if (!isHexaString(value)) {
121
+ throw new Error("[ContextModule] ExternalPluginContextLoader: Unable to get address");
122
+ }
123
+ return value;
124
+ }
125
+ };
126
+ ExternalPluginContextLoader = __decorate([
127
+ injectable(),
128
+ __param(0, inject(externalPluginTypes.ExternalPluginDataSource)),
129
+ __param(1, inject(tokenTypes.TokenDataSource)),
130
+ __metadata("design:paramtypes", [Object, Object])
131
+ ], ExternalPluginContextLoader);
132
+ export { ExternalPluginContextLoader };
133
+ //# sourceMappingURL=ExternalPluginContextLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExternalPluginContextLoader.js","sourceRoot":"","sources":["../../../../../src/external-plugin/domain/ExternalPluginContextLoader.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ import { SelectorDetails } from "../../external-plugin/model/SelectorDetails";
2
+ export type DappInfos = {
3
+ selectorDetails: SelectorDetails;
4
+ abi: object[];
5
+ };
6
+ //# sourceMappingURL=DappInfos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DappInfos.d.ts","sourceRoot":"","sources":["../../../../../src/external-plugin/model/DappInfos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE1E,MAAM,MAAM,SAAS,GAAG;IAAE,eAAe,EAAE,eAAe,CAAC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DappInfos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DappInfos.js","sourceRoot":"","sources":["../../../../../src/external-plugin/model/DappInfos.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export type SelectorDetails = {
2
+ plugin: string;
3
+ signature: string;
4
+ serializedData: string;
5
+ method: string;
6
+ erc20OfInterest: string[];
7
+ };
8
+ //# sourceMappingURL=SelectorDetails.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectorDetails.d.ts","sourceRoot":"","sources":["../../../../../src/external-plugin/model/SelectorDetails.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SelectorDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectorDetails.js","sourceRoot":"","sources":["../../../../../src/external-plugin/model/SelectorDetails.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { Either } from "purify-ts/Either";
2
+ export type GetForwardDomainInfosParams = {
3
+ domain: string;
4
+ challenge: string;
5
+ };
6
+ export interface ForwardDomainDataSource {
7
+ getDomainNamePayload(params: GetForwardDomainInfosParams): Promise<Either<Error, string>>;
8
+ }
9
+ //# sourceMappingURL=ForwardDomainDataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForwardDomainDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/forward-domain/data/ForwardDomainDataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC,oBAAoB,CAClB,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ForwardDomainDataSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForwardDomainDataSource.js","sourceRoot":"","sources":["../../../../../src/forward-domain/data/ForwardDomainDataSource.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { Either } from "purify-ts";
2
+ import { ForwardDomainDataSource, GetForwardDomainInfosParams } from "../../forward-domain/data/ForwardDomainDataSource";
3
+ export declare class HttpForwardDomainDataSource implements ForwardDomainDataSource {
4
+ getDomainNamePayload({ domain, challenge, }: GetForwardDomainInfosParams): Promise<Either<Error, string>>;
5
+ }
6
+ //# sourceMappingURL=HttpForwardDomainDataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpForwardDomainDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/forward-domain/data/HttpForwardDomainDataSource.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,WAAW,CAAC;AAEhD,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,+CAA+C,CAAC;AAGvD,qBACa,2BAA4B,YAAW,uBAAuB;IAC5D,oBAAoB,CAAC,EAChC,MAAM,EACN,SAAS,GACV,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAyBhE"}
@@ -0,0 +1,34 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import axios from "axios";
8
+ import { injectable } from "inversify";
9
+ import { Left, Right } from "purify-ts";
10
+ import PACKAGE from "../../../package.json";
11
+ let HttpForwardDomainDataSource = class HttpForwardDomainDataSource {
12
+ async getDomainNamePayload({ domain, challenge, }) {
13
+ try {
14
+ const response = await axios.request({
15
+ method: "GET",
16
+ url: `https://nft.api.live.ledger.com/v1/names/ens/forward/${domain}?challenge=${challenge}`,
17
+ headers: {
18
+ "X-Ledger-Client-Version": `context-module/${PACKAGE.version}`,
19
+ },
20
+ });
21
+ return response.data.payload
22
+ ? Right(response.data.payload)
23
+ : Left(new Error("[ContextModule] HttpForwardDomainDataSource: error getting domain payload"));
24
+ }
25
+ catch (_error) {
26
+ return Left(new Error("[ContextModule] HttpForwardDomainDataSource: Failed to fetch domain name"));
27
+ }
28
+ }
29
+ };
30
+ HttpForwardDomainDataSource = __decorate([
31
+ injectable()
32
+ ], HttpForwardDomainDataSource);
33
+ export { HttpForwardDomainDataSource };
34
+ //# sourceMappingURL=HttpForwardDomainDataSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpForwardDomainDataSource.js","sourceRoot":"","sources":["../../../../../src/forward-domain/data/HttpForwardDomainDataSource.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAU,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAMhD,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAGlC,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAC/B,KAAK,CAAC,oBAAoB,CAAC,EAChC,MAAM,EACN,SAAS,GACmB;QAC5B,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAsB;gBACxD,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,wDAAwD,MAAM,cAAc,SAAS,EAAE;gBAC5F,OAAO,EAAE;oBACP,yBAAyB,EAAE,kBAAkB,OAAO,CAAC,OAAO,EAAE;iBAC/D;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO;gBAC1B,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC9B,CAAC,CAAC,IAAI,CACF,IAAI,KAAK,CACP,2EAA2E,CAC5E,CACF,CAAC;QACR,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,OAAO,IAAI,CACT,IAAI,KAAK,CACP,0EAA0E,CAC3E,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AA7BY,2BAA2B;IADvC,UAAU,EAAE;GACA,2BAA2B,CA6BvC"}
@@ -0,0 +1,3 @@
1
+ import { ContainerModule } from "inversify";
2
+ export declare const forwardDomainModuleFactory: () => ContainerModule;
3
+ //# sourceMappingURL=forwardDomainModuleFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forwardDomainModuleFactory.d.ts","sourceRoot":"","sources":["../../../../../src/forward-domain/di/forwardDomainModuleFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAM5C,eAAO,MAAM,0BAA0B,uBAQnC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ContainerModule } from "inversify";
2
+ import { HttpForwardDomainDataSource } from "../../forward-domain/data/HttpForwardDomainDataSource";
3
+ import { forwardDomainTypes } from "../../forward-domain/di/forwardDomainTypes";
4
+ import { ForwardDomainContextLoader } from "../../forward-domain/domain/ForwardDomainContextLoader";
5
+ export const forwardDomainModuleFactory = () => new ContainerModule((bind, _unbind, _isBound, _rebind) => {
6
+ bind(forwardDomainTypes.ForwardDomainDataSource).to(HttpForwardDomainDataSource);
7
+ bind(forwardDomainTypes.ForwardDomainContextLoader).to(ForwardDomainContextLoader);
8
+ });
9
+ //# sourceMappingURL=forwardDomainModuleFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forwardDomainModuleFactory.js","sourceRoot":"","sources":["../../../../../src/forward-domain/di/forwardDomainModuleFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAEhG,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE,CAC7C,IAAI,eAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IACvD,IAAI,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAC,EAAE,CACjD,2BAA2B,CAC5B,CAAC;IACF,IAAI,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAC,EAAE,CACpD,0BAA0B,CAC3B,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const forwardDomainTypes: {
2
+ ForwardDomainDataSource: symbol;
3
+ ForwardDomainContextLoader: symbol;
4
+ };
5
+ //# sourceMappingURL=forwardDomainTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forwardDomainTypes.d.ts","sourceRoot":"","sources":["../../../../../src/forward-domain/di/forwardDomainTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;CAG9B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const forwardDomainTypes = {
2
+ ForwardDomainDataSource: Symbol.for("forwardDomainDataSource"),
3
+ ForwardDomainContextLoader: Symbol.for("forwardDomainContextLoader"),
4
+ };
5
+ //# sourceMappingURL=forwardDomainTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forwardDomainTypes.js","sourceRoot":"","sources":["../../../../../src/forward-domain/di/forwardDomainTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC;IAC9D,0BAA0B,EAAE,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC;CACrE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ForwardDomainDataSource } from "../../forward-domain/data/ForwardDomainDataSource";
2
+ import { ContextLoader } from "../../shared/domain/ContextLoader";
3
+ import { ClearSignContext } from "../../shared/model/ClearSignContext";
4
+ import { TransactionContext } from "../../shared/model/TransactionContext";
5
+ export declare class ForwardDomainContextLoader implements ContextLoader {
6
+ private _dataSource;
7
+ constructor(dataSource: ForwardDomainDataSource);
8
+ load(transactionContext: TransactionContext): Promise<ClearSignContext[]>;
9
+ private isDomainValid;
10
+ }
11
+ //# sourceMappingURL=ForwardDomainContextLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForwardDomainContextLoader.d.ts","sourceRoot":"","sources":["../../../../../src/forward-domain/domain/ForwardDomainContextLoader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACL,gBAAgB,EAEjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,qBACa,0BAA2B,YAAW,aAAa;IAC9D,OAAO,CAAC,WAAW,CAA0B;gBAI3C,UAAU,EAAE,uBAAuB;IAK/B,IAAI,CACR,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAqC9B,OAAO,CAAC,aAAa;CAQtB"}
@@ -0,0 +1,63 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { inject, injectable } from "inversify";
14
+ import { forwardDomainTypes } from "../../forward-domain/di/forwardDomainTypes";
15
+ import { ClearSignContextType, } from "../../shared/model/ClearSignContext";
16
+ let ForwardDomainContextLoader = class ForwardDomainContextLoader {
17
+ _dataSource;
18
+ constructor(dataSource) {
19
+ this._dataSource = dataSource;
20
+ }
21
+ async load(transactionContext) {
22
+ const { domain, challenge } = transactionContext;
23
+ if (!domain) {
24
+ return [];
25
+ }
26
+ if (!this.isDomainValid(domain)) {
27
+ return [
28
+ {
29
+ type: ClearSignContextType.ERROR,
30
+ error: new Error("[ContextModule] ForwardDomainLoader: invalid domain"),
31
+ },
32
+ ];
33
+ }
34
+ const payload = await this._dataSource.getDomainNamePayload({
35
+ domain: domain,
36
+ challenge: challenge,
37
+ });
38
+ return [
39
+ payload.caseOf({
40
+ Left: (error) => ({
41
+ type: ClearSignContextType.ERROR,
42
+ error: error,
43
+ }),
44
+ Right: (value) => ({
45
+ type: ClearSignContextType.DOMAIN_NAME,
46
+ payload: value,
47
+ }),
48
+ }),
49
+ ];
50
+ }
51
+ isDomainValid(domain) {
52
+ const lengthIsValid = domain.length > 0 && Number(domain.length) < 30;
53
+ const containsOnlyValidChars = new RegExp("^[a-zA-Z0-9\\-\\_\\.]+$").test(domain);
54
+ return lengthIsValid && containsOnlyValidChars;
55
+ }
56
+ };
57
+ ForwardDomainContextLoader = __decorate([
58
+ injectable(),
59
+ __param(0, inject(forwardDomainTypes.ForwardDomainDataSource)),
60
+ __metadata("design:paramtypes", [Object])
61
+ ], ForwardDomainContextLoader);
62
+ export { ForwardDomainContextLoader };
63
+ //# sourceMappingURL=ForwardDomainContextLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForwardDomainContextLoader.js","sourceRoot":"","sources":["../../../../../src/forward-domain/domain/ForwardDomainContextLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAE5E,OAAO,EAEL,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AAIlC,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAC7B,WAAW,CAA0B;IAE7C,YAEE,UAAmC;QAEnC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,IAAI,CACR,kBAAsC;QAEtC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC;QAEjD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YAChC,OAAO;gBACL;oBACE,IAAI,EAAE,oBAAoB,CAAC,KAAK;oBAChC,KAAK,EAAE,IAAI,KAAK,CACd,qDAAqD,CACtD;iBACF;aACF,CAAC;QACJ,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC;YAC1D,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,SAAS;SACrB,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,CAAC,MAAM,CAAC;gBACb,IAAI,EAAE,CAAC,KAAK,EAAoB,EAAE,CAAC,CAAC;oBAClC,IAAI,EAAE,oBAAoB,CAAC,KAAK;oBAChC,KAAK,EAAE,KAAK;iBACb,CAAC;gBACF,KAAK,EAAE,CAAC,KAAK,EAAoB,EAAE,CAAC,CAAC;oBACnC,IAAI,EAAE,oBAAoB,CAAC,WAAW;oBACtC,OAAO,EAAE,KAAK;iBACf,CAAC;aACH,CAAC;SACH,CAAC;IACJ,CAAC;IAEO,aAAa,CAAC,MAAc;QAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QACtE,MAAM,sBAAsB,GAAG,IAAI,MAAM,CAAC,yBAAyB,CAAC,CAAC,IAAI,CACvE,MAAM,CACP,CAAC;QAEF,OAAO,aAAa,IAAI,sBAAsB,CAAC;IACjD,CAAC;CACF,CAAA;AAzDY,0BAA0B;IADtC,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAA;;GAJ1C,0BAA0B,CAyDtC"}
@@ -0,0 +1,14 @@
1
+ export * from "./config/model/ContextModuleConfig";
2
+ export * from "./ContextModule";
3
+ export * from "./ContextModuleBuilder";
4
+ export * from "./DefaultContextModule";
5
+ export * from "./external-plugin/domain/ExternalPluginContextLoader";
6
+ export * from "./forward-domain/domain/ForwardDomainContextLoader";
7
+ export * from "./nft/domain/NftContextLoader";
8
+ export * from "./shared/model/ClearSignContext";
9
+ export * from "./shared/model/TransactionContext";
10
+ export * from "./shared/model/TransactionSubset";
11
+ export * from "./shared/model/TypedDataClearSignContext";
12
+ export * from "./shared/model/TypedDataContext";
13
+ export * from "./token/domain/TokenContextLoader";
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC"}
@@ -1,11 +1,14 @@
1
+ export * from "./config/model/ContextModuleConfig";
1
2
  export * from "./ContextModule";
2
3
  export * from "./ContextModuleBuilder";
3
4
  export * from "./DefaultContextModule";
5
+ export * from "./external-plugin/domain/ExternalPluginContextLoader";
6
+ export * from "./forward-domain/domain/ForwardDomainContextLoader";
7
+ export * from "./nft/domain/NftContextLoader";
4
8
  export * from "./shared/model/ClearSignContext";
5
9
  export * from "./shared/model/TransactionContext";
6
10
  export * from "./shared/model/TransactionSubset";
11
+ export * from "./shared/model/TypedDataClearSignContext";
12
+ export * from "./shared/model/TypedDataContext";
7
13
  export * from "./token/domain/TokenContextLoader";
8
- export * from "./nft/domain/NftContextLoader";
9
- export * from "./forward-domain/domain/ForwardDomainContextLoader";
10
- export * from "./external-plugin/domain/ExternalPluginContextLoader";
11
- //# sourceMappingURL=index.d.ts.map
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Either } from "purify-ts";
2
+ import { GetNftInformationsParams, GetSetPluginPayloadParams, NftDataSource } from "../../nft/data/NftDataSource";
3
+ export declare class HttpNftDataSource implements NftDataSource {
4
+ getSetPluginPayload({ chainId, address, selector, }: GetSetPluginPayloadParams): Promise<Either<Error, string>>;
5
+ getNftInfosPayload({ chainId, address, }: GetNftInformationsParams): Promise<Either<Error, string>>;
6
+ }
7
+ //# sourceMappingURL=HttpNftDataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpNftDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/nft/data/HttpNftDataSource.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,WAAW,CAAC;AAEhD,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,aAAa,EACd,MAAM,0BAA0B,CAAC;AAGlC,qBACa,iBAAkB,YAAW,aAAa;IACxC,mBAAmB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,QAAQ,GACT,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IA0BhD,kBAAkB,CAAC,EAC9B,OAAO,EACP,OAAO,GACR,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAqB7D"}
@@ -0,0 +1,51 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import axios from "axios";
8
+ import { injectable } from "inversify";
9
+ import { Left, Right } from "purify-ts";
10
+ import PACKAGE from "../../../package.json";
11
+ let HttpNftDataSource = class HttpNftDataSource {
12
+ async getSetPluginPayload({ chainId, address, selector, }) {
13
+ try {
14
+ const response = await axios.request({
15
+ method: "GET",
16
+ url: `https://nft.api.live.ledger.com/v1/ethereum/${chainId}/contracts/${address}/plugin-selector/${selector}`,
17
+ headers: {
18
+ "X-Ledger-Client-Version": `context-module/${PACKAGE.version}`,
19
+ },
20
+ });
21
+ return response.data.payload
22
+ ? Right(response.data.payload)
23
+ : Left(new Error("[ContextModule] HttpNftDataSource: unexpected empty response"));
24
+ }
25
+ catch (_error) {
26
+ return Left(new Error("[ContextModule] HttpNftDataSource: Failed to fetch set plugin payload"));
27
+ }
28
+ }
29
+ async getNftInfosPayload({ chainId, address, }) {
30
+ try {
31
+ const response = await axios.request({
32
+ method: "GET",
33
+ url: `https://nft.api.live.ledger.com/v1/ethereum/${chainId}/contracts/${address}`,
34
+ headers: {
35
+ "X-Ledger-Client-Version": `context-module/${PACKAGE.version}`,
36
+ },
37
+ });
38
+ return response.data.payload
39
+ ? Right(response.data.payload)
40
+ : Left(new Error("[ContextModule] HttpNftDataSource: no nft metadata"));
41
+ }
42
+ catch (_error) {
43
+ return Left(new Error("[ContextModule] HttpNftDataSource: Failed to fetch nft informations"));
44
+ }
45
+ }
46
+ };
47
+ HttpNftDataSource = __decorate([
48
+ injectable()
49
+ ], HttpNftDataSource);
50
+ export { HttpNftDataSource };
51
+ //# sourceMappingURL=HttpNftDataSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpNftDataSource.js","sourceRoot":"","sources":["../../../../../src/nft/data/HttpNftDataSource.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAU,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAOhD,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAGlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACrB,KAAK,CAAC,mBAAmB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,QAAQ,GACkB;QAC1B,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAsB;gBACxD,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,+CAA+C,OAAO,cAAc,OAAO,oBAAoB,QAAQ,EAAE;gBAC9G,OAAO,EAAE;oBACP,yBAAyB,EAAE,kBAAkB,OAAO,CAAC,OAAO,EAAE;iBAC/D;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO;gBAC1B,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC9B,CAAC,CAAC,IAAI,CACF,IAAI,KAAK,CACP,8DAA8D,CAC/D,CACF,CAAC;QACR,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,OAAO,IAAI,CACT,IAAI,KAAK,CACP,uEAAuE,CACxE,CACF,CAAC;QACJ,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,EAC9B,OAAO,EACP,OAAO,GACkB;QACzB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAsB;gBACxD,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,+CAA+C,OAAO,cAAc,OAAO,EAAE;gBAClF,OAAO,EAAE;oBACP,yBAAyB,EAAE,kBAAkB,OAAO,CAAC,OAAO,EAAE;iBAC/D;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO;gBAC1B,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC9B,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC,CAAC;QAC5E,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,OAAO,IAAI,CACT,IAAI,KAAK,CACP,qEAAqE,CACtE,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAvDY,iBAAiB;IAD7B,UAAU,EAAE;GACA,iBAAiB,CAuD7B"}
@@ -0,0 +1,15 @@
1
+ import { Either } from "purify-ts";
2
+ export type GetSetPluginPayloadParams = {
3
+ chainId: number;
4
+ address: string;
5
+ selector: string;
6
+ };
7
+ export type GetNftInformationsParams = {
8
+ chainId: number;
9
+ address: string;
10
+ };
11
+ export interface NftDataSource {
12
+ getNftInfosPayload(params: GetNftInformationsParams): Promise<Either<Error, string>>;
13
+ getSetPluginPayload(params: GetSetPluginPayloadParams): Promise<Either<Error, string>>;
14
+ }
15
+ //# sourceMappingURL=NftDataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NftDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/nft/data/NftDataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,kBAAkB,CAChB,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAClC,mBAAmB,CACjB,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=NftDataSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NftDataSource.js","sourceRoot":"","sources":["../../../../../src/nft/data/NftDataSource.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { ContainerModule } from "inversify";
2
+ export declare const nftModuleFactory: () => ContainerModule;
3
+ //# sourceMappingURL=nftModuleFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nftModuleFactory.d.ts","sourceRoot":"","sources":["../../../../../src/nft/di/nftModuleFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAM5C,eAAO,MAAM,gBAAgB,uBAIzB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ContainerModule } from "inversify";
2
+ import { HttpNftDataSource } from "../../nft/data/HttpNftDataSource";
3
+ import { nftTypes } from "../../nft/di/nftTypes";
4
+ import { NftContextLoader } from "../../nft/domain/NftContextLoader";
5
+ export const nftModuleFactory = () => new ContainerModule((bind, _unbind, _isBound, _rebind) => {
6
+ bind(nftTypes.NftDataSource).to(HttpNftDataSource);
7
+ bind(nftTypes.NftContextLoader).to(NftContextLoader);
8
+ });
9
+ //# sourceMappingURL=nftModuleFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nftModuleFactory.js","sourceRoot":"","sources":["../../../../../src/nft/di/nftModuleFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CACnC,IAAI,eAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IACvD,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;IACnD,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const nftTypes: {
2
+ NftDataSource: symbol;
3
+ NftContextLoader: symbol;
4
+ };
5
+ //# sourceMappingURL=nftTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nftTypes.d.ts","sourceRoot":"","sources":["../../../../../src/nft/di/nftTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;CAGpB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const nftTypes = {
2
+ NftDataSource: Symbol.for("nftDataSource"),
3
+ NftContextLoader: Symbol.for("nftContextLoader"),
4
+ };
5
+ //# sourceMappingURL=nftTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nftTypes.js","sourceRoot":"","sources":["../../../../../src/nft/di/nftTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;IAC1C,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACjD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { NftDataSource } from "../../nft/data/NftDataSource";
2
+ import { ContextLoader } from "../../shared/domain/ContextLoader";
3
+ import { ClearSignContext } from "../../shared/model/ClearSignContext";
4
+ import { TransactionContext } from "../../shared/model/TransactionContext";
5
+ export declare class NftContextLoader implements ContextLoader {
6
+ private _dataSource;
7
+ constructor(dataSource: NftDataSource);
8
+ load(transaction: TransactionContext): Promise<ClearSignContext[]>;
9
+ private isSelectorSupported;
10
+ }
11
+ //# sourceMappingURL=NftContextLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NftContextLoader.d.ts","sourceRoot":"","sources":["../../../../../src/nft/domain/NftContextLoader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACL,gBAAgB,EAEjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAqBvE,qBACa,gBAAiB,YAAW,aAAa;IACpD,OAAO,CAAC,WAAW,CAAgB;gBAES,UAAU,EAAE,aAAa;IAI/D,IAAI,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IA2ExE,OAAO,CAAC,mBAAmB;CAG5B"}