@ledgerhq/context-module 0.0.0-develop-20241011001048 → 0.0.0-develop-20241017000946
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.
- package/LICENSE.MD +202 -0
- package/lib/cjs/index.js +1126 -19
- package/lib/cjs/index.js.map +7 -1
- package/lib/esm/index.js +37618 -4
- package/lib/esm/index.js.map +7 -1
- package/lib/types/src/ContextModuleBuilder.test.d.ts +2 -0
- package/lib/types/src/ContextModuleBuilder.test.d.ts.map +1 -0
- package/lib/types/src/DefaultContextModule.test.d.ts +2 -0
- package/lib/types/src/DefaultContextModule.test.d.ts.map +1 -0
- package/lib/types/src/config/model/ContextModuleConfig.d.ts +11 -0
- package/lib/types/src/config/model/ContextModuleConfig.d.ts.map +1 -0
- package/lib/types/src/external-plugin/data/HttpExternalPluginDataSource.test.d.ts +2 -0
- package/lib/types/src/external-plugin/data/HttpExternalPluginDataSource.test.d.ts.map +1 -0
- package/lib/types/src/external-plugin/domain/ExternalPluginContextLoader.test.d.ts +2 -0
- package/lib/types/src/external-plugin/domain/ExternalPluginContextLoader.test.d.ts.map +1 -0
- package/lib/types/src/forward-domain/data/HttpForwardDomainDataSource.test.d.ts +2 -0
- package/lib/types/src/forward-domain/data/HttpForwardDomainDataSource.test.d.ts.map +1 -0
- package/lib/types/src/forward-domain/domain/ForwardDomainContextLoader.test.d.ts +2 -0
- package/lib/types/src/forward-domain/domain/ForwardDomainContextLoader.test.d.ts.map +1 -0
- package/lib/{cjs → types}/src/index.d.ts +1 -0
- package/lib/{cjs → types}/src/index.d.ts.map +1 -1
- package/lib/types/src/nft/data/HttpNftDataSource.test.d.ts +2 -0
- package/lib/types/src/nft/data/HttpNftDataSource.test.d.ts.map +1 -0
- package/lib/types/src/nft/domain/NftContextLoader.test.d.ts +2 -0
- package/lib/types/src/nft/domain/NftContextLoader.test.d.ts.map +1 -0
- package/lib/{cjs → types}/src/token/data/HttpTokenDataSource.d.ts.map +1 -1
- package/lib/types/src/token/data/HttpTokenDataSource.test.d.ts +2 -0
- package/lib/types/src/token/data/HttpTokenDataSource.test.d.ts.map +1 -0
- package/lib/types/src/token/data/TokenDto.d.ts +16 -0
- package/lib/types/src/token/data/TokenDto.d.ts.map +1 -0
- package/lib/types/src/token/domain/TokenContextLoader.test.d.ts +2 -0
- package/lib/types/src/token/domain/TokenContextLoader.test.d.ts.map +1 -0
- package/lib/{esm → types}/src/typed-data/data/FiltersDto.d.ts +3 -0
- package/lib/types/src/typed-data/data/FiltersDto.d.ts.map +1 -0
- package/lib/types/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +1 -0
- package/lib/types/src/typed-data/data/HttpTypedDataDataSource.test.d.ts +3 -0
- package/lib/types/src/typed-data/data/HttpTypedDataDataSource.test.d.ts.map +1 -0
- package/lib/types/src/typed-data/domain/DefaultTypedDataContextLoader.test.d.ts +2 -0
- package/lib/types/src/typed-data/domain/DefaultTypedDataContextLoader.test.d.ts.map +1 -0
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -0
- package/package.json +14 -22
- package/lib/cjs/package.json +0 -63
- package/lib/cjs/src/ContextModule.js +0 -3
- package/lib/cjs/src/ContextModule.js.map +0 -1
- package/lib/cjs/src/ContextModuleBuilder.js +0 -87
- package/lib/cjs/src/ContextModuleBuilder.js.map +0 -1
- package/lib/cjs/src/DefaultContextModule.js +0 -21
- package/lib/cjs/src/DefaultContextModule.js.map +0 -1
- package/lib/cjs/src/config/di/configModuleFactory.js +0 -10
- package/lib/cjs/src/config/di/configModuleFactory.js.map +0 -1
- package/lib/cjs/src/config/di/configTypes.js +0 -7
- package/lib/cjs/src/config/di/configTypes.js.map +0 -1
- package/lib/cjs/src/config/model/ContextModuleConfig.d.ts +0 -9
- package/lib/cjs/src/config/model/ContextModuleConfig.d.ts.map +0 -1
- package/lib/cjs/src/config/model/ContextModuleConfig.js +0 -3
- package/lib/cjs/src/config/model/ContextModuleConfig.js.map +0 -1
- package/lib/cjs/src/di.js +0 -17
- package/lib/cjs/src/di.js.map +0 -1
- package/lib/cjs/src/external-plugin/data/DAppDto.js +0 -3
- package/lib/cjs/src/external-plugin/data/DAppDto.js.map +0 -1
- package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js +0 -3
- package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js.map +0 -1
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js +0 -83
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js.map +0 -1
- package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js +0 -13
- package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js.map +0 -1
- package/lib/cjs/src/external-plugin/di/externalPluginTypes.js +0 -8
- package/lib/cjs/src/external-plugin/di/externalPluginTypes.js.map +0 -1
- package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js +0 -136
- package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js.map +0 -1
- package/lib/cjs/src/external-plugin/model/DappInfos.js +0 -3
- package/lib/cjs/src/external-plugin/model/DappInfos.js.map +0 -1
- package/lib/cjs/src/external-plugin/model/SelectorDetails.js +0 -3
- package/lib/cjs/src/external-plugin/model/SelectorDetails.js.map +0 -1
- package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.js +0 -3
- package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.js.map +0 -1
- package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js +0 -40
- package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js.map +0 -1
- package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js +0 -13
- package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js.map +0 -1
- package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js +0 -8
- package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js.map +0 -1
- package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js +0 -66
- package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js.map +0 -1
- package/lib/cjs/src/index.js +0 -30
- package/lib/cjs/src/index.js.map +0 -1
- package/lib/cjs/src/nft/data/HttpNftDataSource.js +0 -57
- package/lib/cjs/src/nft/data/HttpNftDataSource.js.map +0 -1
- package/lib/cjs/src/nft/data/NftDataSource.js +0 -3
- package/lib/cjs/src/nft/data/NftDataSource.js.map +0 -1
- package/lib/cjs/src/nft/di/nftModuleFactory.js +0 -13
- package/lib/cjs/src/nft/di/nftModuleFactory.js.map +0 -1
- package/lib/cjs/src/nft/di/nftTypes.js +0 -8
- package/lib/cjs/src/nft/di/nftTypes.js.map +0 -1
- package/lib/cjs/src/nft/domain/NftContextLoader.js +0 -111
- package/lib/cjs/src/nft/domain/NftContextLoader.js.map +0 -1
- package/lib/cjs/src/shared/domain/ContextLoader.js +0 -3
- package/lib/cjs/src/shared/domain/ContextLoader.js.map +0 -1
- package/lib/cjs/src/shared/model/ClearSignContext.js +0 -13
- package/lib/cjs/src/shared/model/ClearSignContext.js.map +0 -1
- package/lib/cjs/src/shared/model/TransactionContext.js +0 -3
- package/lib/cjs/src/shared/model/TransactionContext.js.map +0 -1
- package/lib/cjs/src/shared/model/TransactionSubset.js +0 -3
- package/lib/cjs/src/shared/model/TransactionSubset.js.map +0 -1
- package/lib/cjs/src/shared/model/TypedDataClearSignContext.js +0 -6
- package/lib/cjs/src/shared/model/TypedDataClearSignContext.js.map +0 -1
- package/lib/cjs/src/shared/model/TypedDataContext.js +0 -3
- package/lib/cjs/src/shared/model/TypedDataContext.js.map +0 -1
- package/lib/cjs/src/shared/utils/HexStringUtils.js +0 -15
- package/lib/cjs/src/shared/utils/HexStringUtils.js.map +0 -1
- package/lib/cjs/src/token/data/HttpTokenDataSource.js +0 -83
- package/lib/cjs/src/token/data/HttpTokenDataSource.js.map +0 -1
- package/lib/cjs/src/token/data/TokenDataSource.js +0 -3
- package/lib/cjs/src/token/data/TokenDataSource.js.map +0 -1
- package/lib/cjs/src/token/data/TokenDto.d.ts +0 -6
- package/lib/cjs/src/token/data/TokenDto.d.ts.map +0 -1
- package/lib/cjs/src/token/data/TokenDto.js +0 -3
- package/lib/cjs/src/token/data/TokenDto.js.map +0 -1
- package/lib/cjs/src/token/di/tokenModuleFactory.js +0 -13
- package/lib/cjs/src/token/di/tokenModuleFactory.js.map +0 -1
- package/lib/cjs/src/token/di/tokenTypes.js +0 -8
- package/lib/cjs/src/token/di/tokenTypes.js.map +0 -1
- package/lib/cjs/src/token/domain/TokenContextLoader.js +0 -74
- package/lib/cjs/src/token/domain/TokenContextLoader.js.map +0 -1
- package/lib/cjs/src/typed-data/data/FiltersDto.d.ts +0 -55
- package/lib/cjs/src/typed-data/data/FiltersDto.d.ts.map +0 -1
- package/lib/cjs/src/typed-data/data/FiltersDto.js +0 -3
- package/lib/cjs/src/typed-data/data/FiltersDto.js.map +0 -1
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +0 -1
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js +0 -163
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js.map +0 -1
- package/lib/cjs/src/typed-data/data/TypedDataDataSource.js +0 -3
- package/lib/cjs/src/typed-data/data/TypedDataDataSource.js.map +0 -1
- package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js +0 -13
- package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js.map +0 -1
- package/lib/cjs/src/typed-data/di/typedDataTypes.js +0 -8
- package/lib/cjs/src/typed-data/di/typedDataTypes.js.map +0 -1
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js +0 -127
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +0 -1
- package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js +0 -3
- package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js.map +0 -1
- package/lib/cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/lib/esm/index.d.ts +0 -3
- package/lib/esm/index.d.ts.map +0 -1
- package/lib/esm/package.json +0 -63
- package/lib/esm/src/ContextModule.d.ts +0 -9
- package/lib/esm/src/ContextModule.d.ts.map +0 -1
- package/lib/esm/src/ContextModule.js +0 -2
- package/lib/esm/src/ContextModule.js.map +0 -1
- package/lib/esm/src/ContextModuleBuilder.d.ts +0 -45
- package/lib/esm/src/ContextModuleBuilder.d.ts.map +0 -1
- package/lib/esm/src/ContextModuleBuilder.js +0 -83
- package/lib/esm/src/ContextModuleBuilder.js.map +0 -1
- package/lib/esm/src/DefaultContextModule.d.ts +0 -20
- package/lib/esm/src/DefaultContextModule.d.ts.map +0 -1
- package/lib/esm/src/DefaultContextModule.js +0 -17
- package/lib/esm/src/DefaultContextModule.js.map +0 -1
- package/lib/esm/src/config/di/configModuleFactory.d.ts +0 -4
- package/lib/esm/src/config/di/configModuleFactory.d.ts.map +0 -1
- package/lib/esm/src/config/di/configModuleFactory.js +0 -6
- package/lib/esm/src/config/di/configModuleFactory.js.map +0 -1
- package/lib/esm/src/config/di/configTypes.d.ts +0 -4
- package/lib/esm/src/config/di/configTypes.d.ts.map +0 -1
- package/lib/esm/src/config/di/configTypes.js +0 -4
- package/lib/esm/src/config/di/configTypes.js.map +0 -1
- package/lib/esm/src/config/model/ContextModuleConfig.d.ts +0 -9
- package/lib/esm/src/config/model/ContextModuleConfig.d.ts.map +0 -1
- package/lib/esm/src/config/model/ContextModuleConfig.js +0 -2
- package/lib/esm/src/config/model/ContextModuleConfig.js.map +0 -1
- package/lib/esm/src/di.d.ts +0 -8
- package/lib/esm/src/di.d.ts.map +0 -1
- package/lib/esm/src/di.js +0 -13
- package/lib/esm/src/di.js.map +0 -1
- package/lib/esm/src/external-plugin/data/DAppDto.d.ts +0 -38
- package/lib/esm/src/external-plugin/data/DAppDto.d.ts.map +0 -1
- package/lib/esm/src/external-plugin/data/DAppDto.js +0 -2
- package/lib/esm/src/external-plugin/data/DAppDto.js.map +0 -1
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts +0 -12
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +0 -1
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js +0 -2
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js.map +0 -1
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +0 -10
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +0 -1
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js +0 -77
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js.map +0 -1
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts +0 -3
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +0 -1
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js +0 -9
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js.map +0 -1
- package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts +0 -5
- package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts.map +0 -1
- package/lib/esm/src/external-plugin/di/externalPluginTypes.js +0 -5
- package/lib/esm/src/external-plugin/di/externalPluginTypes.js.map +0 -1
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts +0 -15
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +0 -1
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js +0 -133
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js.map +0 -1
- package/lib/esm/src/external-plugin/model/DappInfos.d.ts +0 -6
- package/lib/esm/src/external-plugin/model/DappInfos.d.ts.map +0 -1
- package/lib/esm/src/external-plugin/model/DappInfos.js +0 -2
- package/lib/esm/src/external-plugin/model/DappInfos.js.map +0 -1
- package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts +0 -8
- package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts.map +0 -1
- package/lib/esm/src/external-plugin/model/SelectorDetails.js +0 -2
- package/lib/esm/src/external-plugin/model/SelectorDetails.js.map +0 -1
- package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts +0 -9
- package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +0 -1
- package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js +0 -2
- package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js.map +0 -1
- package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts +0 -6
- package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +0 -1
- package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js +0 -34
- package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js.map +0 -1
- package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts +0 -3
- package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +0 -1
- package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js +0 -9
- package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js.map +0 -1
- package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts +0 -5
- package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts.map +0 -1
- package/lib/esm/src/forward-domain/di/forwardDomainTypes.js +0 -5
- package/lib/esm/src/forward-domain/di/forwardDomainTypes.js.map +0 -1
- package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts +0 -11
- package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +0 -1
- package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js +0 -63
- package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js.map +0 -1
- package/lib/esm/src/index.d.ts +0 -14
- package/lib/esm/src/index.d.ts.map +0 -1
- package/lib/esm/src/index.js +0 -14
- package/lib/esm/src/index.js.map +0 -1
- package/lib/esm/src/nft/data/HttpNftDataSource.d.ts +0 -7
- package/lib/esm/src/nft/data/HttpNftDataSource.d.ts.map +0 -1
- package/lib/esm/src/nft/data/HttpNftDataSource.js +0 -51
- package/lib/esm/src/nft/data/HttpNftDataSource.js.map +0 -1
- package/lib/esm/src/nft/data/NftDataSource.d.ts +0 -15
- package/lib/esm/src/nft/data/NftDataSource.d.ts.map +0 -1
- package/lib/esm/src/nft/data/NftDataSource.js +0 -2
- package/lib/esm/src/nft/data/NftDataSource.js.map +0 -1
- package/lib/esm/src/nft/di/nftModuleFactory.d.ts +0 -3
- package/lib/esm/src/nft/di/nftModuleFactory.d.ts.map +0 -1
- package/lib/esm/src/nft/di/nftModuleFactory.js +0 -9
- package/lib/esm/src/nft/di/nftModuleFactory.js.map +0 -1
- package/lib/esm/src/nft/di/nftTypes.d.ts +0 -5
- package/lib/esm/src/nft/di/nftTypes.d.ts.map +0 -1
- package/lib/esm/src/nft/di/nftTypes.js +0 -5
- package/lib/esm/src/nft/di/nftTypes.js.map +0 -1
- package/lib/esm/src/nft/domain/NftContextLoader.d.ts +0 -11
- package/lib/esm/src/nft/domain/NftContextLoader.d.ts.map +0 -1
- package/lib/esm/src/nft/domain/NftContextLoader.js +0 -108
- package/lib/esm/src/nft/domain/NftContextLoader.js.map +0 -1
- package/lib/esm/src/shared/domain/ContextLoader.d.ts +0 -6
- package/lib/esm/src/shared/domain/ContextLoader.d.ts.map +0 -1
- package/lib/esm/src/shared/domain/ContextLoader.js +0 -2
- package/lib/esm/src/shared/domain/ContextLoader.js.map +0 -1
- package/lib/esm/src/shared/model/ClearSignContext.d.ts +0 -21
- package/lib/esm/src/shared/model/ClearSignContext.d.ts.map +0 -1
- package/lib/esm/src/shared/model/ClearSignContext.js +0 -10
- package/lib/esm/src/shared/model/ClearSignContext.js.map +0 -1
- package/lib/esm/src/shared/model/TransactionContext.d.ts +0 -6
- package/lib/esm/src/shared/model/TransactionContext.d.ts.map +0 -1
- package/lib/esm/src/shared/model/TransactionContext.js +0 -2
- package/lib/esm/src/shared/model/TransactionContext.js.map +0 -1
- package/lib/esm/src/shared/model/TransactionSubset.d.ts +0 -6
- package/lib/esm/src/shared/model/TransactionSubset.d.ts.map +0 -1
- package/lib/esm/src/shared/model/TransactionSubset.js +0 -2
- package/lib/esm/src/shared/model/TransactionSubset.js.map +0 -1
- package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts +0 -33
- package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts.map +0 -1
- package/lib/esm/src/shared/model/TypedDataClearSignContext.js +0 -3
- package/lib/esm/src/shared/model/TypedDataClearSignContext.js.map +0 -1
- package/lib/esm/src/shared/model/TypedDataContext.d.ts +0 -16
- package/lib/esm/src/shared/model/TypedDataContext.d.ts.map +0 -1
- package/lib/esm/src/shared/model/TypedDataContext.js +0 -2
- package/lib/esm/src/shared/model/TypedDataContext.js.map +0 -1
- package/lib/esm/src/shared/utils/HexStringUtils.d.ts +0 -4
- package/lib/esm/src/shared/utils/HexStringUtils.d.ts.map +0 -1
- package/lib/esm/src/shared/utils/HexStringUtils.js +0 -11
- package/lib/esm/src/shared/utils/HexStringUtils.js.map +0 -1
- package/lib/esm/src/token/data/HttpTokenDataSource.d.ts +0 -9
- package/lib/esm/src/token/data/HttpTokenDataSource.d.ts.map +0 -1
- package/lib/esm/src/token/data/HttpTokenDataSource.js +0 -77
- package/lib/esm/src/token/data/HttpTokenDataSource.js.map +0 -1
- package/lib/esm/src/token/data/TokenDataSource.d.ts +0 -9
- package/lib/esm/src/token/data/TokenDataSource.d.ts.map +0 -1
- package/lib/esm/src/token/data/TokenDataSource.js +0 -2
- package/lib/esm/src/token/data/TokenDataSource.js.map +0 -1
- package/lib/esm/src/token/data/TokenDto.d.ts +0 -6
- package/lib/esm/src/token/data/TokenDto.d.ts.map +0 -1
- package/lib/esm/src/token/data/TokenDto.js +0 -2
- package/lib/esm/src/token/data/TokenDto.js.map +0 -1
- package/lib/esm/src/token/di/tokenModuleFactory.d.ts +0 -3
- package/lib/esm/src/token/di/tokenModuleFactory.d.ts.map +0 -1
- package/lib/esm/src/token/di/tokenModuleFactory.js +0 -9
- package/lib/esm/src/token/di/tokenModuleFactory.js.map +0 -1
- package/lib/esm/src/token/di/tokenTypes.d.ts +0 -5
- package/lib/esm/src/token/di/tokenTypes.d.ts.map +0 -1
- package/lib/esm/src/token/di/tokenTypes.js +0 -5
- package/lib/esm/src/token/di/tokenTypes.js.map +0 -1
- package/lib/esm/src/token/domain/TokenContextLoader.d.ts +0 -15
- package/lib/esm/src/token/domain/TokenContextLoader.d.ts.map +0 -1
- package/lib/esm/src/token/domain/TokenContextLoader.js +0 -71
- package/lib/esm/src/token/domain/TokenContextLoader.js.map +0 -1
- package/lib/esm/src/typed-data/data/FiltersDto.d.ts.map +0 -1
- package/lib/esm/src/typed-data/data/FiltersDto.js +0 -2
- package/lib/esm/src/typed-data/data/FiltersDto.js.map +0 -1
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts +0 -14
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +0 -1
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js +0 -157
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js.map +0 -1
- package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts +0 -17
- package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts.map +0 -1
- package/lib/esm/src/typed-data/data/TypedDataDataSource.js +0 -2
- package/lib/esm/src/typed-data/data/TypedDataDataSource.js.map +0 -1
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts +0 -3
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts.map +0 -1
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.js +0 -9
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.js.map +0 -1
- package/lib/esm/src/typed-data/di/typedDataTypes.d.ts +0 -5
- package/lib/esm/src/typed-data/di/typedDataTypes.d.ts.map +0 -1
- package/lib/esm/src/typed-data/di/typedDataTypes.js +0 -5
- package/lib/esm/src/typed-data/di/typedDataTypes.js.map +0 -1
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +0 -13
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +0 -1
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js +0 -124
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +0 -1
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts +0 -6
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts.map +0 -1
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js +0 -2
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js.map +0 -1
- package/lib/esm/tsconfig.esm.tsbuildinfo +0 -1
- /package/lib/{cjs → types}/index.d.ts +0 -0
- /package/lib/{cjs → types}/index.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/ContextModule.d.ts +0 -0
- /package/lib/{cjs → types}/src/ContextModule.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/ContextModuleBuilder.d.ts +0 -0
- /package/lib/{cjs → types}/src/ContextModuleBuilder.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/DefaultContextModule.d.ts +0 -0
- /package/lib/{cjs → types}/src/DefaultContextModule.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/config/di/configModuleFactory.d.ts +0 -0
- /package/lib/{cjs → types}/src/config/di/configModuleFactory.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/config/di/configTypes.d.ts +0 -0
- /package/lib/{cjs → types}/src/config/di/configTypes.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/di.d.ts +0 -0
- /package/lib/{cjs → types}/src/di.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/external-plugin/data/DAppDto.d.ts +0 -0
- /package/lib/{cjs → types}/src/external-plugin/data/DAppDto.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/external-plugin/data/ExternalPluginDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/external-plugin/di/externalPluginModuleFactory.d.ts +0 -0
- /package/lib/{cjs → types}/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/external-plugin/di/externalPluginTypes.d.ts +0 -0
- /package/lib/{cjs → types}/src/external-plugin/di/externalPluginTypes.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/external-plugin/domain/ExternalPluginContextLoader.d.ts +0 -0
- /package/lib/{cjs → types}/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/external-plugin/model/DappInfos.d.ts +0 -0
- /package/lib/{cjs → types}/src/external-plugin/model/DappInfos.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/external-plugin/model/SelectorDetails.d.ts +0 -0
- /package/lib/{cjs → types}/src/external-plugin/model/SelectorDetails.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/forward-domain/data/ForwardDomainDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/forward-domain/data/HttpForwardDomainDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/forward-domain/di/forwardDomainModuleFactory.d.ts +0 -0
- /package/lib/{cjs → types}/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/forward-domain/di/forwardDomainTypes.d.ts +0 -0
- /package/lib/{cjs → types}/src/forward-domain/di/forwardDomainTypes.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/forward-domain/domain/ForwardDomainContextLoader.d.ts +0 -0
- /package/lib/{cjs → types}/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/nft/data/HttpNftDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/nft/data/HttpNftDataSource.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/nft/data/NftDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/nft/data/NftDataSource.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/nft/di/nftModuleFactory.d.ts +0 -0
- /package/lib/{cjs → types}/src/nft/di/nftModuleFactory.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/nft/di/nftTypes.d.ts +0 -0
- /package/lib/{cjs → types}/src/nft/di/nftTypes.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/nft/domain/NftContextLoader.d.ts +0 -0
- /package/lib/{cjs → types}/src/nft/domain/NftContextLoader.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/shared/domain/ContextLoader.d.ts +0 -0
- /package/lib/{cjs → types}/src/shared/domain/ContextLoader.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/shared/model/ClearSignContext.d.ts +0 -0
- /package/lib/{cjs → types}/src/shared/model/ClearSignContext.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/shared/model/TransactionContext.d.ts +0 -0
- /package/lib/{cjs → types}/src/shared/model/TransactionContext.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/shared/model/TransactionSubset.d.ts +0 -0
- /package/lib/{cjs → types}/src/shared/model/TransactionSubset.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/shared/model/TypedDataClearSignContext.d.ts +0 -0
- /package/lib/{cjs → types}/src/shared/model/TypedDataClearSignContext.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/shared/model/TypedDataContext.d.ts +0 -0
- /package/lib/{cjs → types}/src/shared/model/TypedDataContext.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/shared/utils/HexStringUtils.d.ts +0 -0
- /package/lib/{cjs → types}/src/shared/utils/HexStringUtils.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/token/data/HttpTokenDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/token/data/TokenDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/token/data/TokenDataSource.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/token/di/tokenModuleFactory.d.ts +0 -0
- /package/lib/{cjs → types}/src/token/di/tokenModuleFactory.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/token/di/tokenTypes.d.ts +0 -0
- /package/lib/{cjs → types}/src/token/di/tokenTypes.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/token/domain/TokenContextLoader.d.ts +0 -0
- /package/lib/{cjs → types}/src/token/domain/TokenContextLoader.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/typed-data/data/HttpTypedDataDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/typed-data/data/TypedDataDataSource.d.ts +0 -0
- /package/lib/{cjs → types}/src/typed-data/data/TypedDataDataSource.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/typed-data/di/typedDataModuleFactory.d.ts +0 -0
- /package/lib/{cjs → types}/src/typed-data/di/typedDataModuleFactory.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/typed-data/di/typedDataTypes.d.ts +0 -0
- /package/lib/{cjs → types}/src/typed-data/di/typedDataTypes.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +0 -0
- /package/lib/{cjs → types}/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +0 -0
- /package/lib/{cjs → types}/src/typed-data/domain/TypedDataContextLoader.d.ts +0 -0
- /package/lib/{cjs → types}/src/typed-data/domain/TypedDataContextLoader.d.ts.map +0 -0
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../index.ts", "../../src/external-plugin/di/externalPluginTypes.ts", "../../src/forward-domain/di/forwardDomainTypes.ts", "../../src/nft/di/nftTypes.ts", "../../src/token/di/tokenTypes.ts", "../../src/typed-data/di/typedDataTypes.ts", "../../src/DefaultContextModule.ts", "../../src/di.ts", "../../src/config/di/configModuleFactory.ts", "../../src/config/di/configTypes.ts", "../../src/external-plugin/di/externalPluginModuleFactory.ts", "../../src/external-plugin/data/HttpExternalPluginDataSource.ts", "../../package.json", "../../src/external-plugin/domain/ExternalPluginContextLoader.ts", "../../src/shared/model/ClearSignContext.ts", "../../src/forward-domain/di/forwardDomainModuleFactory.ts", "../../src/forward-domain/data/HttpForwardDomainDataSource.ts", "../../src/forward-domain/domain/ForwardDomainContextLoader.ts", "../../src/nft/di/nftModuleFactory.ts", "../../src/nft/data/HttpNftDataSource.ts", "../../src/nft/domain/NftContextLoader.ts", "../../src/token/di/tokenModuleFactory.ts", "../../src/token/data/HttpTokenDataSource.ts", "../../src/token/domain/TokenContextLoader.ts", "../../src/typed-data/di/typedDataModuleFactory.ts", "../../src/typed-data/data/HttpTypedDataDataSource.ts", "../../src/typed-data/domain/DefaultTypedDataContextLoader.ts", "../../src/shared/model/TypedDataClearSignContext.ts", "../../src/ContextModuleBuilder.ts"],
|
|
4
|
+
"sourcesContent": ["// inversify requirement\nimport \"reflect-metadata\";\n\nexport * from \"./src/index\";\n", "export const externalPluginTypes = {\n ExternalPluginDataSource: Symbol.for(\"externalPluginDataSource\"),\n ExternalPluginContextLoader: Symbol.for(\"externalPluginContextLoader\"),\n};\n", "export const forwardDomainTypes = {\n ForwardDomainDataSource: Symbol.for(\"forwardDomainDataSource\"),\n ForwardDomainContextLoader: Symbol.for(\"forwardDomainContextLoader\"),\n};\n", "export const nftTypes = {\n NftDataSource: Symbol.for(\"nftDataSource\"),\n NftContextLoader: Symbol.for(\"nftContextLoader\"),\n};\n", "export const tokenTypes = {\n TokenDataSource: Symbol.for(\"TokenDataSource\"),\n TokenContextLoader: Symbol.for(\"TokenContextLoader\"),\n};\n", "export const typedDataTypes = {\n TypedDataDataSource: Symbol.for(\"TypedDataDataSource\"),\n TypedDataContextLoader: Symbol.for(\"TypedDataContextLoader\"),\n};\n", "import type { TypedDataClearSignContext } from \"@/shared/model/TypedDataClearSignContext\";\nimport type { TypedDataContext } from \"@/shared/model/TypedDataContext\";\n\nimport { ContextLoader } from \"./shared/domain/ContextLoader\";\nimport { ClearSignContext } from \"./shared/model/ClearSignContext\";\nimport { TransactionContext } from \"./shared/model/TransactionContext\";\nimport type { TypedDataContextLoader } from \"./typed-data/domain/TypedDataContextLoader\";\nimport { ContextModule } from \"./ContextModule\";\n\ntype DefaultContextModuleConstructorArgs = {\n loaders: ContextLoader[];\n typedDataLoader: TypedDataContextLoader;\n};\n\nexport class DefaultContextModule implements ContextModule {\n private _loaders: ContextLoader[];\n private _typedDataLoader: TypedDataContextLoader;\n\n constructor(args: DefaultContextModuleConstructorArgs) {\n this._loaders = args.loaders;\n this._typedDataLoader = args.typedDataLoader;\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 getTypedDataFilters(\n typedData: TypedDataContext,\n ): Promise<TypedDataClearSignContext> {\n return this._typedDataLoader.load(typedData);\n }\n}\n", "import { Container } from \"inversify\";\n\nimport { configModuleFactory } from \"@/config/di/configModuleFactory\";\nimport { ContextModuleConfig } from \"@/config/model/ContextModuleConfig\";\nimport { externalPluginModuleFactory } from \"@/external-plugin/di/externalPluginModuleFactory\";\nimport { forwardDomainModuleFactory } from \"@/forward-domain/di/forwardDomainModuleFactory\";\nimport { nftModuleFactory } from \"@/nft/di/nftModuleFactory\";\nimport { tokenModuleFactory } from \"@/token/di/tokenModuleFactory\";\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 forwardDomainModuleFactory(),\n nftModuleFactory(),\n tokenModuleFactory(),\n typedDataModuleFactory(),\n );\n\n return container;\n};\n", "import { ContainerModule } from \"inversify\";\n\nimport { 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", "export const configTypes = {\n Config: Symbol.for(\"config\"),\n};\n", "import { ContainerModule } from \"inversify\";\n\nimport { HttpExternalPluginDataSource } from \"@/external-plugin/data/HttpExternalPluginDataSource\";\nimport { externalPluginTypes } from \"@/external-plugin/di/externalPluginTypes\";\nimport { ExternalPluginContextLoader } from \"@/external-plugin/domain/ExternalPluginContextLoader\";\n\nexport const externalPluginModuleFactory = () =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind(externalPluginTypes.ExternalPluginDataSource).to(\n HttpExternalPluginDataSource,\n );\n bind(externalPluginTypes.ExternalPluginContextLoader).to(\n ExternalPluginContextLoader,\n );\n });\n", "import axios from \"axios\";\nimport { inject, injectable } from \"inversify\";\nimport { Either, Left, Right } from \"purify-ts\";\n\nimport { configTypes } from \"@/config/di/configTypes\";\nimport type { ContextModuleConfig } from \"@/config/model/ContextModuleConfig\";\nimport { DAppDto } from \"@/external-plugin/data/DAppDto\";\nimport {\n ExternalPluginDataSource,\n GetDappInfos,\n} from \"@/external-plugin/data/ExternalPluginDataSource\";\nimport { DappInfos } from \"@/external-plugin/model/DappInfos\";\nimport { SelectorDetails } from \"@/external-plugin/model/SelectorDetails\";\nimport PACKAGE from \"@root/package.json\";\n\n@injectable()\nexport class HttpExternalPluginDataSource implements ExternalPluginDataSource {\n constructor(\n @inject(configTypes.Config) private readonly config: ContextModuleConfig,\n ) {}\n\n async getDappInfos({\n chainId,\n address,\n selector,\n }: GetDappInfos): Promise<Either<Error, DappInfos | undefined>> {\n try {\n const dappInfos = await axios.request<DAppDto[]>({\n method: \"GET\",\n url: `${this.config.cal.url}/dapps`,\n params: {\n output: \"b2c,b2c_signatures,abis\",\n chain_id: chainId,\n contracts: address,\n },\n headers: {\n \"X-Ledger-Client-Version\": `context-module/${PACKAGE.version}`,\n },\n });\n\n if (!dappInfos.data[0]) {\n return Right(undefined);\n }\n\n // Normalize the address and selector\n address = address.toLowerCase();\n selector = `0x${selector.slice(2).toLowerCase()}`;\n\n const { erc20OfInterest, method, plugin } =\n dappInfos.data[0].b2c?.contracts?.find((c) => c.address === address)\n ?.selectors?.[selector] || {};\n const { signature, serialized_data: serializedData } =\n dappInfos.data[0].b2c_signatures?.[address]?.[selector] || {};\n\n if (\n !erc20OfInterest ||\n !method ||\n !plugin ||\n !signature ||\n !serializedData\n ) {\n return Right(undefined);\n }\n\n const abi = dappInfos.data[0].abis?.[address];\n\n if (!abi) {\n return Right(undefined);\n }\n\n const selectorDetails: SelectorDetails = {\n method,\n plugin,\n erc20OfInterest,\n signature,\n serializedData,\n };\n\n return Right({ selectorDetails, abi });\n } catch (_error) {\n return Left(\n new Error(\n \"[ContextModule] HttpExternalPluginDataSource: Error fetching dapp infos\",\n ),\n );\n }\n }\n}\n", "{\n \"name\": \"@ledgerhq/context-module\",\n \"version\": \"1.0.0\",\n \"license\": \"MIT\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/types/index.d.ts\",\n \"import\": \"./lib/esm/index.js\",\n \"require\": \"./lib/cjs/index.js\"\n },\n \"./*\": {\n \"types\": \"./lib/types/*\"\n }\n },\n \"files\": [\n \"./lib\"\n ],\n \"scripts\": {\n \"prebuild\": \"rimraf lib\",\n \"build\": \"pnpm lmdk-build --entryPoints index.ts --tsconfig tsconfig.prod.json\",\n \"dev\": \"concurrently \\\"pnpm watch:builds\\\" \\\"pnpm watch:types\\\"\",\n \"watch:builds\": \"pnpm lmdk-watch --entryPoints index.ts --tsconfig tsconfig.prod.json\",\n \"watch:types\": \"concurrently \\\"tsc --watch -p tsconfig.prod.json\\\" \\\"tsc-alias --watch -p tsconfig.prod.json\\\"\",\n \"lint\": \"eslint\",\n \"lint:fix\": \"pnpm lint --fix\",\n \"postpack\": \"find . -name '*.tgz' -exec cp {} ../../../dist/ \\\\; \",\n \"prettier\": \"prettier . --check\",\n \"prettier:fix\": \"prettier . --write\",\n \"test\": \"jest\",\n \"test:watch\": \"pnpm test -- --watch\",\n \"test:coverage\": \"pnpm test -- --coverage\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"devDependencies\": {\n \"@ledgerhq/esbuild-tools\": \"workspace:*\",\n \"@ledgerhq/device-management-kit\": \"workspace:*\",\n \"@ledgerhq/eslint-config-dsdk\": \"workspace:*\",\n \"@ledgerhq/jest-config-dsdk\": \"workspace:*\",\n \"@ledgerhq/prettier-config-dsdk\": \"workspace:*\",\n \"@ledgerhq/tsconfig-dsdk\": \"workspace:*\",\n \"@types/crypto-js\": \"^4.2.2\",\n \"ts-node\": \"^10.9.2\"\n },\n \"dependencies\": {\n \"axios\": \"^1.7.7\",\n \"crypto-js\": \"^4.2.0\",\n \"ethers\": \"^6.13.2\",\n \"inversify\": \"^6.0.2\",\n \"purify-ts\": \"^2.1.0\",\n \"reflect-metadata\": \"^0.2.2\"\n },\n \"peerDependencies\": {\n \"@ledgerhq/device-management-kit\": \"workspace:*\"\n }\n}\n", "import { HexaString, isHexaString } from \"@ledgerhq/device-management-kit\";\nimport { ethers, Interface } from \"ethers\";\nimport { inject, injectable } from \"inversify\";\nimport { Either, EitherAsync, Left, Right } from \"purify-ts\";\n\nimport type { ExternalPluginDataSource } from \"@/external-plugin/data/ExternalPluginDataSource\";\nimport { externalPluginTypes } from \"@/external-plugin/di/externalPluginTypes\";\nimport { ContextLoader } from \"@/shared/domain/ContextLoader\";\nimport {\n ClearSignContext,\n ClearSignContextType,\n} from \"@/shared/model/ClearSignContext\";\nimport { TransactionContext } from \"@/shared/model/TransactionContext\";\nimport type { TokenDataSource } from \"@/token/data/TokenDataSource\";\nimport { tokenTypes } from \"@/token/di/tokenTypes\";\n\n@injectable()\nexport class ExternalPluginContextLoader implements ContextLoader {\n private _externalPluginDataSource: ExternalPluginDataSource;\n private _tokenDataSource: TokenDataSource;\n\n constructor(\n @inject(externalPluginTypes.ExternalPluginDataSource)\n externalPluginDataSource: ExternalPluginDataSource,\n @inject(tokenTypes.TokenDataSource) tokenDataSource: TokenDataSource,\n ) {\n this._externalPluginDataSource = externalPluginDataSource;\n this._tokenDataSource = tokenDataSource;\n }\n\n async load(transaction: TransactionContext): Promise<ClearSignContext[]> {\n if (!transaction.to || !transaction.data || transaction.data === \"0x\") {\n return [];\n }\n\n const selector = transaction.data.slice(0, 10);\n\n if (!isHexaString(selector)) {\n return [\n {\n type: ClearSignContextType.ERROR,\n error: new Error(\"Invalid selector\"),\n },\n ];\n }\n\n const eitherDappInfos = await this._externalPluginDataSource.getDappInfos({\n address: transaction.to,\n chainId: transaction.chainId,\n selector,\n });\n\n return EitherAsync<Error, ClearSignContext[]>(async ({ liftEither }) => {\n const dappInfos = await liftEither(eitherDappInfos);\n\n // if the dappInfos is null, return an empty array\n // this means that the selector is not a known selector\n if (!dappInfos) {\n return [];\n }\n\n const externalPluginContext: ClearSignContext = {\n type: ClearSignContextType.EXTERNAL_PLUGIN,\n payload: dappInfos.selectorDetails.serializedData.concat(\n dappInfos.selectorDetails.signature,\n ),\n };\n\n const decodedCallData = this.getDecodedCallData(\n dappInfos.abi,\n dappInfos.selectorDetails.method,\n transaction.data!, // trasaction.data is not null and not infered correctly\n );\n\n // if the call data cannot be decoded, return the error\n // but also the externalPluginContext because it is still valid\n if (decodedCallData.isLeft()) {\n return [\n {\n type: ClearSignContextType.ERROR,\n error: decodedCallData.extract(),\n },\n externalPluginContext,\n ];\n }\n\n // decodedCallData is a Right so we can extract it safely\n const extractedDecodedCallData =\n decodedCallData.extract() as ethers.Result;\n\n // get the token payload for each erc20OfInterest\n // and return the payload or the error\n const promises = dappInfos.selectorDetails.erc20OfInterest.map(\n async (erc20Path) =>\n this.getTokenPayload(\n transaction,\n erc20Path,\n extractedDecodedCallData,\n ),\n );\n\n const tokensPayload = await Promise.all(promises);\n\n // map the payload or the error to a ClearSignContext\n const contexts: ClearSignContext[] = tokensPayload.map((eitherToken) =>\n eitherToken.caseOf<ClearSignContext>({\n Left: (error) => ({ type: ClearSignContextType.ERROR, error }),\n Right: (payload) => ({ type: ClearSignContextType.TOKEN, payload }),\n }),\n );\n\n return [...contexts, externalPluginContext];\n }).caseOf<ClearSignContext[]>({\n // parse all errors into ClearSignContext\n Left: (error) => [{ type: ClearSignContextType.ERROR, error }],\n Right: (contexts) => contexts,\n });\n }\n\n private getTokenPayload(\n transaction: TransactionContext,\n erc20Path: string,\n decodedCallData: ethers.Result,\n ) {\n const address = this.getAddressFromPath(erc20Path, decodedCallData);\n\n return EitherAsync<Error, string>(({ fromPromise }) =>\n fromPromise(\n this._tokenDataSource.getTokenInfosPayload({\n address,\n chainId: transaction.chainId,\n }),\n ),\n );\n }\n\n private getDecodedCallData(\n abi: object[],\n method: string,\n data: string,\n ): Either<Error, ethers.Result> {\n try {\n const contractInterface = new Interface(abi);\n return Right(contractInterface.decodeFunctionData(method, data));\n } catch (_error) {\n return Left(\n new Error(\n \"[ContextModule] ExternalPluginContextLoader: Unable to parse abi\",\n ),\n );\n }\n }\n\n private getAddressFromPath(\n path: string,\n decodedCallData: ethers.Result,\n ): HexaString {\n // ethers.Result is a record string, any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let value: any = decodedCallData;\n for (const key of path.split(\".\")) {\n // In Solidity, a struct cannot begin with a number\n // Additionally, when we use -1, it signifies the last element of the array.\n if (key === \"-1\") {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n value = value[value.length - 1];\n } else {\n // This access can throw a RangeError error in case of an invalid key\n // but is correctly caught by the liftEither above\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n value = value[key];\n }\n }\n\n if (!isHexaString(value)) {\n throw new Error(\n \"[ContextModule] ExternalPluginContextLoader: Unable to get address\",\n );\n }\n\n return value;\n }\n}\n", "export enum ClearSignContextType {\n TOKEN = \"token\",\n NFT = \"nft\",\n DOMAIN_NAME = \"domainName\",\n PLUGIN = \"plugin\",\n EXTERNAL_PLUGIN = \"externalPlugin\",\n ERROR = \"error\",\n}\n\nexport type ClearSignContextSuccess = {\n type: Exclude<ClearSignContextType, ClearSignContextType.ERROR>;\n /**\n * Hexadecimal string representation of the payload.\n */\n payload: string;\n};\n\nexport type ClearSignContextError = {\n type: ClearSignContextType.ERROR;\n error: Error;\n};\n\nexport type ClearSignContext = ClearSignContextSuccess | ClearSignContextError;\n", "import { ContainerModule } from \"inversify\";\n\nimport { HttpForwardDomainDataSource } from \"@/forward-domain/data/HttpForwardDomainDataSource\";\nimport { forwardDomainTypes } from \"@/forward-domain/di/forwardDomainTypes\";\nimport { ForwardDomainContextLoader } from \"@/forward-domain/domain/ForwardDomainContextLoader\";\n\nexport const forwardDomainModuleFactory = () =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind(forwardDomainTypes.ForwardDomainDataSource).to(\n HttpForwardDomainDataSource,\n );\n bind(forwardDomainTypes.ForwardDomainContextLoader).to(\n ForwardDomainContextLoader,\n );\n });\n", "import axios from \"axios\";\nimport { injectable } from \"inversify\";\nimport { Either, Left, Right } from \"purify-ts\";\n\nimport {\n ForwardDomainDataSource,\n GetForwardDomainInfosParams,\n} from \"@/forward-domain/data/ForwardDomainDataSource\";\nimport PACKAGE from \"@root/package.json\";\n\n@injectable()\nexport class HttpForwardDomainDataSource implements ForwardDomainDataSource {\n public async getDomainNamePayload({\n domain,\n challenge,\n }: GetForwardDomainInfosParams): Promise<Either<Error, string>> {\n try {\n const response = await axios.request<{ payload: string }>({\n method: \"GET\",\n url: `https://nft.api.live.ledger.com/v1/names/ens/forward/${domain}?challenge=${challenge}`,\n headers: {\n \"X-Ledger-Client-Version\": `context-module/${PACKAGE.version}`,\n },\n });\n\n return response.data.payload\n ? Right(response.data.payload)\n : Left(\n new Error(\n \"[ContextModule] HttpForwardDomainDataSource: error getting domain payload\",\n ),\n );\n } catch (_error) {\n return Left(\n new Error(\n \"[ContextModule] HttpForwardDomainDataSource: Failed to fetch domain name\",\n ),\n );\n }\n }\n}\n", "import { inject, injectable } from \"inversify\";\n\nimport type { ForwardDomainDataSource } from \"@/forward-domain/data/ForwardDomainDataSource\";\nimport { forwardDomainTypes } from \"@/forward-domain/di/forwardDomainTypes\";\nimport { ContextLoader } from \"@/shared/domain/ContextLoader\";\nimport {\n ClearSignContext,\n ClearSignContextType,\n} from \"@/shared/model/ClearSignContext\";\nimport { TransactionContext } from \"@/shared/model/TransactionContext\";\n\n@injectable()\nexport class ForwardDomainContextLoader implements ContextLoader {\n private _dataSource: ForwardDomainDataSource;\n\n constructor(\n @inject(forwardDomainTypes.ForwardDomainDataSource)\n dataSource: ForwardDomainDataSource,\n ) {\n this._dataSource = dataSource;\n }\n\n async load(\n transactionContext: TransactionContext,\n ): Promise<ClearSignContext[]> {\n const { domain, challenge } = transactionContext;\n\n if (!domain) {\n return [];\n }\n\n if (!this.isDomainValid(domain)) {\n return [\n {\n type: ClearSignContextType.ERROR,\n error: new Error(\n \"[ContextModule] ForwardDomainLoader: invalid domain\",\n ),\n },\n ];\n }\n\n const payload = await this._dataSource.getDomainNamePayload({\n domain: domain,\n challenge: challenge,\n });\n\n return [\n payload.caseOf({\n Left: (error): ClearSignContext => ({\n type: ClearSignContextType.ERROR,\n error: error,\n }),\n Right: (value): ClearSignContext => ({\n type: ClearSignContextType.DOMAIN_NAME,\n payload: value,\n }),\n }),\n ];\n }\n\n private isDomainValid(domain: string) {\n const lengthIsValid = domain.length > 0 && Number(domain.length) < 30;\n const containsOnlyValidChars = new RegExp(\"^[a-zA-Z0-9\\\\-\\\\_\\\\.]+$\").test(\n domain,\n );\n\n return lengthIsValid && containsOnlyValidChars;\n }\n}\n", "import { ContainerModule } from \"inversify\";\n\nimport { HttpNftDataSource } from \"@/nft/data/HttpNftDataSource\";\nimport { nftTypes } from \"@/nft/di/nftTypes\";\nimport { NftContextLoader } from \"@/nft/domain/NftContextLoader\";\n\nexport const nftModuleFactory = () =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind(nftTypes.NftDataSource).to(HttpNftDataSource);\n bind(nftTypes.NftContextLoader).to(NftContextLoader);\n });\n", "import axios from \"axios\";\nimport { injectable } from \"inversify\";\nimport { Either, Left, Right } from \"purify-ts\";\n\nimport {\n GetNftInformationsParams,\n GetSetPluginPayloadParams,\n NftDataSource,\n} from \"@/nft/data/NftDataSource\";\nimport PACKAGE from \"@root/package.json\";\n\n@injectable()\nexport class HttpNftDataSource implements NftDataSource {\n public async getSetPluginPayload({\n chainId,\n address,\n selector,\n }: GetSetPluginPayloadParams): Promise<Either<Error, string>> {\n try {\n const response = await axios.request<{ payload: string }>({\n method: \"GET\",\n url: `https://nft.api.live.ledger.com/v1/ethereum/${chainId}/contracts/${address}/plugin-selector/${selector}`,\n headers: {\n \"X-Ledger-Client-Version\": `context-module/${PACKAGE.version}`,\n },\n });\n\n return response.data.payload\n ? Right(response.data.payload)\n : Left(\n new Error(\n \"[ContextModule] HttpNftDataSource: unexpected empty response\",\n ),\n );\n } catch (_error) {\n return Left(\n new Error(\n \"[ContextModule] HttpNftDataSource: Failed to fetch set plugin payload\",\n ),\n );\n }\n }\n\n public async getNftInfosPayload({\n chainId,\n address,\n }: GetNftInformationsParams): Promise<Either<Error, string>> {\n try {\n const response = await axios.request<{ payload: string }>({\n method: \"GET\",\n url: `https://nft.api.live.ledger.com/v1/ethereum/${chainId}/contracts/${address}`,\n headers: {\n \"X-Ledger-Client-Version\": `context-module/${PACKAGE.version}`,\n },\n });\n\n return response.data.payload\n ? Right(response.data.payload)\n : Left(new Error(\"[ContextModule] HttpNftDataSource: no nft metadata\"));\n } catch (_error) {\n return Left(\n new Error(\n \"[ContextModule] HttpNftDataSource: Failed to fetch nft informations\",\n ),\n );\n }\n }\n}\n", "import { HexaString, isHexaString } from \"@ledgerhq/device-management-kit\";\nimport { inject, injectable } from \"inversify\";\n\nimport type { NftDataSource } from \"@/nft/data/NftDataSource\";\nimport { nftTypes } from \"@/nft/di/nftTypes\";\nimport { ContextLoader } from \"@/shared/domain/ContextLoader\";\nimport {\n ClearSignContext,\n ClearSignContextType,\n} from \"@/shared/model/ClearSignContext\";\nimport { TransactionContext } from \"@/shared/model/TransactionContext\";\n\nenum ERC721_SUPPORTED_SELECTOR {\n Approve = \"0x095ea7b3\",\n SetApprovalForAll = \"0xa22cb465\",\n TransferFrom = \"0x23b872dd\",\n SafeTransferFrom = \"0x42842e0e\",\n SafeTransferFromWithData = \"0xb88d4fde\",\n}\n\nenum ERC1155_SUPPORTED_SELECTOR {\n SetApprovalForAll = \"0xa22cb465\",\n SafeTransferFrom = \"0xf242432a\",\n SafeBatchTransferFrom = \"0x2eb2c2d6\",\n}\n\nconst SUPPORTED_SELECTORS: HexaString[] = [\n ...Object.values(ERC721_SUPPORTED_SELECTOR),\n ...Object.values(ERC1155_SUPPORTED_SELECTOR),\n];\n\n@injectable()\nexport class NftContextLoader implements ContextLoader {\n private _dataSource: NftDataSource;\n\n constructor(@inject(nftTypes.NftDataSource) dataSource: NftDataSource) {\n this._dataSource = dataSource;\n }\n\n async load(transaction: TransactionContext): Promise<ClearSignContext[]> {\n const responses: ClearSignContext[] = [];\n\n if (!transaction.to || !transaction.data || transaction.data === \"0x\") {\n return [];\n }\n\n const selector = transaction.data.slice(0, 10);\n\n if (!isHexaString(selector)) {\n return [\n {\n type: ClearSignContextType.ERROR,\n error: new Error(\"Invalid selector\"),\n },\n ];\n }\n\n if (!this.isSelectorSupported(selector)) {\n return [];\n }\n\n // EXAMPLE:\n // https://nft.api.live.ledger.com/v1/ethereum/1/contracts/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/plugin-selector/0x095ea7b3\n const getPluginPayloadResponse = await this._dataSource.getSetPluginPayload(\n {\n chainId: transaction.chainId,\n address: transaction.to,\n selector,\n },\n );\n\n const pluginPayload = getPluginPayloadResponse.caseOf({\n Left: (error): ClearSignContext => ({\n type: ClearSignContextType.ERROR,\n error,\n }),\n Right: (value): ClearSignContext => ({\n type: ClearSignContextType.PLUGIN,\n payload: value,\n }),\n });\n\n if (pluginPayload.type === ClearSignContextType.ERROR) {\n return [pluginPayload];\n }\n\n responses.push(pluginPayload);\n\n const getNftInfosPayloadResponse =\n await this._dataSource.getNftInfosPayload({\n chainId: transaction.chainId,\n address: transaction.to,\n });\n\n const nftInfosPayload = getNftInfosPayloadResponse.caseOf({\n Left: (error): ClearSignContext => ({\n type: ClearSignContextType.ERROR,\n error,\n }),\n Right: (value): ClearSignContext => ({\n type: ClearSignContextType.NFT,\n payload: value,\n }),\n });\n\n if (nftInfosPayload.type === ClearSignContextType.ERROR) {\n return [nftInfosPayload];\n }\n\n responses.push(nftInfosPayload);\n\n return responses;\n }\n\n private isSelectorSupported(selector: HexaString) {\n return Object.values(SUPPORTED_SELECTORS).includes(selector);\n }\n}\n", "import { ContainerModule } from \"inversify\";\n\nimport { HttpTokenDataSource } from \"@/token/data/HttpTokenDataSource\";\nimport { tokenTypes } from \"@/token/di/tokenTypes\";\nimport { TokenContextLoader } from \"@/token/domain/TokenContextLoader\";\n\nexport const tokenModuleFactory = () =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind(tokenTypes.TokenDataSource).to(HttpTokenDataSource);\n bind(tokenTypes.TokenContextLoader).to(TokenContextLoader);\n });\n", "import axios from \"axios\";\nimport { inject, injectable } from \"inversify\";\nimport { Either, Left, Right } from \"purify-ts\";\n\nimport { configTypes } from \"@/config/di/configTypes\";\nimport type { ContextModuleConfig } from \"@/config/model/ContextModuleConfig\";\nimport PACKAGE from \"@root/package.json\";\n\nimport { GetTokenInfosParams, TokenDataSource } from \"./TokenDataSource\";\nimport { TokenDto } from \"./TokenDto\";\n\n@injectable()\nexport class HttpTokenDataSource implements TokenDataSource {\n constructor(\n @inject(configTypes.Config) private readonly config: ContextModuleConfig,\n ) {}\n public async getTokenInfosPayload({\n chainId,\n address,\n }: GetTokenInfosParams): Promise<Either<Error, string>> {\n try {\n const response = await axios.request<TokenDto[]>({\n method: \"GET\",\n url: `${this.config.cal.url}/tokens`,\n params: {\n contract_address: address,\n chain_id: chainId,\n output: \"descriptor,ticker\",\n ref: `branch:${this.config.cal.branch}`,\n },\n headers: {\n \"X-Ledger-Client-Version\": `context-module/${PACKAGE.version}`,\n },\n });\n const tokenInfos = response.data?.[0];\n\n if (\n !tokenInfos ||\n !tokenInfos.ticker ||\n !tokenInfos.descriptor ||\n !tokenInfos.descriptor.data ||\n !tokenInfos.descriptor.signatures ||\n typeof tokenInfos.descriptor.signatures[this.config.cal.mode] !==\n \"string\"\n ) {\n return Left(\n new Error(\n `[ContextModule] HttpTokenDataSource: no token metadata for address ${address} on chain ${chainId}`,\n ),\n );\n }\n\n // 1 byte for the length of the ticker\n const tickerLengthBuff = tokenInfos.ticker.length\n .toString(16)\n .padStart(2, \"0\");\n\n return Right(\n [\n tickerLengthBuff,\n tokenInfos.descriptor.data,\n tokenInfos.descriptor.signatures[this.config.cal.mode],\n ].join(\"\"),\n );\n } catch (_error) {\n return Left(\n new Error(\n \"[ContextModule] HttpTokenDataSource: Failed to fetch token informations\",\n ),\n );\n }\n }\n}\n", "import { HexaString, isHexaString } from \"@ledgerhq/device-management-kit\";\nimport { inject, injectable } from \"inversify\";\n\nimport { ContextLoader } from \"@/shared/domain/ContextLoader\";\nimport {\n ClearSignContext,\n ClearSignContextType,\n} from \"@/shared/model/ClearSignContext\";\nimport { TransactionContext } from \"@/shared/model/TransactionContext\";\nimport type { TokenDataSource } from \"@/token/data/TokenDataSource\";\nimport { tokenTypes } from \"@/token/di/tokenTypes\";\n\nexport enum ERC20_SUPPORTED_SELECTORS {\n Approve = \"0x095ea7b3\",\n Transfer = \"0xa9059cbb\",\n}\n\nconst SUPPORTED_SELECTORS: HexaString[] = Object.values(\n ERC20_SUPPORTED_SELECTORS,\n);\n\n@injectable()\nexport class TokenContextLoader implements ContextLoader {\n private _dataSource: TokenDataSource;\n\n constructor(@inject(tokenTypes.TokenDataSource) dataSource: TokenDataSource) {\n this._dataSource = dataSource;\n }\n\n async load(transaction: TransactionContext): Promise<ClearSignContext[]> {\n if (!transaction.to || !transaction.data || transaction.data === \"0x\") {\n return [];\n }\n\n const selector = transaction.data.slice(0, 10);\n\n if (!isHexaString(selector)) {\n return [\n {\n type: ClearSignContextType.ERROR,\n error: new Error(\"Invalid selector\"),\n },\n ];\n }\n\n if (!this.isSelectorSupported(selector)) {\n return [];\n }\n\n const payload = await this._dataSource.getTokenInfosPayload({\n address: transaction.to,\n chainId: transaction.chainId,\n });\n\n return [\n payload.caseOf({\n Left: (error): ClearSignContext => ({\n type: ClearSignContextType.ERROR,\n error,\n }),\n Right: (value): ClearSignContext => ({\n type: ClearSignContextType.TOKEN,\n payload: value,\n }),\n }),\n ];\n }\n\n private isSelectorSupported(selector: HexaString) {\n return Object.values(SUPPORTED_SELECTORS).includes(selector);\n }\n}\n", "import { ContainerModule } from \"inversify\";\n\nimport { HttpTypedDataDataSource } from \"@/typed-data/data/HttpTypedDataDataSource\";\nimport { typedDataTypes } from \"@/typed-data/di/typedDataTypes\";\nimport { DefaultTypedDataContextLoader } from \"@/typed-data/domain/DefaultTypedDataContextLoader\";\n\nexport const typedDataModuleFactory = () =>\n new ContainerModule((bind, _unbind, _isBound, _rebind) => {\n bind(typedDataTypes.TypedDataDataSource).to(HttpTypedDataDataSource);\n bind(typedDataTypes.TypedDataContextLoader).to(\n DefaultTypedDataContextLoader,\n );\n });\n", "import axios from \"axios\";\nimport SHA224 from \"crypto-js/sha224\";\nimport { inject, injectable } from \"inversify\";\nimport { Either, Left, Right } from \"purify-ts\";\n\nimport { configTypes } from \"@/config/di/configTypes\";\nimport type {\n ContextModuleCalMode,\n ContextModuleConfig,\n} from \"@/config/model/ContextModuleConfig\";\nimport type {\n TypedDataFilter,\n TypedDataMessageInfo,\n} from \"@/shared/model/TypedDataClearSignContext\";\nimport type { TypedDataSchema } from \"@/shared/model/TypedDataContext\";\nimport PACKAGE from \"@root/package.json\";\n\nimport type {\n FiltersDto,\n InstructionContractInfo,\n InstructionField,\n InstructionFieldV1,\n InstructionFieldV2,\n InstructionFieldV2WithCoinRef,\n} from \"./FiltersDto\";\nimport {\n GetTypedDataFiltersParams,\n GetTypedDataFiltersResult,\n TypedDataDataSource,\n} from \"./TypedDataDataSource\";\n\n@injectable()\nexport class HttpTypedDataDataSource implements TypedDataDataSource {\n constructor(\n @inject(configTypes.Config) private readonly config: ContextModuleConfig,\n ) {}\n\n public async getTypedDataFilters({\n chainId,\n address,\n schema,\n version,\n }: GetTypedDataFiltersParams): Promise<\n Either<Error, GetTypedDataFiltersResult>\n > {\n let messageInfo: TypedDataMessageInfo | undefined = undefined;\n\n try {\n const response = await axios.request<FiltersDto[]>({\n method: \"GET\",\n url: `${this.config.cal.url}/dapps`,\n params: {\n contracts: address,\n chain_id: chainId,\n output: \"descriptors_eip712\",\n descriptors_eip712_version: version,\n descriptors_eip712: \"<set>\",\n ref: `branch:${this.config.cal.branch}`,\n },\n headers: {\n \"X-Ledger-Client-Version\": `context-module/${PACKAGE.version}`,\n },\n });\n\n // Try to get the filters JSON descriptor, from address and schema hash\n const schemaHash = SHA224(\n JSON.stringify(this.sortTypes(schema)).replace(\" \", \"\"),\n ).toString();\n address = address.toLowerCase();\n const filtersJson =\n response.data?.[0]?.descriptors_eip712?.[address]?.[schemaHash];\n if (!filtersJson) {\n return Left(\n new Error(\n `[ContextModule] HttpTypedDataDataSource: no typed data filters for address ${address} on chain ${chainId} for schema ${schemaHash}`,\n ),\n );\n }\n\n // Parse the message type, if available\n if (!filtersJson.schema || !Array.isArray(filtersJson.instructions)) {\n return Left(\n new Error(\n `[ContextModule] HttpTypedDataDataSource: no message info for address ${address} on chain ${chainId} for schema ${schemaHash}`,\n ),\n );\n }\n\n // Parse all the filters\n const filters: TypedDataFilter[] = [];\n for (const field of filtersJson.instructions) {\n if (this.isInstructionContractInfo(field, this.config.cal.mode)) {\n messageInfo = {\n displayName: field.display_name,\n signature: field.signatures[this.config.cal.mode],\n filtersCount: field.field_mappers_count,\n };\n } else if (\n version === \"v1\" &&\n this.isInstructionFieldV1(field, this.config.cal.mode)\n ) {\n filters.push({\n type: \"raw\",\n displayName: field.display_name,\n path: field.field_path,\n signature: field.signatures[this.config.cal.mode],\n });\n } else if (this.isInstructionFieldV2(field, this.config.cal.mode)) {\n filters.push({\n type: field.format,\n displayName: field.display_name,\n path: field.field_path,\n signature: field.signatures[this.config.cal.mode],\n });\n } else if (\n this.isInstructionFieldV2WithCoinRef(field, this.config.cal.mode)\n ) {\n filters.push({\n type: field.format,\n displayName: field.display_name,\n path: field.field_path,\n signature: field.signatures[this.config.cal.mode],\n tokenIndex: field.coin_ref,\n });\n } else {\n return Left(\n new Error(\n `[ContextModule] HttpTypedDataDataSource: invalid typed data field for address ${address} on chain ${chainId} for schema ${schemaHash}`,\n ),\n );\n }\n }\n\n if (!messageInfo) {\n return Left(\n new Error(\n `[ContextModule] HttpTypedDataDataSource: no message info for address ${address} on chain ${chainId} for schema ${schemaHash}`,\n ),\n );\n }\n\n return Right({ messageInfo, filters });\n } catch (_error) {\n return Left(\n new Error(\n \"[ContextModule] HttpTypedDataDataSource: Failed to fetch typed data informations\",\n ),\n );\n }\n }\n\n private isInstructionFieldV1(\n data: InstructionField,\n mode: ContextModuleCalMode,\n ): data is InstructionFieldV1 & {\n signatures: { [key in ContextModuleCalMode]: string };\n } {\n // NOTE: Currently the backend return the same structure for V1 and V2,\n // so we can't distinguish them here, but we can still check the required fields\n return (\n typeof data === \"object\" &&\n typeof data.display_name === \"string\" &&\n typeof data.field_path === \"string\" &&\n typeof data.signatures === \"object\" &&\n typeof data.signatures[mode] === \"string\"\n );\n }\n\n private isInstructionFieldV2(\n data: InstructionField,\n mode: ContextModuleCalMode,\n ): data is InstructionFieldV2 & {\n signatures: { [key in ContextModuleCalMode]: string };\n } {\n return (\n typeof data === \"object\" &&\n typeof data.display_name === \"string\" &&\n typeof data.field_path === \"string\" &&\n typeof data.signatures === \"object\" &&\n typeof data.signatures[mode] === \"string\" &&\n typeof data.format === \"string\" &&\n [\"raw\", \"datetime\"].includes(data.format) &&\n data.coin_ref === undefined\n );\n }\n\n private isInstructionFieldV2WithCoinRef(\n data: InstructionField,\n mode: ContextModuleCalMode,\n ): data is InstructionFieldV2WithCoinRef & {\n signatures: { [key in ContextModuleCalMode]: string };\n } {\n return (\n typeof data === \"object\" &&\n typeof data.display_name === \"string\" &&\n typeof data.field_path === \"string\" &&\n typeof data.signatures === \"object\" &&\n typeof data.signatures[mode] === \"string\" &&\n typeof data.format === \"string\" &&\n [\"token\", \"amount\"].includes(data.format) &&\n typeof data.coin_ref === \"number\"\n );\n }\n\n private isInstructionContractInfo(\n data: InstructionField,\n mode: ContextModuleCalMode,\n ): data is InstructionContractInfo & {\n signatures: { [key in ContextModuleCalMode]: string };\n } {\n return (\n typeof data === \"object\" &&\n typeof data.display_name === \"string\" &&\n typeof data.field_mappers_count === \"number\" &&\n typeof data.signatures === \"object\" &&\n typeof data.signatures[mode] === \"string\" &&\n data.field_path === undefined\n );\n }\n\n private sortTypes(types: TypedDataSchema): TypedDataSchema {\n return Object.fromEntries(\n Object.entries(types)\n .sort(([aKey], [bKey]) => aKey.localeCompare(bKey))\n .map(([key, value]) => [\n key,\n value.map((v) => ({ name: v.name, type: v.type })),\n ]),\n );\n }\n}\n", "import type { HexaString } from \"@ledgerhq/device-management-kit\";\nimport { inject, injectable } from \"inversify\";\n\nimport type {\n TypedDataClearSignContext,\n TypedDataFilter,\n TypedDataFilterPath,\n TypedDataToken,\n TypedDataTokenIndex,\n} from \"@/shared/model/TypedDataClearSignContext\";\nimport { VERIFYING_CONTRACT_TOKEN_INDEX } from \"@/shared/model/TypedDataClearSignContext\";\nimport type { TypedDataContext } from \"@/shared/model/TypedDataContext\";\nimport type { TokenDataSource } from \"@/token/data/TokenDataSource\";\nimport { tokenTypes } from \"@/token/di/tokenTypes\";\nimport type { TypedDataDataSource } from \"@/typed-data/data/TypedDataDataSource\";\nimport { typedDataTypes } from \"@/typed-data/di/typedDataTypes\";\nimport type { TypedDataContextLoader } from \"@/typed-data/domain/TypedDataContextLoader\";\n\n@injectable()\nexport class DefaultTypedDataContextLoader implements TypedDataContextLoader {\n constructor(\n @inject(typedDataTypes.TypedDataDataSource)\n private dataSource: TypedDataDataSource,\n @inject(tokenTypes.TokenDataSource)\n private tokenDataSource: TokenDataSource,\n ) {}\n\n async load(typedData: TypedDataContext): Promise<TypedDataClearSignContext> {\n // Get the typed data filters from the data source\n const data = await this.dataSource.getTypedDataFilters({\n address: typedData.verifyingContract,\n chainId: typedData.chainId,\n version: typedData.version,\n schema: typedData.schema,\n });\n\n // If there was an error getting the typed data filters, return an error immediately\n if (data.isLeft()) {\n return {\n type: \"error\",\n error: data.extract(),\n };\n }\n\n // Else, extract the message info and filters\n const { messageInfo, filters } = data.unsafeCoerce();\n\n // Loop through the typed data filters to extract informations\n const mappedFilters: Record<TypedDataFilterPath, TypedDataFilter> = {};\n const mappedTokens: Record<TypedDataTokenIndex, TypedDataToken> = {};\n for (const filter of filters) {\n // Add the filter to the clear signing context\n mappedFilters[filter.path] = filter;\n if (filter.type !== \"token\" && filter.type !== \"amount\") {\n continue; // no token reference\n }\n\n // If the filter references a token, retrieve its descriptor from the tokens data source\n const tokenIndex = filter.tokenIndex;\n if (mappedTokens[tokenIndex] !== undefined) {\n continue; // Already fetched for a previous filter\n }\n\n // If the filter is a token, get token address from typed message values, and fetch descriptor\n if (filter.type === \"token\") {\n const value = typedData.fieldsValues.find(\n (entry) => entry.path === filter.path,\n );\n if (value === undefined) {\n return {\n type: \"error\",\n error: new Error(\n `The token filter references the value ${filter.path} which is absent from the message`,\n ),\n };\n }\n // Fetch descriptor\n const address = this.convertAddressToHexaString(value.value);\n const chainId = typedData.chainId;\n const payload = await this.tokenDataSource.getTokenInfosPayload({\n address,\n chainId,\n });\n if (payload.isLeft()) {\n return {\n type: \"error\",\n error: payload.extract(),\n };\n }\n payload.ifRight((payload) => {\n mappedTokens[tokenIndex] = payload;\n });\n }\n\n // If the filter is an amount with a reference to the verifyingContract, fetch verifyingContract descriptor.\n // This is because descriptors data-sources should be compatible with Ledger devices specifications:\n // https://github.com/LedgerHQ/app-ethereum/blob/develop/doc/ethapp.adoc#amount-join-value\n else if (\n filter.type === \"amount\" &&\n tokenIndex === VERIFYING_CONTRACT_TOKEN_INDEX\n ) {\n const address = typedData.verifyingContract;\n const chainId = typedData.chainId;\n const payload = await this.tokenDataSource.getTokenInfosPayload({\n address,\n chainId,\n });\n if (payload.isLeft()) {\n return {\n type: \"error\",\n error: payload.extract(),\n };\n }\n payload.ifRight((payload) => {\n mappedTokens[tokenIndex] = payload;\n });\n }\n }\n\n return {\n type: \"success\",\n messageInfo,\n filters: mappedFilters,\n tokens: mappedTokens,\n };\n }\n\n private convertAddressToHexaString(address: Uint8Array): HexaString {\n // Address size is 20 bytes so 40 characters, padded with zeros on the left\n return `0x${Array.from(address, (byte) =>\n byte.toString(16).padStart(2, \"0\"),\n )\n .join(\"\")\n .padStart(40, \"0\")}`;\n }\n}\n", "// The general informations for a typed message\nexport type TypedDataMessageInfo = {\n displayName: string;\n filtersCount: number;\n signature: string;\n};\n\n// Token index and descriptor. Needed for tokens that are referenced by a typed message\nexport type TypedDataTokenIndex = number;\nexport type TypedDataToken = string;\n// Special token index value when the referenced token is the verifying contract\nexport const VERIFYING_CONTRACT_TOKEN_INDEX = 255;\n\n// Typed message filters, to select fields to display, and provide formatting informations\nexport type TypedDataFilterPath = string;\nexport type TypedDataFilter =\n | {\n type: \"datetime\" | \"raw\";\n displayName: string;\n path: TypedDataFilterPath;\n signature: string;\n }\n | {\n type: \"amount\" | \"token\";\n displayName: string;\n tokenIndex: TypedDataTokenIndex;\n path: TypedDataFilterPath;\n signature: string;\n };\n\n// Clear signing context for a typed message\nexport type TypedDataClearSignContextSuccess = {\n type: \"success\";\n messageInfo: TypedDataMessageInfo;\n filters: Record<TypedDataFilterPath, TypedDataFilter>;\n tokens: Record<TypedDataTokenIndex, TypedDataToken>;\n};\nexport type TypedDataClearSignContextError = {\n type: \"error\";\n error: Error;\n};\nexport type TypedDataClearSignContext =\n | TypedDataClearSignContextSuccess\n | TypedDataClearSignContextError;\n", "import { externalPluginTypes } from \"@/external-plugin/di/externalPluginTypes\";\nimport { forwardDomainTypes } from \"@/forward-domain/di/forwardDomainTypes\";\nimport { nftTypes } from \"@/nft/di/nftTypes\";\nimport { tokenTypes } from \"@/token/di/tokenTypes\";\nimport { typedDataTypes } from \"@/typed-data/di/typedDataTypes\";\n\nimport { ContextModuleConfig } from \"./config/model/ContextModuleConfig\";\nimport { ExternalPluginContextLoader } from \"./external-plugin/domain/ExternalPluginContextLoader\";\nimport { ForwardDomainContextLoader } from \"./forward-domain/domain/ForwardDomainContextLoader\";\nimport { NftContextLoader } from \"./nft/domain/NftContextLoader\";\nimport { ContextLoader } from \"./shared/domain/ContextLoader\";\nimport { TokenContextLoader } from \"./token/domain/TokenContextLoader\";\nimport { type TypedDataContextLoader } from \"./typed-data/domain/TypedDataContextLoader\";\nimport { ContextModule } from \"./ContextModule\";\nimport { DefaultContextModule } from \"./DefaultContextModule\";\nimport { makeContainer } from \"./di\";\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};\n\nexport class ContextModuleBuilder {\n private config: Partial<ContextModuleConfig> = {};\n private customLoaders: ContextLoader[] = [];\n private defaultLoaders: ContextLoader[] = [];\n private customTypedDataLoader?: TypedDataContextLoader;\n\n constructor() {}\n\n /**\n * Remove default loaders from the list of loaders\n *\n * @returns this\n */\n withoutDefaultLoaders() {\n this.defaultLoaders = [];\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.customLoaders.push(loader);\n return this;\n }\n\n /**\n * Replace the default loader for typed data clear signing contexts\n *\n * @returns this\n */\n withTypedDataLoader(loader: TypedDataContextLoader) {\n this.customTypedDataLoader = loader;\n return this;\n }\n\n /**\n * Set the configuration for the context module\n *\n * @param config configuration for the context module\n * @returns this\n */\n withConfig(config: Partial<ContextModuleConfig>) {\n this.config = config;\n return this;\n }\n\n /**\n * Build the context module\n *\n * @returns the context module\n */\n build(): ContextModule {\n const container = makeContainer({\n config: { ...DEFAULT_CONFIG, ...this.config },\n });\n\n this.defaultLoaders = [\n container.get<ExternalPluginContextLoader>(\n externalPluginTypes.ExternalPluginContextLoader,\n ),\n container.get<ForwardDomainContextLoader>(\n forwardDomainTypes.ForwardDomainContextLoader,\n ),\n container.get<NftContextLoader>(nftTypes.NftContextLoader),\n container.get<TokenContextLoader>(tokenTypes.TokenContextLoader),\n ];\n const defaultTypedDataLoader = container.get<TypedDataContextLoader>(\n typedDataTypes.TypedDataContextLoader,\n );\n\n const loaders = [...this.defaultLoaders, ...this.customLoaders];\n return new DefaultContextModule({\n loaders,\n typedDataLoader: this.customTypedDataLoader ?? defaultTypedDataLoader,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,8BAAO;;;ACDA,IAAM,sBAAsB;AAAA,EACjC,0BAA0B,OAAO,IAAI,0BAA0B;AAAA,EAC/D,6BAA6B,OAAO,IAAI,6BAA6B;AACvE;;;ACHO,IAAM,qBAAqB;AAAA,EAChC,yBAAyB,OAAO,IAAI,yBAAyB;AAAA,EAC7D,4BAA4B,OAAO,IAAI,4BAA4B;AACrE;;;ACH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A,iBAAiB,KAAK,yBAAyB;AAAA,IACjD,CAAC;AAAA,EACH;AACF;",
|
|
6
|
+
"names": ["import_inversify", "import_inversify", "import_inversify", "axios", "import_inversify", "import_purify_ts", "ClearSignContextType", "import_inversify", "import_axios", "import_inversify", "import_purify_ts", "axios", "import_inversify", "import_inversify", "import_axios", "import_inversify", "import_purify_ts", "axios", "import_device_management_kit", "import_inversify", "ERC721_SUPPORTED_SELECTOR", "ERC1155_SUPPORTED_SELECTOR", "import_inversify", "import_axios", "import_inversify", "import_purify_ts", "axios", "import_device_management_kit", "import_inversify", "ERC20_SUPPORTED_SELECTORS", "SUPPORTED_SELECTORS", "import_inversify", "import_axios", "import_inversify", "import_purify_ts", "axios", "SHA224", "import_inversify", "payload"]
|
|
7
|
+
}
|