@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.
- package/README.md +4 -6
- package/lib/cjs/index.js +2 -20
- package/lib/cjs/index.js.map +7 -1
- package/lib/cjs/package.json +53 -59
- package/lib/cjs/src/ContextModule.js +2 -3
- package/lib/cjs/src/ContextModule.js.map +7 -1
- package/lib/cjs/src/ContextModuleBuilder.js +2 -87
- package/lib/cjs/src/ContextModuleBuilder.js.map +7 -1
- package/lib/cjs/src/ContextModuleBuilder.test.js +2 -0
- package/lib/cjs/src/ContextModuleBuilder.test.js.map +7 -0
- package/lib/cjs/src/DefaultContextModule.js +2 -21
- package/lib/cjs/src/DefaultContextModule.js.map +7 -1
- package/lib/cjs/src/DefaultContextModule.test.js +2 -0
- package/lib/cjs/src/DefaultContextModule.test.js.map +7 -0
- package/lib/cjs/src/config/di/configModuleFactory.js +2 -10
- package/lib/cjs/src/config/di/configModuleFactory.js.map +7 -1
- package/lib/cjs/src/config/di/configTypes.js +2 -7
- package/lib/cjs/src/config/di/configTypes.js.map +7 -1
- package/lib/cjs/src/config/model/ContextModuleConfig.js +2 -3
- package/lib/cjs/src/config/model/ContextModuleConfig.js.map +7 -1
- package/lib/cjs/src/di.js +2 -17
- package/lib/cjs/src/di.js.map +7 -1
- package/lib/cjs/src/external-plugin/data/DAppDto.js +2 -3
- package/lib/cjs/src/external-plugin/data/DAppDto.js.map +7 -1
- package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js +2 -3
- package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js.map +7 -1
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js +2 -83
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js.map +7 -1
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.test.js +2 -0
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.test.js.map +7 -0
- package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js +2 -13
- package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js.map +7 -1
- package/lib/cjs/src/external-plugin/di/externalPluginTypes.js +2 -8
- package/lib/cjs/src/external-plugin/di/externalPluginTypes.js.map +7 -1
- package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js +2 -136
- package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js.map +7 -1
- package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.test.js +2 -0
- package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.test.js.map +7 -0
- package/lib/cjs/src/external-plugin/model/DappInfos.js +2 -3
- package/lib/cjs/src/external-plugin/model/DappInfos.js.map +7 -1
- package/lib/cjs/src/external-plugin/model/SelectorDetails.js +2 -3
- package/lib/cjs/src/external-plugin/model/SelectorDetails.js.map +7 -1
- package/lib/cjs/src/index.js +2 -30
- package/lib/cjs/src/index.js.map +7 -1
- package/lib/cjs/src/nft/data/HttpNftDataSource.js +2 -57
- package/lib/cjs/src/nft/data/HttpNftDataSource.js.map +7 -1
- package/lib/cjs/src/nft/data/HttpNftDataSource.test.js +2 -0
- package/lib/cjs/src/nft/data/HttpNftDataSource.test.js.map +7 -0
- package/lib/cjs/src/nft/data/NftDataSource.js +2 -3
- package/lib/cjs/src/nft/data/NftDataSource.js.map +7 -1
- package/lib/cjs/src/nft/di/nftModuleFactory.js +2 -13
- package/lib/cjs/src/nft/di/nftModuleFactory.js.map +7 -1
- package/lib/cjs/src/nft/di/nftTypes.js +2 -8
- package/lib/cjs/src/nft/di/nftTypes.js.map +7 -1
- package/lib/cjs/src/nft/domain/NftContextLoader.js +2 -111
- package/lib/cjs/src/nft/domain/NftContextLoader.js.map +7 -1
- package/lib/cjs/src/nft/domain/NftContextLoader.test.js +2 -0
- package/lib/cjs/src/nft/domain/NftContextLoader.test.js.map +7 -0
- package/lib/cjs/src/shared/domain/ContextLoader.js +2 -3
- package/lib/cjs/src/shared/domain/ContextLoader.js.map +7 -1
- package/lib/cjs/src/shared/model/ClearSignContext.js +2 -13
- package/lib/cjs/src/shared/model/ClearSignContext.js.map +7 -1
- package/lib/cjs/src/shared/model/GenericPath.js +2 -0
- package/lib/cjs/src/shared/model/GenericPath.js.map +7 -0
- package/lib/cjs/src/shared/model/TransactionContext.js +2 -3
- package/lib/cjs/src/shared/model/TransactionContext.js.map +7 -1
- package/lib/cjs/src/shared/model/TransactionSubset.js +2 -3
- package/lib/cjs/src/shared/model/TransactionSubset.js.map +7 -1
- package/lib/cjs/src/shared/model/TypedDataClearSignContext.js +2 -6
- package/lib/cjs/src/shared/model/TypedDataClearSignContext.js.map +7 -1
- package/lib/cjs/src/shared/model/TypedDataContext.js +2 -3
- package/lib/cjs/src/shared/model/TypedDataContext.js.map +7 -1
- package/lib/cjs/src/shared/utils/HexStringUtils.js +2 -15
- package/lib/cjs/src/shared/utils/HexStringUtils.js.map +7 -1
- package/lib/cjs/src/token/data/HttpTokenDataSource.js +2 -83
- package/lib/cjs/src/token/data/HttpTokenDataSource.js.map +7 -1
- package/lib/cjs/src/token/data/HttpTokenDataSource.test.js +2 -0
- package/lib/cjs/src/token/data/HttpTokenDataSource.test.js.map +7 -0
- package/lib/cjs/src/token/data/TokenDataSource.js +2 -3
- package/lib/cjs/src/token/data/TokenDataSource.js.map +7 -1
- package/lib/cjs/src/token/data/TokenDto.js +2 -3
- package/lib/cjs/src/token/data/TokenDto.js.map +7 -1
- package/lib/cjs/src/token/di/tokenModuleFactory.js +2 -13
- package/lib/cjs/src/token/di/tokenModuleFactory.js.map +7 -1
- package/lib/cjs/src/token/di/tokenTypes.js +2 -8
- package/lib/cjs/src/token/di/tokenTypes.js.map +7 -1
- package/lib/cjs/src/token/domain/TokenContextLoader.js +2 -74
- package/lib/cjs/src/token/domain/TokenContextLoader.js.map +7 -1
- package/lib/cjs/src/token/domain/TokenContextLoader.test.js +2 -0
- package/lib/cjs/src/token/domain/TokenContextLoader.test.js.map +7 -0
- package/lib/cjs/src/transaction/data/CalldataDto.js +2 -0
- package/lib/cjs/src/transaction/data/CalldataDto.js.map +7 -0
- package/lib/cjs/src/transaction/data/HttpTransactionDataSource.js +2 -0
- package/lib/cjs/src/transaction/data/HttpTransactionDataSource.js.map +7 -0
- package/lib/cjs/src/transaction/data/HttpTransactionDataSource.test.js +2 -0
- package/lib/cjs/src/transaction/data/HttpTransactionDataSource.test.js.map +7 -0
- package/lib/cjs/src/transaction/data/TransactionDataSource.js +2 -0
- package/lib/cjs/src/transaction/data/TransactionDataSource.js.map +7 -0
- package/lib/cjs/src/transaction/di/transactionModuleFactory.js +2 -0
- package/lib/cjs/src/transaction/di/transactionModuleFactory.js.map +7 -0
- package/lib/cjs/src/transaction/di/transactionTypes.js +2 -0
- package/lib/cjs/src/transaction/di/transactionTypes.js.map +7 -0
- package/lib/cjs/src/transaction/domain/TransactionContextLoader.js +2 -0
- package/lib/cjs/src/transaction/domain/TransactionContextLoader.js.map +7 -0
- package/lib/cjs/src/transaction/domain/TransactionContextLoader.test.js +2 -0
- package/lib/cjs/src/transaction/domain/TransactionContextLoader.test.js.map +7 -0
- package/lib/cjs/src/trusted-name/data/HttpTrustedNameDataSource.js +2 -0
- package/lib/cjs/src/trusted-name/data/HttpTrustedNameDataSource.js.map +7 -0
- package/lib/cjs/src/trusted-name/data/HttpTrustedNameDataSource.test.js +2 -0
- package/lib/cjs/src/trusted-name/data/HttpTrustedNameDataSource.test.js.map +7 -0
- package/lib/cjs/src/trusted-name/data/TrustedNameDataSource.js +2 -0
- package/lib/cjs/src/trusted-name/data/TrustedNameDataSource.js.map +7 -0
- package/lib/cjs/src/trusted-name/data/TrustedNameDto.js +2 -0
- package/lib/cjs/src/trusted-name/data/TrustedNameDto.js.map +7 -0
- package/lib/cjs/src/trusted-name/di/trustedNameModuleFactory.js +2 -0
- package/lib/cjs/src/trusted-name/di/trustedNameModuleFactory.js.map +7 -0
- package/lib/cjs/src/trusted-name/di/trustedNameTypes.js +2 -0
- package/lib/cjs/src/trusted-name/di/trustedNameTypes.js.map +7 -0
- package/lib/cjs/src/trusted-name/domain/TrustedNameContextLoader.js +2 -0
- package/lib/cjs/src/trusted-name/domain/TrustedNameContextLoader.js.map +7 -0
- package/lib/cjs/src/trusted-name/domain/TrustedNameContextLoader.test.js +2 -0
- package/lib/cjs/src/trusted-name/domain/TrustedNameContextLoader.test.js.map +7 -0
- package/lib/cjs/src/typed-data/data/FiltersDto.js +2 -3
- package/lib/cjs/src/typed-data/data/FiltersDto.js.map +7 -1
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js +2 -163
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js.map +7 -1
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.test.js +2 -0
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.test.js.map +7 -0
- package/lib/cjs/src/typed-data/data/TypedDataDataSource.js +2 -3
- package/lib/cjs/src/typed-data/data/TypedDataDataSource.js.map +7 -1
- package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js +2 -13
- package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js.map +7 -1
- package/lib/cjs/src/typed-data/di/typedDataTypes.js +2 -8
- package/lib/cjs/src/typed-data/di/typedDataTypes.js.map +7 -1
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js +2 -127
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +7 -1
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.test.js +2 -0
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.test.js.map +7 -0
- package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js +2 -3
- package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js.map +7 -1
- package/lib/esm/index.js +2 -4
- package/lib/esm/index.js.map +7 -1
- package/lib/esm/package.json +53 -59
- package/lib/esm/src/ContextModule.js +1 -2
- package/lib/esm/src/ContextModule.js.map +7 -1
- package/lib/esm/src/ContextModuleBuilder.js +2 -83
- package/lib/esm/src/ContextModuleBuilder.js.map +7 -1
- package/lib/esm/src/ContextModuleBuilder.test.js +2 -0
- package/lib/esm/src/ContextModuleBuilder.test.js.map +7 -0
- package/lib/esm/src/DefaultContextModule.js +2 -17
- package/lib/esm/src/DefaultContextModule.js.map +7 -1
- package/lib/esm/src/DefaultContextModule.test.js +2 -0
- package/lib/esm/src/DefaultContextModule.test.js.map +7 -0
- package/lib/esm/src/config/di/configModuleFactory.js +2 -6
- package/lib/esm/src/config/di/configModuleFactory.js.map +7 -1
- package/lib/esm/src/config/di/configTypes.js +2 -4
- package/lib/esm/src/config/di/configTypes.js.map +7 -1
- package/lib/esm/src/config/model/ContextModuleConfig.js +1 -2
- package/lib/esm/src/config/model/ContextModuleConfig.js.map +7 -1
- package/lib/esm/src/di.js +2 -13
- package/lib/esm/src/di.js.map +7 -1
- package/lib/esm/src/external-plugin/data/DAppDto.js +1 -2
- package/lib/esm/src/external-plugin/data/DAppDto.js.map +7 -1
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js +1 -2
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js.map +7 -1
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js +2 -77
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js.map +7 -1
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.test.js +2 -0
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.test.js.map +7 -0
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js +2 -9
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js.map +7 -1
- package/lib/esm/src/external-plugin/di/externalPluginTypes.js +2 -5
- package/lib/esm/src/external-plugin/di/externalPluginTypes.js.map +7 -1
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js +2 -133
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js.map +7 -1
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.test.js +2 -0
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.test.js.map +7 -0
- package/lib/esm/src/external-plugin/model/DappInfos.js +1 -2
- package/lib/esm/src/external-plugin/model/DappInfos.js.map +7 -1
- package/lib/esm/src/external-plugin/model/SelectorDetails.js +1 -2
- package/lib/esm/src/external-plugin/model/SelectorDetails.js.map +7 -1
- package/lib/esm/src/index.js +2 -14
- package/lib/esm/src/index.js.map +7 -1
- package/lib/esm/src/nft/data/HttpNftDataSource.js +2 -51
- package/lib/esm/src/nft/data/HttpNftDataSource.js.map +7 -1
- package/lib/esm/src/nft/data/HttpNftDataSource.test.js +2 -0
- package/lib/esm/src/nft/data/HttpNftDataSource.test.js.map +7 -0
- package/lib/esm/src/nft/data/NftDataSource.js +1 -2
- package/lib/esm/src/nft/data/NftDataSource.js.map +7 -1
- package/lib/esm/src/nft/di/nftModuleFactory.js +2 -9
- package/lib/esm/src/nft/di/nftModuleFactory.js.map +7 -1
- package/lib/esm/src/nft/di/nftTypes.js +2 -5
- package/lib/esm/src/nft/di/nftTypes.js.map +7 -1
- package/lib/esm/src/nft/domain/NftContextLoader.js +2 -108
- package/lib/esm/src/nft/domain/NftContextLoader.js.map +7 -1
- package/lib/esm/src/nft/domain/NftContextLoader.test.js +2 -0
- package/lib/esm/src/nft/domain/NftContextLoader.test.js.map +7 -0
- package/lib/esm/src/shared/domain/ContextLoader.js +1 -2
- package/lib/esm/src/shared/domain/ContextLoader.js.map +7 -1
- package/lib/esm/src/shared/model/ClearSignContext.js +2 -10
- package/lib/esm/src/shared/model/ClearSignContext.js.map +7 -1
- package/lib/esm/src/shared/model/GenericPath.js +2 -0
- package/lib/esm/src/shared/model/GenericPath.js.map +7 -0
- package/lib/esm/src/shared/model/TransactionContext.js +1 -2
- package/lib/esm/src/shared/model/TransactionContext.js.map +7 -1
- package/lib/esm/src/shared/model/TransactionSubset.js +1 -2
- package/lib/esm/src/shared/model/TransactionSubset.js.map +7 -1
- package/lib/esm/src/shared/model/TypedDataClearSignContext.js +2 -3
- package/lib/esm/src/shared/model/TypedDataClearSignContext.js.map +7 -1
- package/lib/esm/src/shared/model/TypedDataContext.js +1 -2
- package/lib/esm/src/shared/model/TypedDataContext.js.map +7 -1
- package/lib/esm/src/shared/utils/HexStringUtils.js +2 -11
- package/lib/esm/src/shared/utils/HexStringUtils.js.map +7 -1
- package/lib/esm/src/token/data/HttpTokenDataSource.js +2 -77
- package/lib/esm/src/token/data/HttpTokenDataSource.js.map +7 -1
- package/lib/esm/src/token/data/HttpTokenDataSource.test.js +2 -0
- package/lib/esm/src/token/data/HttpTokenDataSource.test.js.map +7 -0
- package/lib/esm/src/token/data/TokenDataSource.js +1 -2
- package/lib/esm/src/token/data/TokenDataSource.js.map +7 -1
- package/lib/esm/src/token/data/TokenDto.js +1 -2
- package/lib/esm/src/token/data/TokenDto.js.map +7 -1
- package/lib/esm/src/token/di/tokenModuleFactory.js +2 -9
- package/lib/esm/src/token/di/tokenModuleFactory.js.map +7 -1
- package/lib/esm/src/token/di/tokenTypes.js +2 -5
- package/lib/esm/src/token/di/tokenTypes.js.map +7 -1
- package/lib/esm/src/token/domain/TokenContextLoader.js +2 -71
- package/lib/esm/src/token/domain/TokenContextLoader.js.map +7 -1
- package/lib/esm/src/token/domain/TokenContextLoader.test.js +2 -0
- package/lib/esm/src/token/domain/TokenContextLoader.test.js.map +7 -0
- package/lib/esm/src/transaction/data/CalldataDto.js +1 -0
- package/lib/esm/src/transaction/data/CalldataDto.js.map +7 -0
- package/lib/esm/src/transaction/data/HttpTransactionDataSource.js +2 -0
- package/lib/esm/src/transaction/data/HttpTransactionDataSource.js.map +7 -0
- package/lib/esm/src/transaction/data/HttpTransactionDataSource.test.js +2 -0
- package/lib/esm/src/transaction/data/HttpTransactionDataSource.test.js.map +7 -0
- package/lib/esm/src/transaction/data/TransactionDataSource.js +1 -0
- package/lib/esm/src/transaction/data/TransactionDataSource.js.map +7 -0
- package/lib/esm/src/transaction/di/transactionModuleFactory.js +2 -0
- package/lib/esm/src/transaction/di/transactionModuleFactory.js.map +7 -0
- package/lib/esm/src/transaction/di/transactionTypes.js +2 -0
- package/lib/esm/src/transaction/di/transactionTypes.js.map +7 -0
- package/lib/esm/src/transaction/domain/TransactionContextLoader.js +2 -0
- package/lib/esm/src/transaction/domain/TransactionContextLoader.js.map +7 -0
- package/lib/esm/src/transaction/domain/TransactionContextLoader.test.js +2 -0
- package/lib/esm/src/transaction/domain/TransactionContextLoader.test.js.map +7 -0
- package/lib/esm/src/trusted-name/data/HttpTrustedNameDataSource.js +2 -0
- package/lib/esm/src/trusted-name/data/HttpTrustedNameDataSource.js.map +7 -0
- package/lib/esm/src/trusted-name/data/HttpTrustedNameDataSource.test.js +2 -0
- package/lib/esm/src/trusted-name/data/HttpTrustedNameDataSource.test.js.map +7 -0
- package/lib/esm/src/trusted-name/data/TrustedNameDataSource.js +1 -0
- package/lib/esm/src/trusted-name/data/TrustedNameDataSource.js.map +7 -0
- package/lib/esm/src/trusted-name/data/TrustedNameDto.js +1 -0
- package/lib/esm/src/trusted-name/data/TrustedNameDto.js.map +7 -0
- package/lib/esm/src/trusted-name/di/trustedNameModuleFactory.js +2 -0
- package/lib/esm/src/trusted-name/di/trustedNameModuleFactory.js.map +7 -0
- package/lib/esm/src/trusted-name/di/trustedNameTypes.js +2 -0
- package/lib/esm/src/trusted-name/di/trustedNameTypes.js.map +7 -0
- package/lib/esm/src/trusted-name/domain/TrustedNameContextLoader.js +2 -0
- package/lib/esm/src/trusted-name/domain/TrustedNameContextLoader.js.map +7 -0
- package/lib/esm/src/trusted-name/domain/TrustedNameContextLoader.test.js +2 -0
- package/lib/esm/src/trusted-name/domain/TrustedNameContextLoader.test.js.map +7 -0
- package/lib/esm/src/typed-data/data/FiltersDto.js +1 -2
- package/lib/esm/src/typed-data/data/FiltersDto.js.map +7 -1
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js +2 -157
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js.map +7 -1
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.test.js +2 -0
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.test.js.map +7 -0
- package/lib/esm/src/typed-data/data/TypedDataDataSource.js +1 -2
- package/lib/esm/src/typed-data/data/TypedDataDataSource.js.map +7 -1
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.js +2 -9
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.js.map +7 -1
- package/lib/esm/src/typed-data/di/typedDataTypes.js +2 -5
- package/lib/esm/src/typed-data/di/typedDataTypes.js.map +7 -1
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js +2 -124
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +7 -1
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.test.js +2 -0
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.test.js.map +7 -0
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js +1 -2
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js.map +7 -1
- package/lib/{cjs → types}/src/ContextModule.d.ts +3 -2
- package/lib/types/src/ContextModule.d.ts.map +1 -0
- package/lib/{cjs → types}/src/ContextModuleBuilder.d.ts +9 -11
- package/lib/types/src/ContextModuleBuilder.d.ts.map +1 -0
- 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.d.ts +18 -0
- package/lib/types/src/DefaultContextModule.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/{cjs → types}/src/config/di/configModuleFactory.d.ts +1 -1
- package/lib/{cjs → types}/src/config/di/configModuleFactory.d.ts.map +1 -1
- package/lib/types/src/config/model/ContextModuleConfig.d.ts +16 -0
- package/lib/types/src/config/model/ContextModuleConfig.d.ts.map +1 -0
- package/lib/{cjs → types}/src/di.d.ts +1 -1
- package/lib/types/src/di.d.ts.map +1 -0
- package/lib/{cjs → types}/src/external-plugin/data/ExternalPluginDataSource.d.ts +3 -3
- package/lib/types/src/external-plugin/data/ExternalPluginDataSource.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/external-plugin/model/DappInfos.d.ts +6 -0
- package/lib/types/src/external-plugin/model/DappInfos.d.ts.map +1 -0
- package/lib/{cjs → types}/src/index.d.ts +3 -1
- package/lib/types/src/index.d.ts.map +1 -0
- 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/{cjs → types}/src/nft/data/NftDataSource.d.ts +1 -1
- package/lib/types/src/nft/data/NftDataSource.d.ts.map +1 -0
- package/lib/{cjs → types}/src/nft/domain/NftContextLoader.d.ts +2 -1
- package/lib/types/src/nft/domain/NftContextLoader.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/types/src/shared/domain/ContextLoader.d.ts +7 -0
- package/lib/types/src/shared/domain/ContextLoader.d.ts.map +1 -0
- package/lib/types/src/shared/model/ClearSignContext.d.ts +40 -0
- package/lib/types/src/shared/model/ClearSignContext.d.ts.map +1 -0
- package/lib/types/src/shared/model/GenericPath.d.ts +105 -0
- package/lib/types/src/shared/model/GenericPath.d.ts.map +1 -0
- package/lib/types/src/shared/model/TransactionContext.d.ts +19 -0
- package/lib/types/src/shared/model/TransactionContext.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/{cjs → types}/src/token/data/TokenDataSource.d.ts +1 -1
- package/lib/types/src/token/data/TokenDataSource.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/{cjs → types}/src/token/domain/TokenContextLoader.d.ts +2 -1
- package/lib/types/src/token/domain/TokenContextLoader.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/types/src/transaction/data/CalldataDto.d.ts +117 -0
- package/lib/types/src/transaction/data/CalldataDto.d.ts.map +1 -0
- package/lib/types/src/transaction/data/HttpTransactionDataSource.d.ts +19 -0
- package/lib/types/src/transaction/data/HttpTransactionDataSource.d.ts.map +1 -0
- package/lib/types/src/transaction/data/HttpTransactionDataSource.test.d.ts +2 -0
- package/lib/types/src/transaction/data/HttpTransactionDataSource.test.d.ts.map +1 -0
- package/lib/types/src/transaction/data/TransactionDataSource.d.ts +12 -0
- package/lib/types/src/transaction/data/TransactionDataSource.d.ts.map +1 -0
- package/lib/types/src/transaction/di/transactionModuleFactory.d.ts +3 -0
- package/lib/types/src/transaction/di/transactionModuleFactory.d.ts.map +1 -0
- package/lib/types/src/transaction/di/transactionTypes.d.ts +5 -0
- package/lib/types/src/transaction/di/transactionTypes.d.ts.map +1 -0
- package/lib/types/src/transaction/domain/TransactionContextLoader.d.ts +10 -0
- package/lib/types/src/transaction/domain/TransactionContextLoader.d.ts.map +1 -0
- package/lib/types/src/transaction/domain/TransactionContextLoader.test.d.ts +2 -0
- package/lib/types/src/transaction/domain/TransactionContextLoader.test.d.ts.map +1 -0
- package/lib/types/src/trusted-name/data/HttpTrustedNameDataSource.d.ts +11 -0
- package/lib/types/src/trusted-name/data/HttpTrustedNameDataSource.d.ts.map +1 -0
- package/lib/types/src/trusted-name/data/HttpTrustedNameDataSource.test.d.ts +2 -0
- package/lib/types/src/trusted-name/data/HttpTrustedNameDataSource.test.d.ts.map +1 -0
- package/lib/types/src/trusted-name/data/TrustedNameDataSource.d.ts +16 -0
- package/lib/types/src/trusted-name/data/TrustedNameDataSource.d.ts.map +1 -0
- package/lib/types/src/trusted-name/data/TrustedNameDto.d.ts +15 -0
- package/lib/types/src/trusted-name/data/TrustedNameDto.d.ts.map +1 -0
- package/lib/types/src/trusted-name/di/trustedNameModuleFactory.d.ts +3 -0
- package/lib/types/src/trusted-name/di/trustedNameModuleFactory.d.ts.map +1 -0
- package/lib/types/src/trusted-name/di/trustedNameTypes.d.ts +5 -0
- package/lib/types/src/trusted-name/di/trustedNameTypes.d.ts.map +1 -0
- package/lib/types/src/trusted-name/domain/TrustedNameContextLoader.d.ts +12 -0
- package/lib/types/src/trusted-name/domain/TrustedNameContextLoader.d.ts.map +1 -0
- package/lib/types/src/trusted-name/domain/TrustedNameContextLoader.test.d.ts +2 -0
- package/lib/types/src/trusted-name/domain/TrustedNameContextLoader.test.d.ts.map +1 -0
- package/lib/{cjs → 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/{cjs → types}/src/typed-data/data/TypedDataDataSource.d.ts +3 -3
- package/lib/types/src/typed-data/data/TypedDataDataSource.d.ts.map +1 -0
- package/lib/{cjs → types}/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +1 -1
- 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 +21 -27
- package/lib/cjs/src/ContextModule.d.ts.map +0 -1
- package/lib/cjs/src/ContextModuleBuilder.d.ts.map +0 -1
- package/lib/cjs/src/DefaultContextModule.d.ts +0 -20
- package/lib/cjs/src/DefaultContextModule.d.ts.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/di.d.ts.map +0 -1
- package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +0 -1
- package/lib/cjs/src/external-plugin/model/DappInfos.d.ts +0 -6
- package/lib/cjs/src/external-plugin/model/DappInfos.d.ts.map +0 -1
- package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.d.ts +0 -9
- package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.d.ts.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.d.ts +0 -6
- package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.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.d.ts +0 -3
- package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.d.ts.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.d.ts +0 -5
- package/lib/cjs/src/forward-domain/di/forwardDomainTypes.d.ts.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.d.ts +0 -11
- package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.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.d.ts.map +0 -1
- package/lib/cjs/src/nft/data/NftDataSource.d.ts.map +0 -1
- package/lib/cjs/src/nft/domain/NftContextLoader.d.ts.map +0 -1
- package/lib/cjs/src/shared/domain/ContextLoader.d.ts +0 -6
- package/lib/cjs/src/shared/domain/ContextLoader.d.ts.map +0 -1
- package/lib/cjs/src/shared/model/ClearSignContext.d.ts +0 -21
- package/lib/cjs/src/shared/model/ClearSignContext.d.ts.map +0 -1
- package/lib/cjs/src/shared/model/TransactionContext.d.ts +0 -6
- package/lib/cjs/src/shared/model/TransactionContext.d.ts.map +0 -1
- package/lib/cjs/src/token/data/TokenDataSource.d.ts.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/domain/TokenContextLoader.d.ts.map +0 -1
- package/lib/cjs/src/typed-data/data/FiltersDto.d.ts.map +0 -1
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +0 -1
- package/lib/cjs/src/typed-data/data/TypedDataDataSource.d.ts.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/src/ContextModule.d.ts +0 -9
- package/lib/esm/src/ContextModule.d.ts.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/DefaultContextModule.d.ts +0 -20
- package/lib/esm/src/DefaultContextModule.d.ts.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/configTypes.d.ts +0 -4
- package/lib/esm/src/config/di/configTypes.d.ts.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/di.d.ts +0 -8
- package/lib/esm/src/di.d.ts.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/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/HttpExternalPluginDataSource.d.ts +0 -10
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.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/externalPluginTypes.d.ts +0 -5
- package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts.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/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/SelectorDetails.d.ts +0 -8
- package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts.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/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/NftDataSource.d.ts +0 -15
- package/lib/esm/src/nft/data/NftDataSource.d.ts.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/nftTypes.d.ts +0 -5
- package/lib/esm/src/nft/di/nftTypes.d.ts.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/shared/domain/ContextLoader.d.ts +0 -6
- package/lib/esm/src/shared/domain/ContextLoader.d.ts.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/TransactionContext.d.ts +0 -6
- package/lib/esm/src/shared/model/TransactionContext.d.ts.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/TypedDataClearSignContext.d.ts +0 -33
- package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts.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/utils/HexStringUtils.d.ts +0 -4
- package/lib/esm/src/shared/utils/HexStringUtils.d.ts.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/TokenDataSource.d.ts +0 -9
- package/lib/esm/src/token/data/TokenDataSource.d.ts.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/di/tokenModuleFactory.d.ts +0 -3
- package/lib/esm/src/token/di/tokenModuleFactory.d.ts.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/domain/TokenContextLoader.d.ts +0 -15
- package/lib/esm/src/token/domain/TokenContextLoader.d.ts.map +0 -1
- package/lib/esm/src/typed-data/data/FiltersDto.d.ts +0 -55
- package/lib/esm/src/typed-data/data/FiltersDto.d.ts.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/TypedDataDataSource.d.ts +0 -17
- package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts.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/typedDataTypes.d.ts +0 -5
- package/lib/esm/src/typed-data/di/typedDataTypes.d.ts.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/TypedDataContextLoader.d.ts +0 -6
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts.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/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/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/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/SelectorDetails.d.ts +0 -0
- /package/lib/{cjs → types}/src/external-plugin/model/SelectorDetails.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/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/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/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/typed-data/data/HttpTypedDataDataSource.d.ts +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/TypedDataContextLoader.d.ts +0 -0
- /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:
|
|
65
|
+
const config: ContextModuleCalConfig = {
|
|
66
66
|
// config to use
|
|
67
67
|
};
|
|
68
|
-
const contextModule = new ContextModuleBuilder().
|
|
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
|
-
.
|
|
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
|
-
|
|
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
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
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
|
+
}
|
package/lib/cjs/package.json
CHANGED
|
@@ -1,63 +1,57 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
|
|
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
|
package/lib/cjs/src/di.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
-
|
|
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
|
-
{
|
|
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
|
+
}
|