@ledgerhq/context-module 1.0.0 → 1.1.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 (571) hide show
  1. package/README.md +4 -6
  2. package/lib/cjs/index.js +2 -20
  3. package/lib/cjs/index.js.map +7 -1
  4. package/lib/cjs/package.json +53 -59
  5. package/lib/cjs/src/ContextModule.js +2 -3
  6. package/lib/cjs/src/ContextModule.js.map +7 -1
  7. package/lib/cjs/src/ContextModuleBuilder.js +2 -87
  8. package/lib/cjs/src/ContextModuleBuilder.js.map +7 -1
  9. package/lib/cjs/src/ContextModuleBuilder.test.js +2 -0
  10. package/lib/cjs/src/ContextModuleBuilder.test.js.map +7 -0
  11. package/lib/cjs/src/DefaultContextModule.js +2 -21
  12. package/lib/cjs/src/DefaultContextModule.js.map +7 -1
  13. package/lib/cjs/src/DefaultContextModule.test.js +2 -0
  14. package/lib/cjs/src/DefaultContextModule.test.js.map +7 -0
  15. package/lib/cjs/src/config/di/configModuleFactory.js +2 -10
  16. package/lib/cjs/src/config/di/configModuleFactory.js.map +7 -1
  17. package/lib/cjs/src/config/di/configTypes.js +2 -7
  18. package/lib/cjs/src/config/di/configTypes.js.map +7 -1
  19. package/lib/cjs/src/config/model/ContextModuleConfig.js +2 -3
  20. package/lib/cjs/src/config/model/ContextModuleConfig.js.map +7 -1
  21. package/lib/cjs/src/di.js +2 -17
  22. package/lib/cjs/src/di.js.map +7 -1
  23. package/lib/cjs/src/external-plugin/data/DAppDto.js +2 -3
  24. package/lib/cjs/src/external-plugin/data/DAppDto.js.map +7 -1
  25. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js +2 -3
  26. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js.map +7 -1
  27. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js +2 -83
  28. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js.map +7 -1
  29. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.test.js +2 -0
  30. package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.test.js.map +7 -0
  31. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js +2 -13
  32. package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js.map +7 -1
  33. package/lib/cjs/src/external-plugin/di/externalPluginTypes.js +2 -8
  34. package/lib/cjs/src/external-plugin/di/externalPluginTypes.js.map +7 -1
  35. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js +2 -136
  36. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js.map +7 -1
  37. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.test.js +2 -0
  38. package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.test.js.map +7 -0
  39. package/lib/cjs/src/external-plugin/model/DappInfos.js +2 -3
  40. package/lib/cjs/src/external-plugin/model/DappInfos.js.map +7 -1
  41. package/lib/cjs/src/external-plugin/model/SelectorDetails.js +2 -3
  42. package/lib/cjs/src/external-plugin/model/SelectorDetails.js.map +7 -1
  43. package/lib/cjs/src/index.js +2 -30
  44. package/lib/cjs/src/index.js.map +7 -1
  45. package/lib/cjs/src/nft/data/HttpNftDataSource.js +2 -57
  46. package/lib/cjs/src/nft/data/HttpNftDataSource.js.map +7 -1
  47. package/lib/cjs/src/nft/data/HttpNftDataSource.test.js +2 -0
  48. package/lib/cjs/src/nft/data/HttpNftDataSource.test.js.map +7 -0
  49. package/lib/cjs/src/nft/data/NftDataSource.js +2 -3
  50. package/lib/cjs/src/nft/data/NftDataSource.js.map +7 -1
  51. package/lib/cjs/src/nft/di/nftModuleFactory.js +2 -13
  52. package/lib/cjs/src/nft/di/nftModuleFactory.js.map +7 -1
  53. package/lib/cjs/src/nft/di/nftTypes.js +2 -8
  54. package/lib/cjs/src/nft/di/nftTypes.js.map +7 -1
  55. package/lib/cjs/src/nft/domain/NftContextLoader.js +2 -111
  56. package/lib/cjs/src/nft/domain/NftContextLoader.js.map +7 -1
  57. package/lib/cjs/src/nft/domain/NftContextLoader.test.js +2 -0
  58. package/lib/cjs/src/nft/domain/NftContextLoader.test.js.map +7 -0
  59. package/lib/cjs/src/shared/domain/ContextLoader.js +2 -3
  60. package/lib/cjs/src/shared/domain/ContextLoader.js.map +7 -1
  61. package/lib/cjs/src/shared/model/ClearSignContext.js +2 -13
  62. package/lib/cjs/src/shared/model/ClearSignContext.js.map +7 -1
  63. package/lib/cjs/src/shared/model/GenericPath.js +2 -0
  64. package/lib/cjs/src/shared/model/GenericPath.js.map +7 -0
  65. package/lib/cjs/src/shared/model/TransactionContext.js +2 -3
  66. package/lib/cjs/src/shared/model/TransactionContext.js.map +7 -1
  67. package/lib/cjs/src/shared/model/TransactionSubset.js +2 -3
  68. package/lib/cjs/src/shared/model/TransactionSubset.js.map +7 -1
  69. package/lib/cjs/src/shared/model/TypedDataClearSignContext.js +2 -6
  70. package/lib/cjs/src/shared/model/TypedDataClearSignContext.js.map +7 -1
  71. package/lib/cjs/src/shared/model/TypedDataContext.js +2 -3
  72. package/lib/cjs/src/shared/model/TypedDataContext.js.map +7 -1
  73. package/lib/cjs/src/shared/utils/HexStringUtils.js +2 -15
  74. package/lib/cjs/src/shared/utils/HexStringUtils.js.map +7 -1
  75. package/lib/cjs/src/token/data/HttpTokenDataSource.js +2 -83
  76. package/lib/cjs/src/token/data/HttpTokenDataSource.js.map +7 -1
  77. package/lib/cjs/src/token/data/HttpTokenDataSource.test.js +2 -0
  78. package/lib/cjs/src/token/data/HttpTokenDataSource.test.js.map +7 -0
  79. package/lib/cjs/src/token/data/TokenDataSource.js +2 -3
  80. package/lib/cjs/src/token/data/TokenDataSource.js.map +7 -1
  81. package/lib/cjs/src/token/data/TokenDto.js +2 -3
  82. package/lib/cjs/src/token/data/TokenDto.js.map +7 -1
  83. package/lib/cjs/src/token/di/tokenModuleFactory.js +2 -13
  84. package/lib/cjs/src/token/di/tokenModuleFactory.js.map +7 -1
  85. package/lib/cjs/src/token/di/tokenTypes.js +2 -8
  86. package/lib/cjs/src/token/di/tokenTypes.js.map +7 -1
  87. package/lib/cjs/src/token/domain/TokenContextLoader.js +2 -74
  88. package/lib/cjs/src/token/domain/TokenContextLoader.js.map +7 -1
  89. package/lib/cjs/src/token/domain/TokenContextLoader.test.js +2 -0
  90. package/lib/cjs/src/token/domain/TokenContextLoader.test.js.map +7 -0
  91. package/lib/cjs/src/transaction/data/CalldataDto.js +2 -0
  92. package/lib/cjs/src/transaction/data/CalldataDto.js.map +7 -0
  93. package/lib/cjs/src/transaction/data/HttpTransactionDataSource.js +2 -0
  94. package/lib/cjs/src/transaction/data/HttpTransactionDataSource.js.map +7 -0
  95. package/lib/cjs/src/transaction/data/HttpTransactionDataSource.test.js +2 -0
  96. package/lib/cjs/src/transaction/data/HttpTransactionDataSource.test.js.map +7 -0
  97. package/lib/cjs/src/transaction/data/TransactionDataSource.js +2 -0
  98. package/lib/cjs/src/transaction/data/TransactionDataSource.js.map +7 -0
  99. package/lib/cjs/src/transaction/di/transactionModuleFactory.js +2 -0
  100. package/lib/cjs/src/transaction/di/transactionModuleFactory.js.map +7 -0
  101. package/lib/cjs/src/transaction/di/transactionTypes.js +2 -0
  102. package/lib/cjs/src/transaction/di/transactionTypes.js.map +7 -0
  103. package/lib/cjs/src/transaction/domain/TransactionContextLoader.js +2 -0
  104. package/lib/cjs/src/transaction/domain/TransactionContextLoader.js.map +7 -0
  105. package/lib/cjs/src/transaction/domain/TransactionContextLoader.test.js +2 -0
  106. package/lib/cjs/src/transaction/domain/TransactionContextLoader.test.js.map +7 -0
  107. package/lib/cjs/src/trusted-name/data/HttpTrustedNameDataSource.js +2 -0
  108. package/lib/cjs/src/trusted-name/data/HttpTrustedNameDataSource.js.map +7 -0
  109. package/lib/cjs/src/trusted-name/data/HttpTrustedNameDataSource.test.js +2 -0
  110. package/lib/cjs/src/trusted-name/data/HttpTrustedNameDataSource.test.js.map +7 -0
  111. package/lib/cjs/src/trusted-name/data/TrustedNameDataSource.js +2 -0
  112. package/lib/cjs/src/trusted-name/data/TrustedNameDataSource.js.map +7 -0
  113. package/lib/cjs/src/trusted-name/data/TrustedNameDto.js +2 -0
  114. package/lib/cjs/src/trusted-name/data/TrustedNameDto.js.map +7 -0
  115. package/lib/cjs/src/trusted-name/di/trustedNameModuleFactory.js +2 -0
  116. package/lib/cjs/src/trusted-name/di/trustedNameModuleFactory.js.map +7 -0
  117. package/lib/cjs/src/trusted-name/di/trustedNameTypes.js +2 -0
  118. package/lib/cjs/src/trusted-name/di/trustedNameTypes.js.map +7 -0
  119. package/lib/cjs/src/trusted-name/domain/TrustedNameContextLoader.js +2 -0
  120. package/lib/cjs/src/trusted-name/domain/TrustedNameContextLoader.js.map +7 -0
  121. package/lib/cjs/src/trusted-name/domain/TrustedNameContextLoader.test.js +2 -0
  122. package/lib/cjs/src/trusted-name/domain/TrustedNameContextLoader.test.js.map +7 -0
  123. package/lib/cjs/src/typed-data/data/FiltersDto.js +2 -3
  124. package/lib/cjs/src/typed-data/data/FiltersDto.js.map +7 -1
  125. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js +2 -163
  126. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js.map +7 -1
  127. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.test.js +2 -0
  128. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.test.js.map +7 -0
  129. package/lib/cjs/src/typed-data/data/TypedDataDataSource.js +2 -3
  130. package/lib/cjs/src/typed-data/data/TypedDataDataSource.js.map +7 -1
  131. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js +2 -13
  132. package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js.map +7 -1
  133. package/lib/cjs/src/typed-data/di/typedDataTypes.js +2 -8
  134. package/lib/cjs/src/typed-data/di/typedDataTypes.js.map +7 -1
  135. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js +2 -127
  136. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +7 -1
  137. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.test.js +2 -0
  138. package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.test.js.map +7 -0
  139. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js +2 -3
  140. package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js.map +7 -1
  141. package/lib/esm/index.js +2 -4
  142. package/lib/esm/index.js.map +7 -1
  143. package/lib/esm/package.json +53 -59
  144. package/lib/esm/src/ContextModule.js +1 -2
  145. package/lib/esm/src/ContextModule.js.map +7 -1
  146. package/lib/esm/src/ContextModuleBuilder.js +2 -83
  147. package/lib/esm/src/ContextModuleBuilder.js.map +7 -1
  148. package/lib/esm/src/ContextModuleBuilder.test.js +2 -0
  149. package/lib/esm/src/ContextModuleBuilder.test.js.map +7 -0
  150. package/lib/esm/src/DefaultContextModule.js +2 -17
  151. package/lib/esm/src/DefaultContextModule.js.map +7 -1
  152. package/lib/esm/src/DefaultContextModule.test.js +2 -0
  153. package/lib/esm/src/DefaultContextModule.test.js.map +7 -0
  154. package/lib/esm/src/config/di/configModuleFactory.js +2 -6
  155. package/lib/esm/src/config/di/configModuleFactory.js.map +7 -1
  156. package/lib/esm/src/config/di/configTypes.js +2 -4
  157. package/lib/esm/src/config/di/configTypes.js.map +7 -1
  158. package/lib/esm/src/config/model/ContextModuleConfig.js +1 -2
  159. package/lib/esm/src/config/model/ContextModuleConfig.js.map +7 -1
  160. package/lib/esm/src/di.js +2 -13
  161. package/lib/esm/src/di.js.map +7 -1
  162. package/lib/esm/src/external-plugin/data/DAppDto.js +1 -2
  163. package/lib/esm/src/external-plugin/data/DAppDto.js.map +7 -1
  164. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js +1 -2
  165. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js.map +7 -1
  166. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js +2 -77
  167. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js.map +7 -1
  168. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.test.js +2 -0
  169. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.test.js.map +7 -0
  170. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js +2 -9
  171. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js.map +7 -1
  172. package/lib/esm/src/external-plugin/di/externalPluginTypes.js +2 -5
  173. package/lib/esm/src/external-plugin/di/externalPluginTypes.js.map +7 -1
  174. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js +2 -133
  175. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js.map +7 -1
  176. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.test.js +2 -0
  177. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.test.js.map +7 -0
  178. package/lib/esm/src/external-plugin/model/DappInfos.js +1 -2
  179. package/lib/esm/src/external-plugin/model/DappInfos.js.map +7 -1
  180. package/lib/esm/src/external-plugin/model/SelectorDetails.js +1 -2
  181. package/lib/esm/src/external-plugin/model/SelectorDetails.js.map +7 -1
  182. package/lib/esm/src/index.js +2 -14
  183. package/lib/esm/src/index.js.map +7 -1
  184. package/lib/esm/src/nft/data/HttpNftDataSource.js +2 -51
  185. package/lib/esm/src/nft/data/HttpNftDataSource.js.map +7 -1
  186. package/lib/esm/src/nft/data/HttpNftDataSource.test.js +2 -0
  187. package/lib/esm/src/nft/data/HttpNftDataSource.test.js.map +7 -0
  188. package/lib/esm/src/nft/data/NftDataSource.js +1 -2
  189. package/lib/esm/src/nft/data/NftDataSource.js.map +7 -1
  190. package/lib/esm/src/nft/di/nftModuleFactory.js +2 -9
  191. package/lib/esm/src/nft/di/nftModuleFactory.js.map +7 -1
  192. package/lib/esm/src/nft/di/nftTypes.js +2 -5
  193. package/lib/esm/src/nft/di/nftTypes.js.map +7 -1
  194. package/lib/esm/src/nft/domain/NftContextLoader.js +2 -108
  195. package/lib/esm/src/nft/domain/NftContextLoader.js.map +7 -1
  196. package/lib/esm/src/nft/domain/NftContextLoader.test.js +2 -0
  197. package/lib/esm/src/nft/domain/NftContextLoader.test.js.map +7 -0
  198. package/lib/esm/src/shared/domain/ContextLoader.js +1 -2
  199. package/lib/esm/src/shared/domain/ContextLoader.js.map +7 -1
  200. package/lib/esm/src/shared/model/ClearSignContext.js +2 -10
  201. package/lib/esm/src/shared/model/ClearSignContext.js.map +7 -1
  202. package/lib/esm/src/shared/model/GenericPath.js +2 -0
  203. package/lib/esm/src/shared/model/GenericPath.js.map +7 -0
  204. package/lib/esm/src/shared/model/TransactionContext.js +1 -2
  205. package/lib/esm/src/shared/model/TransactionContext.js.map +7 -1
  206. package/lib/esm/src/shared/model/TransactionSubset.js +1 -2
  207. package/lib/esm/src/shared/model/TransactionSubset.js.map +7 -1
  208. package/lib/esm/src/shared/model/TypedDataClearSignContext.js +2 -3
  209. package/lib/esm/src/shared/model/TypedDataClearSignContext.js.map +7 -1
  210. package/lib/esm/src/shared/model/TypedDataContext.js +1 -2
  211. package/lib/esm/src/shared/model/TypedDataContext.js.map +7 -1
  212. package/lib/esm/src/shared/utils/HexStringUtils.js +2 -11
  213. package/lib/esm/src/shared/utils/HexStringUtils.js.map +7 -1
  214. package/lib/esm/src/token/data/HttpTokenDataSource.js +2 -77
  215. package/lib/esm/src/token/data/HttpTokenDataSource.js.map +7 -1
  216. package/lib/esm/src/token/data/HttpTokenDataSource.test.js +2 -0
  217. package/lib/esm/src/token/data/HttpTokenDataSource.test.js.map +7 -0
  218. package/lib/esm/src/token/data/TokenDataSource.js +1 -2
  219. package/lib/esm/src/token/data/TokenDataSource.js.map +7 -1
  220. package/lib/esm/src/token/data/TokenDto.js +1 -2
  221. package/lib/esm/src/token/data/TokenDto.js.map +7 -1
  222. package/lib/esm/src/token/di/tokenModuleFactory.js +2 -9
  223. package/lib/esm/src/token/di/tokenModuleFactory.js.map +7 -1
  224. package/lib/esm/src/token/di/tokenTypes.js +2 -5
  225. package/lib/esm/src/token/di/tokenTypes.js.map +7 -1
  226. package/lib/esm/src/token/domain/TokenContextLoader.js +2 -71
  227. package/lib/esm/src/token/domain/TokenContextLoader.js.map +7 -1
  228. package/lib/esm/src/token/domain/TokenContextLoader.test.js +2 -0
  229. package/lib/esm/src/token/domain/TokenContextLoader.test.js.map +7 -0
  230. package/lib/esm/src/transaction/data/CalldataDto.js +1 -0
  231. package/lib/esm/src/transaction/data/CalldataDto.js.map +7 -0
  232. package/lib/esm/src/transaction/data/HttpTransactionDataSource.js +2 -0
  233. package/lib/esm/src/transaction/data/HttpTransactionDataSource.js.map +7 -0
  234. package/lib/esm/src/transaction/data/HttpTransactionDataSource.test.js +2 -0
  235. package/lib/esm/src/transaction/data/HttpTransactionDataSource.test.js.map +7 -0
  236. package/lib/esm/src/transaction/data/TransactionDataSource.js +1 -0
  237. package/lib/esm/src/transaction/data/TransactionDataSource.js.map +7 -0
  238. package/lib/esm/src/transaction/di/transactionModuleFactory.js +2 -0
  239. package/lib/esm/src/transaction/di/transactionModuleFactory.js.map +7 -0
  240. package/lib/esm/src/transaction/di/transactionTypes.js +2 -0
  241. package/lib/esm/src/transaction/di/transactionTypes.js.map +7 -0
  242. package/lib/esm/src/transaction/domain/TransactionContextLoader.js +2 -0
  243. package/lib/esm/src/transaction/domain/TransactionContextLoader.js.map +7 -0
  244. package/lib/esm/src/transaction/domain/TransactionContextLoader.test.js +2 -0
  245. package/lib/esm/src/transaction/domain/TransactionContextLoader.test.js.map +7 -0
  246. package/lib/esm/src/trusted-name/data/HttpTrustedNameDataSource.js +2 -0
  247. package/lib/esm/src/trusted-name/data/HttpTrustedNameDataSource.js.map +7 -0
  248. package/lib/esm/src/trusted-name/data/HttpTrustedNameDataSource.test.js +2 -0
  249. package/lib/esm/src/trusted-name/data/HttpTrustedNameDataSource.test.js.map +7 -0
  250. package/lib/esm/src/trusted-name/data/TrustedNameDataSource.js +1 -0
  251. package/lib/esm/src/trusted-name/data/TrustedNameDataSource.js.map +7 -0
  252. package/lib/esm/src/trusted-name/data/TrustedNameDto.js +1 -0
  253. package/lib/esm/src/trusted-name/data/TrustedNameDto.js.map +7 -0
  254. package/lib/esm/src/trusted-name/di/trustedNameModuleFactory.js +2 -0
  255. package/lib/esm/src/trusted-name/di/trustedNameModuleFactory.js.map +7 -0
  256. package/lib/esm/src/trusted-name/di/trustedNameTypes.js +2 -0
  257. package/lib/esm/src/trusted-name/di/trustedNameTypes.js.map +7 -0
  258. package/lib/esm/src/trusted-name/domain/TrustedNameContextLoader.js +2 -0
  259. package/lib/esm/src/trusted-name/domain/TrustedNameContextLoader.js.map +7 -0
  260. package/lib/esm/src/trusted-name/domain/TrustedNameContextLoader.test.js +2 -0
  261. package/lib/esm/src/trusted-name/domain/TrustedNameContextLoader.test.js.map +7 -0
  262. package/lib/esm/src/typed-data/data/FiltersDto.js +1 -2
  263. package/lib/esm/src/typed-data/data/FiltersDto.js.map +7 -1
  264. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js +2 -157
  265. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js.map +7 -1
  266. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.test.js +2 -0
  267. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.test.js.map +7 -0
  268. package/lib/esm/src/typed-data/data/TypedDataDataSource.js +1 -2
  269. package/lib/esm/src/typed-data/data/TypedDataDataSource.js.map +7 -1
  270. package/lib/esm/src/typed-data/di/typedDataModuleFactory.js +2 -9
  271. package/lib/esm/src/typed-data/di/typedDataModuleFactory.js.map +7 -1
  272. package/lib/esm/src/typed-data/di/typedDataTypes.js +2 -5
  273. package/lib/esm/src/typed-data/di/typedDataTypes.js.map +7 -1
  274. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js +2 -124
  275. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +7 -1
  276. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.test.js +2 -0
  277. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.test.js.map +7 -0
  278. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js +1 -2
  279. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js.map +7 -1
  280. package/lib/{cjs → types}/src/ContextModule.d.ts +3 -2
  281. package/lib/types/src/ContextModule.d.ts.map +1 -0
  282. package/lib/{cjs → types}/src/ContextModuleBuilder.d.ts +9 -11
  283. package/lib/types/src/ContextModuleBuilder.d.ts.map +1 -0
  284. package/lib/types/src/ContextModuleBuilder.test.d.ts +2 -0
  285. package/lib/types/src/ContextModuleBuilder.test.d.ts.map +1 -0
  286. package/lib/types/src/DefaultContextModule.d.ts +18 -0
  287. package/lib/types/src/DefaultContextModule.d.ts.map +1 -0
  288. package/lib/types/src/DefaultContextModule.test.d.ts +2 -0
  289. package/lib/types/src/DefaultContextModule.test.d.ts.map +1 -0
  290. package/lib/{cjs → types}/src/config/di/configModuleFactory.d.ts +1 -1
  291. package/lib/{cjs → types}/src/config/di/configModuleFactory.d.ts.map +1 -1
  292. package/lib/types/src/config/model/ContextModuleConfig.d.ts +16 -0
  293. package/lib/types/src/config/model/ContextModuleConfig.d.ts.map +1 -0
  294. package/lib/{cjs → types}/src/di.d.ts +1 -1
  295. package/lib/types/src/di.d.ts.map +1 -0
  296. package/lib/{cjs → types}/src/external-plugin/data/ExternalPluginDataSource.d.ts +3 -3
  297. package/lib/types/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +1 -0
  298. package/lib/types/src/external-plugin/data/HttpExternalPluginDataSource.test.d.ts +2 -0
  299. package/lib/types/src/external-plugin/data/HttpExternalPluginDataSource.test.d.ts.map +1 -0
  300. package/lib/types/src/external-plugin/domain/ExternalPluginContextLoader.test.d.ts +2 -0
  301. package/lib/types/src/external-plugin/domain/ExternalPluginContextLoader.test.d.ts.map +1 -0
  302. package/lib/types/src/external-plugin/model/DappInfos.d.ts +6 -0
  303. package/lib/types/src/external-plugin/model/DappInfos.d.ts.map +1 -0
  304. package/lib/{cjs → types}/src/index.d.ts +3 -1
  305. package/lib/types/src/index.d.ts.map +1 -0
  306. package/lib/types/src/nft/data/HttpNftDataSource.test.d.ts +2 -0
  307. package/lib/types/src/nft/data/HttpNftDataSource.test.d.ts.map +1 -0
  308. package/lib/{cjs → types}/src/nft/data/NftDataSource.d.ts +1 -1
  309. package/lib/types/src/nft/data/NftDataSource.d.ts.map +1 -0
  310. package/lib/{cjs → types}/src/nft/domain/NftContextLoader.d.ts +2 -1
  311. package/lib/types/src/nft/domain/NftContextLoader.d.ts.map +1 -0
  312. package/lib/types/src/nft/domain/NftContextLoader.test.d.ts +2 -0
  313. package/lib/types/src/nft/domain/NftContextLoader.test.d.ts.map +1 -0
  314. package/lib/types/src/shared/domain/ContextLoader.d.ts +7 -0
  315. package/lib/types/src/shared/domain/ContextLoader.d.ts.map +1 -0
  316. package/lib/types/src/shared/model/ClearSignContext.d.ts +40 -0
  317. package/lib/types/src/shared/model/ClearSignContext.d.ts.map +1 -0
  318. package/lib/types/src/shared/model/GenericPath.d.ts +105 -0
  319. package/lib/types/src/shared/model/GenericPath.d.ts.map +1 -0
  320. package/lib/types/src/shared/model/TransactionContext.d.ts +19 -0
  321. package/lib/types/src/shared/model/TransactionContext.d.ts.map +1 -0
  322. package/lib/{cjs → types}/src/token/data/HttpTokenDataSource.d.ts.map +1 -1
  323. package/lib/types/src/token/data/HttpTokenDataSource.test.d.ts +2 -0
  324. package/lib/types/src/token/data/HttpTokenDataSource.test.d.ts.map +1 -0
  325. package/lib/{cjs → types}/src/token/data/TokenDataSource.d.ts +1 -1
  326. package/lib/types/src/token/data/TokenDataSource.d.ts.map +1 -0
  327. package/lib/types/src/token/data/TokenDto.d.ts +16 -0
  328. package/lib/types/src/token/data/TokenDto.d.ts.map +1 -0
  329. package/lib/{cjs → types}/src/token/domain/TokenContextLoader.d.ts +2 -1
  330. package/lib/types/src/token/domain/TokenContextLoader.d.ts.map +1 -0
  331. package/lib/types/src/token/domain/TokenContextLoader.test.d.ts +2 -0
  332. package/lib/types/src/token/domain/TokenContextLoader.test.d.ts.map +1 -0
  333. package/lib/types/src/transaction/data/CalldataDto.d.ts +117 -0
  334. package/lib/types/src/transaction/data/CalldataDto.d.ts.map +1 -0
  335. package/lib/types/src/transaction/data/HttpTransactionDataSource.d.ts +19 -0
  336. package/lib/types/src/transaction/data/HttpTransactionDataSource.d.ts.map +1 -0
  337. package/lib/types/src/transaction/data/HttpTransactionDataSource.test.d.ts +2 -0
  338. package/lib/types/src/transaction/data/HttpTransactionDataSource.test.d.ts.map +1 -0
  339. package/lib/types/src/transaction/data/TransactionDataSource.d.ts +12 -0
  340. package/lib/types/src/transaction/data/TransactionDataSource.d.ts.map +1 -0
  341. package/lib/types/src/transaction/di/transactionModuleFactory.d.ts +3 -0
  342. package/lib/types/src/transaction/di/transactionModuleFactory.d.ts.map +1 -0
  343. package/lib/types/src/transaction/di/transactionTypes.d.ts +5 -0
  344. package/lib/types/src/transaction/di/transactionTypes.d.ts.map +1 -0
  345. package/lib/types/src/transaction/domain/TransactionContextLoader.d.ts +10 -0
  346. package/lib/types/src/transaction/domain/TransactionContextLoader.d.ts.map +1 -0
  347. package/lib/types/src/transaction/domain/TransactionContextLoader.test.d.ts +2 -0
  348. package/lib/types/src/transaction/domain/TransactionContextLoader.test.d.ts.map +1 -0
  349. package/lib/types/src/trusted-name/data/HttpTrustedNameDataSource.d.ts +11 -0
  350. package/lib/types/src/trusted-name/data/HttpTrustedNameDataSource.d.ts.map +1 -0
  351. package/lib/types/src/trusted-name/data/HttpTrustedNameDataSource.test.d.ts +2 -0
  352. package/lib/types/src/trusted-name/data/HttpTrustedNameDataSource.test.d.ts.map +1 -0
  353. package/lib/types/src/trusted-name/data/TrustedNameDataSource.d.ts +16 -0
  354. package/lib/types/src/trusted-name/data/TrustedNameDataSource.d.ts.map +1 -0
  355. package/lib/types/src/trusted-name/data/TrustedNameDto.d.ts +15 -0
  356. package/lib/types/src/trusted-name/data/TrustedNameDto.d.ts.map +1 -0
  357. package/lib/types/src/trusted-name/di/trustedNameModuleFactory.d.ts +3 -0
  358. package/lib/types/src/trusted-name/di/trustedNameModuleFactory.d.ts.map +1 -0
  359. package/lib/types/src/trusted-name/di/trustedNameTypes.d.ts +5 -0
  360. package/lib/types/src/trusted-name/di/trustedNameTypes.d.ts.map +1 -0
  361. package/lib/types/src/trusted-name/domain/TrustedNameContextLoader.d.ts +12 -0
  362. package/lib/types/src/trusted-name/domain/TrustedNameContextLoader.d.ts.map +1 -0
  363. package/lib/types/src/trusted-name/domain/TrustedNameContextLoader.test.d.ts +2 -0
  364. package/lib/types/src/trusted-name/domain/TrustedNameContextLoader.test.d.ts.map +1 -0
  365. package/lib/{cjs → types}/src/typed-data/data/FiltersDto.d.ts +3 -0
  366. package/lib/types/src/typed-data/data/FiltersDto.d.ts.map +1 -0
  367. package/lib/types/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +1 -0
  368. package/lib/types/src/typed-data/data/HttpTypedDataDataSource.test.d.ts +3 -0
  369. package/lib/types/src/typed-data/data/HttpTypedDataDataSource.test.d.ts.map +1 -0
  370. package/lib/{cjs → types}/src/typed-data/data/TypedDataDataSource.d.ts +3 -3
  371. package/lib/types/src/typed-data/data/TypedDataDataSource.d.ts.map +1 -0
  372. package/lib/{cjs → types}/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +1 -1
  373. package/lib/types/src/typed-data/domain/DefaultTypedDataContextLoader.test.d.ts +2 -0
  374. package/lib/types/src/typed-data/domain/DefaultTypedDataContextLoader.test.d.ts.map +1 -0
  375. package/lib/types/tsconfig.prod.tsbuildinfo +1 -0
  376. package/package.json +21 -27
  377. package/lib/cjs/src/ContextModule.d.ts.map +0 -1
  378. package/lib/cjs/src/ContextModuleBuilder.d.ts.map +0 -1
  379. package/lib/cjs/src/DefaultContextModule.d.ts +0 -20
  380. package/lib/cjs/src/DefaultContextModule.d.ts.map +0 -1
  381. package/lib/cjs/src/config/model/ContextModuleConfig.d.ts +0 -9
  382. package/lib/cjs/src/config/model/ContextModuleConfig.d.ts.map +0 -1
  383. package/lib/cjs/src/di.d.ts.map +0 -1
  384. package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +0 -1
  385. package/lib/cjs/src/external-plugin/model/DappInfos.d.ts +0 -6
  386. package/lib/cjs/src/external-plugin/model/DappInfos.d.ts.map +0 -1
  387. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.d.ts +0 -9
  388. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +0 -1
  389. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.js +0 -3
  390. package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.js.map +0 -1
  391. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.d.ts +0 -6
  392. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +0 -1
  393. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js +0 -40
  394. package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js.map +0 -1
  395. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.d.ts +0 -3
  396. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +0 -1
  397. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js +0 -13
  398. package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js.map +0 -1
  399. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.d.ts +0 -5
  400. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.d.ts.map +0 -1
  401. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js +0 -8
  402. package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js.map +0 -1
  403. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.d.ts +0 -11
  404. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +0 -1
  405. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js +0 -66
  406. package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js.map +0 -1
  407. package/lib/cjs/src/index.d.ts.map +0 -1
  408. package/lib/cjs/src/nft/data/NftDataSource.d.ts.map +0 -1
  409. package/lib/cjs/src/nft/domain/NftContextLoader.d.ts.map +0 -1
  410. package/lib/cjs/src/shared/domain/ContextLoader.d.ts +0 -6
  411. package/lib/cjs/src/shared/domain/ContextLoader.d.ts.map +0 -1
  412. package/lib/cjs/src/shared/model/ClearSignContext.d.ts +0 -21
  413. package/lib/cjs/src/shared/model/ClearSignContext.d.ts.map +0 -1
  414. package/lib/cjs/src/shared/model/TransactionContext.d.ts +0 -6
  415. package/lib/cjs/src/shared/model/TransactionContext.d.ts.map +0 -1
  416. package/lib/cjs/src/token/data/TokenDataSource.d.ts.map +0 -1
  417. package/lib/cjs/src/token/data/TokenDto.d.ts +0 -6
  418. package/lib/cjs/src/token/data/TokenDto.d.ts.map +0 -1
  419. package/lib/cjs/src/token/domain/TokenContextLoader.d.ts.map +0 -1
  420. package/lib/cjs/src/typed-data/data/FiltersDto.d.ts.map +0 -1
  421. package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +0 -1
  422. package/lib/cjs/src/typed-data/data/TypedDataDataSource.d.ts.map +0 -1
  423. package/lib/cjs/tsconfig.cjs.tsbuildinfo +0 -1
  424. package/lib/esm/index.d.ts +0 -3
  425. package/lib/esm/index.d.ts.map +0 -1
  426. package/lib/esm/src/ContextModule.d.ts +0 -9
  427. package/lib/esm/src/ContextModule.d.ts.map +0 -1
  428. package/lib/esm/src/ContextModuleBuilder.d.ts +0 -45
  429. package/lib/esm/src/ContextModuleBuilder.d.ts.map +0 -1
  430. package/lib/esm/src/DefaultContextModule.d.ts +0 -20
  431. package/lib/esm/src/DefaultContextModule.d.ts.map +0 -1
  432. package/lib/esm/src/config/di/configModuleFactory.d.ts +0 -4
  433. package/lib/esm/src/config/di/configModuleFactory.d.ts.map +0 -1
  434. package/lib/esm/src/config/di/configTypes.d.ts +0 -4
  435. package/lib/esm/src/config/di/configTypes.d.ts.map +0 -1
  436. package/lib/esm/src/config/model/ContextModuleConfig.d.ts +0 -9
  437. package/lib/esm/src/config/model/ContextModuleConfig.d.ts.map +0 -1
  438. package/lib/esm/src/di.d.ts +0 -8
  439. package/lib/esm/src/di.d.ts.map +0 -1
  440. package/lib/esm/src/external-plugin/data/DAppDto.d.ts +0 -38
  441. package/lib/esm/src/external-plugin/data/DAppDto.d.ts.map +0 -1
  442. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts +0 -12
  443. package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +0 -1
  444. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +0 -10
  445. package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +0 -1
  446. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts +0 -3
  447. package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +0 -1
  448. package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts +0 -5
  449. package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts.map +0 -1
  450. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts +0 -15
  451. package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +0 -1
  452. package/lib/esm/src/external-plugin/model/DappInfos.d.ts +0 -6
  453. package/lib/esm/src/external-plugin/model/DappInfos.d.ts.map +0 -1
  454. package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts +0 -8
  455. package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts.map +0 -1
  456. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts +0 -9
  457. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +0 -1
  458. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js +0 -2
  459. package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js.map +0 -1
  460. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts +0 -6
  461. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +0 -1
  462. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js +0 -34
  463. package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js.map +0 -1
  464. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts +0 -3
  465. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +0 -1
  466. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js +0 -9
  467. package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js.map +0 -1
  468. package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts +0 -5
  469. package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts.map +0 -1
  470. package/lib/esm/src/forward-domain/di/forwardDomainTypes.js +0 -5
  471. package/lib/esm/src/forward-domain/di/forwardDomainTypes.js.map +0 -1
  472. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts +0 -11
  473. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +0 -1
  474. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js +0 -63
  475. package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js.map +0 -1
  476. package/lib/esm/src/index.d.ts +0 -14
  477. package/lib/esm/src/index.d.ts.map +0 -1
  478. package/lib/esm/src/nft/data/HttpNftDataSource.d.ts +0 -7
  479. package/lib/esm/src/nft/data/HttpNftDataSource.d.ts.map +0 -1
  480. package/lib/esm/src/nft/data/NftDataSource.d.ts +0 -15
  481. package/lib/esm/src/nft/data/NftDataSource.d.ts.map +0 -1
  482. package/lib/esm/src/nft/di/nftModuleFactory.d.ts +0 -3
  483. package/lib/esm/src/nft/di/nftModuleFactory.d.ts.map +0 -1
  484. package/lib/esm/src/nft/di/nftTypes.d.ts +0 -5
  485. package/lib/esm/src/nft/di/nftTypes.d.ts.map +0 -1
  486. package/lib/esm/src/nft/domain/NftContextLoader.d.ts +0 -11
  487. package/lib/esm/src/nft/domain/NftContextLoader.d.ts.map +0 -1
  488. package/lib/esm/src/shared/domain/ContextLoader.d.ts +0 -6
  489. package/lib/esm/src/shared/domain/ContextLoader.d.ts.map +0 -1
  490. package/lib/esm/src/shared/model/ClearSignContext.d.ts +0 -21
  491. package/lib/esm/src/shared/model/ClearSignContext.d.ts.map +0 -1
  492. package/lib/esm/src/shared/model/TransactionContext.d.ts +0 -6
  493. package/lib/esm/src/shared/model/TransactionContext.d.ts.map +0 -1
  494. package/lib/esm/src/shared/model/TransactionSubset.d.ts +0 -6
  495. package/lib/esm/src/shared/model/TransactionSubset.d.ts.map +0 -1
  496. package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts +0 -33
  497. package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts.map +0 -1
  498. package/lib/esm/src/shared/model/TypedDataContext.d.ts +0 -16
  499. package/lib/esm/src/shared/model/TypedDataContext.d.ts.map +0 -1
  500. package/lib/esm/src/shared/utils/HexStringUtils.d.ts +0 -4
  501. package/lib/esm/src/shared/utils/HexStringUtils.d.ts.map +0 -1
  502. package/lib/esm/src/token/data/HttpTokenDataSource.d.ts +0 -9
  503. package/lib/esm/src/token/data/HttpTokenDataSource.d.ts.map +0 -1
  504. package/lib/esm/src/token/data/TokenDataSource.d.ts +0 -9
  505. package/lib/esm/src/token/data/TokenDataSource.d.ts.map +0 -1
  506. package/lib/esm/src/token/data/TokenDto.d.ts +0 -6
  507. package/lib/esm/src/token/data/TokenDto.d.ts.map +0 -1
  508. package/lib/esm/src/token/di/tokenModuleFactory.d.ts +0 -3
  509. package/lib/esm/src/token/di/tokenModuleFactory.d.ts.map +0 -1
  510. package/lib/esm/src/token/di/tokenTypes.d.ts +0 -5
  511. package/lib/esm/src/token/di/tokenTypes.d.ts.map +0 -1
  512. package/lib/esm/src/token/domain/TokenContextLoader.d.ts +0 -15
  513. package/lib/esm/src/token/domain/TokenContextLoader.d.ts.map +0 -1
  514. package/lib/esm/src/typed-data/data/FiltersDto.d.ts +0 -55
  515. package/lib/esm/src/typed-data/data/FiltersDto.d.ts.map +0 -1
  516. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts +0 -14
  517. package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +0 -1
  518. package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts +0 -17
  519. package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts.map +0 -1
  520. package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts +0 -3
  521. package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts.map +0 -1
  522. package/lib/esm/src/typed-data/di/typedDataTypes.d.ts +0 -5
  523. package/lib/esm/src/typed-data/di/typedDataTypes.d.ts.map +0 -1
  524. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +0 -13
  525. package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +0 -1
  526. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts +0 -6
  527. package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts.map +0 -1
  528. package/lib/esm/tsconfig.esm.tsbuildinfo +0 -1
  529. /package/lib/{cjs → types}/index.d.ts +0 -0
  530. /package/lib/{cjs → types}/index.d.ts.map +0 -0
  531. /package/lib/{cjs → types}/src/config/di/configTypes.d.ts +0 -0
  532. /package/lib/{cjs → types}/src/config/di/configTypes.d.ts.map +0 -0
  533. /package/lib/{cjs → types}/src/external-plugin/data/DAppDto.d.ts +0 -0
  534. /package/lib/{cjs → types}/src/external-plugin/data/DAppDto.d.ts.map +0 -0
  535. /package/lib/{cjs → types}/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +0 -0
  536. /package/lib/{cjs → types}/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +0 -0
  537. /package/lib/{cjs → types}/src/external-plugin/di/externalPluginModuleFactory.d.ts +0 -0
  538. /package/lib/{cjs → types}/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +0 -0
  539. /package/lib/{cjs → types}/src/external-plugin/di/externalPluginTypes.d.ts +0 -0
  540. /package/lib/{cjs → types}/src/external-plugin/di/externalPluginTypes.d.ts.map +0 -0
  541. /package/lib/{cjs → types}/src/external-plugin/domain/ExternalPluginContextLoader.d.ts +0 -0
  542. /package/lib/{cjs → types}/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +0 -0
  543. /package/lib/{cjs → types}/src/external-plugin/model/SelectorDetails.d.ts +0 -0
  544. /package/lib/{cjs → types}/src/external-plugin/model/SelectorDetails.d.ts.map +0 -0
  545. /package/lib/{cjs → types}/src/nft/data/HttpNftDataSource.d.ts +0 -0
  546. /package/lib/{cjs → types}/src/nft/data/HttpNftDataSource.d.ts.map +0 -0
  547. /package/lib/{cjs → types}/src/nft/di/nftModuleFactory.d.ts +0 -0
  548. /package/lib/{cjs → types}/src/nft/di/nftModuleFactory.d.ts.map +0 -0
  549. /package/lib/{cjs → types}/src/nft/di/nftTypes.d.ts +0 -0
  550. /package/lib/{cjs → types}/src/nft/di/nftTypes.d.ts.map +0 -0
  551. /package/lib/{cjs → types}/src/shared/model/TransactionSubset.d.ts +0 -0
  552. /package/lib/{cjs → types}/src/shared/model/TransactionSubset.d.ts.map +0 -0
  553. /package/lib/{cjs → types}/src/shared/model/TypedDataClearSignContext.d.ts +0 -0
  554. /package/lib/{cjs → types}/src/shared/model/TypedDataClearSignContext.d.ts.map +0 -0
  555. /package/lib/{cjs → types}/src/shared/model/TypedDataContext.d.ts +0 -0
  556. /package/lib/{cjs → types}/src/shared/model/TypedDataContext.d.ts.map +0 -0
  557. /package/lib/{cjs → types}/src/shared/utils/HexStringUtils.d.ts +0 -0
  558. /package/lib/{cjs → types}/src/shared/utils/HexStringUtils.d.ts.map +0 -0
  559. /package/lib/{cjs → types}/src/token/data/HttpTokenDataSource.d.ts +0 -0
  560. /package/lib/{cjs → types}/src/token/di/tokenModuleFactory.d.ts +0 -0
  561. /package/lib/{cjs → types}/src/token/di/tokenModuleFactory.d.ts.map +0 -0
  562. /package/lib/{cjs → types}/src/token/di/tokenTypes.d.ts +0 -0
  563. /package/lib/{cjs → types}/src/token/di/tokenTypes.d.ts.map +0 -0
  564. /package/lib/{cjs → types}/src/typed-data/data/HttpTypedDataDataSource.d.ts +0 -0
  565. /package/lib/{cjs → types}/src/typed-data/di/typedDataModuleFactory.d.ts +0 -0
  566. /package/lib/{cjs → types}/src/typed-data/di/typedDataModuleFactory.d.ts.map +0 -0
  567. /package/lib/{cjs → types}/src/typed-data/di/typedDataTypes.d.ts +0 -0
  568. /package/lib/{cjs → types}/src/typed-data/di/typedDataTypes.d.ts.map +0 -0
  569. /package/lib/{cjs → types}/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +0 -0
  570. /package/lib/{cjs → types}/src/typed-data/domain/TypedDataContextLoader.d.ts +0 -0
  571. /package/lib/{cjs → types}/src/typed-data/domain/TypedDataContextLoader.d.ts.map +0 -0
