@ledgerhq/context-module 0.1.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.MD +202 -0
- package/README.md +127 -0
- package/lib/cjs/index.d.ts +3 -0
- package/lib/cjs/index.d.ts.map +1 -0
- package/lib/cjs/index.js +20 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/package.json +63 -0
- package/lib/cjs/src/ContextModule.d.ts +9 -0
- package/lib/cjs/src/ContextModule.d.ts.map +1 -0
- package/lib/{ContextModule.js.map → cjs/src/ContextModule.js.map} +1 -1
- package/lib/cjs/src/ContextModuleBuilder.d.ts +45 -0
- package/lib/cjs/src/ContextModuleBuilder.d.ts.map +1 -0
- package/lib/cjs/src/ContextModuleBuilder.js +87 -0
- package/lib/cjs/src/ContextModuleBuilder.js.map +1 -0
- package/lib/{DefaultContextModule.d.ts → cjs/src/DefaultContextModule.d.ts} +7 -1
- package/lib/cjs/src/DefaultContextModule.d.ts.map +1 -0
- package/lib/cjs/src/DefaultContextModule.js +21 -0
- package/lib/cjs/src/DefaultContextModule.js.map +1 -0
- package/lib/cjs/src/config/di/configModuleFactory.d.ts +4 -0
- package/lib/cjs/src/config/di/configModuleFactory.d.ts.map +1 -0
- package/lib/cjs/src/config/di/configModuleFactory.js +10 -0
- package/lib/cjs/src/config/di/configModuleFactory.js.map +1 -0
- package/lib/cjs/src/config/di/configTypes.d.ts +4 -0
- package/lib/cjs/src/config/di/configTypes.d.ts.map +1 -0
- package/lib/cjs/src/config/di/configTypes.js +7 -0
- package/lib/cjs/src/config/di/configTypes.js.map +1 -0
- package/lib/cjs/src/config/model/ContextModuleConfig.d.ts +9 -0
- package/lib/cjs/src/config/model/ContextModuleConfig.d.ts.map +1 -0
- package/lib/cjs/src/config/model/ContextModuleConfig.js +3 -0
- package/lib/cjs/src/config/model/ContextModuleConfig.js.map +1 -0
- package/lib/cjs/src/di.d.ts +8 -0
- package/lib/cjs/src/di.d.ts.map +1 -0
- package/lib/cjs/src/di.js +17 -0
- package/lib/cjs/src/di.js.map +1 -0
- package/lib/cjs/src/external-plugin/data/DAppDto.d.ts.map +1 -0
- package/lib/cjs/src/external-plugin/data/DAppDto.js.map +1 -0
- package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.d.ts +12 -0
- package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +1 -0
- package/lib/cjs/src/external-plugin/data/ExternalPluginDataSource.js.map +1 -0
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +10 -0
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +1 -0
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js +83 -0
- package/lib/cjs/src/external-plugin/data/HttpExternalPluginDataSource.js.map +1 -0
- package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.d.ts +3 -0
- package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +1 -0
- package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js +13 -0
- package/lib/cjs/src/external-plugin/di/externalPluginModuleFactory.js.map +1 -0
- package/lib/cjs/src/external-plugin/di/externalPluginTypes.d.ts +5 -0
- package/lib/cjs/src/external-plugin/di/externalPluginTypes.d.ts.map +1 -0
- package/lib/cjs/src/external-plugin/di/externalPluginTypes.js +8 -0
- package/lib/cjs/src/external-plugin/di/externalPluginTypes.js.map +1 -0
- package/lib/{external-plugin → cjs/src/external-plugin}/domain/ExternalPluginContextLoader.d.ts +4 -3
- package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +1 -0
- package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js +136 -0
- package/lib/cjs/src/external-plugin/domain/ExternalPluginContextLoader.js.map +1 -0
- package/lib/cjs/src/external-plugin/model/DappInfos.d.ts +6 -0
- package/lib/cjs/src/external-plugin/model/DappInfos.d.ts.map +1 -0
- package/lib/cjs/src/external-plugin/model/DappInfos.js.map +1 -0
- package/lib/cjs/src/external-plugin/model/SelectorDetails.d.ts.map +1 -0
- package/lib/cjs/src/external-plugin/model/SelectorDetails.js.map +1 -0
- package/lib/{forward-domain → cjs/src/forward-domain}/data/ForwardDomainDataSource.d.ts +2 -1
- package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +1 -0
- package/lib/cjs/src/forward-domain/data/ForwardDomainDataSource.js.map +1 -0
- package/lib/{forward-domain → cjs/src/forward-domain}/data/HttpForwardDomainDataSource.d.ts +3 -2
- package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +1 -0
- package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js +40 -0
- package/lib/cjs/src/forward-domain/data/HttpForwardDomainDataSource.js.map +1 -0
- package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.d.ts +3 -0
- package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +1 -0
- package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js +13 -0
- package/lib/cjs/src/forward-domain/di/forwardDomainModuleFactory.js.map +1 -0
- package/lib/cjs/src/forward-domain/di/forwardDomainTypes.d.ts +5 -0
- package/lib/cjs/src/forward-domain/di/forwardDomainTypes.d.ts.map +1 -0
- package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js +8 -0
- package/lib/cjs/src/forward-domain/di/forwardDomainTypes.js.map +1 -0
- package/lib/{forward-domain → cjs/src/forward-domain}/domain/ForwardDomainContextLoader.d.ts +1 -1
- package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +1 -0
- package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js +66 -0
- package/lib/cjs/src/forward-domain/domain/ForwardDomainContextLoader.js.map +1 -0
- package/lib/cjs/src/index.d.ts +14 -0
- package/lib/cjs/src/index.d.ts.map +1 -0
- package/lib/{index.js → cjs/src/index.js} +6 -3
- package/lib/cjs/src/index.js.map +1 -0
- package/lib/cjs/src/nft/data/HttpNftDataSource.d.ts +7 -0
- package/lib/cjs/src/nft/data/HttpNftDataSource.d.ts.map +1 -0
- package/lib/cjs/src/nft/data/HttpNftDataSource.js +57 -0
- package/lib/cjs/src/nft/data/HttpNftDataSource.js.map +1 -0
- package/lib/{nft → cjs/src/nft}/data/NftDataSource.d.ts +3 -2
- package/lib/cjs/src/nft/data/NftDataSource.d.ts.map +1 -0
- package/lib/cjs/src/nft/data/NftDataSource.js.map +1 -0
- package/lib/cjs/src/nft/di/nftModuleFactory.d.ts +3 -0
- package/lib/cjs/src/nft/di/nftModuleFactory.d.ts.map +1 -0
- package/lib/cjs/src/nft/di/nftModuleFactory.js +13 -0
- package/lib/cjs/src/nft/di/nftModuleFactory.js.map +1 -0
- package/lib/cjs/src/nft/di/nftTypes.d.ts +5 -0
- package/lib/cjs/src/nft/di/nftTypes.d.ts.map +1 -0
- package/lib/cjs/src/nft/di/nftTypes.js +8 -0
- package/lib/cjs/src/nft/di/nftTypes.js.map +1 -0
- package/lib/{nft → cjs/src/nft}/domain/NftContextLoader.d.ts +1 -1
- package/lib/cjs/src/nft/domain/NftContextLoader.d.ts.map +1 -0
- package/lib/cjs/src/nft/domain/NftContextLoader.js +111 -0
- package/lib/cjs/src/nft/domain/NftContextLoader.js.map +1 -0
- package/lib/cjs/src/shared/domain/ContextLoader.d.ts +6 -0
- package/lib/cjs/src/shared/domain/ContextLoader.d.ts.map +1 -0
- package/lib/cjs/src/shared/domain/ContextLoader.js.map +1 -0
- package/lib/cjs/src/shared/model/ClearSignContext.d.ts +21 -0
- package/lib/cjs/src/shared/model/ClearSignContext.d.ts.map +1 -0
- package/lib/cjs/src/shared/model/ClearSignContext.js +13 -0
- package/lib/cjs/src/shared/model/ClearSignContext.js.map +1 -0
- package/lib/cjs/src/shared/model/TransactionContext.d.ts +6 -0
- package/lib/cjs/src/shared/model/TransactionContext.d.ts.map +1 -0
- package/lib/cjs/src/shared/model/TransactionContext.js.map +1 -0
- package/lib/cjs/src/shared/model/TransactionSubset.d.ts.map +1 -0
- package/lib/cjs/src/shared/model/TransactionSubset.js.map +1 -0
- package/lib/cjs/src/shared/model/TypedDataClearSignContext.d.ts +33 -0
- package/lib/cjs/src/shared/model/TypedDataClearSignContext.d.ts.map +1 -0
- package/lib/cjs/src/shared/model/TypedDataClearSignContext.js +6 -0
- package/lib/cjs/src/shared/model/TypedDataClearSignContext.js.map +1 -0
- package/lib/cjs/src/shared/model/TypedDataContext.d.ts +16 -0
- package/lib/cjs/src/shared/model/TypedDataContext.d.ts.map +1 -0
- package/lib/cjs/src/shared/model/TypedDataContext.js +3 -0
- package/lib/cjs/src/shared/model/TypedDataContext.js.map +1 -0
- package/lib/cjs/src/shared/utils/HexStringUtils.d.ts +4 -0
- package/lib/cjs/src/shared/utils/HexStringUtils.d.ts.map +1 -0
- package/lib/cjs/src/shared/utils/HexStringUtils.js +15 -0
- package/lib/cjs/src/shared/utils/HexStringUtils.js.map +1 -0
- package/lib/cjs/src/token/data/HttpTokenDataSource.d.ts +9 -0
- package/lib/cjs/src/token/data/HttpTokenDataSource.d.ts.map +1 -0
- package/lib/cjs/src/token/data/HttpTokenDataSource.js +83 -0
- package/lib/cjs/src/token/data/HttpTokenDataSource.js.map +1 -0
- package/lib/cjs/src/token/data/TokenDataSource.d.ts +9 -0
- package/lib/cjs/src/token/data/TokenDataSource.d.ts.map +1 -0
- package/lib/cjs/src/token/data/TokenDataSource.js.map +1 -0
- package/lib/cjs/src/token/data/TokenDto.d.ts.map +1 -0
- package/lib/cjs/src/token/data/TokenDto.js.map +1 -0
- package/lib/cjs/src/token/di/tokenModuleFactory.d.ts +3 -0
- package/lib/cjs/src/token/di/tokenModuleFactory.d.ts.map +1 -0
- package/lib/cjs/src/token/di/tokenModuleFactory.js +13 -0
- package/lib/cjs/src/token/di/tokenModuleFactory.js.map +1 -0
- package/lib/cjs/src/token/di/tokenTypes.d.ts +5 -0
- package/lib/cjs/src/token/di/tokenTypes.d.ts.map +1 -0
- package/lib/cjs/src/token/di/tokenTypes.js +8 -0
- package/lib/cjs/src/token/di/tokenTypes.js.map +1 -0
- package/lib/{token → cjs/src/token}/domain/TokenContextLoader.d.ts +1 -1
- package/lib/cjs/src/token/domain/TokenContextLoader.d.ts.map +1 -0
- package/lib/cjs/src/token/domain/TokenContextLoader.js +74 -0
- package/lib/cjs/src/token/domain/TokenContextLoader.js.map +1 -0
- package/lib/cjs/src/typed-data/data/FiltersDto.d.ts +55 -0
- package/lib/cjs/src/typed-data/data/FiltersDto.d.ts.map +1 -0
- package/lib/cjs/src/typed-data/data/FiltersDto.js +3 -0
- package/lib/cjs/src/typed-data/data/FiltersDto.js.map +1 -0
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.d.ts +14 -0
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +1 -0
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js +163 -0
- package/lib/cjs/src/typed-data/data/HttpTypedDataDataSource.js.map +1 -0
- package/lib/cjs/src/typed-data/data/TypedDataDataSource.d.ts +17 -0
- package/lib/cjs/src/typed-data/data/TypedDataDataSource.d.ts.map +1 -0
- package/lib/cjs/src/typed-data/data/TypedDataDataSource.js +3 -0
- package/lib/cjs/src/typed-data/data/TypedDataDataSource.js.map +1 -0
- package/lib/cjs/src/typed-data/di/typedDataModuleFactory.d.ts +3 -0
- package/lib/cjs/src/typed-data/di/typedDataModuleFactory.d.ts.map +1 -0
- package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js +13 -0
- package/lib/cjs/src/typed-data/di/typedDataModuleFactory.js.map +1 -0
- package/lib/cjs/src/typed-data/di/typedDataTypes.d.ts +5 -0
- package/lib/cjs/src/typed-data/di/typedDataTypes.d.ts.map +1 -0
- package/lib/cjs/src/typed-data/di/typedDataTypes.js +8 -0
- package/lib/cjs/src/typed-data/di/typedDataTypes.js.map +1 -0
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +13 -0
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +1 -0
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js +127 -0
- package/lib/cjs/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +1 -0
- package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.d.ts +6 -0
- package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.d.ts.map +1 -0
- package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js +3 -0
- package/lib/cjs/src/typed-data/domain/TypedDataContextLoader.js.map +1 -0
- package/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -0
- package/lib/esm/index.d.ts +3 -0
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/index.js +4 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/package.json +63 -0
- package/lib/esm/src/ContextModule.d.ts +9 -0
- package/lib/esm/src/ContextModule.d.ts.map +1 -0
- package/lib/esm/src/ContextModule.js +2 -0
- package/lib/esm/src/ContextModule.js.map +1 -0
- package/lib/esm/src/ContextModuleBuilder.d.ts +45 -0
- package/lib/esm/src/ContextModuleBuilder.d.ts.map +1 -0
- package/lib/esm/src/ContextModuleBuilder.js +83 -0
- package/lib/esm/src/ContextModuleBuilder.js.map +1 -0
- package/lib/esm/src/DefaultContextModule.d.ts +20 -0
- package/lib/esm/src/DefaultContextModule.d.ts.map +1 -0
- package/lib/esm/src/DefaultContextModule.js +17 -0
- package/lib/esm/src/DefaultContextModule.js.map +1 -0
- package/lib/esm/src/config/di/configModuleFactory.d.ts +4 -0
- package/lib/esm/src/config/di/configModuleFactory.d.ts.map +1 -0
- package/lib/esm/src/config/di/configModuleFactory.js +6 -0
- package/lib/esm/src/config/di/configModuleFactory.js.map +1 -0
- package/lib/esm/src/config/di/configTypes.d.ts +4 -0
- package/lib/esm/src/config/di/configTypes.d.ts.map +1 -0
- package/lib/esm/src/config/di/configTypes.js +4 -0
- package/lib/esm/src/config/di/configTypes.js.map +1 -0
- package/lib/esm/src/config/model/ContextModuleConfig.d.ts +9 -0
- package/lib/esm/src/config/model/ContextModuleConfig.d.ts.map +1 -0
- package/lib/esm/src/config/model/ContextModuleConfig.js +2 -0
- package/lib/esm/src/config/model/ContextModuleConfig.js.map +1 -0
- package/lib/esm/src/di.d.ts +8 -0
- package/lib/esm/src/di.d.ts.map +1 -0
- package/lib/esm/src/di.js +13 -0
- package/lib/esm/src/di.js.map +1 -0
- package/lib/esm/src/external-plugin/data/DAppDto.d.ts +38 -0
- package/lib/esm/src/external-plugin/data/DAppDto.d.ts.map +1 -0
- package/lib/esm/src/external-plugin/data/DAppDto.js +2 -0
- package/lib/esm/src/external-plugin/data/DAppDto.js.map +1 -0
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts +12 -0
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.d.ts.map +1 -0
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js +2 -0
- package/lib/esm/src/external-plugin/data/ExternalPluginDataSource.js.map +1 -0
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts +10 -0
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +1 -0
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js +77 -0
- package/lib/esm/src/external-plugin/data/HttpExternalPluginDataSource.js.map +1 -0
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts +3 -0
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.d.ts.map +1 -0
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js +9 -0
- package/lib/esm/src/external-plugin/di/externalPluginModuleFactory.js.map +1 -0
- package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts +5 -0
- package/lib/esm/src/external-plugin/di/externalPluginTypes.d.ts.map +1 -0
- package/lib/esm/src/external-plugin/di/externalPluginTypes.js +5 -0
- package/lib/esm/src/external-plugin/di/externalPluginTypes.js.map +1 -0
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts +15 -0
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +1 -0
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js +133 -0
- package/lib/esm/src/external-plugin/domain/ExternalPluginContextLoader.js.map +1 -0
- package/lib/esm/src/external-plugin/model/DappInfos.d.ts +6 -0
- package/lib/esm/src/external-plugin/model/DappInfos.d.ts.map +1 -0
- package/lib/esm/src/external-plugin/model/DappInfos.js +2 -0
- package/lib/esm/src/external-plugin/model/DappInfos.js.map +1 -0
- package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts +8 -0
- package/lib/esm/src/external-plugin/model/SelectorDetails.d.ts.map +1 -0
- package/lib/esm/src/external-plugin/model/SelectorDetails.js +2 -0
- package/lib/esm/src/external-plugin/model/SelectorDetails.js.map +1 -0
- package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts +9 -0
- package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.d.ts.map +1 -0
- package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js +2 -0
- package/lib/esm/src/forward-domain/data/ForwardDomainDataSource.js.map +1 -0
- package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts +6 -0
- package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +1 -0
- package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js +34 -0
- package/lib/esm/src/forward-domain/data/HttpForwardDomainDataSource.js.map +1 -0
- package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts +3 -0
- package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.d.ts.map +1 -0
- package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js +9 -0
- package/lib/esm/src/forward-domain/di/forwardDomainModuleFactory.js.map +1 -0
- package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts +5 -0
- package/lib/esm/src/forward-domain/di/forwardDomainTypes.d.ts.map +1 -0
- package/lib/esm/src/forward-domain/di/forwardDomainTypes.js +5 -0
- package/lib/esm/src/forward-domain/di/forwardDomainTypes.js.map +1 -0
- package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts +11 -0
- package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +1 -0
- package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js +63 -0
- package/lib/esm/src/forward-domain/domain/ForwardDomainContextLoader.js.map +1 -0
- package/lib/esm/src/index.d.ts +14 -0
- package/lib/esm/src/index.d.ts.map +1 -0
- package/lib/{index.d.ts → esm/src/index.js} +7 -4
- package/lib/esm/src/index.js.map +1 -0
- package/lib/esm/src/nft/data/HttpNftDataSource.d.ts +7 -0
- package/lib/esm/src/nft/data/HttpNftDataSource.d.ts.map +1 -0
- package/lib/esm/src/nft/data/HttpNftDataSource.js +51 -0
- package/lib/esm/src/nft/data/HttpNftDataSource.js.map +1 -0
- package/lib/esm/src/nft/data/NftDataSource.d.ts +15 -0
- package/lib/esm/src/nft/data/NftDataSource.d.ts.map +1 -0
- package/lib/esm/src/nft/data/NftDataSource.js +2 -0
- package/lib/esm/src/nft/data/NftDataSource.js.map +1 -0
- package/lib/esm/src/nft/di/nftModuleFactory.d.ts +3 -0
- package/lib/esm/src/nft/di/nftModuleFactory.d.ts.map +1 -0
- package/lib/esm/src/nft/di/nftModuleFactory.js +9 -0
- package/lib/esm/src/nft/di/nftModuleFactory.js.map +1 -0
- package/lib/esm/src/nft/di/nftTypes.d.ts +5 -0
- package/lib/esm/src/nft/di/nftTypes.d.ts.map +1 -0
- package/lib/esm/src/nft/di/nftTypes.js +5 -0
- package/lib/esm/src/nft/di/nftTypes.js.map +1 -0
- package/lib/esm/src/nft/domain/NftContextLoader.d.ts +11 -0
- package/lib/esm/src/nft/domain/NftContextLoader.d.ts.map +1 -0
- package/lib/esm/src/nft/domain/NftContextLoader.js +108 -0
- package/lib/esm/src/nft/domain/NftContextLoader.js.map +1 -0
- package/lib/esm/src/shared/domain/ContextLoader.d.ts +6 -0
- package/lib/esm/src/shared/domain/ContextLoader.d.ts.map +1 -0
- package/lib/esm/src/shared/domain/ContextLoader.js +2 -0
- package/lib/esm/src/shared/domain/ContextLoader.js.map +1 -0
- package/lib/esm/src/shared/model/ClearSignContext.d.ts +21 -0
- package/lib/esm/src/shared/model/ClearSignContext.d.ts.map +1 -0
- package/lib/esm/src/shared/model/ClearSignContext.js +10 -0
- package/lib/esm/src/shared/model/ClearSignContext.js.map +1 -0
- package/lib/esm/src/shared/model/TransactionContext.d.ts +6 -0
- package/lib/esm/src/shared/model/TransactionContext.d.ts.map +1 -0
- package/lib/esm/src/shared/model/TransactionContext.js +2 -0
- package/lib/esm/src/shared/model/TransactionContext.js.map +1 -0
- package/lib/esm/src/shared/model/TransactionSubset.d.ts +6 -0
- package/lib/esm/src/shared/model/TransactionSubset.d.ts.map +1 -0
- package/lib/esm/src/shared/model/TransactionSubset.js +2 -0
- package/lib/esm/src/shared/model/TransactionSubset.js.map +1 -0
- package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts +33 -0
- package/lib/esm/src/shared/model/TypedDataClearSignContext.d.ts.map +1 -0
- package/lib/esm/src/shared/model/TypedDataClearSignContext.js +3 -0
- package/lib/esm/src/shared/model/TypedDataClearSignContext.js.map +1 -0
- package/lib/esm/src/shared/model/TypedDataContext.d.ts +16 -0
- package/lib/esm/src/shared/model/TypedDataContext.d.ts.map +1 -0
- package/lib/esm/src/shared/model/TypedDataContext.js +2 -0
- package/lib/esm/src/shared/model/TypedDataContext.js.map +1 -0
- package/lib/esm/src/shared/utils/HexStringUtils.d.ts +4 -0
- package/lib/esm/src/shared/utils/HexStringUtils.d.ts.map +1 -0
- package/lib/esm/src/shared/utils/HexStringUtils.js +11 -0
- package/lib/esm/src/shared/utils/HexStringUtils.js.map +1 -0
- package/lib/esm/src/token/data/HttpTokenDataSource.d.ts +9 -0
- package/lib/esm/src/token/data/HttpTokenDataSource.d.ts.map +1 -0
- package/lib/esm/src/token/data/HttpTokenDataSource.js +77 -0
- package/lib/esm/src/token/data/HttpTokenDataSource.js.map +1 -0
- package/lib/esm/src/token/data/TokenDataSource.d.ts +9 -0
- package/lib/esm/src/token/data/TokenDataSource.d.ts.map +1 -0
- package/lib/esm/src/token/data/TokenDataSource.js +2 -0
- package/lib/esm/src/token/data/TokenDataSource.js.map +1 -0
- package/lib/esm/src/token/data/TokenDto.d.ts +6 -0
- package/lib/esm/src/token/data/TokenDto.d.ts.map +1 -0
- package/lib/esm/src/token/data/TokenDto.js +2 -0
- package/lib/esm/src/token/data/TokenDto.js.map +1 -0
- package/lib/esm/src/token/di/tokenModuleFactory.d.ts +3 -0
- package/lib/esm/src/token/di/tokenModuleFactory.d.ts.map +1 -0
- package/lib/esm/src/token/di/tokenModuleFactory.js +9 -0
- package/lib/esm/src/token/di/tokenModuleFactory.js.map +1 -0
- package/lib/esm/src/token/di/tokenTypes.d.ts +5 -0
- package/lib/esm/src/token/di/tokenTypes.d.ts.map +1 -0
- package/lib/esm/src/token/di/tokenTypes.js +5 -0
- package/lib/esm/src/token/di/tokenTypes.js.map +1 -0
- package/lib/esm/src/token/domain/TokenContextLoader.d.ts +15 -0
- package/lib/esm/src/token/domain/TokenContextLoader.d.ts.map +1 -0
- package/lib/esm/src/token/domain/TokenContextLoader.js +71 -0
- package/lib/esm/src/token/domain/TokenContextLoader.js.map +1 -0
- package/lib/esm/src/typed-data/data/FiltersDto.d.ts +55 -0
- package/lib/esm/src/typed-data/data/FiltersDto.d.ts.map +1 -0
- package/lib/esm/src/typed-data/data/FiltersDto.js +2 -0
- package/lib/esm/src/typed-data/data/FiltersDto.js.map +1 -0
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts +14 -0
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.d.ts.map +1 -0
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js +157 -0
- package/lib/esm/src/typed-data/data/HttpTypedDataDataSource.js.map +1 -0
- package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts +17 -0
- package/lib/esm/src/typed-data/data/TypedDataDataSource.d.ts.map +1 -0
- package/lib/esm/src/typed-data/data/TypedDataDataSource.js +2 -0
- package/lib/esm/src/typed-data/data/TypedDataDataSource.js.map +1 -0
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts +3 -0
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.d.ts.map +1 -0
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.js +9 -0
- package/lib/esm/src/typed-data/di/typedDataModuleFactory.js.map +1 -0
- package/lib/esm/src/typed-data/di/typedDataTypes.d.ts +5 -0
- package/lib/esm/src/typed-data/di/typedDataTypes.d.ts.map +1 -0
- package/lib/esm/src/typed-data/di/typedDataTypes.js +5 -0
- package/lib/esm/src/typed-data/di/typedDataTypes.js.map +1 -0
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts +13 -0
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.d.ts.map +1 -0
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js +124 -0
- package/lib/esm/src/typed-data/domain/DefaultTypedDataContextLoader.js.map +1 -0
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts +6 -0
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.d.ts.map +1 -0
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js +2 -0
- package/lib/esm/src/typed-data/domain/TypedDataContextLoader.js.map +1 -0
- package/lib/esm/tsconfig.esm.tsbuildinfo +1 -0
- package/package.json +50 -20
- package/LICENSE.txt +0 -21
- package/lib/ContextModule.d.ts +0 -6
- package/lib/ContextModule.d.ts.map +0 -1
- package/lib/ContextModuleBuilder.d.ts +0 -27
- package/lib/ContextModuleBuilder.d.ts.map +0 -1
- package/lib/ContextModuleBuilder.js +0 -54
- package/lib/ContextModuleBuilder.js.map +0 -1
- package/lib/ContextModuleBuilder.test.d.ts +0 -2
- package/lib/ContextModuleBuilder.test.d.ts.map +0 -1
- package/lib/ContextModuleBuilder.test.js +0 -18
- package/lib/ContextModuleBuilder.test.js.map +0 -1
- package/lib/DefaultContextModule.d.ts.map +0 -1
- package/lib/DefaultContextModule.js +0 -26
- package/lib/DefaultContextModule.js.map +0 -1
- package/lib/DefaultContextModule.test.d.ts +0 -2
- package/lib/DefaultContextModule.test.d.ts.map +0 -1
- package/lib/DefaultContextModule.test.js +0 -55
- package/lib/DefaultContextModule.test.js.map +0 -1
- package/lib/external-plugin/__tests__/abi.json +0 -92
- package/lib/external-plugin/data/DAppDto.d.ts.map +0 -1
- package/lib/external-plugin/data/DAppDto.js.map +0 -1
- package/lib/external-plugin/data/ExternalPluginDataSource.d.ts +0 -10
- package/lib/external-plugin/data/ExternalPluginDataSource.d.ts.map +0 -1
- package/lib/external-plugin/data/ExternalPluginDataSource.js.map +0 -1
- package/lib/external-plugin/data/HttpExternalPluginDataSource.d.ts +0 -7
- package/lib/external-plugin/data/HttpExternalPluginDataSource.d.ts.map +0 -1
- package/lib/external-plugin/data/HttpExternalPluginDataSource.js +0 -55
- package/lib/external-plugin/data/HttpExternalPluginDataSource.js.map +0 -1
- package/lib/external-plugin/data/HttpExternalPluginDataSource.test.d.ts +0 -2
- package/lib/external-plugin/data/HttpExternalPluginDataSource.test.d.ts.map +0 -1
- package/lib/external-plugin/data/HttpExternalPluginDataSource.test.js +0 -268
- package/lib/external-plugin/data/HttpExternalPluginDataSource.test.js.map +0 -1
- package/lib/external-plugin/domain/ExternalPluginContextLoader.d.ts.map +0 -1
- package/lib/external-plugin/domain/ExternalPluginContextLoader.js +0 -96
- package/lib/external-plugin/domain/ExternalPluginContextLoader.js.map +0 -1
- package/lib/external-plugin/domain/ExternalPluginContextLoader.test.d.ts +0 -2
- package/lib/external-plugin/domain/ExternalPluginContextLoader.test.d.ts.map +0 -1
- package/lib/external-plugin/domain/ExternalPluginContextLoader.test.js +0 -344
- package/lib/external-plugin/domain/ExternalPluginContextLoader.test.js.map +0 -1
- package/lib/external-plugin/model/DappInfos.d.ts +0 -6
- package/lib/external-plugin/model/DappInfos.d.ts.map +0 -1
- package/lib/external-plugin/model/DappInfos.js.map +0 -1
- package/lib/external-plugin/model/SelectorDetails.d.ts.map +0 -1
- package/lib/external-plugin/model/SelectorDetails.js.map +0 -1
- package/lib/forward-domain/data/ForwardDomainDataSource.d.ts.map +0 -1
- package/lib/forward-domain/data/ForwardDomainDataSource.js.map +0 -1
- package/lib/forward-domain/data/HttpForwardDomainDataSource.d.ts.map +0 -1
- package/lib/forward-domain/data/HttpForwardDomainDataSource.js +0 -36
- package/lib/forward-domain/data/HttpForwardDomainDataSource.js.map +0 -1
- package/lib/forward-domain/data/HttpForwardDomainDataSource.test.d.ts +0 -2
- package/lib/forward-domain/data/HttpForwardDomainDataSource.test.d.ts.map +0 -1
- package/lib/forward-domain/data/HttpForwardDomainDataSource.test.js +0 -53
- package/lib/forward-domain/data/HttpForwardDomainDataSource.test.js.map +0 -1
- package/lib/forward-domain/domain/ForwardDomainContextLoader.d.ts.map +0 -1
- package/lib/forward-domain/domain/ForwardDomainContextLoader.js +0 -54
- package/lib/forward-domain/domain/ForwardDomainContextLoader.js.map +0 -1
- package/lib/forward-domain/domain/ForwardDomainContextLoader.test.d.ts +0 -2
- package/lib/forward-domain/domain/ForwardDomainContextLoader.test.d.ts.map +0 -1
- package/lib/forward-domain/domain/ForwardDomainContextLoader.test.js +0 -83
- package/lib/forward-domain/domain/ForwardDomainContextLoader.test.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/nft/data/HttpNftDataSource.d.ts +0 -6
- package/lib/nft/data/HttpNftDataSource.d.ts.map +0 -1
- package/lib/nft/data/HttpNftDataSource.js +0 -51
- package/lib/nft/data/HttpNftDataSource.js.map +0 -1
- package/lib/nft/data/HttpNftDataSource.test.d.ts +0 -2
- package/lib/nft/data/HttpNftDataSource.test.d.ts.map +0 -1
- package/lib/nft/data/HttpNftDataSource.test.js +0 -62
- package/lib/nft/data/HttpNftDataSource.test.js.map +0 -1
- package/lib/nft/data/NftDataSource.d.ts.map +0 -1
- package/lib/nft/data/NftDataSource.js.map +0 -1
- package/lib/nft/domain/NftContextLoader.d.ts.map +0 -1
- package/lib/nft/domain/NftContextLoader.js +0 -79
- package/lib/nft/domain/NftContextLoader.js.map +0 -1
- package/lib/nft/domain/NftContextLoader.test.d.ts +0 -2
- package/lib/nft/domain/NftContextLoader.test.d.ts.map +0 -1
- package/lib/nft/domain/NftContextLoader.test.js +0 -106
- package/lib/nft/domain/NftContextLoader.test.js.map +0 -1
- package/lib/shared/domain/ContextLoader.d.ts +0 -6
- package/lib/shared/domain/ContextLoader.d.ts.map +0 -1
- package/lib/shared/domain/ContextLoader.js.map +0 -1
- package/lib/shared/model/ClearSignContext.d.ts +0 -11
- package/lib/shared/model/ClearSignContext.d.ts.map +0 -1
- package/lib/shared/model/ClearSignContext.js +0 -3
- package/lib/shared/model/ClearSignContext.js.map +0 -1
- package/lib/shared/model/TransactionContext.d.ts +0 -6
- package/lib/shared/model/TransactionContext.d.ts.map +0 -1
- package/lib/shared/model/TransactionContext.js.map +0 -1
- package/lib/shared/model/TransactionSubset.d.ts.map +0 -1
- package/lib/shared/model/TransactionSubset.js.map +0 -1
- package/lib/token/data/HttpTokenDataSource.d.ts +0 -5
- package/lib/token/data/HttpTokenDataSource.d.ts.map +0 -1
- package/lib/token/data/HttpTokenDataSource.js +0 -68
- package/lib/token/data/HttpTokenDataSource.js.map +0 -1
- package/lib/token/data/HttpTokenDataSource.test.d.ts +0 -2
- package/lib/token/data/HttpTokenDataSource.test.d.ts.map +0 -1
- package/lib/token/data/HttpTokenDataSource.test.js +0 -87
- package/lib/token/data/HttpTokenDataSource.test.js.map +0 -1
- package/lib/token/data/TokenDataSource.d.ts +0 -8
- package/lib/token/data/TokenDataSource.d.ts.map +0 -1
- package/lib/token/data/TokenDataSource.js.map +0 -1
- package/lib/token/data/TokenDto.d.ts.map +0 -1
- package/lib/token/data/TokenDto.js.map +0 -1
- package/lib/token/domain/TokenContextLoader.d.ts.map +0 -1
- package/lib/token/domain/TokenContextLoader.js +0 -52
- package/lib/token/domain/TokenContextLoader.js.map +0 -1
- package/lib/token/domain/TokenContextLoader.test.d.ts +0 -2
- package/lib/token/domain/TokenContextLoader.test.d.ts.map +0 -1
- package/lib/token/domain/TokenContextLoader.test.js +0 -96
- package/lib/token/domain/TokenContextLoader.test.js.map +0 -1
- /package/lib/{ContextModule.js → cjs/src/ContextModule.js} +0 -0
- /package/lib/{external-plugin → cjs/src/external-plugin}/data/DAppDto.d.ts +0 -0
- /package/lib/{external-plugin → cjs/src/external-plugin}/data/DAppDto.js +0 -0
- /package/lib/{external-plugin → cjs/src/external-plugin}/data/ExternalPluginDataSource.js +0 -0
- /package/lib/{external-plugin → cjs/src/external-plugin}/model/DappInfos.js +0 -0
- /package/lib/{external-plugin → cjs/src/external-plugin}/model/SelectorDetails.d.ts +0 -0
- /package/lib/{external-plugin → cjs/src/external-plugin}/model/SelectorDetails.js +0 -0
- /package/lib/{forward-domain → cjs/src/forward-domain}/data/ForwardDomainDataSource.js +0 -0
- /package/lib/{nft → cjs/src/nft}/data/NftDataSource.js +0 -0
- /package/lib/{shared → cjs/src/shared}/domain/ContextLoader.js +0 -0
- /package/lib/{shared → cjs/src/shared}/model/TransactionContext.js +0 -0
- /package/lib/{shared → cjs/src/shared}/model/TransactionSubset.d.ts +0 -0
- /package/lib/{shared → cjs/src/shared}/model/TransactionSubset.js +0 -0
- /package/lib/{token → cjs/src/token}/data/TokenDataSource.js +0 -0
- /package/lib/{token → cjs/src/token}/data/TokenDto.d.ts +0 -0
- /package/lib/{token → cjs/src/token}/data/TokenDto.js +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.forwardDomainTypes = void 0;
|
|
4
|
+
exports.forwardDomainTypes = {
|
|
5
|
+
ForwardDomainDataSource: Symbol.for("forwardDomainDataSource"),
|
|
6
|
+
ForwardDomainContextLoader: Symbol.for("forwardDomainContextLoader"),
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=forwardDomainTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forwardDomainTypes.js","sourceRoot":"","sources":["../../../../../src/forward-domain/di/forwardDomainTypes.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC;IAC9D,0BAA0B,EAAE,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC;CACrE,CAAC"}
|
package/lib/{forward-domain → cjs/src/forward-domain}/domain/ForwardDomainContextLoader.d.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { ForwardDomainDataSource } from "../../forward-domain/data/ForwardDomainDataSource";
|
|
1
2
|
import { ContextLoader } from "../../shared/domain/ContextLoader";
|
|
2
3
|
import { ClearSignContext } from "../../shared/model/ClearSignContext";
|
|
3
4
|
import { TransactionContext } from "../../shared/model/TransactionContext";
|
|
4
|
-
import { ForwardDomainDataSource } from "../data/ForwardDomainDataSource";
|
|
5
5
|
export declare class ForwardDomainContextLoader implements ContextLoader {
|
|
6
6
|
private _dataSource;
|
|
7
7
|
constructor(dataSource: ForwardDomainDataSource);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForwardDomainContextLoader.d.ts","sourceRoot":"","sources":["../../../../../src/forward-domain/domain/ForwardDomainContextLoader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACL,gBAAgB,EAEjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,qBACa,0BAA2B,YAAW,aAAa;IAC9D,OAAO,CAAC,WAAW,CAA0B;gBAI3C,UAAU,EAAE,uBAAuB;IAK/B,IAAI,CACR,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAqC9B,OAAO,CAAC,aAAa;CAQtB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ForwardDomainContextLoader = void 0;
|
|
16
|
+
const inversify_1 = require("inversify");
|
|
17
|
+
const forwardDomainTypes_1 = require("../../forward-domain/di/forwardDomainTypes");
|
|
18
|
+
const ClearSignContext_1 = require("../../shared/model/ClearSignContext");
|
|
19
|
+
let ForwardDomainContextLoader = class ForwardDomainContextLoader {
|
|
20
|
+
_dataSource;
|
|
21
|
+
constructor(dataSource) {
|
|
22
|
+
this._dataSource = dataSource;
|
|
23
|
+
}
|
|
24
|
+
async load(transactionContext) {
|
|
25
|
+
const { domain, challenge } = transactionContext;
|
|
26
|
+
if (!domain) {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
if (!this.isDomainValid(domain)) {
|
|
30
|
+
return [
|
|
31
|
+
{
|
|
32
|
+
type: ClearSignContext_1.ClearSignContextType.ERROR,
|
|
33
|
+
error: new Error("[ContextModule] ForwardDomainLoader: invalid domain"),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
const payload = await this._dataSource.getDomainNamePayload({
|
|
38
|
+
domain: domain,
|
|
39
|
+
challenge: challenge,
|
|
40
|
+
});
|
|
41
|
+
return [
|
|
42
|
+
payload.caseOf({
|
|
43
|
+
Left: (error) => ({
|
|
44
|
+
type: ClearSignContext_1.ClearSignContextType.ERROR,
|
|
45
|
+
error: error,
|
|
46
|
+
}),
|
|
47
|
+
Right: (value) => ({
|
|
48
|
+
type: ClearSignContext_1.ClearSignContextType.DOMAIN_NAME,
|
|
49
|
+
payload: value,
|
|
50
|
+
}),
|
|
51
|
+
}),
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
isDomainValid(domain) {
|
|
55
|
+
const lengthIsValid = domain.length > 0 && Number(domain.length) < 30;
|
|
56
|
+
const containsOnlyValidChars = new RegExp("^[a-zA-Z0-9\\-\\_\\.]+$").test(domain);
|
|
57
|
+
return lengthIsValid && containsOnlyValidChars;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.ForwardDomainContextLoader = ForwardDomainContextLoader;
|
|
61
|
+
exports.ForwardDomainContextLoader = ForwardDomainContextLoader = __decorate([
|
|
62
|
+
(0, inversify_1.injectable)(),
|
|
63
|
+
__param(0, (0, inversify_1.inject)(forwardDomainTypes_1.forwardDomainTypes.ForwardDomainDataSource)),
|
|
64
|
+
__metadata("design:paramtypes", [Object])
|
|
65
|
+
], ForwardDomainContextLoader);
|
|
66
|
+
//# sourceMappingURL=ForwardDomainContextLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForwardDomainContextLoader.js","sourceRoot":"","sources":["../../../../../src/forward-domain/domain/ForwardDomainContextLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yCAA+C;AAG/C,+EAA4E;AAE5E,sEAGyC;AAIlC,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAC7B,WAAW,CAA0B;IAE7C,YAEE,UAAmC;QAEnC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,IAAI,CACR,kBAAsC;QAEtC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC;QAEjD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YAChC,OAAO;gBACL;oBACE,IAAI,EAAE,uCAAoB,CAAC,KAAK;oBAChC,KAAK,EAAE,IAAI,KAAK,CACd,qDAAqD,CACtD;iBACF;aACF,CAAC;QACJ,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC;YAC1D,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,SAAS;SACrB,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,CAAC,MAAM,CAAC;gBACb,IAAI,EAAE,CAAC,KAAK,EAAoB,EAAE,CAAC,CAAC;oBAClC,IAAI,EAAE,uCAAoB,CAAC,KAAK;oBAChC,KAAK,EAAE,KAAK;iBACb,CAAC;gBACF,KAAK,EAAE,CAAC,KAAK,EAAoB,EAAE,CAAC,CAAC;oBACnC,IAAI,EAAE,uCAAoB,CAAC,WAAW;oBACtC,OAAO,EAAE,KAAK;iBACf,CAAC;aACH,CAAC;SACH,CAAC;IACJ,CAAC;IAEO,aAAa,CAAC,MAAc;QAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QACtE,MAAM,sBAAsB,GAAG,IAAI,MAAM,CAAC,yBAAyB,CAAC,CAAC,IAAI,CACvE,MAAM,CACP,CAAC;QAEF,OAAO,aAAa,IAAI,sBAAsB,CAAC;IACjD,CAAC;CACF,CAAA;AAzDY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,sBAAU,GAAE;IAKR,WAAA,IAAA,kBAAM,EAAC,uCAAkB,CAAC,uBAAuB,CAAC,CAAA;;GAJ1C,0BAA0B,CAyDtC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./config/model/ContextModuleConfig";
|
|
2
|
+
export * from "./ContextModule";
|
|
3
|
+
export * from "./ContextModuleBuilder";
|
|
4
|
+
export * from "./DefaultContextModule";
|
|
5
|
+
export * from "./external-plugin/domain/ExternalPluginContextLoader";
|
|
6
|
+
export * from "./forward-domain/domain/ForwardDomainContextLoader";
|
|
7
|
+
export * from "./nft/domain/NftContextLoader";
|
|
8
|
+
export * from "./shared/model/ClearSignContext";
|
|
9
|
+
export * from "./shared/model/TransactionContext";
|
|
10
|
+
export * from "./shared/model/TransactionSubset";
|
|
11
|
+
export * from "./shared/model/TypedDataClearSignContext";
|
|
12
|
+
export * from "./shared/model/TypedDataContext";
|
|
13
|
+
export * from "./token/domain/TokenContextLoader";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC"}
|
|
@@ -14,14 +14,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./config/model/ContextModuleConfig"), exports);
|
|
17
18
|
__exportStar(require("./ContextModule"), exports);
|
|
18
19
|
__exportStar(require("./ContextModuleBuilder"), exports);
|
|
19
20
|
__exportStar(require("./DefaultContextModule"), exports);
|
|
21
|
+
__exportStar(require("./external-plugin/domain/ExternalPluginContextLoader"), exports);
|
|
22
|
+
__exportStar(require("./forward-domain/domain/ForwardDomainContextLoader"), exports);
|
|
23
|
+
__exportStar(require("./nft/domain/NftContextLoader"), exports);
|
|
20
24
|
__exportStar(require("./shared/model/ClearSignContext"), exports);
|
|
21
25
|
__exportStar(require("./shared/model/TransactionContext"), exports);
|
|
22
26
|
__exportStar(require("./shared/model/TransactionSubset"), exports);
|
|
27
|
+
__exportStar(require("./shared/model/TypedDataClearSignContext"), exports);
|
|
28
|
+
__exportStar(require("./shared/model/TypedDataContext"), exports);
|
|
23
29
|
__exportStar(require("./token/domain/TokenContextLoader"), exports);
|
|
24
|
-
__exportStar(require("./nft/domain/NftContextLoader"), exports);
|
|
25
|
-
__exportStar(require("./forward-domain/domain/ForwardDomainContextLoader"), exports);
|
|
26
|
-
__exportStar(require("./external-plugin/domain/ExternalPluginContextLoader"), exports);
|
|
27
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAmD;AACnD,kDAAgC;AAChC,yDAAuC;AACvC,yDAAuC;AACvC,uFAAqE;AACrE,qFAAmE;AACnE,gEAA8C;AAC9C,kEAAgD;AAChD,oEAAkD;AAClD,mEAAiD;AACjD,2EAAyD;AACzD,kEAAgD;AAChD,oEAAkD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Either } from "purify-ts";
|
|
2
|
+
import { GetNftInformationsParams, GetSetPluginPayloadParams, NftDataSource } from "../../nft/data/NftDataSource";
|
|
3
|
+
export declare class HttpNftDataSource implements NftDataSource {
|
|
4
|
+
getSetPluginPayload({ chainId, address, selector, }: GetSetPluginPayloadParams): Promise<Either<Error, string>>;
|
|
5
|
+
getNftInfosPayload({ chainId, address, }: GetNftInformationsParams): Promise<Either<Error, string>>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=HttpNftDataSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpNftDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/nft/data/HttpNftDataSource.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,WAAW,CAAC;AAEhD,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,aAAa,EACd,MAAM,0BAA0B,CAAC;AAGlC,qBACa,iBAAkB,YAAW,aAAa;IACxC,mBAAmB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,QAAQ,GACT,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IA0BhD,kBAAkB,CAAC,EAC9B,OAAO,EACP,OAAO,GACR,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAqB7D"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.HttpNftDataSource = void 0;
|
|
13
|
+
const axios_1 = __importDefault(require("axios"));
|
|
14
|
+
const inversify_1 = require("inversify");
|
|
15
|
+
const purify_ts_1 = require("purify-ts");
|
|
16
|
+
const package_json_1 = __importDefault(require("../../../package.json"));
|
|
17
|
+
let HttpNftDataSource = class HttpNftDataSource {
|
|
18
|
+
async getSetPluginPayload({ chainId, address, selector, }) {
|
|
19
|
+
try {
|
|
20
|
+
const response = await axios_1.default.request({
|
|
21
|
+
method: "GET",
|
|
22
|
+
url: `https://nft.api.live.ledger.com/v1/ethereum/${chainId}/contracts/${address}/plugin-selector/${selector}`,
|
|
23
|
+
headers: {
|
|
24
|
+
"X-Ledger-Client-Version": `context-module/${package_json_1.default.version}`,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
return response.data.payload
|
|
28
|
+
? (0, purify_ts_1.Right)(response.data.payload)
|
|
29
|
+
: (0, purify_ts_1.Left)(new Error("[ContextModule] HttpNftDataSource: unexpected empty response"));
|
|
30
|
+
}
|
|
31
|
+
catch (_error) {
|
|
32
|
+
return (0, purify_ts_1.Left)(new Error("[ContextModule] HttpNftDataSource: Failed to fetch set plugin payload"));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async getNftInfosPayload({ chainId, address, }) {
|
|
36
|
+
try {
|
|
37
|
+
const response = await axios_1.default.request({
|
|
38
|
+
method: "GET",
|
|
39
|
+
url: `https://nft.api.live.ledger.com/v1/ethereum/${chainId}/contracts/${address}`,
|
|
40
|
+
headers: {
|
|
41
|
+
"X-Ledger-Client-Version": `context-module/${package_json_1.default.version}`,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
return response.data.payload
|
|
45
|
+
? (0, purify_ts_1.Right)(response.data.payload)
|
|
46
|
+
: (0, purify_ts_1.Left)(new Error("[ContextModule] HttpNftDataSource: no nft metadata"));
|
|
47
|
+
}
|
|
48
|
+
catch (_error) {
|
|
49
|
+
return (0, purify_ts_1.Left)(new Error("[ContextModule] HttpNftDataSource: Failed to fetch nft informations"));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.HttpNftDataSource = HttpNftDataSource;
|
|
54
|
+
exports.HttpNftDataSource = HttpNftDataSource = __decorate([
|
|
55
|
+
(0, inversify_1.injectable)()
|
|
56
|
+
], HttpNftDataSource);
|
|
57
|
+
//# sourceMappingURL=HttpNftDataSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpNftDataSource.js","sourceRoot":"","sources":["../../../../../src/nft/data/HttpNftDataSource.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA0B;AAC1B,yCAAuC;AACvC,yCAAgD;AAOhD,sEAAyC;AAGlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACrB,KAAK,CAAC,mBAAmB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,QAAQ,GACkB;QAC1B,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,OAAO,CAAsB;gBACxD,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,+CAA+C,OAAO,cAAc,OAAO,oBAAoB,QAAQ,EAAE;gBAC9G,OAAO,EAAE;oBACP,yBAAyB,EAAE,kBAAkB,sBAAO,CAAC,OAAO,EAAE;iBAC/D;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO;gBAC1B,CAAC,CAAC,IAAA,iBAAK,EAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC9B,CAAC,CAAC,IAAA,gBAAI,EACF,IAAI,KAAK,CACP,8DAA8D,CAC/D,CACF,CAAC;QACR,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,OAAO,IAAA,gBAAI,EACT,IAAI,KAAK,CACP,uEAAuE,CACxE,CACF,CAAC;QACJ,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,EAC9B,OAAO,EACP,OAAO,GACkB;QACzB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,OAAO,CAAsB;gBACxD,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,+CAA+C,OAAO,cAAc,OAAO,EAAE;gBAClF,OAAO,EAAE;oBACP,yBAAyB,EAAE,kBAAkB,sBAAO,CAAC,OAAO,EAAE;iBAC/D;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,OAAO;gBAC1B,CAAC,CAAC,IAAA,iBAAK,EAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC9B,CAAC,CAAC,IAAA,gBAAI,EAAC,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC,CAAC;QAC5E,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,OAAO,IAAA,gBAAI,EACT,IAAI,KAAK,CACP,qEAAqE,CACtE,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAvDY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,sBAAU,GAAE;GACA,iBAAiB,CAuD7B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Either } from "purify-ts";
|
|
1
2
|
export type GetSetPluginPayloadParams = {
|
|
2
3
|
chainId: number;
|
|
3
4
|
address: string;
|
|
@@ -8,7 +9,7 @@ export type GetNftInformationsParams = {
|
|
|
8
9
|
address: string;
|
|
9
10
|
};
|
|
10
11
|
export interface NftDataSource {
|
|
11
|
-
getNftInfosPayload(params: GetNftInformationsParams): Promise<string
|
|
12
|
-
getSetPluginPayload(params: GetSetPluginPayloadParams): Promise<string
|
|
12
|
+
getNftInfosPayload(params: GetNftInformationsParams): Promise<Either<Error, string>>;
|
|
13
|
+
getSetPluginPayload(params: GetSetPluginPayloadParams): Promise<Either<Error, string>>;
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=NftDataSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NftDataSource.d.ts","sourceRoot":"","sources":["../../../../../src/nft/data/NftDataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,kBAAkB,CAChB,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAClC,mBAAmB,CACjB,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NftDataSource.js","sourceRoot":"","sources":["../../../../../src/nft/data/NftDataSource.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nftModuleFactory.d.ts","sourceRoot":"","sources":["../../../../../src/nft/di/nftModuleFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAM5C,eAAO,MAAM,gBAAgB,uBAIzB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nftModuleFactory = void 0;
|
|
4
|
+
const inversify_1 = require("inversify");
|
|
5
|
+
const HttpNftDataSource_1 = require("../../nft/data/HttpNftDataSource");
|
|
6
|
+
const nftTypes_1 = require("../../nft/di/nftTypes");
|
|
7
|
+
const NftContextLoader_1 = require("../../nft/domain/NftContextLoader");
|
|
8
|
+
const nftModuleFactory = () => new inversify_1.ContainerModule((bind, _unbind, _isBound, _rebind) => {
|
|
9
|
+
bind(nftTypes_1.nftTypes.NftDataSource).to(HttpNftDataSource_1.HttpNftDataSource);
|
|
10
|
+
bind(nftTypes_1.nftTypes.NftContextLoader).to(NftContextLoader_1.NftContextLoader);
|
|
11
|
+
});
|
|
12
|
+
exports.nftModuleFactory = nftModuleFactory;
|
|
13
|
+
//# sourceMappingURL=nftModuleFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nftModuleFactory.js","sourceRoot":"","sources":["../../../../../src/nft/di/nftModuleFactory.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAE5C,oEAAiE;AACjE,gDAA6C;AAC7C,oEAAiE;AAE1D,MAAM,gBAAgB,GAAG,GAAG,EAAE,CACnC,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IACvD,IAAI,CAAC,mBAAQ,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,qCAAiB,CAAC,CAAC;IACnD,IAAI,CAAC,mBAAQ,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,mCAAgB,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC;AAJQ,QAAA,gBAAgB,oBAIxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nftTypes.d.ts","sourceRoot":"","sources":["../../../../../src/nft/di/nftTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;CAGpB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nftTypes = void 0;
|
|
4
|
+
exports.nftTypes = {
|
|
5
|
+
NftDataSource: Symbol.for("nftDataSource"),
|
|
6
|
+
NftContextLoader: Symbol.for("nftContextLoader"),
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=nftTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nftTypes.js","sourceRoot":"","sources":["../../../../../src/nft/di/nftTypes.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;IAC1C,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACjD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { NftDataSource } from "../../nft/data/NftDataSource";
|
|
1
2
|
import { ContextLoader } from "../../shared/domain/ContextLoader";
|
|
2
3
|
import { ClearSignContext } from "../../shared/model/ClearSignContext";
|
|
3
4
|
import { TransactionContext } from "../../shared/model/TransactionContext";
|
|
4
|
-
import { NftDataSource } from "../data/NftDataSource";
|
|
5
5
|
export declare class NftContextLoader implements ContextLoader {
|
|
6
6
|
private _dataSource;
|
|
7
7
|
constructor(dataSource: NftDataSource);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NftContextLoader.d.ts","sourceRoot":"","sources":["../../../../../src/nft/domain/NftContextLoader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EACL,gBAAgB,EAEjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAqBvE,qBACa,gBAAiB,YAAW,aAAa;IACpD,OAAO,CAAC,WAAW,CAAgB;gBAES,UAAU,EAAE,aAAa;IAI/D,IAAI,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IA2ExE,OAAO,CAAC,mBAAmB;CAG5B"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.NftContextLoader = void 0;
|
|
16
|
+
const device_management_kit_1 = require("@ledgerhq/device-management-kit");
|
|
17
|
+
const inversify_1 = require("inversify");
|
|
18
|
+
const nftTypes_1 = require("../../nft/di/nftTypes");
|
|
19
|
+
const ClearSignContext_1 = require("../../shared/model/ClearSignContext");
|
|
20
|
+
var ERC721_SUPPORTED_SELECTOR;
|
|
21
|
+
(function (ERC721_SUPPORTED_SELECTOR) {
|
|
22
|
+
ERC721_SUPPORTED_SELECTOR["Approve"] = "0x095ea7b3";
|
|
23
|
+
ERC721_SUPPORTED_SELECTOR["SetApprovalForAll"] = "0xa22cb465";
|
|
24
|
+
ERC721_SUPPORTED_SELECTOR["TransferFrom"] = "0x23b872dd";
|
|
25
|
+
ERC721_SUPPORTED_SELECTOR["SafeTransferFrom"] = "0x42842e0e";
|
|
26
|
+
ERC721_SUPPORTED_SELECTOR["SafeTransferFromWithData"] = "0xb88d4fde";
|
|
27
|
+
})(ERC721_SUPPORTED_SELECTOR || (ERC721_SUPPORTED_SELECTOR = {}));
|
|
28
|
+
var ERC1155_SUPPORTED_SELECTOR;
|
|
29
|
+
(function (ERC1155_SUPPORTED_SELECTOR) {
|
|
30
|
+
ERC1155_SUPPORTED_SELECTOR["SetApprovalForAll"] = "0xa22cb465";
|
|
31
|
+
ERC1155_SUPPORTED_SELECTOR["SafeTransferFrom"] = "0xf242432a";
|
|
32
|
+
ERC1155_SUPPORTED_SELECTOR["SafeBatchTransferFrom"] = "0x2eb2c2d6";
|
|
33
|
+
})(ERC1155_SUPPORTED_SELECTOR || (ERC1155_SUPPORTED_SELECTOR = {}));
|
|
34
|
+
const SUPPORTED_SELECTORS = [
|
|
35
|
+
...Object.values(ERC721_SUPPORTED_SELECTOR),
|
|
36
|
+
...Object.values(ERC1155_SUPPORTED_SELECTOR),
|
|
37
|
+
];
|
|
38
|
+
let NftContextLoader = class NftContextLoader {
|
|
39
|
+
_dataSource;
|
|
40
|
+
constructor(dataSource) {
|
|
41
|
+
this._dataSource = dataSource;
|
|
42
|
+
}
|
|
43
|
+
async load(transaction) {
|
|
44
|
+
const responses = [];
|
|
45
|
+
if (!transaction.to || !transaction.data || transaction.data === "0x") {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
const selector = transaction.data.slice(0, 10);
|
|
49
|
+
if (!(0, device_management_kit_1.isHexaString)(selector)) {
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
type: ClearSignContext_1.ClearSignContextType.ERROR,
|
|
53
|
+
error: new Error("Invalid selector"),
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
if (!this.isSelectorSupported(selector)) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
// EXAMPLE:
|
|
61
|
+
// https://nft.api.live.ledger.com/v1/ethereum/1/contracts/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/plugin-selector/0x095ea7b3
|
|
62
|
+
const getPluginPayloadResponse = await this._dataSource.getSetPluginPayload({
|
|
63
|
+
chainId: transaction.chainId,
|
|
64
|
+
address: transaction.to,
|
|
65
|
+
selector,
|
|
66
|
+
});
|
|
67
|
+
const pluginPayload = getPluginPayloadResponse.caseOf({
|
|
68
|
+
Left: (error) => ({
|
|
69
|
+
type: ClearSignContext_1.ClearSignContextType.ERROR,
|
|
70
|
+
error,
|
|
71
|
+
}),
|
|
72
|
+
Right: (value) => ({
|
|
73
|
+
type: ClearSignContext_1.ClearSignContextType.PLUGIN,
|
|
74
|
+
payload: value,
|
|
75
|
+
}),
|
|
76
|
+
});
|
|
77
|
+
if (pluginPayload.type === ClearSignContext_1.ClearSignContextType.ERROR) {
|
|
78
|
+
return [pluginPayload];
|
|
79
|
+
}
|
|
80
|
+
responses.push(pluginPayload);
|
|
81
|
+
const getNftInfosPayloadResponse = await this._dataSource.getNftInfosPayload({
|
|
82
|
+
chainId: transaction.chainId,
|
|
83
|
+
address: transaction.to,
|
|
84
|
+
});
|
|
85
|
+
const nftInfosPayload = getNftInfosPayloadResponse.caseOf({
|
|
86
|
+
Left: (error) => ({
|
|
87
|
+
type: ClearSignContext_1.ClearSignContextType.ERROR,
|
|
88
|
+
error,
|
|
89
|
+
}),
|
|
90
|
+
Right: (value) => ({
|
|
91
|
+
type: ClearSignContext_1.ClearSignContextType.NFT,
|
|
92
|
+
payload: value,
|
|
93
|
+
}),
|
|
94
|
+
});
|
|
95
|
+
if (nftInfosPayload.type === ClearSignContext_1.ClearSignContextType.ERROR) {
|
|
96
|
+
return [nftInfosPayload];
|
|
97
|
+
}
|
|
98
|
+
responses.push(nftInfosPayload);
|
|
99
|
+
return responses;
|
|
100
|
+
}
|
|
101
|
+
isSelectorSupported(selector) {
|
|
102
|
+
return Object.values(SUPPORTED_SELECTORS).includes(selector);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
exports.NftContextLoader = NftContextLoader;
|
|
106
|
+
exports.NftContextLoader = NftContextLoader = __decorate([
|
|
107
|
+
(0, inversify_1.injectable)(),
|
|
108
|
+
__param(0, (0, inversify_1.inject)(nftTypes_1.nftTypes.NftDataSource)),
|
|
109
|
+
__metadata("design:paramtypes", [Object])
|
|
110
|
+
], NftContextLoader);
|
|
111
|
+
//# sourceMappingURL=NftContextLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NftContextLoader.js","sourceRoot":"","sources":["../../../../../src/nft/domain/NftContextLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2EAA2E;AAC3E,yCAA+C;AAG/C,gDAA6C;AAE7C,sEAGyC;AAGzC,IAAK,yBAMJ;AAND,WAAK,yBAAyB;IAC5B,mDAAsB,CAAA;IACtB,6DAAgC,CAAA;IAChC,wDAA2B,CAAA;IAC3B,4DAA+B,CAAA;IAC/B,oEAAuC,CAAA;AACzC,CAAC,EANI,yBAAyB,KAAzB,yBAAyB,QAM7B;AAED,IAAK,0BAIJ;AAJD,WAAK,0BAA0B;IAC7B,8DAAgC,CAAA;IAChC,6DAA+B,CAAA;IAC/B,kEAAoC,CAAA;AACtC,CAAC,EAJI,0BAA0B,KAA1B,0BAA0B,QAI9B;AAED,MAAM,mBAAmB,GAAiB;IACxC,GAAG,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC;IAC3C,GAAG,MAAM,CAAC,MAAM,CAAC,0BAA0B,CAAC;CAC7C,CAAC;AAGK,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACnB,WAAW,CAAgB;IAEnC,YAA4C,UAAyB;QACnE,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAA+B;QACxC,MAAM,SAAS,GAAuB,EAAE,CAAC;QAEzC,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACtE,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAE/C,IAAI,CAAC,IAAA,oCAAY,EAAC,QAAQ,CAAC,EAAE,CAAC;YAC5B,OAAO;gBACL;oBACE,IAAI,EAAE,uCAAoB,CAAC,KAAK;oBAChC,KAAK,EAAE,IAAI,KAAK,CAAC,kBAAkB,CAAC;iBACrC;aACF,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxC,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,WAAW;QACX,gIAAgI;QAChI,MAAM,wBAAwB,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,mBAAmB,CACzE;YACE,OAAO,EAAE,WAAW,CAAC,OAAO;YAC5B,OAAO,EAAE,WAAW,CAAC,EAAE;YACvB,QAAQ;SACT,CACF,CAAC;QAEF,MAAM,aAAa,GAAG,wBAAwB,CAAC,MAAM,CAAC;YACpD,IAAI,EAAE,CAAC,KAAK,EAAoB,EAAE,CAAC,CAAC;gBAClC,IAAI,EAAE,uCAAoB,CAAC,KAAK;gBAChC,KAAK;aACN,CAAC;YACF,KAAK,EAAE,CAAC,KAAK,EAAoB,EAAE,CAAC,CAAC;gBACnC,IAAI,EAAE,uCAAoB,CAAC,MAAM;gBACjC,OAAO,EAAE,KAAK;aACf,CAAC;SACH,CAAC,CAAC;QAEH,IAAI,aAAa,CAAC,IAAI,KAAK,uCAAoB,CAAC,KAAK,EAAE,CAAC;YACtD,OAAO,CAAC,aAAa,CAAC,CAAC;QACzB,CAAC;QAED,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAE9B,MAAM,0BAA0B,GAC9B,MAAM,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC;YACxC,OAAO,EAAE,WAAW,CAAC,OAAO;YAC5B,OAAO,EAAE,WAAW,CAAC,EAAE;SACxB,CAAC,CAAC;QAEL,MAAM,eAAe,GAAG,0BAA0B,CAAC,MAAM,CAAC;YACxD,IAAI,EAAE,CAAC,KAAK,EAAoB,EAAE,CAAC,CAAC;gBAClC,IAAI,EAAE,uCAAoB,CAAC,KAAK;gBAChC,KAAK;aACN,CAAC;YACF,KAAK,EAAE,CAAC,KAAK,EAAoB,EAAE,CAAC,CAAC;gBACnC,IAAI,EAAE,uCAAoB,CAAC,GAAG;gBAC9B,OAAO,EAAE,KAAK;aACf,CAAC;SACH,CAAC,CAAC;QAEH,IAAI,eAAe,CAAC,IAAI,KAAK,uCAAoB,CAAC,KAAK,EAAE,CAAC;YACxD,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3B,CAAC;QAED,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEhC,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,mBAAmB,CAAC,QAAoB;QAC9C,OAAO,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC/D,CAAC;CACF,CAAA;AArFY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;IAIE,WAAA,IAAA,kBAAM,EAAC,mBAAQ,CAAC,aAAa,CAAC,CAAA;;GAHhC,gBAAgB,CAqF5B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ClearSignContext } from "../../shared/model/ClearSignContext";
|
|
2
|
+
import { TransactionContext } from "../../shared/model/TransactionContext";
|
|
3
|
+
export type ContextLoader = {
|
|
4
|
+
load: (transaction: TransactionContext) => Promise<ClearSignContext[]>;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=ContextLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextLoader.d.ts","sourceRoot":"","sources":["../../../../../src/shared/domain/ContextLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,CAAC,WAAW,EAAE,kBAAkB,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;CACxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextLoader.js","sourceRoot":"","sources":["../../../../../src/shared/domain/ContextLoader.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum ClearSignContextType {
|
|
2
|
+
TOKEN = "token",
|
|
3
|
+
NFT = "nft",
|
|
4
|
+
DOMAIN_NAME = "domainName",
|
|
5
|
+
PLUGIN = "plugin",
|
|
6
|
+
EXTERNAL_PLUGIN = "externalPlugin",
|
|
7
|
+
ERROR = "error"
|
|
8
|
+
}
|
|
9
|
+
export type ClearSignContextSuccess = {
|
|
10
|
+
type: Exclude<ClearSignContextType, ClearSignContextType.ERROR>;
|
|
11
|
+
/**
|
|
12
|
+
* Hexadecimal string representation of the payload.
|
|
13
|
+
*/
|
|
14
|
+
payload: string;
|
|
15
|
+
};
|
|
16
|
+
export type ClearSignContextError = {
|
|
17
|
+
type: ClearSignContextType.ERROR;
|
|
18
|
+
error: Error;
|
|
19
|
+
};
|
|
20
|
+
export type ClearSignContext = ClearSignContextSuccess | ClearSignContextError;
|
|
21
|
+
//# sourceMappingURL=ClearSignContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClearSignContext.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/ClearSignContext.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,WAAW,eAAe;IAC1B,MAAM,WAAW;IACjB,eAAe,mBAAmB;IAClC,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAChE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,oBAAoB,CAAC,KAAK,CAAC;IACjC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,GAAG,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClearSignContextType = void 0;
|
|
4
|
+
var ClearSignContextType;
|
|
5
|
+
(function (ClearSignContextType) {
|
|
6
|
+
ClearSignContextType["TOKEN"] = "token";
|
|
7
|
+
ClearSignContextType["NFT"] = "nft";
|
|
8
|
+
ClearSignContextType["DOMAIN_NAME"] = "domainName";
|
|
9
|
+
ClearSignContextType["PLUGIN"] = "plugin";
|
|
10
|
+
ClearSignContextType["EXTERNAL_PLUGIN"] = "externalPlugin";
|
|
11
|
+
ClearSignContextType["ERROR"] = "error";
|
|
12
|
+
})(ClearSignContextType || (exports.ClearSignContextType = ClearSignContextType = {}));
|
|
13
|
+
//# sourceMappingURL=ClearSignContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClearSignContext.js","sourceRoot":"","sources":["../../../../../src/shared/model/ClearSignContext.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,mCAAW,CAAA;IACX,kDAA0B,CAAA;IAC1B,yCAAiB,CAAA;IACjB,0DAAkC,CAAA;IAClC,uCAAe,CAAA;AACjB,CAAC,EAPW,oBAAoB,oCAApB,oBAAoB,QAO/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionContext.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/TransactionContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionContext.js","sourceRoot":"","sources":["../../../../../src/shared/model/TransactionContext.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionSubset.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/TransactionSubset.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionSubset.js","sourceRoot":"","sources":["../../../../../src/shared/model/TransactionSubset.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type TypedDataMessageInfo = {
|
|
2
|
+
displayName: string;
|
|
3
|
+
filtersCount: number;
|
|
4
|
+
signature: string;
|
|
5
|
+
};
|
|
6
|
+
export type TypedDataTokenIndex = number;
|
|
7
|
+
export type TypedDataToken = string;
|
|
8
|
+
export declare const VERIFYING_CONTRACT_TOKEN_INDEX = 255;
|
|
9
|
+
export type TypedDataFilterPath = string;
|
|
10
|
+
export type TypedDataFilter = {
|
|
11
|
+
type: "datetime" | "raw";
|
|
12
|
+
displayName: string;
|
|
13
|
+
path: TypedDataFilterPath;
|
|
14
|
+
signature: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: "amount" | "token";
|
|
17
|
+
displayName: string;
|
|
18
|
+
tokenIndex: TypedDataTokenIndex;
|
|
19
|
+
path: TypedDataFilterPath;
|
|
20
|
+
signature: string;
|
|
21
|
+
};
|
|
22
|
+
export type TypedDataClearSignContextSuccess = {
|
|
23
|
+
type: "success";
|
|
24
|
+
messageInfo: TypedDataMessageInfo;
|
|
25
|
+
filters: Record<TypedDataFilterPath, TypedDataFilter>;
|
|
26
|
+
tokens: Record<TypedDataTokenIndex, TypedDataToken>;
|
|
27
|
+
};
|
|
28
|
+
export type TypedDataClearSignContextError = {
|
|
29
|
+
type: "error";
|
|
30
|
+
error: Error;
|
|
31
|
+
};
|
|
32
|
+
export type TypedDataClearSignContext = TypedDataClearSignContextSuccess | TypedDataClearSignContextError;
|
|
33
|
+
//# sourceMappingURL=TypedDataClearSignContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypedDataClearSignContext.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/TypedDataClearSignContext.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAGF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,eAAe,GACvB;IACE,IAAI,EAAE,UAAU,GAAG,KAAK,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,GACD;IACE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,mBAAmB,CAAC;IAChC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAGN,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,oBAAoB,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;IACtD,MAAM,EAAE,MAAM,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;CACrD,CAAC;AACF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AACF,MAAM,MAAM,yBAAyB,GACjC,gCAAgC,GAChC,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VERIFYING_CONTRACT_TOKEN_INDEX = void 0;
|
|
4
|
+
// Special token index value when the referenced token is the verifying contract
|
|
5
|
+
exports.VERIFYING_CONTRACT_TOKEN_INDEX = 255;
|
|
6
|
+
//# sourceMappingURL=TypedDataClearSignContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypedDataClearSignContext.js","sourceRoot":"","sources":["../../../../../src/shared/model/TypedDataClearSignContext.ts"],"names":[],"mappings":";;;AAUA,gFAAgF;AACnE,QAAA,8BAA8B,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type TypedDataSchema = Record<string, Array<{
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
}>>;
|
|
5
|
+
export type TypedDataFieldValues = Array<{
|
|
6
|
+
path: string;
|
|
7
|
+
value: Uint8Array;
|
|
8
|
+
}>;
|
|
9
|
+
export type TypedDataContext = {
|
|
10
|
+
verifyingContract: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
version: "v1" | "v2";
|
|
13
|
+
schema: TypedDataSchema;
|
|
14
|
+
fieldsValues: TypedDataFieldValues;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=TypedDataContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypedDataContext.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/TypedDataContext.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,eAAe,GAAG,MAAM,CAClC,MAAM,EACN,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CACtC,CAAC;AAGF,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC;AAG9E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,eAAe,CAAC;IACxB,YAAY,EAAE,oBAAoB,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypedDataContext.js","sourceRoot":"","sources":["../../../../../src/shared/model/TypedDataContext.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HexStringUtils.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/HexStringUtils.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc;IACzB,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAQxC"}
|