@ledgerhq/context-module 0.1.2-next.0 → 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
package/LICENSE.MD ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2024-present Ledger
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,127 @@
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
+ You can use a custom configuration for your context module.
63
+
64
+ ```ts
65
+ const config: ContextModuleConfig = {
66
+ // config to use
67
+ };
68
+ const contextModule = new ContextModuleBuilder().withConfig(config).build();
69
+ ```
70
+
71
+ It is also possible to instantiate the context module without the default loaders.
72
+
73
+ ```ts
74
+ const contextModule = new ContextModuleBuilder()
75
+ .withoutDefaultLoaders()
76
+ .build();
77
+ ```
78
+
79
+ > [!NOTE]
80
+ > Without loaders, a transaction cannot be clear signed. Use it with caution.
81
+
82
+ You can add a custom list of loader to the context module.
83
+
84
+ ```ts
85
+ // Default Token Loader
86
+ const tokenLoader = new TokenContextLoader(new TokenDataSource());
87
+
88
+ // Custom Loader
89
+ const myCustomLoader = new MyCustomLoader();
90
+
91
+ // Custom datasource for a default Token Loader
92
+ const myCustomTokenDataSource = new MyCustomTokenDataSource();
93
+ const myTokenLoader = new TokenCOntextLoader();
94
+
95
+ const contextModule = new ContextModuleBuilder()
96
+ .withoutDefaultLoaders()
97
+ .addLoader(tokenLoader)
98
+ .addLoader(myTokenLoader)
99
+ .addLoader(myCustomLoader)
100
+ .build();
101
+ ```
102
+
103
+ ### Create a custom loader
104
+
105
+ A custom loader must implement the ContextLoader interface, defined as follows:
106
+
107
+ ```ts
108
+ type ContextLoader = {
109
+ load: (transaction: TransactionContext) => Promise<ClearSignContext[]>;
110
+ };
111
+ ```
112
+
113
+ with ClearSignContextSuccess defined as follows:
114
+
115
+ ```ts
116
+ type ClearSignContextSuccess = {
117
+ type: "token" | "nft" | "domainName" | "plugin" | "externalPlugin";
118
+ payload: string;
119
+ };
120
+ ```
121
+
122
+ The payload should represent the data sent to the device to provide information and must be signed by a trusted authority.
123
+
124
+ ### Errors handling
125
+
126
+ > [!CAUTION]
127
+ > 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": "1.0.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"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextModule.js","sourceRoot":"","sources":["../src/ContextModule.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ContextModule.js","sourceRoot":"","sources":["../../../src/ContextModule.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
1
+ import { ContextModuleConfig } from "./config/model/ContextModuleConfig";
2
+ import { ContextLoader } from "./shared/domain/ContextLoader";
3
+ import { type TypedDataContextLoader } from "./typed-data/domain/TypedDataContextLoader";
4
+ import { ContextModule } from "./ContextModule";
5
+ export declare const DEFAULT_CONFIG: ContextModuleConfig;
6
+ export declare class ContextModuleBuilder {
7
+ private config;
8
+ private customLoaders;
9
+ private defaultLoaders;
10
+ private customTypedDataLoader?;
11
+ constructor();
12
+ /**
13
+ * Remove default loaders from the list of loaders
14
+ *
15
+ * @returns this
16
+ */
17
+ withoutDefaultLoaders(): this;
18
+ /**
19
+ * Add a custom loader to the list of loaders
20
+ *
21
+ * @param loader loader to add to the list of loaders
22
+ * @returns this
23
+ */
24
+ addLoader(loader: ContextLoader): this;
25
+ /**
26
+ * Replace the default loader for typed data clear signing contexts
27
+ *
28
+ * @returns this
29
+ */
30
+ withTypedDataLoader(loader: TypedDataContextLoader): this;
31
+ /**
32
+ * Set the configuration for the context module
33
+ *
34
+ * @param config configuration for the context module
35
+ * @returns this
36
+ */
37
+ withConfig(config: Partial<ContextModuleConfig>): this;
38
+ /**
39
+ * Build the context module
40
+ *
41
+ * @returns the context module
42
+ */
43
+ build(): ContextModule;
44
+ }
45
+ //# sourceMappingURL=ContextModuleBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextModuleBuilder.d.ts","sourceRoot":"","sources":["../../../src/ContextModuleBuilder.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAIzE,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;AAMhD,eAAO,MAAM,cAAc,EAAE,mBAM5B,CAAC;AAEF,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAoC;IAClD,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,qBAAqB,CAAC,CAAyB;;IAIvD;;;;OAIG;IACH,qBAAqB;IAKrB;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,aAAa;IAK/B;;;;OAIG;IACH,mBAAmB,CAAC,MAAM,EAAE,sBAAsB;IAKlD;;;;;OAKG;IACH,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC;IAK/C;;;;OAIG;IACH,KAAK,IAAI,aAAa;CAyBvB"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContextModuleBuilder = exports.DEFAULT_CONFIG = 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
+ const DEFAULT_CAL_URL = "https://crypto-assets-service.api.ledger.com/v1";
12
+ exports.DEFAULT_CONFIG = {
13
+ cal: {
14
+ url: DEFAULT_CAL_URL,
15
+ mode: "prod",
16
+ branch: "main",
17
+ },
18
+ };
19
+ class ContextModuleBuilder {
20
+ config = {};
21
+ customLoaders = [];
22
+ defaultLoaders = [];
23
+ customTypedDataLoader;
24
+ constructor() { }
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.customTypedDataLoader = loader;
51
+ return this;
52
+ }
53
+ /**
54
+ * Set the configuration for the context module
55
+ *
56
+ * @param config configuration for the context module
57
+ * @returns this
58
+ */
59
+ withConfig(config) {
60
+ this.config = config;
61
+ return this;
62
+ }
63
+ /**
64
+ * Build the context module
65
+ *
66
+ * @returns the context module
67
+ */
68
+ build() {
69
+ const container = (0, di_1.makeContainer)({
70
+ config: { ...exports.DEFAULT_CONFIG, ...this.config },
71
+ });
72
+ this.defaultLoaders = [
73
+ container.get(externalPluginTypes_1.externalPluginTypes.ExternalPluginContextLoader),
74
+ container.get(forwardDomainTypes_1.forwardDomainTypes.ForwardDomainContextLoader),
75
+ container.get(nftTypes_1.nftTypes.NftContextLoader),
76
+ container.get(tokenTypes_1.tokenTypes.TokenContextLoader),
77
+ ];
78
+ const defaultTypedDataLoader = container.get(typedDataTypes_1.typedDataTypes.TypedDataContextLoader);
79
+ const loaders = [...this.defaultLoaders, ...this.customLoaders];
80
+ return new DefaultContextModule_1.DefaultContextModule({
81
+ loaders,
82
+ typedDataLoader: this.customTypedDataLoader ?? defaultTypedDataLoader,
83
+ });
84
+ }
85
+ }
86
+ exports.ContextModuleBuilder = ContextModuleBuilder;
87
+ //# 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;AAUhE,iEAA8D;AAC9D,6BAAqC;AAErC,MAAM,eAAe,GAAG,iDAAiD,CAAC;AAE7D,QAAA,cAAc,GAAwB;IACjD,GAAG,EAAE;QACH,GAAG,EAAE,eAAe;QACpB,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,MAAM;KACf;CACF,CAAC;AAEF,MAAa,oBAAoB;IACvB,MAAM,GAAiC,EAAE,CAAC;IAC1C,aAAa,GAAoB,EAAE,CAAC;IACpC,cAAc,GAAoB,EAAE,CAAC;IACrC,qBAAqB,CAA0B;IAEvD,gBAAe,CAAC;IAEhB;;;;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,qBAAqB,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,MAAoC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK;QACH,MAAM,SAAS,GAAG,IAAA,kBAAa,EAAC;YAC9B,MAAM,EAAE,EAAE,GAAG,sBAAc,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE;SAC9C,CAAC,CAAC;QAEH,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,MAAM,sBAAsB,GAAG,SAAS,CAAC,GAAG,CAC1C,+BAAc,CAAC,sBAAsB,CACtC,CAAC;QAEF,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,qBAAqB,IAAI,sBAAsB;SACtE,CAAC,CAAC;IACL,CAAC;CACF;AAhFD,oDAgFC"}
@@ -1,14 +1,20 @@
1
- import { ContextModule } from "./ContextModule";
1
+ import type { TypedDataClearSignContext } from "./shared/model/TypedDataClearSignContext";
2
+ import type { TypedDataContext } from "./shared/model/TypedDataContext";
2
3
  import { ContextLoader } from "./shared/domain/ContextLoader";
3
4
  import { ClearSignContext } from "./shared/model/ClearSignContext";
4
5
  import { TransactionContext } from "./shared/model/TransactionContext";
6
+ import type { TypedDataContextLoader } from "./typed-data/domain/TypedDataContextLoader";
7
+ import { ContextModule } from "./ContextModule";
5
8
  type DefaultContextModuleConstructorArgs = {
6
9
  loaders: ContextLoader[];
10
+ typedDataLoader: TypedDataContextLoader;
7
11
  };
8
12
  export declare class DefaultContextModule implements ContextModule {
9
13
  private _loaders;
14
+ private _typedDataLoader;
10
15
  constructor(args: DefaultContextModuleConstructorArgs);
11
16
  getContexts(transaction: TransactionContext): Promise<ClearSignContext[]>;
17
+ getTypedDataFilters(typedData: TypedDataContext): Promise<TypedDataClearSignContext>;
12
18
  }
13
19
  export {};
14
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,4 @@
1
+ import { ContainerModule } from "inversify";
2
+ import { ContextModuleConfig } from "../../config/model/ContextModuleConfig";
3
+ export declare const configModuleFactory: (config: ContextModuleConfig) => ContainerModule;
4
+ //# sourceMappingURL=configModuleFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configModuleFactory.d.ts","sourceRoot":"","sources":["../../../../../src/config/di/configModuleFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAIzE,eAAO,MAAM,mBAAmB,WAAY,mBAAmB,oBAG3D,CAAC"}