package/README.md CHANGED
@@ -62,18 +62,16 @@ const contextModule = new ContextModuleBuilder().build();
62
62
  You can use a custom configuration for your context module.
63
63
 
64
64
  ```ts
65
- const config: ContextModuleConfig = {
65
+ const config: ContextModuleCalConfig = {
66
66
  // config to use
67
67
  };
68
- const contextModule = new ContextModuleBuilder().withConfig(config).build();
68
+ const contextModule = new ContextModuleBuilder().addCalConfig(config).build();
69
69
  ```
70
70
 
71
71
  It is also possible to instantiate the context module without the default loaders.
72
72
 
73
73
  ```ts
74
- const contextModule = new ContextModuleBuilder()
75
- .withoutDefaultLoaders()
76
- .build();
74
+ const contextModule = new ContextModuleBuilder().removeDefaultLoaders().build();
77
75
  ```
78
76
 
79
77
  > [!NOTE]
@@ -93,7 +91,7 @@ const myCustomTokenDataSource = new MyCustomTokenDataSource();
93
91
  const myTokenLoader = new TokenCOntextLoader();
94
92
 
95
93
  const contextModule = new ContextModuleBuilder()
96
- .withoutDefaultLoaders()
94
+ .removeDefaultLoaders()
97
95
  .addLoader(tokenLoader)
98
96
  .addLoader(myTokenLoader)
99
97
  .addLoader(myCustomLoader)
package/lib/cjs/index.js CHANGED
@@ -1,20 +1,2 @@
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
1
+ "use strict";var x=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(r,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of b(o))!c.call(r,m)&&m!==t&&x(r,m,{get:()=>o[m],enumerable:!(i=a(o,m))||i.enumerable});return r},e=(r,o,t)=>(f(r,o,"default"),t&&f(t,o,"default"));var d=r=>f(x({},"__esModule",{value:!0}),r);var p={};module.exports=d(p);var h=require("reflect-metadata");e(p,require("./src/index"),module.exports);0&&(module.exports={...require("./src/index")});
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wBAAwB;AACxB,4BAA0B;AAE1B,8CAA4B"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../index.ts"],
4
+ "sourcesContent": ["// inversify requirement\nimport \"reflect-metadata\";\n\nexport * from \"./src/index\";\n"],
5
+ "mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GACA,IAAAE,EAAO,4BAEPC,EAAAH,EAAc,uBAHd",
6
+ "names": ["context_module_exports", "__toCommonJS", "import_reflect_metadata", "__reExport"]
7
+ }
@@ -1,63 +1,57 @@
1
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
- }
2
+ "name": "@ledgerhq/context-module",
3
+ "version": "1.1.0",
4
+ "license": "Apache-2.0",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./lib/types/index.d.ts",
8
+ "import": "./lib/esm/index.js",
9
+ "require": "./lib/cjs/index.js"
24
10
  },
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:*"
11
+ "./*": {
12
+ "types": "./lib/types/*",
13
+ "import": "./lib/esm/*",
14
+ "require": "./lib/cjs/*"
62
15
  }
16
+ },
17
+ "files": [
18
+ "./lib"
19
+ ],
20
+ "scripts": {
21
+ "prebuild": "rimraf lib",
22
+ "build": "pnpm lmdk-build --entryPoints index.ts,src/**/*.ts --tsconfig tsconfig.prod.json",
23
+ "dev": "concurrently \"pnpm watch:builds\" \"pnpm watch:types\"",
24
+ "watch:builds": "pnpm lmdk-watch --entryPoints index.ts,src/**/*.ts --tsconfig tsconfig.prod.json",
25
+ "watch:types": "concurrently \"tsc --watch -p tsconfig.prod.json\" \"tsc-alias --watch -p tsconfig.prod.json\"",
26
+ "lint": "eslint",
27
+ "lint:fix": "pnpm lint --fix",
28
+ "postpack": "find . -name '*.tgz' -exec cp {} ../../../dist/ \\; ",
29
+ "prettier": "prettier . --check",
30
+ "prettier:fix": "prettier . --write",
31
+ "test": "jest",
32
+ "test:watch": "pnpm test -- --watch",
33
+ "test:coverage": "pnpm test -- --coverage",
34
+ "typecheck": "tsc --noEmit"
35
+ },
36
+ "devDependencies": {
37
+ "@ledgerhq/device-management-kit": "workspace:*",
38
+ "@ledgerhq/esbuild-tools": "workspace:*",
39
+ "@ledgerhq/eslint-config-dsdk": "workspace:*",
40
+ "@ledgerhq/jest-config-dsdk": "workspace:*",
41
+ "@ledgerhq/prettier-config-dsdk": "workspace:*",
42
+ "@ledgerhq/tsconfig-dsdk": "workspace:*",
43
+ "@types/crypto-js": "^4.2.2",
44
+ "ts-node": "^10.9.2"
45
+ },
46
+ "dependencies": {
47
+ "axios": "^1.7.9",
48
+ "crypto-js": "^4.2.0",
49
+ "ethers": "6.13.4",
50
+ "inversify": "^6.1.6",
51
+ "purify-ts": "^2.1.0",
52
+ "reflect-metadata": "^0.2.2"
53
+ },
54
+ "peerDependencies": {
55
+ "@ledgerhq/device-management-kit": "^0.5.1"
56
+ }
63
57
  }
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ContextModule.js.map
1
+ "use strict";var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var x=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of C(t))!p.call(e,o)&&o!==r&&a(e,o,{get:()=>t[o],enumerable:!(n=i(t,o))||n.enumerable});return e};var m=e=>x(a({},"__esModule",{value:!0}),e);var y={};module.exports=m(y);
2
+ //# sourceMappingURL=ContextModule.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"ContextModule.js","sourceRoot":"","sources":["../../../src/ContextModule.ts"],"names":[],"mappings":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/ContextModule.ts"],
4
+ "sourcesContent": ["import { type ClearSignContext } from \"@/shared/model/ClearSignContext\";\n\nimport {\n type TransactionContext,\n type TransactionFieldContext,\n} from \"./shared/model/TransactionContext\";\nimport { type TypedDataClearSignContext } from \"./shared/model/TypedDataClearSignContext\";\nimport { type TypedDataContext } from \"./shared/model/TypedDataContext\";\n\nexport interface ContextModule {\n getContext(field: TransactionFieldContext): Promise<ClearSignContext>;\n getContexts(transaction: TransactionContext): Promise<ClearSignContext[]>;\n getTypedDataFilters(\n typedData: TypedDataContext,\n ): Promise<TypedDataClearSignContext>;\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["ContextModule_exports", "__toCommonJS"]
7
+ }
@@ -1,87 +1,2 @@
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
1
+ "use strict";var a=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var C=(o,t)=>{for(var r in t)a(o,r,{get:t[r],enumerable:!0})},f=(o,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of u(t))!l.call(o,e)&&e!==r&&a(o,e,{get:()=>t[e],enumerable:!(n=s(t,e))||n.enumerable});return o};var p=o=>f(a({},"__esModule",{value:!0}),o);var L={};C(L,{ContextModuleBuilder:()=>m,DEFAULT_CONFIG:()=>d});module.exports=p(L);var i=require("./DefaultContextModule");const c="https://crypto-assets-service.api.ledger.com/v1",d={cal:{url:c,mode:"prod",branch:"main"},defaultLoaders:!0,customLoaders:[],customTypedDataLoader:void 0};class m{config=d;constructor(){}removeDefaultLoaders(){return this.config.defaultLoaders=!1,this}addLoader(t){return this.config.customLoaders.push(t),this}addTypedDataLoader(t){return this.config.customTypedDataLoader=t,this}addCalConfig(t){return this.config.cal={...d.cal,...t},this}build(){return new i.DefaultContextModule(this.config)}}0&&(module.exports={ContextModuleBuilder,DEFAULT_CONFIG});
2
+ //# sourceMappingURL=ContextModuleBuilder.js.map
@@ -1 +1,7 @@
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
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/ContextModuleBuilder.ts"],
4
+ "sourcesContent": ["import {\n type ContextModuleCalConfig,\n type ContextModuleConfig,\n} from \"./config/model/ContextModuleConfig\";\nimport { type ContextLoader } from \"./shared/domain/ContextLoader\";\nimport { type TypedDataContextLoader } from \"./typed-data/domain/TypedDataContextLoader\";\nimport { type ContextModule } from \"./ContextModule\";\nimport { DefaultContextModule } from \"./DefaultContextModule\";\n\nconst DEFAULT_CAL_URL = \"https://crypto-assets-service.api.ledger.com/v1\";\n\nexport const DEFAULT_CONFIG: ContextModuleConfig = {\n cal: {\n url: DEFAULT_CAL_URL,\n mode: \"prod\",\n branch: \"main\",\n },\n defaultLoaders: true,\n customLoaders: [],\n customTypedDataLoader: undefined,\n};\n\nexport class ContextModuleBuilder {\n private config: ContextModuleConfig = DEFAULT_CONFIG;\n\n constructor() {}\n\n /**\n * Remove default loaders from the list of loaders\n *\n * @returns this\n */\n removeDefaultLoaders() {\n this.config.defaultLoaders = false;\n return this;\n }\n\n /**\n * Add a custom loader to the list of loaders\n *\n * @param loader loader to add to the list of loaders\n * @returns this\n */\n addLoader(loader: ContextLoader) {\n this.config.customLoaders.push(loader);\n return this;\n }\n\n /**\n * Replace the default loader for typed data clear signing contexts\n *\n * @param loader loader to use for typed data clear signing contexts\n * @returns this\n */\n addTypedDataLoader(loader: TypedDataContextLoader) {\n this.config.customTypedDataLoader = loader;\n return this;\n }\n\n /**\n * Add a custom CAL configuration\n *\n * @param calConfig\n * @returns this\n */\n addCalConfig(calConfig: ContextModuleCalConfig) {\n this.config.cal = { ...DEFAULT_CONFIG.cal, ...calConfig };\n return this;\n }\n\n /**\n * Build the context module\n *\n * @returns the context module\n */\n build(): ContextModule {\n return new DefaultContextModule(this.config);\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAOA,IAAAK,EAAqC,kCAErC,MAAMC,EAAkB,kDAEXH,EAAsC,CACjD,IAAK,CACH,IAAKG,EACL,KAAM,OACN,OAAQ,MACV,EACA,eAAgB,GAChB,cAAe,CAAC,EAChB,sBAAuB,MACzB,EAEO,MAAMJ,CAAqB,CACxB,OAA8BC,EAEtC,aAAc,CAAC,CAOf,sBAAuB,CACrB,YAAK,OAAO,eAAiB,GACtB,IACT,CAQA,UAAUI,EAAuB,CAC/B,YAAK,OAAO,cAAc,KAAKA,CAAM,EAC9B,IACT,CAQA,mBAAmBA,EAAgC,CACjD,YAAK,OAAO,sBAAwBA,EAC7B,IACT,CAQA,aAAaC,EAAmC,CAC9C,YAAK,OAAO,IAAM,CAAE,GAAGL,EAAe,IAAK,GAAGK,CAAU,EACjD,IACT,CAOA,OAAuB,CACrB,OAAO,IAAI,uBAAqB,KAAK,MAAM,CAC7C,CACF",
6
+ "names": ["ContextModuleBuilder_exports", "__export", "ContextModuleBuilder", "DEFAULT_CONFIG", "__toCommonJS", "import_DefaultContextModule", "DEFAULT_CAL_URL", "loader", "calConfig"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var o=require("./ContextModuleBuilder"),d=require("./DefaultContextModule");describe("ContextModuleBuilder",()=>{const u={url:"https://crypto-assets-service.api.ledger.com/v1",mode:"prod",branch:"main"};it("should return a default context module",()=>{const e=new o.ContextModuleBuilder().build();expect(e).toBeInstanceOf(d.DefaultContextModule)}),it("should return a custom context module",()=>{const t=new o.ContextModuleBuilder,e={load:jest.fn()},n=t.removeDefaultLoaders().addLoader(e).build();expect(n).toBeInstanceOf(d.DefaultContextModule)}),it("should return a custom context module with a custom typed data loader",()=>{const t=new o.ContextModuleBuilder,e={load:jest.fn()},n=t.removeDefaultLoaders().addTypedDataLoader(e).build();expect(n).toBeInstanceOf(d.DefaultContextModule)}),it("should return a custom context module with a custom config",()=>{const e=new o.ContextModuleBuilder().addCalConfig(u).build();expect(e).toBeInstanceOf(d.DefaultContextModule)})});
2
+ //# sourceMappingURL=ContextModuleBuilder.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/ContextModuleBuilder.test.ts"],
4
+ "sourcesContent": ["import { type ContextModuleCalConfig } from \"./config/model/ContextModuleConfig\";\nimport { ContextModuleBuilder } from \"./ContextModuleBuilder\";\nimport { DefaultContextModule } from \"./DefaultContextModule\";\n\ndescribe(\"ContextModuleBuilder\", () => {\n const defaultCalConfig: ContextModuleCalConfig = {\n url: \"https://crypto-assets-service.api.ledger.com/v1\",\n mode: \"prod\",\n branch: \"main\",\n };\n it(\"should return a default context module\", () => {\n const contextModuleBuilder = new ContextModuleBuilder();\n\n const res = contextModuleBuilder.build();\n\n expect(res).toBeInstanceOf(DefaultContextModule);\n });\n\n it(\"should return a custom context module\", () => {\n const contextModuleBuilder = new ContextModuleBuilder();\n const customLoader = { load: jest.fn() };\n\n const res = contextModuleBuilder\n .removeDefaultLoaders()\n .addLoader(customLoader)\n .build();\n\n expect(res).toBeInstanceOf(DefaultContextModule);\n });\n\n it(\"should return a custom context module with a custom typed data loader\", () => {\n const contextModuleBuilder = new ContextModuleBuilder();\n const customLoader = { load: jest.fn() };\n\n const res = contextModuleBuilder\n .removeDefaultLoaders()\n .addTypedDataLoader(customLoader)\n .build();\n\n expect(res).toBeInstanceOf(DefaultContextModule);\n });\n\n it(\"should return a custom context module with a custom config\", () => {\n const contextModuleBuilder = new ContextModuleBuilder();\n\n const res = contextModuleBuilder.addCalConfig(defaultCalConfig).build();\n\n expect(res).toBeInstanceOf(DefaultContextModule);\n });\n});\n"],
5
+ "mappings": "aACA,IAAAA,EAAqC,kCACrCC,EAAqC,kCAErC,SAAS,uBAAwB,IAAM,CACrC,MAAMC,EAA2C,CAC/C,IAAK,kDACL,KAAM,OACN,OAAQ,MACV,EACA,GAAG,yCAA0C,IAAM,CAGjD,MAAMC,EAFuB,IAAI,uBAAqB,EAErB,MAAM,EAEvC,OAAOA,CAAG,EAAE,eAAe,sBAAoB,CACjD,CAAC,EAED,GAAG,wCAAyC,IAAM,CAChD,MAAMC,EAAuB,IAAI,uBAC3BC,EAAe,CAAE,KAAM,KAAK,GAAG,CAAE,EAEjCF,EAAMC,EACT,qBAAqB,EACrB,UAAUC,CAAY,EACtB,MAAM,EAET,OAAOF,CAAG,EAAE,eAAe,sBAAoB,CACjD,CAAC,EAED,GAAG,wEAAyE,IAAM,CAChF,MAAMC,EAAuB,IAAI,uBAC3BC,EAAe,CAAE,KAAM,KAAK,GAAG,CAAE,EAEjCF,EAAMC,EACT,qBAAqB,EACrB,mBAAmBC,CAAY,EAC/B,MAAM,EAET,OAAOF,CAAG,EAAE,eAAe,sBAAoB,CACjD,CAAC,EAED,GAAG,6DAA8D,IAAM,CAGrE,MAAMA,EAFuB,IAAI,uBAAqB,EAErB,aAAaD,CAAgB,EAAE,MAAM,EAEtE,OAAOC,CAAG,EAAE,eAAe,sBAAoB,CACjD,CAAC,CACH,CAAC",
6
+ "names": ["import_ContextModuleBuilder", "import_DefaultContextModule", "defaultCalConfig", "res", "contextModuleBuilder", "customLoader"]
7
+ }
@@ -1,21 +1,2 @@
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
1
+ "use strict";var n=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var L=(o,t)=>{for(var a in t)n(o,a,{get:t[a],enumerable:!0})},u=(o,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of f(t))!T.call(o,e)&&e!==a&&n(o,e,{get:()=>t[e],enumerable:!(r=y(t,e))||r.enumerable});return o};var c=o=>u(n({},"__esModule",{value:!0}),o);var g={};L(g,{DefaultContextModule:()=>D});module.exports=c(g);var i=require("./transaction/di/transactionTypes"),p=require("./trusted-name/di/trustedNameTypes"),d=require("./external-plugin/di/externalPluginTypes"),s=require("./nft/di/nftTypes"),m=require("./shared/model/ClearSignContext"),C=require("./token/di/tokenTypes"),l=require("./typed-data/di/typedDataTypes"),x=require("./di");class D{_container;_loaders;_typedDataLoader;constructor(t){this._container=(0,x.makeContainer)({config:t}),this._loaders=t.defaultLoaders?this._getDefaultLoaders():[],this._loaders.push(...t.customLoaders),this._typedDataLoader=t.customTypedDataLoader??this._getDefaultTypedDataLoader()}_getDefaultLoaders(){return[this._container.get(d.externalPluginTypes.ExternalPluginContextLoader),this._container.get(p.trustedNameTypes.TrustedNameContextLoader),this._container.get(s.nftTypes.NftContextLoader),this._container.get(C.tokenTypes.TokenContextLoader),this._container.get(i.transactionTypes.TransactionContextLoader)]}_getDefaultTypedDataLoader(){return this._container.get(l.typedDataTypes.TypedDataContextLoader)}async getContexts(t){const a=this._loaders.map(e=>e.load(t));return(await Promise.all(a)).flat()}async getContext(t){const a=this._loaders.filter(e=>e.loadField).map(e=>e.loadField(t));return(await Promise.all(a)).find(e=>e!==null)||{type:m.ClearSignContextType.ERROR,error:new Error(`Field type not supported: ${t.type}`)}}async getTypedDataFilters(t){return this._typedDataLoader.load(t)}}0&&(module.exports={DefaultContextModule});
2
+ //# sourceMappingURL=DefaultContextModule.js.map
@@ -1 +1,7 @@
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"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/DefaultContextModule.ts"],
4
+ "sourcesContent": ["import { type Container } from \"inversify\";\n\nimport type { TypedDataClearSignContext } from \"@/shared/model/TypedDataClearSignContext\";\nimport type { TypedDataContext } from \"@/shared/model/TypedDataContext\";\nimport { transactionTypes } from \"@/transaction/di/transactionTypes\";\nimport { trustedNameTypes } from \"@/trusted-name/di/trustedNameTypes\";\n\nimport { type ContextModuleConfig } from \"./config/model/ContextModuleConfig\";\nimport { externalPluginTypes } from \"./external-plugin/di/externalPluginTypes\";\nimport { type ExternalPluginContextLoader } from \"./external-plugin/domain/ExternalPluginContextLoader\";\nimport { nftTypes } from \"./nft/di/nftTypes\";\nimport { type NftContextLoader } from \"./nft/domain/NftContextLoader\";\nimport { type ContextLoader } from \"./shared/domain/ContextLoader\";\nimport {\n type ClearSignContext,\n ClearSignContextType,\n} from \"./shared/model/ClearSignContext\";\nimport {\n type TransactionContext,\n type TransactionFieldContext,\n} from \"./shared/model/TransactionContext\";\nimport { tokenTypes } from \"./token/di/tokenTypes\";\nimport { type TokenContextLoader } from \"./token/domain/TokenContextLoader\";\nimport { type TransactionContextLoader } from \"./transaction/domain/TransactionContextLoader\";\nimport { type TrustedNameContextLoader } from \"./trusted-name/domain/TrustedNameContextLoader\";\nimport { typedDataTypes } from \"./typed-data/di/typedDataTypes\";\nimport type { TypedDataContextLoader } from \"./typed-data/domain/TypedDataContextLoader\";\nimport { type ContextModule } from \"./ContextModule\";\nimport { makeContainer } from \"./di\";\n\nexport class DefaultContextModule implements ContextModule {\n private _container: Container;\n private _loaders: ContextLoader[];\n private _typedDataLoader: TypedDataContextLoader;\n\n constructor(args: ContextModuleConfig) {\n this._container = makeContainer({ config: args });\n this._loaders = args.defaultLoaders ? this._getDefaultLoaders() : [];\n this._loaders.push(...args.customLoaders);\n this._typedDataLoader =\n args.customTypedDataLoader ?? this._getDefaultTypedDataLoader();\n }\n\n private _getDefaultLoaders(): ContextLoader[] {\n return [\n this._container.get<ExternalPluginContextLoader>(\n externalPluginTypes.ExternalPluginContextLoader,\n ),\n this._container.get<TrustedNameContextLoader>(\n trustedNameTypes.TrustedNameContextLoader,\n ),\n this._container.get<NftContextLoader>(nftTypes.NftContextLoader),\n this._container.get<TokenContextLoader>(tokenTypes.TokenContextLoader),\n this._container.get<TransactionContextLoader>(\n transactionTypes.TransactionContextLoader,\n ),\n ];\n }\n\n private _getDefaultTypedDataLoader(): TypedDataContextLoader {\n return this._container.get<TypedDataContextLoader>(\n typedDataTypes.TypedDataContextLoader,\n );\n }\n\n public async getContexts(\n transaction: TransactionContext,\n ): Promise<ClearSignContext[]> {\n const promises = this._loaders.map((fetcher) => fetcher.load(transaction));\n const responses = await Promise.all(promises);\n return responses.flat();\n }\n\n public async getContext(\n field: TransactionFieldContext,\n ): Promise<ClearSignContext> {\n const promises = this._loaders\n .filter((fetcher) => fetcher.loadField)\n .map((fetcher) => fetcher.loadField!(field));\n const responses = await Promise.all(promises);\n return (\n responses.find((resp) => resp !== null) || {\n type: ClearSignContextType.ERROR,\n error: new Error(`Field type not supported: ${field.type}`),\n }\n );\n }\n\n public async getTypedDataFilters(\n typedData: TypedDataContext,\n ): Promise<TypedDataClearSignContext> {\n return this._typedDataLoader.load(typedData);\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAAA,eAAAC,EAAAH,GAIA,IAAAI,EAAiC,6CACjCC,EAAiC,8CAGjCC,EAAoC,oDAEpCC,EAAyB,6BAGzBC,EAGO,2CAKPC,EAA2B,iCAI3BC,EAA+B,0CAG/BC,EAA8B,gBAEvB,MAAMT,CAA8C,CACjD,WACA,SACA,iBAER,YAAYU,EAA2B,CACrC,KAAK,cAAa,iBAAc,CAAE,OAAQA,CAAK,CAAC,EAChD,KAAK,SAAWA,EAAK,eAAiB,KAAK,mBAAmB,EAAI,CAAC,EACnE,KAAK,SAAS,KAAK,GAAGA,EAAK,aAAa,EACxC,KAAK,iBACHA,EAAK,uBAAyB,KAAK,2BAA2B,CAClE,CAEQ,oBAAsC,CAC5C,MAAO,CACL,KAAK,WAAW,IACd,sBAAoB,2BACtB,EACA,KAAK,WAAW,IACd,mBAAiB,wBACnB,EACA,KAAK,WAAW,IAAsB,WAAS,gBAAgB,EAC/D,KAAK,WAAW,IAAwB,aAAW,kBAAkB,EACrE,KAAK,WAAW,IACd,mBAAiB,wBACnB,CACF,CACF,CAEQ,4BAAqD,CAC3D,OAAO,KAAK,WAAW,IACrB,iBAAe,sBACjB,CACF,CAEA,MAAa,YACXC,EAC6B,CAC7B,MAAMC,EAAW,KAAK,SAAS,IAAKC,GAAYA,EAAQ,KAAKF,CAAW,CAAC,EAEzE,OADkB,MAAM,QAAQ,IAAIC,CAAQ,GAC3B,KAAK,CACxB,CAEA,MAAa,WACXE,EAC2B,CAC3B,MAAMF,EAAW,KAAK,SACnB,OAAQC,GAAYA,EAAQ,SAAS,EACrC,IAAKA,GAAYA,EAAQ,UAAWC,CAAK,CAAC,EAE7C,OADkB,MAAM,QAAQ,IAAIF,CAAQ,GAEhC,KAAMG,GAASA,IAAS,IAAI,GAAK,CACzC,KAAM,uBAAqB,MAC3B,MAAO,IAAI,MAAM,6BAA6BD,EAAM,IAAI,EAAE,CAC5D,CAEJ,CAEA,MAAa,oBACXE,EACoC,CACpC,OAAO,KAAK,iBAAiB,KAAKA,CAAS,CAC7C,CACF",
6
+ "names": ["DefaultContextModule_exports", "__export", "DefaultContextModule", "__toCommonJS", "import_transactionTypes", "import_trustedNameTypes", "import_externalPluginTypes", "import_nftTypes", "import_ClearSignContext", "import_tokenTypes", "import_typedDataTypes", "import_di", "args", "transaction", "promises", "fetcher", "field", "resp", "typedData"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var o=require("./DefaultContextModule");const l=()=>({load:jest.fn(),loadField:jest.fn()});describe("DefaultContextModule",()=>{const s={load:jest.fn()},a={customLoaders:[],defaultLoaders:!1,customTypedDataLoader:s,cal:{url:"https://crypto-assets-service.api.ledger.com/v1",mode:"prod",branch:"main"}};beforeEach(()=>{jest.restoreAllMocks()}),it("should initialize the context module with all the default loaders",async()=>{const t=await new o.DefaultContextModule(a).getContexts({});expect(t).toEqual([])}),it("should return an empty array when no loaders",async()=>{const t=await new o.DefaultContextModule(a).getContexts({});expect(t).toEqual([])}),it("should call all fetch method from metadata fetcher",async()=>{const e=l();await new o.DefaultContextModule({...a,customLoaders:[e,e]}).getContexts({}),expect(e.load).toHaveBeenCalledTimes(2)}),it("should return an array of context response",async()=>{const e=l(),t=[[{type:"provideERC20Info",payload:"payload1"}],[{type:"provideERC20Info",payload:"payload2"},{type:"plugin",payload:"payload3"}]];jest.spyOn(e,"load").mockResolvedValueOnce(t[0]).mockResolvedValueOnce(t[1]);const n=await new o.DefaultContextModule({...a,customLoaders:[e,e]}).getContexts({});expect(e.load).toHaveBeenCalledTimes(2),expect(n).toEqual(t.flat())}),it("should call the typed data loader",async()=>{await new o.DefaultContextModule({...a,customTypedDataLoader:s}).getTypedDataFilters({}),expect(s.load).toHaveBeenCalledTimes(1)}),it("should return a single context",async()=>{const e=l(),t=[null,{type:"token",payload:"payload"}];jest.spyOn(e,"loadField").mockResolvedValueOnce(t[0]).mockResolvedValueOnce(t[1]);const n=await new o.DefaultContextModule({...a,customLoaders:[e,{load:jest.fn()},e]}).getContext({type:"token"});expect(e.loadField).toHaveBeenCalledTimes(2),expect(n).toEqual({type:"token",payload:"payload"})}),it("context field not supported",async()=>{const e=l(),t=[null,null];jest.spyOn(e,"loadField").mockResolvedValueOnce(t[0]).mockResolvedValueOnce(t[1]);const n=await new o.DefaultContextModule({...a,customLoaders:[e,{load:jest.fn()},e]}).getContext({type:"token"});expect(e.loadField).toHaveBeenCalledTimes(2),expect(n).toEqual({type:"error",error:new Error("Field type not supported: token")})}),it("getField not implemented",async()=>{const t=await new o.DefaultContextModule({...a,customLoaders:[{load:jest.fn()}]}).getContext({type:"token"});expect(t).toEqual({type:"error",error:new Error("Field type not supported: token")})})});
2
+ //# sourceMappingURL=DefaultContextModule.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/DefaultContextModule.test.ts"],
4
+ "sourcesContent": ["import { type ContextModuleConfig } from \"./config/model/ContextModuleConfig\";\nimport {\n type TransactionContext,\n type TransactionFieldContext,\n} from \"./shared/model/TransactionContext\";\nimport { type TypedDataContext } from \"./shared/model/TypedDataContext\";\nimport type { TypedDataContextLoader } from \"./typed-data/domain/TypedDataContextLoader\";\nimport { DefaultContextModule } from \"./DefaultContextModule\";\n\nconst contextLoaderStubBuilder = () => {\n return { load: jest.fn(), loadField: jest.fn() };\n};\n\ndescribe(\"DefaultContextModule\", () => {\n const typedDataLoader: TypedDataContextLoader = { load: jest.fn() };\n const defaultContextModuleConfig: ContextModuleConfig = {\n customLoaders: [],\n defaultLoaders: false,\n customTypedDataLoader: typedDataLoader,\n cal: {\n url: \"https://crypto-assets-service.api.ledger.com/v1\",\n mode: \"prod\",\n branch: \"main\",\n },\n };\n\n beforeEach(() => {\n jest.restoreAllMocks();\n });\n\n it(\"should initialize the context module with all the default loaders\", async () => {\n const contextModule = new DefaultContextModule(defaultContextModuleConfig);\n\n const res = await contextModule.getContexts({} as TransactionContext);\n\n expect(res).toEqual([]);\n });\n\n it(\"should return an empty array when no loaders\", async () => {\n const contextModule = new DefaultContextModule(defaultContextModuleConfig);\n\n const res = await contextModule.getContexts({} as TransactionContext);\n\n expect(res).toEqual([]);\n });\n\n it(\"should call all fetch method from metadata fetcher\", async () => {\n const loader = contextLoaderStubBuilder();\n const contextModule = new DefaultContextModule({\n ...defaultContextModuleConfig,\n customLoaders: [loader, loader],\n });\n\n await contextModule.getContexts({} as TransactionContext);\n\n expect(loader.load).toHaveBeenCalledTimes(2);\n });\n\n it(\"should return an array of context response\", async () => {\n const loader = contextLoaderStubBuilder();\n const responses = [\n [{ type: \"provideERC20Info\", payload: \"payload1\" }],\n [\n { type: \"provideERC20Info\", payload: \"payload2\" },\n { type: \"plugin\", payload: \"payload3\" },\n ],\n ];\n jest\n .spyOn(loader, \"load\")\n .mockResolvedValueOnce(responses[0])\n .mockResolvedValueOnce(responses[1]);\n const contextModule = new DefaultContextModule({\n ...defaultContextModuleConfig,\n customLoaders: [loader, loader],\n });\n\n const res = await contextModule.getContexts({} as TransactionContext);\n\n expect(loader.load).toHaveBeenCalledTimes(2);\n expect(res).toEqual(responses.flat());\n });\n\n it(\"should call the typed data loader\", async () => {\n const contextModule = new DefaultContextModule({\n ...defaultContextModuleConfig,\n customTypedDataLoader: typedDataLoader,\n });\n\n await contextModule.getTypedDataFilters({} as TypedDataContext);\n\n expect(typedDataLoader.load).toHaveBeenCalledTimes(1);\n });\n\n it(\"should return a single context\", async () => {\n const loader = contextLoaderStubBuilder();\n const responses = [null, { type: \"token\", payload: \"payload\" }];\n jest\n .spyOn(loader, \"loadField\")\n .mockResolvedValueOnce(responses[0])\n .mockResolvedValueOnce(responses[1]);\n const contextModule = new DefaultContextModule({\n ...defaultContextModuleConfig,\n customLoaders: [loader, { load: jest.fn() }, loader],\n });\n\n const res = await contextModule.getContext({\n type: \"token\",\n } as TransactionFieldContext);\n\n expect(loader.loadField).toHaveBeenCalledTimes(2);\n expect(res).toEqual({ type: \"token\", payload: \"payload\" });\n });\n\n it(\"context field not supported\", async () => {\n const loader = contextLoaderStubBuilder();\n const responses = [null, null];\n jest\n .spyOn(loader, \"loadField\")\n .mockResolvedValueOnce(responses[0])\n .mockResolvedValueOnce(responses[1]);\n const contextModule = new DefaultContextModule({\n ...defaultContextModuleConfig,\n customLoaders: [loader, { load: jest.fn() }, loader],\n });\n\n const res = await contextModule.getContext({\n type: \"token\",\n } as TransactionFieldContext);\n\n expect(loader.loadField).toHaveBeenCalledTimes(2);\n expect(res).toEqual({\n type: \"error\",\n error: new Error(\"Field type not supported: token\"),\n });\n });\n\n it(\"getField not implemented\", async () => {\n const contextModule = new DefaultContextModule({\n ...defaultContextModuleConfig,\n customLoaders: [{ load: jest.fn() }],\n });\n\n const res = await contextModule.getContext({\n type: \"token\",\n } as TransactionFieldContext);\n\n expect(res).toEqual({\n type: \"error\",\n error: new Error(\"Field type not supported: token\"),\n });\n });\n});\n"],
5
+ "mappings": "aAOA,IAAAA,EAAqC,kCAErC,MAAMC,EAA2B,KACxB,CAAE,KAAM,KAAK,GAAG,EAAG,UAAW,KAAK,GAAG,CAAE,GAGjD,SAAS,uBAAwB,IAAM,CACrC,MAAMC,EAA0C,CAAE,KAAM,KAAK,GAAG,CAAE,EAC5DC,EAAkD,CACtD,cAAe,CAAC,EAChB,eAAgB,GAChB,sBAAuBD,EACvB,IAAK,CACH,IAAK,kDACL,KAAM,OACN,OAAQ,MACV,CACF,EAEA,WAAW,IAAM,CACf,KAAK,gBAAgB,CACvB,CAAC,EAED,GAAG,oEAAqE,SAAY,CAGlF,MAAME,EAAM,MAFU,IAAI,uBAAqBD,CAA0B,EAEzC,YAAY,CAAC,CAAuB,EAEpE,OAAOC,CAAG,EAAE,QAAQ,CAAC,CAAC,CACxB,CAAC,EAED,GAAG,+CAAgD,SAAY,CAG7D,MAAMA,EAAM,MAFU,IAAI,uBAAqBD,CAA0B,EAEzC,YAAY,CAAC,CAAuB,EAEpE,OAAOC,CAAG,EAAE,QAAQ,CAAC,CAAC,CACxB,CAAC,EAED,GAAG,qDAAsD,SAAY,CACnE,MAAMC,EAASJ,EAAyB,EAMxC,MALsB,IAAI,uBAAqB,CAC7C,GAAGE,EACH,cAAe,CAACE,EAAQA,CAAM,CAChC,CAAC,EAEmB,YAAY,CAAC,CAAuB,EAExD,OAAOA,EAAO,IAAI,EAAE,sBAAsB,CAAC,CAC7C,CAAC,EAED,GAAG,6CAA8C,SAAY,CAC3D,MAAMA,EAASJ,EAAyB,EAClCK,EAAY,CAChB,CAAC,CAAE,KAAM,mBAAoB,QAAS,UAAW,CAAC,EAClD,CACE,CAAE,KAAM,mBAAoB,QAAS,UAAW,EAChD,CAAE,KAAM,SAAU,QAAS,UAAW,CACxC,CACF,EACA,KACG,MAAMD,EAAQ,MAAM,EACpB,sBAAsBC,EAAU,CAAC,CAAC,EAClC,sBAAsBA,EAAU,CAAC,CAAC,EAMrC,MAAMF,EAAM,MALU,IAAI,uBAAqB,CAC7C,GAAGD,EACH,cAAe,CAACE,EAAQA,CAAM,CAChC,CAAC,EAE+B,YAAY,CAAC,CAAuB,EAEpE,OAAOA,EAAO,IAAI,EAAE,sBAAsB,CAAC,EAC3C,OAAOD,CAAG,EAAE,QAAQE,EAAU,KAAK,CAAC,CACtC,CAAC,EAED,GAAG,oCAAqC,SAAY,CAMlD,MALsB,IAAI,uBAAqB,CAC7C,GAAGH,EACH,sBAAuBD,CACzB,CAAC,EAEmB,oBAAoB,CAAC,CAAqB,EAE9D,OAAOA,EAAgB,IAAI,EAAE,sBAAsB,CAAC,CACtD,CAAC,EAED,GAAG,iCAAkC,SAAY,CAC/C,MAAMG,EAASJ,EAAyB,EAClCK,EAAY,CAAC,KAAM,CAAE,KAAM,QAAS,QAAS,SAAU,CAAC,EAC9D,KACG,MAAMD,EAAQ,WAAW,EACzB,sBAAsBC,EAAU,CAAC,CAAC,EAClC,sBAAsBA,EAAU,CAAC,CAAC,EAMrC,MAAMF,EAAM,MALU,IAAI,uBAAqB,CAC7C,GAAGD,EACH,cAAe,CAACE,EAAQ,CAAE,KAAM,KAAK,GAAG,CAAE,EAAGA,CAAM,CACrD,CAAC,EAE+B,WAAW,CACzC,KAAM,OACR,CAA4B,EAE5B,OAAOA,EAAO,SAAS,EAAE,sBAAsB,CAAC,EAChD,OAAOD,CAAG,EAAE,QAAQ,CAAE,KAAM,QAAS,QAAS,SAAU,CAAC,CAC3D,CAAC,EAED,GAAG,8BAA+B,SAAY,CAC5C,MAAMC,EAASJ,EAAyB,EAClCK,EAAY,CAAC,KAAM,IAAI,EAC7B,KACG,MAAMD,EAAQ,WAAW,EACzB,sBAAsBC,EAAU,CAAC,CAAC,EAClC,sBAAsBA,EAAU,CAAC,CAAC,EAMrC,MAAMF,EAAM,MALU,IAAI,uBAAqB,CAC7C,GAAGD,EACH,cAAe,CAACE,EAAQ,CAAE,KAAM,KAAK,GAAG,CAAE,EAAGA,CAAM,CACrD,CAAC,EAE+B,WAAW,CACzC,KAAM,OACR,CAA4B,EAE5B,OAAOA,EAAO,SAAS,EAAE,sBAAsB,CAAC,EAChD,OAAOD,CAAG,EAAE,QAAQ,CAClB,KAAM,QACN,MAAO,IAAI,MAAM,iCAAiC,CACpD,CAAC,CACH,CAAC,EAED,GAAG,2BAA4B,SAAY,CAMzC,MAAMA,EAAM,MALU,IAAI,uBAAqB,CAC7C,GAAGD,EACH,cAAe,CAAC,CAAE,KAAM,KAAK,GAAG,CAAE,CAAC,CACrC,CAAC,EAE+B,WAAW,CACzC,KAAM,OACR,CAA4B,EAE5B,OAAOC,CAAG,EAAE,QAAQ,CAClB,KAAM,QACN,MAAO,IAAI,MAAM,iCAAiC,CACpD,CAAC,CACH,CAAC,CACH,CAAC",
6
+ "names": ["import_DefaultContextModule", "contextLoaderStubBuilder", "typedDataLoader", "defaultContextModuleConfig", "res", "loader", "responses"]
7
+ }
@@ -1,10 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configModuleFactory = void 0;
4
- const inversify_1 = require("inversify");
5
- const configTypes_1 = require("./configTypes");
6
- const configModuleFactory = (config) => new inversify_1.ContainerModule((bind, _unbind, _isBound, _rebind) => {
7
- bind(configTypes_1.configTypes.Config).toConstantValue(config);
8
- });
9
- exports.configModuleFactory = configModuleFactory;
10
- //# sourceMappingURL=configModuleFactory.js.map
1
+ "use strict";var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var l=(n,o)=>{for(var e in o)r(n,e,{get:o[e],enumerable:!0})},m=(n,o,e,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of u(o))!g.call(n,t)&&t!==e&&r(n,t,{get:()=>o[t],enumerable:!(i=d(o,t))||i.enumerable});return n};var p=n=>m(r({},"__esModule",{value:!0}),n);var a={};l(a,{configModuleFactory:()=>M});module.exports=p(a);var f=require("inversify"),C=require("./configTypes");const M=n=>new f.ContainerModule((o,e,i,t)=>{o(C.configTypes.Config).toConstantValue(n)});0&&(module.exports={configModuleFactory});
2
+ //# sourceMappingURL=configModuleFactory.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"configModuleFactory.js","sourceRoot":"","sources":["../../../../../src/config/di/configModuleFactory.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAI5C,+CAA4C;AAErC,MAAM,mBAAmB,GAAG,CAAC,MAA2B,EAAE,EAAE,CACjE,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IACvD,IAAI,CAAsB,yBAAW,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;AACxE,CAAC,CAAC,CAAC;AAHQ,QAAA,mBAAmB,uBAG3B"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/config/di/configModuleFactory.ts"],
4
+ "sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { type ContextModuleConfig } from \"@/config/model/ContextModuleConfig\";\n\nimport { configTypes } from \"./configTypes\";\n\nexport const configModuleFactory = (config: ContextModuleConfig) =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind<ContextModuleConfig>(configTypes.Config).toConstantValue(config);\n });\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAIhCC,EAA4B,yBAErB,MAAMH,EAAuBI,GAClC,IAAI,kBAAgB,CAACC,EAAMC,EAASC,EAAUC,IAAY,CACxDH,EAA0B,cAAY,MAAM,EAAE,gBAAgBD,CAAM,CACtE,CAAC",
6
+ "names": ["configModuleFactory_exports", "__export", "configModuleFactory", "__toCommonJS", "import_inversify", "import_configTypes", "config", "bind", "_unbind", "_isBound", "_rebind"]
7
+ }
@@ -1,7 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configTypes = void 0;
4
- exports.configTypes = {
5
- Config: Symbol.for("config"),
6
- };
7
- //# sourceMappingURL=configTypes.js.map
1
+ "use strict";var g=Object.defineProperty;var e=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var s=(f,o)=>{for(var c in o)g(f,c,{get:o[c],enumerable:!0})},t=(f,o,c,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of p(o))!r.call(f,n)&&n!==c&&g(f,n,{get:()=>o[n],enumerable:!(i=e(o,n))||i.enumerable});return f};var y=f=>t(g({},"__esModule",{value:!0}),f);var l={};s(l,{configTypes:()=>b});module.exports=y(l);const b={Config:Symbol.for("config")};0&&(module.exports={configTypes});
2
+ //# sourceMappingURL=configTypes.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"configTypes.js","sourceRoot":"","sources":["../../../../../src/config/di/configTypes.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;CAC7B,CAAC"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/config/di/configTypes.ts"],
4
+ "sourcesContent": ["export const configTypes = {\n Config: Symbol.for(\"config\"),\n};\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAc,CACzB,OAAQ,OAAO,IAAI,QAAQ,CAC7B",
6
+ "names": ["configTypes_exports", "__export", "configTypes", "__toCommonJS"]
7
+ }
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ContextModuleConfig.js.map
1
+ "use strict";var d=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var p=(o,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of C(e))!l.call(o,t)&&t!==n&&d(o,t,{get:()=>e[t],enumerable:!(a=r(e,t))||a.enumerable});return o};var x=o=>p(d({},"__esModule",{value:!0}),o);var u={};module.exports=x(u);
2
+ //# sourceMappingURL=ContextModuleConfig.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"ContextModuleConfig.js","sourceRoot":"","sources":["../../../../../src/config/model/ContextModuleConfig.ts"],"names":[],"mappings":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/config/model/ContextModuleConfig.ts"],
4
+ "sourcesContent": ["import { type ContextLoader } from \"@/shared/domain/ContextLoader\";\nimport { type TypedDataContextLoader } from \"@/typed-data/domain/TypedDataContextLoader\";\n\nexport type ContextModuleCalMode = \"prod\" | \"test\";\nexport type ContextModuleCalBranch = \"next\" | \"main\" | \"demo\";\n\nexport type ContextModuleCalConfig = {\n url: string;\n mode: ContextModuleCalMode;\n branch: ContextModuleCalBranch;\n};\n\nexport type ContextModuleConfig = {\n cal: ContextModuleCalConfig;\n defaultLoaders: boolean;\n customLoaders: ContextLoader[];\n customTypedDataLoader?: TypedDataContextLoader;\n};\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["ContextModuleConfig_exports", "__toCommonJS"]
7
+ }
package/lib/cjs/src/di.js CHANGED
@@ -1,17 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeContainer = void 0;
4
- const inversify_1 = require("inversify");
5
- const configModuleFactory_1 = require("./config/di/configModuleFactory");
6
- const externalPluginModuleFactory_1 = require("./external-plugin/di/externalPluginModuleFactory");
7
- const forwardDomainModuleFactory_1 = require("./forward-domain/di/forwardDomainModuleFactory");
8
- const nftModuleFactory_1 = require("./nft/di/nftModuleFactory");
9
- const tokenModuleFactory_1 = require("./token/di/tokenModuleFactory");
10
- const typedDataModuleFactory_1 = require("./typed-data/di/typedDataModuleFactory");
11
- const makeContainer = ({ config }) => {
12
- const container = new inversify_1.Container();
13
- container.load((0, configModuleFactory_1.configModuleFactory)(config), (0, externalPluginModuleFactory_1.externalPluginModuleFactory)(), (0, forwardDomainModuleFactory_1.forwardDomainModuleFactory)(), (0, nftModuleFactory_1.nftModuleFactory)(), (0, tokenModuleFactory_1.tokenModuleFactory)(), (0, typedDataModuleFactory_1.typedDataModuleFactory)());
14
- return container;
15
- };
16
- exports.makeContainer = makeContainer;
17
- //# sourceMappingURL=di.js.map
1
+ "use strict";var n=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var g=(t,o)=>{for(var e in o)n(t,e,{get:o[e],enumerable:!0})},F=(t,o,e,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of y(o))!C.call(t,r)&&r!==e&&n(t,r,{get:()=>o[r],enumerable:!(a=M(o,r))||a.enumerable});return t};var s=t=>F(n({},"__esModule",{value:!0}),t);var x={};g(x,{makeContainer:()=>k});module.exports=s(x);var i=require("inversify"),m=require("./config/di/configModuleFactory"),f=require("./external-plugin/di/externalPluginModuleFactory"),c=require("./nft/di/nftModuleFactory"),p=require("./token/di/tokenModuleFactory"),d=require("./transaction/di/transactionModuleFactory"),l=require("./trusted-name/di/trustedNameModuleFactory"),u=require("./typed-data/di/typedDataModuleFactory");const k=({config:t})=>{const o=new i.Container;return o.load((0,m.configModuleFactory)(t),(0,f.externalPluginModuleFactory)(),(0,c.nftModuleFactory)(),(0,p.tokenModuleFactory)(),(0,d.transactionModuleFactory)(),(0,l.trustedNameModuleFactory)(),(0,u.typedDataModuleFactory)()),o};0&&(module.exports={makeContainer});
2
+ //# sourceMappingURL=di.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"di.js","sourceRoot":"","sources":["../../../src/di.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,yEAAsE;AAEtE,kGAA+F;AAC/F,+FAA4F;AAC5F,gEAA6D;AAC7D,sEAAmE;AACnE,mFAAgF;AAMzE,MAAM,aAAa,GAAG,CAAC,EAAE,MAAM,EAAqB,EAAE,EAAE;IAC7D,MAAM,SAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;IAElC,SAAS,CAAC,IAAI,CACZ,IAAA,yCAAmB,EAAC,MAAM,CAAC,EAC3B,IAAA,yDAA2B,GAAE,EAC7B,IAAA,uDAA0B,GAAE,EAC5B,IAAA,mCAAgB,GAAE,EAClB,IAAA,uCAAkB,GAAE,EACpB,IAAA,+CAAsB,GAAE,CACzB,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAbW,QAAA,aAAa,iBAaxB"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/di.ts"],
4
+ "sourcesContent": ["import { Container } from \"inversify\";\n\nimport { configModuleFactory } from \"@/config/di/configModuleFactory\";\nimport { type ContextModuleConfig } from \"@/config/model/ContextModuleConfig\";\nimport { externalPluginModuleFactory } from \"@/external-plugin/di/externalPluginModuleFactory\";\nimport { nftModuleFactory } from \"@/nft/di/nftModuleFactory\";\nimport { tokenModuleFactory } from \"@/token/di/tokenModuleFactory\";\nimport { transactionModuleFactory } from \"@/transaction/di/transactionModuleFactory\";\nimport { trustedNameModuleFactory } from \"@/trusted-name/di/trustedNameModuleFactory\";\nimport { typedDataModuleFactory } from \"@/typed-data/di/typedDataModuleFactory\";\n\ntype MakeContainerArgs = {\n config: ContextModuleConfig;\n};\n\nexport const makeContainer = ({ config }: MakeContainerArgs) => {\n const container = new Container();\n\n container.load(\n configModuleFactory(config),\n externalPluginModuleFactory(),\n nftModuleFactory(),\n tokenModuleFactory(),\n transactionModuleFactory(),\n trustedNameModuleFactory(),\n typedDataModuleFactory(),\n );\n\n return container;\n};\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA0B,qBAE1BC,EAAoC,2CAEpCC,EAA4C,4DAC5CC,EAAiC,qCACjCC,EAAmC,yCACnCC,EAAyC,qDACzCC,EAAyC,sDACzCC,EAAuC,kDAMhC,MAAMT,EAAgB,CAAC,CAAE,OAAAU,CAAO,IAAyB,CAC9D,MAAMC,EAAY,IAAI,YAEtB,OAAAA,EAAU,QACR,uBAAoBD,CAAM,KAC1B,+BAA4B,KAC5B,oBAAiB,KACjB,sBAAmB,KACnB,4BAAyB,KACzB,4BAAyB,KACzB,0BAAuB,CACzB,EAEOC,CACT",
6
+ "names": ["di_exports", "__export", "makeContainer", "__toCommonJS", "import_inversify", "import_configModuleFactory", "import_externalPluginModuleFactory", "import_nftModuleFactory", "import_tokenModuleFactory", "import_transactionModuleFactory", "import_trustedNameModuleFactory", "import_typedDataModuleFactory", "config", "container"]
7
+ }
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DAppDto.js.map
1
+ "use strict";var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var o=(r,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of a(t))!g.call(r,e)&&e!==s&&i(r,e,{get:()=>t[e],enumerable:!(n=c(t,e))||n.enumerable});return r};var d=r=>o(i({},"__esModule",{value:!0}),r);var l={};module.exports=d(l);
2
+ //# sourceMappingURL=DAppDto.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"DAppDto.js","sourceRoot":"","sources":["../../../../../src/external-plugin/data/DAppDto.ts"],"names":[],"mappings":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/external-plugin/data/DAppDto.ts"],
4
+ "sourcesContent": ["export interface DAppDto {\n b2c: B2c;\n abis: Abis;\n b2c_signatures: B2cSignatures;\n}\n\nexport interface B2c {\n blockchainName: string;\n chainId: number;\n contracts: Contract[];\n name: string;\n}\n\ninterface Contract {\n address: string;\n contractName: string;\n selectors: { [selector: string]: ContractSelector };\n}\n\ninterface ContractSelector {\n erc20OfInterest: string[];\n method: string;\n plugin: string;\n}\n\nexport interface Abis {\n [address: string]: object[];\n}\n\nexport interface B2cSignatures {\n [address: string]: {\n [selector: string]: B2cSignature;\n };\n}\n\ninterface B2cSignature {\n plugin: string;\n serialized_data: string;\n signature: string;\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["DAppDto_exports", "__toCommonJS"]
7
+ }
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ExternalPluginDataSource.js.map
1
+ "use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var f=(r,e,a,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of i(e))!s.call(r,t)&&t!==a&&o(r,t,{get:()=>e[t],enumerable:!(p=n(e,t))||p.enumerable});return r};var m=r=>f(o({},"__esModule",{value:!0}),r);var D={};module.exports=m(D);
2
+ //# sourceMappingURL=ExternalPluginDataSource.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"ExternalPluginDataSource.js","sourceRoot":"","sources":["../../../../../src/external-plugin/data/ExternalPluginDataSource.ts"],"names":[],"mappings":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/external-plugin/data/ExternalPluginDataSource.ts"],
4
+ "sourcesContent": ["import { type HexaString } from \"@ledgerhq/device-management-kit\";\nimport { type Either } from \"purify-ts\";\n\nimport { type DappInfos } from \"@/external-plugin/model/DappInfos\";\n\nexport type GetDappInfos = {\n address: string;\n selector: HexaString;\n chainId: number;\n};\n\nexport interface ExternalPluginDataSource {\n getDappInfos(\n params: GetDappInfos,\n ): Promise<Either<Error, DappInfos | undefined>>;\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["ExternalPluginDataSource_exports", "__toCommonJS"]
7
+ }