@ledgerhq/device-signer-kit-ethereum 0.0.0-develop-20240926001103
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 +576 -0
- package/lib/cjs/api/KeyringEth.d.ts +15 -0
- package/lib/cjs/api/KeyringEth.d.ts.map +1 -0
- package/lib/cjs/api/KeyringEth.js +3 -0
- package/lib/cjs/api/KeyringEth.js.map +1 -0
- package/lib/cjs/api/KeyringEthBuilder.d.ts +38 -0
- package/lib/cjs/api/KeyringEthBuilder.d.ts.map +1 -0
- package/lib/cjs/api/KeyringEthBuilder.js +49 -0
- package/lib/cjs/api/KeyringEthBuilder.js.map +1 -0
- package/lib/cjs/api/app-binder/GetAddressCommandTypes.d.ts +11 -0
- package/lib/cjs/api/app-binder/GetAddressCommandTypes.d.ts.map +1 -0
- package/lib/cjs/api/app-binder/GetAddressCommandTypes.js +3 -0
- package/lib/cjs/api/app-binder/GetAddressCommandTypes.js.map +1 -0
- package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.d.ts +9 -0
- package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.d.ts.map +1 -0
- package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js +3 -0
- package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js.map +1 -0
- package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.d.ts +20 -0
- package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.d.ts.map +1 -0
- package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.js +3 -0
- package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.js.map +1 -0
- package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.d.ts +31 -0
- package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.d.ts.map +1 -0
- package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js +3 -0
- package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js.map +1 -0
- package/lib/cjs/api/app-binder/SignTypedDataDeviceActionTypes.d.ts +27 -0
- package/lib/cjs/api/app-binder/SignTypedDataDeviceActionTypes.d.ts.map +1 -0
- package/lib/cjs/api/app-binder/SignTypedDataDeviceActionTypes.js +3 -0
- package/lib/cjs/api/app-binder/SignTypedDataDeviceActionTypes.js.map +1 -0
- package/lib/cjs/api/index.d.ts +13 -0
- package/lib/cjs/api/index.d.ts.map +1 -0
- package/lib/cjs/api/index.js +26 -0
- package/lib/cjs/api/index.js.map +1 -0
- package/lib/cjs/api/model/Address.d.ts +7 -0
- package/lib/cjs/api/model/Address.d.ts.map +1 -0
- package/lib/cjs/api/model/Address.js +3 -0
- package/lib/cjs/api/model/Address.js.map +1 -0
- package/lib/cjs/api/model/AddressOptions.d.ts +5 -0
- package/lib/cjs/api/model/AddressOptions.d.ts.map +1 -0
- package/lib/cjs/api/model/AddressOptions.js +3 -0
- package/lib/cjs/api/model/AddressOptions.js.map +1 -0
- package/lib/cjs/api/model/Signature.d.ts +7 -0
- package/lib/cjs/api/model/Signature.d.ts.map +1 -0
- package/lib/cjs/api/model/Signature.js +3 -0
- package/lib/cjs/api/model/Signature.js.map +1 -0
- package/lib/cjs/api/model/Transaction.d.ts +4 -0
- package/lib/cjs/api/model/Transaction.d.ts.map +1 -0
- package/lib/cjs/api/model/Transaction.js +3 -0
- package/lib/cjs/api/model/Transaction.js.map +1 -0
- package/lib/cjs/api/model/TransactionOptions.d.ts +4 -0
- package/lib/cjs/api/model/TransactionOptions.d.ts.map +1 -0
- package/lib/cjs/api/model/TransactionOptions.js +3 -0
- package/lib/cjs/api/model/TransactionOptions.js.map +1 -0
- package/lib/cjs/api/model/TypedData.d.ts +18 -0
- package/lib/cjs/api/model/TypedData.d.ts.map +1 -0
- package/lib/cjs/api/model/TypedData.js +4 -0
- package/lib/cjs/api/model/TypedData.js.map +1 -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/internal/DefaultKeyringEth.d.ts +26 -0
- package/lib/cjs/internal/DefaultKeyringEth.d.ts.map +1 -0
- package/lib/cjs/internal/DefaultKeyringEth.js +36 -0
- package/lib/cjs/internal/DefaultKeyringEth.js.map +1 -0
- package/lib/cjs/internal/address/di/addressModule.d.ts +3 -0
- package/lib/cjs/internal/address/di/addressModule.d.ts.map +1 -0
- package/lib/cjs/internal/address/di/addressModule.js +11 -0
- package/lib/cjs/internal/address/di/addressModule.js.map +1 -0
- package/lib/cjs/internal/address/di/addressTypes.d.ts +4 -0
- package/lib/cjs/internal/address/di/addressTypes.d.ts.map +1 -0
- package/lib/cjs/internal/address/di/addressTypes.js +7 -0
- package/lib/cjs/internal/address/di/addressTypes.js.map +1 -0
- package/lib/cjs/internal/address/use-case/GetAddressUseCase.d.ts +9 -0
- package/lib/cjs/internal/address/use-case/GetAddressUseCase.d.ts.map +1 -0
- package/lib/cjs/internal/address/use-case/GetAddressUseCase.js +38 -0
- package/lib/cjs/internal/address/use-case/GetAddressUseCase.js.map +1 -0
- package/lib/cjs/internal/app-binder/EthAppBinder.d.ts +38 -0
- package/lib/cjs/internal/app-binder/EthAppBinder.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/EthAppBinder.js +100 -0
- package/lib/cjs/internal/app-binder/EthAppBinder.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.d.ts +9 -0
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.js +88 -0
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/GetChallengeCommand.d.ts +10 -0
- package/lib/cjs/internal/app-binder/command/GetChallengeCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/GetChallengeCommand.js +39 -0
- package/lib/cjs/internal/app-binder/command/GetChallengeCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/ProvideDomainNameCommand.d.ts +19 -0
- package/lib/cjs/internal/app-binder/command/ProvideDomainNameCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/ProvideDomainNameCommand.js +41 -0
- package/lib/cjs/internal/app-binder/command/ProvideDomainNameCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/ProvideNFTInformationCommand.d.ts +15 -0
- package/lib/cjs/internal/app-binder/command/ProvideNFTInformationCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/ProvideNFTInformationCommand.js +50 -0
- package/lib/cjs/internal/app-binder/command/ProvideNFTInformationCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/ProvideTokenInformationCommand.d.ts +14 -0
- package/lib/cjs/internal/app-binder/command/ProvideTokenInformationCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/ProvideTokenInformationCommand.js +34 -0
- package/lib/cjs/internal/app-binder/command/ProvideTokenInformationCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712FilteringCommand.d.ts +41 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712FilteringCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712FilteringCommand.js +69 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712FilteringCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.d.ts +25 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.js +131 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712StructDefinitionCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712StructImplemCommand.d.ts +30 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712StructImplemCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712StructImplemCommand.js +51 -0
- package/lib/cjs/internal/app-binder/command/SendEIP712StructImplemCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.d.ts +17 -0
- package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.js +57 -0
- package/lib/cjs/internal/app-binder/command/SetExternalPluginCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/SetPluginCommand.d.ts +18 -0
- package/lib/cjs/internal/app-binder/command/SetPluginCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/SetPluginCommand.js +52 -0
- package/lib/cjs/internal/app-binder/command/SetPluginCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/SignEIP712Command.d.ts +25 -0
- package/lib/cjs/internal/app-binder/command/SignEIP712Command.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/SignEIP712Command.js +69 -0
- package/lib/cjs/internal/app-binder/command/SignEIP712Command.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.d.ts +21 -0
- package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.js +60 -0
- package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.d.ts +24 -0
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js +59 -0
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.d.ts +17 -0
- package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js +161 -0
- package/lib/cjs/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.d.ts +39 -0
- package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js +285 -0
- package/lib/cjs/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.d.ts +31 -0
- package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js +245 -0
- package/lib/cjs/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts +3 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.js +18 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/makeInternalApi.js.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.d.ts +2 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js +31 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts +12 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js +35 -0
- package/lib/cjs/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js.map +1 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.d.ts +3 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.js +11 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.js.map +1 -0
- package/lib/cjs/internal/app-binder/di/appBinderTypes.d.ts +4 -0
- package/lib/cjs/internal/app-binder/di/appBinderTypes.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/di/appBinderTypes.js +7 -0
- package/lib/cjs/internal/app-binder/di/appBinderTypes.js.map +1 -0
- package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.d.ts +16 -0
- package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.js +72 -0
- package/lib/cjs/internal/app-binder/task/BuildEIP712ContextTask.js.map +1 -0
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.d.ts +21 -0
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.js +31 -0
- package/lib/cjs/internal/app-binder/task/BuildTransactionContextTask.js.map +1 -0
- package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.d.ts +21 -0
- package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.js +188 -0
- package/lib/cjs/internal/app-binder/task/ProvideEIP712ContextTask.js.map +1 -0
- package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.d.ts +57 -0
- package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.js +112 -0
- package/lib/cjs/internal/app-binder/task/ProvideTransactionContextTask.js.map +1 -0
- package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.d.ts +19 -0
- package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.js +42 -0
- package/lib/cjs/internal/app-binder/task/SendEIP712StructImplemTask.js.map +1 -0
- package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.d.ts +14 -0
- package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.js +53 -0
- package/lib/cjs/internal/app-binder/task/SendSignPersonalMessageTask.js.map +1 -0
- package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.d.ts +14 -0
- package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.d.ts.map +1 -0
- package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.js +53 -0
- package/lib/cjs/internal/app-binder/task/SendSignTransactionTask.js.map +1 -0
- package/lib/cjs/internal/di.d.ts +10 -0
- package/lib/cjs/internal/di.d.ts.map +1 -0
- package/lib/cjs/internal/di.js +27 -0
- package/lib/cjs/internal/di.js.map +1 -0
- package/lib/cjs/internal/externalTypes.d.ts +6 -0
- package/lib/cjs/internal/externalTypes.d.ts.map +1 -0
- package/lib/cjs/internal/externalTypes.js +9 -0
- package/lib/cjs/internal/externalTypes.js.map +1 -0
- package/lib/cjs/internal/message/di/messageModule.d.ts +3 -0
- package/lib/cjs/internal/message/di/messageModule.d.ts.map +1 -0
- package/lib/cjs/internal/message/di/messageModule.js +11 -0
- package/lib/cjs/internal/message/di/messageModule.js.map +1 -0
- package/lib/cjs/internal/message/di/messageTypes.d.ts +4 -0
- package/lib/cjs/internal/message/di/messageTypes.d.ts.map +1 -0
- package/lib/cjs/internal/message/di/messageTypes.js +7 -0
- package/lib/cjs/internal/message/di/messageTypes.js.map +1 -0
- package/lib/cjs/internal/message/use-case/SignMessageUseCase.d.ts +8 -0
- package/lib/cjs/internal/message/use-case/SignMessageUseCase.d.ts.map +1 -0
- package/lib/cjs/internal/message/use-case/SignMessageUseCase.js +38 -0
- package/lib/cjs/internal/message/use-case/SignMessageUseCase.js.map +1 -0
- package/lib/cjs/internal/shared/utils/DerivationPathUtils.d.ts +5 -0
- package/lib/cjs/internal/shared/utils/DerivationPathUtils.d.ts.map +1 -0
- package/lib/cjs/internal/shared/utils/DerivationPathUtils.js +24 -0
- package/lib/cjs/internal/shared/utils/DerivationPathUtils.js.map +1 -0
- package/lib/cjs/internal/transaction/di/transactionModule.d.ts +3 -0
- package/lib/cjs/internal/transaction/di/transactionModule.d.ts.map +1 -0
- package/lib/cjs/internal/transaction/di/transactionModule.js +17 -0
- package/lib/cjs/internal/transaction/di/transactionModule.js.map +1 -0
- package/lib/cjs/internal/transaction/di/transactionTypes.d.ts +6 -0
- package/lib/cjs/internal/transaction/di/transactionTypes.d.ts.map +1 -0
- package/lib/cjs/internal/transaction/di/transactionTypes.js +9 -0
- package/lib/cjs/internal/transaction/di/transactionTypes.js.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.d.ts +10 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.d.ts.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.js +60 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersV5TransactionMapper.js.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.d.ts +9 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.d.ts.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.js +36 -0
- package/lib/cjs/internal/transaction/service/mapper/EthersV6TransactionMapper.js.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapper.d.ts +7 -0
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapper.d.ts.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapper.js +3 -0
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapper.js.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.d.ts +10 -0
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.d.ts.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.js +41 -0
- package/lib/cjs/internal/transaction/service/mapper/TransactionMapperService.js.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/model/TransactionMapperResult.d.ts +12 -0
- package/lib/cjs/internal/transaction/service/mapper/model/TransactionMapperResult.d.ts.map +1 -0
- package/lib/cjs/internal/transaction/service/mapper/model/TransactionMapperResult.js +3 -0
- package/lib/cjs/internal/transaction/service/mapper/model/TransactionMapperResult.js.map +1 -0
- package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.d.ts +10 -0
- package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.d.ts.map +1 -0
- package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.js +38 -0
- package/lib/cjs/internal/transaction/use-case/SignTransactionUseCase.js.map +1 -0
- package/lib/cjs/internal/typed-data/di/typedDataModule.d.ts +3 -0
- package/lib/cjs/internal/typed-data/di/typedDataModule.d.ts.map +1 -0
- package/lib/cjs/internal/typed-data/di/typedDataModule.js +13 -0
- package/lib/cjs/internal/typed-data/di/typedDataModule.js.map +1 -0
- package/lib/cjs/internal/typed-data/di/typedDataTypes.d.ts +5 -0
- package/lib/cjs/internal/typed-data/di/typedDataTypes.d.ts.map +1 -0
- package/lib/cjs/internal/typed-data/di/typedDataTypes.js +8 -0
- package/lib/cjs/internal/typed-data/di/typedDataTypes.js.map +1 -0
- package/lib/cjs/internal/typed-data/model/Types.d.ts +41 -0
- package/lib/cjs/internal/typed-data/model/Types.d.ts.map +1 -0
- package/lib/cjs/internal/typed-data/model/Types.js +64 -0
- package/lib/cjs/internal/typed-data/model/Types.js.map +1 -0
- package/lib/cjs/internal/typed-data/service/DefaultTypedDataParserService.d.ts +7 -0
- package/lib/cjs/internal/typed-data/service/DefaultTypedDataParserService.d.ts.map +1 -0
- package/lib/cjs/internal/typed-data/service/DefaultTypedDataParserService.js +29 -0
- package/lib/cjs/internal/typed-data/service/DefaultTypedDataParserService.js.map +1 -0
- package/lib/cjs/internal/typed-data/service/TypedDataEncoder.d.ts +10 -0
- package/lib/cjs/internal/typed-data/service/TypedDataEncoder.d.ts.map +1 -0
- package/lib/cjs/internal/typed-data/service/TypedDataEncoder.js +101 -0
- package/lib/cjs/internal/typed-data/service/TypedDataEncoder.js.map +1 -0
- package/lib/cjs/internal/typed-data/service/TypedDataParser.d.ts +73 -0
- package/lib/cjs/internal/typed-data/service/TypedDataParser.d.ts.map +1 -0
- package/lib/cjs/internal/typed-data/service/TypedDataParser.js +211 -0
- package/lib/cjs/internal/typed-data/service/TypedDataParser.js.map +1 -0
- package/lib/cjs/internal/typed-data/service/TypedDataParserService.d.ts +12 -0
- package/lib/cjs/internal/typed-data/service/TypedDataParserService.d.ts.map +1 -0
- package/lib/cjs/internal/typed-data/service/TypedDataParserService.js +3 -0
- package/lib/cjs/internal/typed-data/service/TypedDataParserService.js.map +1 -0
- package/lib/cjs/internal/typed-data/use-case/SignTypedDataUseCase.d.ts +11 -0
- package/lib/cjs/internal/typed-data/use-case/SignTypedDataUseCase.d.ts.map +1 -0
- package/lib/cjs/internal/typed-data/use-case/SignTypedDataUseCase.js +42 -0
- package/lib/cjs/internal/typed-data/use-case/SignTypedDataUseCase.js.map +1 -0
- package/lib/esm/api/KeyringEth.d.ts +15 -0
- package/lib/esm/api/KeyringEth.d.ts.map +1 -0
- package/lib/esm/api/KeyringEth.js +2 -0
- package/lib/esm/api/KeyringEth.js.map +1 -0
- package/lib/esm/api/KeyringEthBuilder.d.ts +38 -0
- package/lib/esm/api/KeyringEthBuilder.d.ts.map +1 -0
- package/lib/esm/api/KeyringEthBuilder.js +45 -0
- package/lib/esm/api/KeyringEthBuilder.js.map +1 -0
- package/lib/esm/api/app-binder/GetAddressCommandTypes.d.ts +11 -0
- package/lib/esm/api/app-binder/GetAddressCommandTypes.d.ts.map +1 -0
- package/lib/esm/api/app-binder/GetAddressCommandTypes.js +2 -0
- package/lib/esm/api/app-binder/GetAddressCommandTypes.js.map +1 -0
- package/lib/esm/api/app-binder/GetAddressDeviceActionTypes.d.ts +9 -0
- package/lib/esm/api/app-binder/GetAddressDeviceActionTypes.d.ts.map +1 -0
- package/lib/esm/api/app-binder/GetAddressDeviceActionTypes.js +2 -0
- package/lib/esm/api/app-binder/GetAddressDeviceActionTypes.js.map +1 -0
- package/lib/esm/api/app-binder/SignPersonalMessageDeviceActionTypes.d.ts +20 -0
- package/lib/esm/api/app-binder/SignPersonalMessageDeviceActionTypes.d.ts.map +1 -0
- package/lib/esm/api/app-binder/SignPersonalMessageDeviceActionTypes.js +2 -0
- package/lib/esm/api/app-binder/SignPersonalMessageDeviceActionTypes.js.map +1 -0
- package/lib/esm/api/app-binder/SignTransactionDeviceActionTypes.d.ts +31 -0
- package/lib/esm/api/app-binder/SignTransactionDeviceActionTypes.d.ts.map +1 -0
- package/lib/esm/api/app-binder/SignTransactionDeviceActionTypes.js +2 -0
- package/lib/esm/api/app-binder/SignTransactionDeviceActionTypes.js.map +1 -0
- package/lib/esm/api/app-binder/SignTypedDataDeviceActionTypes.d.ts +27 -0
- package/lib/esm/api/app-binder/SignTypedDataDeviceActionTypes.d.ts.map +1 -0
- package/lib/esm/api/app-binder/SignTypedDataDeviceActionTypes.js +2 -0
- package/lib/esm/api/app-binder/SignTypedDataDeviceActionTypes.js.map +1 -0
- package/lib/esm/api/index.d.ts +13 -0
- package/lib/esm/api/index.d.ts.map +1 -0
- package/lib/esm/api/index.js +10 -0
- package/lib/esm/api/index.js.map +1 -0
- package/lib/esm/api/model/Address.d.ts +7 -0
- package/lib/esm/api/model/Address.d.ts.map +1 -0
- package/lib/esm/api/model/Address.js +2 -0
- package/lib/esm/api/model/Address.js.map +1 -0
- package/lib/esm/api/model/AddressOptions.d.ts +5 -0
- package/lib/esm/api/model/AddressOptions.d.ts.map +1 -0
- package/lib/esm/api/model/AddressOptions.js +2 -0
- package/lib/esm/api/model/AddressOptions.js.map +1 -0
- package/lib/esm/api/model/Signature.d.ts +7 -0
- package/lib/esm/api/model/Signature.d.ts.map +1 -0
- package/lib/esm/api/model/Signature.js +2 -0
- package/lib/esm/api/model/Signature.js.map +1 -0
- package/lib/esm/api/model/Transaction.d.ts +4 -0
- package/lib/esm/api/model/Transaction.d.ts.map +1 -0
- package/lib/esm/api/model/Transaction.js +2 -0
- package/lib/esm/api/model/Transaction.js.map +1 -0
- package/lib/esm/api/model/TransactionOptions.d.ts +4 -0
- package/lib/esm/api/model/TransactionOptions.d.ts.map +1 -0
- package/lib/esm/api/model/TransactionOptions.js +2 -0
- package/lib/esm/api/model/TransactionOptions.js.map +1 -0
- package/lib/esm/api/model/TypedData.d.ts +18 -0
- package/lib/esm/api/model/TypedData.d.ts.map +1 -0
- package/lib/esm/api/model/TypedData.js +3 -0
- package/lib/esm/api/model/TypedData.js.map +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/internal/DefaultKeyringEth.d.ts +26 -0
- package/lib/esm/internal/DefaultKeyringEth.d.ts.map +1 -0
- package/lib/esm/internal/DefaultKeyringEth.js +32 -0
- package/lib/esm/internal/DefaultKeyringEth.js.map +1 -0
- package/lib/esm/internal/address/di/addressModule.d.ts +3 -0
- package/lib/esm/internal/address/di/addressModule.d.ts.map +1 -0
- package/lib/esm/internal/address/di/addressModule.js +7 -0
- package/lib/esm/internal/address/di/addressModule.js.map +1 -0
- package/lib/esm/internal/address/di/addressTypes.d.ts +4 -0
- package/lib/esm/internal/address/di/addressTypes.d.ts.map +1 -0
- package/lib/esm/internal/address/di/addressTypes.js +4 -0
- package/lib/esm/internal/address/di/addressTypes.js.map +1 -0
- package/lib/esm/internal/address/use-case/GetAddressUseCase.d.ts +9 -0
- package/lib/esm/internal/address/use-case/GetAddressUseCase.d.ts.map +1 -0
- package/lib/esm/internal/address/use-case/GetAddressUseCase.js +35 -0
- package/lib/esm/internal/address/use-case/GetAddressUseCase.js.map +1 -0
- package/lib/esm/internal/app-binder/EthAppBinder.d.ts +38 -0
- package/lib/esm/internal/app-binder/EthAppBinder.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/EthAppBinder.js +97 -0
- package/lib/esm/internal/app-binder/EthAppBinder.js.map +1 -0
- package/lib/esm/internal/app-binder/command/GetAddressCommand.d.ts +9 -0
- package/lib/esm/internal/app-binder/command/GetAddressCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/GetAddressCommand.js +84 -0
- package/lib/esm/internal/app-binder/command/GetAddressCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/GetChallengeCommand.d.ts +10 -0
- package/lib/esm/internal/app-binder/command/GetChallengeCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/GetChallengeCommand.js +35 -0
- package/lib/esm/internal/app-binder/command/GetChallengeCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/ProvideDomainNameCommand.d.ts +19 -0
- package/lib/esm/internal/app-binder/command/ProvideDomainNameCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/ProvideDomainNameCommand.js +37 -0
- package/lib/esm/internal/app-binder/command/ProvideDomainNameCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/ProvideNFTInformationCommand.d.ts +15 -0
- package/lib/esm/internal/app-binder/command/ProvideNFTInformationCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/ProvideNFTInformationCommand.js +46 -0
- package/lib/esm/internal/app-binder/command/ProvideNFTInformationCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/ProvideTokenInformationCommand.d.ts +14 -0
- package/lib/esm/internal/app-binder/command/ProvideTokenInformationCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/ProvideTokenInformationCommand.js +30 -0
- package/lib/esm/internal/app-binder/command/ProvideTokenInformationCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/SendEIP712FilteringCommand.d.ts +41 -0
- package/lib/esm/internal/app-binder/command/SendEIP712FilteringCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/SendEIP712FilteringCommand.js +65 -0
- package/lib/esm/internal/app-binder/command/SendEIP712FilteringCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.d.ts +25 -0
- package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.js +127 -0
- package/lib/esm/internal/app-binder/command/SendEIP712StructDefinitionCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/SendEIP712StructImplemCommand.d.ts +30 -0
- package/lib/esm/internal/app-binder/command/SendEIP712StructImplemCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/SendEIP712StructImplemCommand.js +47 -0
- package/lib/esm/internal/app-binder/command/SendEIP712StructImplemCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.d.ts +17 -0
- package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.js +52 -0
- package/lib/esm/internal/app-binder/command/SetExternalPluginCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/SetPluginCommand.d.ts +18 -0
- package/lib/esm/internal/app-binder/command/SetPluginCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/SetPluginCommand.js +47 -0
- package/lib/esm/internal/app-binder/command/SetPluginCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/SignEIP712Command.d.ts +25 -0
- package/lib/esm/internal/app-binder/command/SignEIP712Command.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/SignEIP712Command.js +65 -0
- package/lib/esm/internal/app-binder/command/SignEIP712Command.js.map +1 -0
- package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.d.ts +21 -0
- package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.js +56 -0
- package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.d.ts +24 -0
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.js +55 -0
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.js.map +1 -0
- package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.d.ts +17 -0
- package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js +157 -0
- package/lib/esm/internal/app-binder/device-action/SignPersonalMessage/SignPersonalMessageDeviceAction.js.map +1 -0
- package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.d.ts +39 -0
- package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js +281 -0
- package/lib/esm/internal/app-binder/device-action/SignTransaction/SignTransactionDeviceAction.js.map +1 -0
- package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.d.ts +31 -0
- package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js +241 -0
- package/lib/esm/internal/app-binder/device-action/SignTypedData/SignTypedDataDeviceAction.js.map +1 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts +3 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.js +15 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/makeInternalApi.js.map +1 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.d.ts +2 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js +27 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/setupOpenAppDAMock.js.map +1 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts +12 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js +32 -0
- package/lib/esm/internal/app-binder/device-action/__test-utils__/testDeviceActionStates.js.map +1 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.d.ts +3 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.js +7 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.js.map +1 -0
- package/lib/esm/internal/app-binder/di/appBinderTypes.d.ts +4 -0
- package/lib/esm/internal/app-binder/di/appBinderTypes.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/di/appBinderTypes.js +4 -0
- package/lib/esm/internal/app-binder/di/appBinderTypes.js.map +1 -0
- package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.d.ts +16 -0
- package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.js +68 -0
- package/lib/esm/internal/app-binder/task/BuildEIP712ContextTask.js.map +1 -0
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.d.ts +21 -0
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.js +27 -0
- package/lib/esm/internal/app-binder/task/BuildTransactionContextTask.js.map +1 -0
- package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.d.ts +21 -0
- package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.js +184 -0
- package/lib/esm/internal/app-binder/task/ProvideEIP712ContextTask.js.map +1 -0
- package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.d.ts +57 -0
- package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.js +107 -0
- package/lib/esm/internal/app-binder/task/ProvideTransactionContextTask.js.map +1 -0
- package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.d.ts +19 -0
- package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.js +38 -0
- package/lib/esm/internal/app-binder/task/SendEIP712StructImplemTask.js.map +1 -0
- package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.d.ts +14 -0
- package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.js +49 -0
- package/lib/esm/internal/app-binder/task/SendSignPersonalMessageTask.js.map +1 -0
- package/lib/esm/internal/app-binder/task/SendSignTransactionTask.d.ts +14 -0
- package/lib/esm/internal/app-binder/task/SendSignTransactionTask.d.ts.map +1 -0
- package/lib/esm/internal/app-binder/task/SendSignTransactionTask.js +49 -0
- package/lib/esm/internal/app-binder/task/SendSignTransactionTask.js.map +1 -0
- package/lib/esm/internal/di.d.ts +10 -0
- package/lib/esm/internal/di.d.ts.map +1 -0
- package/lib/esm/internal/di.js +23 -0
- package/lib/esm/internal/di.js.map +1 -0
- package/lib/esm/internal/externalTypes.d.ts +6 -0
- package/lib/esm/internal/externalTypes.d.ts.map +1 -0
- package/lib/esm/internal/externalTypes.js +6 -0
- package/lib/esm/internal/externalTypes.js.map +1 -0
- package/lib/esm/internal/message/di/messageModule.d.ts +3 -0
- package/lib/esm/internal/message/di/messageModule.d.ts.map +1 -0
- package/lib/esm/internal/message/di/messageModule.js +7 -0
- package/lib/esm/internal/message/di/messageModule.js.map +1 -0
- package/lib/esm/internal/message/di/messageTypes.d.ts +4 -0
- package/lib/esm/internal/message/di/messageTypes.d.ts.map +1 -0
- package/lib/esm/internal/message/di/messageTypes.js +4 -0
- package/lib/esm/internal/message/di/messageTypes.js.map +1 -0
- package/lib/esm/internal/message/use-case/SignMessageUseCase.d.ts +8 -0
- package/lib/esm/internal/message/use-case/SignMessageUseCase.d.ts.map +1 -0
- package/lib/esm/internal/message/use-case/SignMessageUseCase.js +35 -0
- package/lib/esm/internal/message/use-case/SignMessageUseCase.js.map +1 -0
- package/lib/esm/internal/shared/utils/DerivationPathUtils.d.ts +5 -0
- package/lib/esm/internal/shared/utils/DerivationPathUtils.d.ts.map +1 -0
- package/lib/esm/internal/shared/utils/DerivationPathUtils.js +20 -0
- package/lib/esm/internal/shared/utils/DerivationPathUtils.js.map +1 -0
- package/lib/esm/internal/transaction/di/transactionModule.d.ts +3 -0
- package/lib/esm/internal/transaction/di/transactionModule.d.ts.map +1 -0
- package/lib/esm/internal/transaction/di/transactionModule.js +13 -0
- package/lib/esm/internal/transaction/di/transactionModule.js.map +1 -0
- package/lib/esm/internal/transaction/di/transactionTypes.d.ts +6 -0
- package/lib/esm/internal/transaction/di/transactionTypes.d.ts.map +1 -0
- package/lib/esm/internal/transaction/di/transactionTypes.js +6 -0
- package/lib/esm/internal/transaction/di/transactionTypes.js.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.d.ts +10 -0
- package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.d.ts.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.js +57 -0
- package/lib/esm/internal/transaction/service/mapper/EthersV5TransactionMapper.js.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.d.ts +9 -0
- package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.d.ts.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.js +33 -0
- package/lib/esm/internal/transaction/service/mapper/EthersV6TransactionMapper.js.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/TransactionMapper.d.ts +7 -0
- package/lib/esm/internal/transaction/service/mapper/TransactionMapper.d.ts.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/TransactionMapper.js +2 -0
- package/lib/esm/internal/transaction/service/mapper/TransactionMapper.js.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.d.ts +10 -0
- package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.d.ts.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.js +38 -0
- package/lib/esm/internal/transaction/service/mapper/TransactionMapperService.js.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/model/TransactionMapperResult.d.ts +12 -0
- package/lib/esm/internal/transaction/service/mapper/model/TransactionMapperResult.d.ts.map +1 -0
- package/lib/esm/internal/transaction/service/mapper/model/TransactionMapperResult.js +2 -0
- package/lib/esm/internal/transaction/service/mapper/model/TransactionMapperResult.js.map +1 -0
- package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.d.ts +10 -0
- package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.d.ts.map +1 -0
- package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.js +35 -0
- package/lib/esm/internal/transaction/use-case/SignTransactionUseCase.js.map +1 -0
- package/lib/esm/internal/typed-data/di/typedDataModule.d.ts +3 -0
- package/lib/esm/internal/typed-data/di/typedDataModule.d.ts.map +1 -0
- package/lib/esm/internal/typed-data/di/typedDataModule.js +9 -0
- package/lib/esm/internal/typed-data/di/typedDataModule.js.map +1 -0
- package/lib/esm/internal/typed-data/di/typedDataTypes.d.ts +5 -0
- package/lib/esm/internal/typed-data/di/typedDataTypes.d.ts.map +1 -0
- package/lib/esm/internal/typed-data/di/typedDataTypes.js +5 -0
- package/lib/esm/internal/typed-data/di/typedDataTypes.js.map +1 -0
- package/lib/esm/internal/typed-data/model/Types.d.ts +41 -0
- package/lib/esm/internal/typed-data/model/Types.d.ts.map +1 -0
- package/lib/esm/internal/typed-data/model/Types.js +55 -0
- package/lib/esm/internal/typed-data/model/Types.js.map +1 -0
- package/lib/esm/internal/typed-data/service/DefaultTypedDataParserService.d.ts +7 -0
- package/lib/esm/internal/typed-data/service/DefaultTypedDataParserService.d.ts.map +1 -0
- package/lib/esm/internal/typed-data/service/DefaultTypedDataParserService.js +26 -0
- package/lib/esm/internal/typed-data/service/DefaultTypedDataParserService.js.map +1 -0
- package/lib/esm/internal/typed-data/service/TypedDataEncoder.d.ts +10 -0
- package/lib/esm/internal/typed-data/service/TypedDataEncoder.d.ts.map +1 -0
- package/lib/esm/internal/typed-data/service/TypedDataEncoder.js +98 -0
- package/lib/esm/internal/typed-data/service/TypedDataEncoder.js.map +1 -0
- package/lib/esm/internal/typed-data/service/TypedDataParser.d.ts +73 -0
- package/lib/esm/internal/typed-data/service/TypedDataParser.d.ts.map +1 -0
- package/lib/esm/internal/typed-data/service/TypedDataParser.js +207 -0
- package/lib/esm/internal/typed-data/service/TypedDataParser.js.map +1 -0
- package/lib/esm/internal/typed-data/service/TypedDataParserService.d.ts +12 -0
- package/lib/esm/internal/typed-data/service/TypedDataParserService.d.ts.map +1 -0
- package/lib/esm/internal/typed-data/service/TypedDataParserService.js +2 -0
- package/lib/esm/internal/typed-data/service/TypedDataParserService.js.map +1 -0
- package/lib/esm/internal/typed-data/use-case/SignTypedDataUseCase.d.ts +11 -0
- package/lib/esm/internal/typed-data/use-case/SignTypedDataUseCase.d.ts.map +1 -0
- package/lib/esm/internal/typed-data/use-case/SignTypedDataUseCase.js +39 -0
- package/lib/esm/internal/typed-data/use-case/SignTypedDataUseCase.js.map +1 -0
- package/package.json +66 -0
package/README.md
ADDED
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
# Ledger Ethereum Keyring Implementation
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
This module provides the implementation of the Ledger Ethereum keyring of the Device Management Kit. It enables interaction with the Ethereum application on a Ledger device including:
|
|
6
|
+
|
|
7
|
+
- Retrieving the Ethereum address using a given derivation path;
|
|
8
|
+
- Signing an Ethereum transaction ([Clear Signing](https://www.ledger.com/academy/topics/ledgersolutions/what-is-clear-signing));
|
|
9
|
+
- Signing a message displayed on a Ledger device;
|
|
10
|
+
- Signing an [EIP-712](https://eips.ethereum.org/EIPS/eip-712) specified message.
|
|
11
|
+
|
|
12
|
+
### How it works
|
|
13
|
+
|
|
14
|
+
The Ledger Ethereum Keyring utilizes the advanced capabilities of the Ledger device to provide secure operations for end users. It takes advantage of the interface provided by the Device Management Kit to establish communication with the Ledger device and execute various operations, including signing transactions. The communication with the Ledger device is performed using [APDU](https://en.wikipedia.org/wiki/Smart_card_application_protocol_data_unit)s (Application Protocol Data Units), which are encapsulated within the `Command` object. These commands are then organized into tasks, allowing for the execution of complex operations with one or more APDUs. The tasks are further encapsulated within `DeviceAction` objects to handle different real-world scenarios. Finally, the Keyring exposes dedicated and independent use cases that can be directly utilized by end users.
|
|
15
|
+
|
|
16
|
+
### Installation
|
|
17
|
+
|
|
18
|
+
> **Note:** This module is not standalone; it depends on the [@ledgerhq/device-management-kit](https://github.com/LedgerHQ/device-sdk-ts/tree/develop/packages/core) package, so you need to install it first.
|
|
19
|
+
|
|
20
|
+
To install the `device-signer-kit-ethereum` package, run the following command:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install @ledgerhq/device-signer-kit-ethereum
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
### Setting up
|
|
29
|
+
|
|
30
|
+
To initialize an Ethereum keyring instance, you need a Ledger Device Management Kit instance and the ID of the session of the connected device. Use the `KeyringEthBuilder` along with the [Context Module](https://github.com/LedgerHQ/device-sdk-ts/tree/develop/packages/signer/context-module) by default developed by Ledger:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
// Initialize an Ethereum keyring instance using default context module
|
|
34
|
+
const keyringEth = new KeyringEthBuilder({ sdk, sessionId }).build();
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
You can also configure the context module yourself:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
// Initialize an Ethereum keyring instance using customized context module
|
|
41
|
+
const keyringEth = new KeyringEthBuilder({ sdk, sessionId })
|
|
42
|
+
.withContextModule(customContextModule)
|
|
43
|
+
.build();
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Use Cases
|
|
47
|
+
|
|
48
|
+
The `KeyringEthBuilder.build()` method will return a `KeyringEth` instance that exposes 4 dedicated methods, each of which calls an independent use case. Each use case will return an object that contains an observable and a method called `cancel`.
|
|
49
|
+
|
|
50
|
+
#### Use Case 1: Get Address
|
|
51
|
+
|
|
52
|
+
This method allows users to retrieve the Ethereum address according to given `derivationPath`.
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
const { observable, cancel } = keyringETH.getAddress(derivationPath, options);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Parameters**
|
|
59
|
+
|
|
60
|
+
- `derivationPath`
|
|
61
|
+
|
|
62
|
+
- **Required**
|
|
63
|
+
- **Type:** `string` (e.g., `"44'/60'/0'/0/0"`)
|
|
64
|
+
- The derivation path used for the Ethereum address. See [here](https://www.ledger.com/blog/understanding-crypto-addresses-and-derivation-paths) for more information.
|
|
65
|
+
|
|
66
|
+
- `options`
|
|
67
|
+
|
|
68
|
+
- Optional
|
|
69
|
+
- Type: `AddressOptions`
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
type AddressOptions = {
|
|
73
|
+
checkOnDevice?: boolean;
|
|
74
|
+
returnChainCode?: boolean;
|
|
75
|
+
};
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- `checkOnDevice`: An optional boolean indicating whether user confirmation on the device is required (`true`) or not (`false`).
|
|
79
|
+
- `returnChainCode`: An optional boolean indicating whether the chain code should be returned (`true`) or not (`false`).
|
|
80
|
+
|
|
81
|
+
**Returns**
|
|
82
|
+
|
|
83
|
+
- `observable`
|
|
84
|
+
|
|
85
|
+
- An [Observable](https://rxjs.dev/guide/observable) object that contains the [`DeviceActionState`](https://github.com/LedgerHQ/device-sdk-ts/blob/develop/packages/core/src/api/device-action/model/DeviceActionState.ts) derived instance, which reprensents the operation's state. For example:
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
observable.subscribe({
|
|
89
|
+
next: (state: DeviceActionState) => {
|
|
90
|
+
switch (state.status) {
|
|
91
|
+
case DeviceActionStatus.NotStarted: {
|
|
92
|
+
console.log("The action is not started yet.");
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case DeviceActionStatus.Pending: {
|
|
96
|
+
const {
|
|
97
|
+
intermediateValue: { requiredUserInteraction },
|
|
98
|
+
} = state;
|
|
99
|
+
// Access the intermediate value here, explained below
|
|
100
|
+
console.log(
|
|
101
|
+
"The action is pending and the intermediate value is: ",
|
|
102
|
+
intermediateValue,
|
|
103
|
+
);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
case DeviceActionStatus.Stopped: {
|
|
107
|
+
console.log("The action has been stopped.");
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
case DeviceActionStatus.Completed: {
|
|
111
|
+
const { output } = state;
|
|
112
|
+
// Access the output of the completed action here
|
|
113
|
+
console.log("The action has been completed: ", output);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case DeviceActionStatus.Error: {
|
|
117
|
+
const { error } = state;
|
|
118
|
+
// Access the error here if occured
|
|
119
|
+
console.log("An error occured during the action: ", error);
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
const { requiredUserInteraction } = intermediateValue;
|
|
131
|
+
|
|
132
|
+
switch (requiredUserInteraction) {
|
|
133
|
+
case UserInteractionRequired.VerifyAddress: {
|
|
134
|
+
// User needs to verify the address displayed on the device
|
|
135
|
+
console.log(
|
|
136
|
+
"User needs to verify the address displayed on the device.",
|
|
137
|
+
);
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
case UserInteractionRequired.None: {
|
|
141
|
+
// No user action required
|
|
142
|
+
console.log("No user action needed.");
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
case UserInteractionRequired.UnlockDevice: {
|
|
146
|
+
// User needs to unlock the device
|
|
147
|
+
console.log("The user needs to unlock the device.");
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
case UserInteractionRequired.ConfirmOpenApp: {
|
|
151
|
+
// User needs to confirm on the device to open the app
|
|
152
|
+
console.log("The user needs to confirm on the device to open the app.");
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
default:
|
|
156
|
+
// Type guard to ensure all cases are handled
|
|
157
|
+
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
158
|
+
console.error(
|
|
159
|
+
"Unhandled user interaction case:",
|
|
160
|
+
uncaughtUserInteraction,
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
- When the action status is `DeviceActionStatus.Completed`, the execution result can be accessed through the `output` property in the state. The `output` property is of type `GetAddressCommandResponse`, which has the following structure:
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
type GetAddressCommandResponse = {
|
|
169
|
+
publicKey: string;
|
|
170
|
+
address: `0x${string}`;
|
|
171
|
+
chainCode?: string;
|
|
172
|
+
};
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
- `cancel`
|
|
176
|
+
- The function without a return value to cancel the action on the Ledger device.
|
|
177
|
+
|
|
178
|
+
#### Use Case 2: Sign Transaction
|
|
179
|
+
|
|
180
|
+
This method enables users to securely sign transactions using clear signing on Ledger devices.
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
const { observable, cancel } = keyringETH.signTransaction(
|
|
184
|
+
derivationPath,
|
|
185
|
+
transaction,
|
|
186
|
+
options,
|
|
187
|
+
);
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Parameters**
|
|
191
|
+
|
|
192
|
+
- `derivationPath`
|
|
193
|
+
|
|
194
|
+
- **Required**
|
|
195
|
+
- **Type:** `string` (e.g., `"44'/60'/0'/0/0"`)
|
|
196
|
+
- The derivation path used in the transaction. See [here](https://www.ledger.com/blog/understanding-crypto-addresses-and-derivation-paths) for more information.
|
|
197
|
+
|
|
198
|
+
- `transaction`
|
|
199
|
+
|
|
200
|
+
- **Required**
|
|
201
|
+
- **Type:**`Transaction` (compatible with [ethers v5](https://docs.ethers.org/v5/) or [ethers v6](https://docs.ethers.org/v6/))
|
|
202
|
+
- The transaction object that needs to be signed.
|
|
203
|
+
|
|
204
|
+
- `options`
|
|
205
|
+
|
|
206
|
+
- **Optional**
|
|
207
|
+
- **Type:** `TransactionOptions`
|
|
208
|
+
|
|
209
|
+
```typescript
|
|
210
|
+
type TransactionOptions = {
|
|
211
|
+
domain?: string;
|
|
212
|
+
};
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- `domain` An optional string representing the domain present in the transaction. Currently, only ENS domains are supported.
|
|
216
|
+
|
|
217
|
+
**Returns**
|
|
218
|
+
|
|
219
|
+
- `observable`
|
|
220
|
+
|
|
221
|
+
- An [Observable](https://rxjs.dev/guide/observable) object that contains the [`DeviceActionState`](https://github.com/LedgerHQ/device-sdk-ts/blob/develop/packages/core/src/api/device-action/model/DeviceActionState.ts) derived instance which reprensents the operation's state. For example:
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
observable.subscribe({
|
|
225
|
+
next: (state: SignTransactionDAState) => {
|
|
226
|
+
switch (state.status) {
|
|
227
|
+
case DeviceActionStatus.NotStarted: {
|
|
228
|
+
console.log("The action is not started yet.");
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
case DeviceActionStatus.Pending: {
|
|
232
|
+
const {
|
|
233
|
+
intermediateValue: { requiredUserInteraction },
|
|
234
|
+
} = state;
|
|
235
|
+
// Access the intermediate value here, explained below
|
|
236
|
+
console.log(
|
|
237
|
+
"The action is pending and the intermediate value is: ",
|
|
238
|
+
intermediateValue,
|
|
239
|
+
);
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
case DeviceActionStatus.Stopped: {
|
|
243
|
+
console.log("The action has been stopped.");
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
case DeviceActionStatus.Completed: {
|
|
247
|
+
const { output } = state;
|
|
248
|
+
// Access the output of the completed action here
|
|
249
|
+
console.log("The action has been completed: ", output);
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
case DeviceActionStatus.Error: {
|
|
253
|
+
const { error } = state;
|
|
254
|
+
// Access the error here if occured
|
|
255
|
+
console.log("An error occured during the action: ", error);
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
});
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
- When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
const { requiredUserInteraction } = intermediateValue;
|
|
267
|
+
|
|
268
|
+
switch (requiredUserInteraction) {
|
|
269
|
+
case UserInteractionRequired.SignTransaction: {
|
|
270
|
+
// User needs to sign the transaction displayed on the device
|
|
271
|
+
console.log(
|
|
272
|
+
"User needs to sign the transaction displayed on the device.",
|
|
273
|
+
);
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
case UserInteractionRequired.None: {
|
|
277
|
+
// No user action required
|
|
278
|
+
console.log("No user action needed.");
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
case UserInteractionRequired.UnlockDevice: {
|
|
282
|
+
// User needs to unlock the device
|
|
283
|
+
console.log("The user needs to unlock the device.");
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
case UserInteractionRequired.ConfirmOpenApp: {
|
|
287
|
+
// User needs to confirm on the device to open the app
|
|
288
|
+
console.log("The user needs to confirm on the device to open the app.");
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
default:
|
|
292
|
+
// Type guard to ensure all cases are handled
|
|
293
|
+
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
294
|
+
console.error(
|
|
295
|
+
"Unhandled user interaction case:",
|
|
296
|
+
uncaughtUserInteraction,
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
- When the action status is `DeviceActionStatus.Completed`, the execution result can be accessed through the `output` property in the state. This property is a `Signature` object with the following structure:
|
|
302
|
+
|
|
303
|
+
```typescript
|
|
304
|
+
type Signature = {
|
|
305
|
+
r: `0x${string}`;
|
|
306
|
+
s: `0x${string}`;
|
|
307
|
+
v: number;
|
|
308
|
+
};
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
- `cancel`
|
|
312
|
+
- The function without a return value to cancel the action on the Ledger device.
|
|
313
|
+
|
|
314
|
+
#### Use Case 3: Sign Message
|
|
315
|
+
|
|
316
|
+
This method allows users to sign a text string that is displayed on Ledger devices.
|
|
317
|
+
|
|
318
|
+
```typescript
|
|
319
|
+
const { observable, cancel } = keyringETH.signMessage(derivationPath, message);
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**Parameters**
|
|
323
|
+
|
|
324
|
+
- `derivationPath`
|
|
325
|
+
|
|
326
|
+
- **Required**
|
|
327
|
+
- **Type:** `string` (e.g., `"44'/60'/0'/0/0"`)
|
|
328
|
+
- The derivation path used by the Ethereum message. See [here](https://www.ledger.com/blog/understanding-crypto-addresses-and-derivation-paths) for more information.
|
|
329
|
+
|
|
330
|
+
- `message`
|
|
331
|
+
|
|
332
|
+
- **Required**
|
|
333
|
+
- **Type:** `string`
|
|
334
|
+
- The message to be signed, which will be displayed on the Ledger device.
|
|
335
|
+
|
|
336
|
+
**Returns**
|
|
337
|
+
|
|
338
|
+
- `observable`
|
|
339
|
+
|
|
340
|
+
- An [Observable](https://rxjs.dev/guide/observable) object that contains the [`DeviceActionState`](https://github.com/LedgerHQ/device-sdk-ts/blob/develop/packages/core/src/api/device-action/model/DeviceActionState.ts) derived instance which reprensents the operation's state. For example:
|
|
341
|
+
|
|
342
|
+
```typescript
|
|
343
|
+
observable.subscribe({
|
|
344
|
+
next: (state: SignPersonalMessageDAState) => {
|
|
345
|
+
switch (state.status) {
|
|
346
|
+
case DeviceActionStatus.NotStarted: {
|
|
347
|
+
console.log("The action is not started yet.");
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
case DeviceActionStatus.Pending: {
|
|
351
|
+
const {
|
|
352
|
+
intermediateValue: { requiredUserInteraction },
|
|
353
|
+
} = state;
|
|
354
|
+
// Access the intermediate value here, explained below
|
|
355
|
+
console.log(
|
|
356
|
+
"The action is pending and the intermediate value is: ",
|
|
357
|
+
intermediateValue,
|
|
358
|
+
);
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
case DeviceActionStatus.Stopped: {
|
|
362
|
+
console.log("The action has been stopped.");
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
case DeviceActionStatus.Completed: {
|
|
366
|
+
const { output } = state;
|
|
367
|
+
// Access the output of the completed action here
|
|
368
|
+
console.log("The action has been completed: ", output);
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
case DeviceActionStatus.Error: {
|
|
372
|
+
const { error } = state;
|
|
373
|
+
// Access the error here if occured
|
|
374
|
+
console.log("An error occured during the action: ", error);
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
});
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
- When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
const { requiredUserInteraction } = intermediateValue;
|
|
386
|
+
|
|
387
|
+
switch (requiredUserInteraction) {
|
|
388
|
+
case UserInteractionRequired.SignPersonalMessage: {
|
|
389
|
+
// User needs to sign the message displayed on the device
|
|
390
|
+
console.log("User needs to sign the message displayed on the device.");
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
case UserInteractionRequired.None: {
|
|
394
|
+
// No user action required
|
|
395
|
+
console.log("No user action needed.");
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
case UserInteractionRequired.UnlockDevice: {
|
|
399
|
+
// User needs to unlock the device
|
|
400
|
+
console.log("The user needs to unlock the device.");
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
case UserInteractionRequired.ConfirmOpenApp: {
|
|
404
|
+
// User needs to confirm on the device to open the app
|
|
405
|
+
console.log("The user needs to confirm on the device to open the app.");
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
default:
|
|
409
|
+
// Type guard to ensure all cases are handled
|
|
410
|
+
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
411
|
+
console.error(
|
|
412
|
+
"Unhandled user interaction case:",
|
|
413
|
+
uncaughtUserInteraction,
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
- When the action status is `DeviceActionStatus.Completed`, the execution result can be accessed through the `output` property in the state. This property is a `Signature` object with the following structure:
|
|
419
|
+
|
|
420
|
+
```typescript
|
|
421
|
+
type Signature = {
|
|
422
|
+
r: `0x${string}`;
|
|
423
|
+
s: `0x${string}`;
|
|
424
|
+
v: number;
|
|
425
|
+
};
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
- `cancel`
|
|
429
|
+
- The function without a return value to cancel the action on the Ledger device.
|
|
430
|
+
|
|
431
|
+
#### Use Case 4: Sign TypedData
|
|
432
|
+
|
|
433
|
+
This method enables users to sign an Ethereum message following the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) specification.
|
|
434
|
+
|
|
435
|
+
```typescript
|
|
436
|
+
const { observable, cancel } = keyringETH.signTypedData(
|
|
437
|
+
derivationPath,
|
|
438
|
+
typedData,
|
|
439
|
+
);
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
**Parameters**
|
|
443
|
+
|
|
444
|
+
- `derivationPath`
|
|
445
|
+
|
|
446
|
+
- **Required**
|
|
447
|
+
- **Type:** `string` (e.g., `"44'/60'/0'/0/0"`)
|
|
448
|
+
- The derivation path used by the Ethereum message. See [here](https://www.ledger.com/blog/understanding-crypto-addresses-and-derivation-paths) for more information.
|
|
449
|
+
|
|
450
|
+
- `typedData`
|
|
451
|
+
|
|
452
|
+
- **Required**
|
|
453
|
+
- **Type:** `TypedData`
|
|
454
|
+
|
|
455
|
+
```typescript
|
|
456
|
+
interface TypedData {
|
|
457
|
+
domain: TypedDataDomain;
|
|
458
|
+
types: Record<string, Array<TypedDataField>>;
|
|
459
|
+
primaryType: string;
|
|
460
|
+
message: Record<string, unknown>;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
interface TypedDataDomain {
|
|
464
|
+
name?: string;
|
|
465
|
+
version?: string;
|
|
466
|
+
chainId?: number;
|
|
467
|
+
verifyingContract?: string;
|
|
468
|
+
salt?: string;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
interface TypedDataField {
|
|
472
|
+
name: string;
|
|
473
|
+
type: string;
|
|
474
|
+
}
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
- The typed data as defined at [EIP-712](https://eips.ethereum.org/EIPS/eip-712).
|
|
478
|
+
|
|
479
|
+
**Returns**
|
|
480
|
+
|
|
481
|
+
- `observable`
|
|
482
|
+
|
|
483
|
+
- An [Observable](https://rxjs.dev/guide/observable) object that contains the [`DeviceActionState`](https://github.com/LedgerHQ/device-sdk-ts/blob/develop/packages/core/src/api/device-action/model/DeviceActionState.ts) derived instance which reprensents the operation's state. For example:
|
|
484
|
+
|
|
485
|
+
```typescript
|
|
486
|
+
observable.subscribe({
|
|
487
|
+
next: (state: SignTypedDataDAState) => {
|
|
488
|
+
switch (state.status) {
|
|
489
|
+
case DeviceActionStatus.NotStarted: {
|
|
490
|
+
console.log("The action is not started yet.");
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
case DeviceActionStatus.Pending: {
|
|
494
|
+
const { intermediateValue } = state;
|
|
495
|
+
// Access the intermediate value here, explained below
|
|
496
|
+
console.log(
|
|
497
|
+
"The action is pending and the intermediate value is: ",
|
|
498
|
+
requiredUserInteraction,
|
|
499
|
+
);
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
case DeviceActionStatus.Stopped: {
|
|
503
|
+
console.log("The action has been stopped.");
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
case DeviceActionStatus.Completed: {
|
|
507
|
+
const { output } = state;
|
|
508
|
+
// Access the output of the completed action here, explained below
|
|
509
|
+
console.log("The action has been completed: ", output);
|
|
510
|
+
break;
|
|
511
|
+
}
|
|
512
|
+
case DeviceActionStatus.Error: {
|
|
513
|
+
const { error } = state;
|
|
514
|
+
// Access the error here if occured
|
|
515
|
+
console.log("An error occured during the action: ", error);
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
});
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
- When the action status is `DeviceActionStatus.Pending`, the state will include an `intermediateValue` object that provides useful information for interaction:
|
|
524
|
+
|
|
525
|
+
```typescript
|
|
526
|
+
const { requiredUserInteraction } = intermediateValue;
|
|
527
|
+
|
|
528
|
+
switch (requiredUserInteraction) {
|
|
529
|
+
case UserInteractionRequired.SignTypedData: {
|
|
530
|
+
// User needs to sign the typed data displayed on the device
|
|
531
|
+
console.log(
|
|
532
|
+
"User needs to sign the typed data displayed on the device.",
|
|
533
|
+
);
|
|
534
|
+
break;
|
|
535
|
+
}
|
|
536
|
+
case UserInteractionRequired.None: {
|
|
537
|
+
// No user action required
|
|
538
|
+
console.log("No user action needed.");
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
case UserInteractionRequired.UnlockDevice: {
|
|
542
|
+
// User needs to unlock the device
|
|
543
|
+
console.log("The user needs to unlock the device.");
|
|
544
|
+
break;
|
|
545
|
+
}
|
|
546
|
+
case UserInteractionRequired.ConfirmOpenApp: {
|
|
547
|
+
// User needs to confirm on the device to open the app
|
|
548
|
+
console.log("The user needs to confirm on the device to open the app.");
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
default:
|
|
552
|
+
// Type guard to ensure all cases are handled
|
|
553
|
+
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
554
|
+
console.error(
|
|
555
|
+
"Unhandled user interaction case:",
|
|
556
|
+
uncaughtUserInteraction,
|
|
557
|
+
);
|
|
558
|
+
}
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
- When the action status is `DeviceActionStatus.Completed`, the execution result can be accessed through the `output` property in the state. This property is a `Signature` object with the following structure:
|
|
562
|
+
|
|
563
|
+
```typescript
|
|
564
|
+
type Signature = {
|
|
565
|
+
r: `0x${string}`;
|
|
566
|
+
s: `0x${string}`;
|
|
567
|
+
v: number;
|
|
568
|
+
};
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
- `cancel`
|
|
572
|
+
- The function without a return value to cancel the action on the Ledger device.
|
|
573
|
+
|
|
574
|
+
## Example
|
|
575
|
+
|
|
576
|
+
We encourage you to explore the Ethereum Keyring by trying it out in our online [sample application](https://app.devicesdk.ledger-test.com/). Experience how it works and see its capabilities in action. Of course, you will need a Ledger device connected.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GetAddressDAReturnType } from "./app-binder/GetAddressDeviceActionTypes";
|
|
2
|
+
import { SignTypedDataDAReturnType } from "./app-binder/SignTypedDataDeviceActionTypes";
|
|
3
|
+
import { AddressOptions } from "./model/AddressOptions";
|
|
4
|
+
import { Transaction } from "./model/Transaction";
|
|
5
|
+
import { TransactionOptions } from "./model/TransactionOptions";
|
|
6
|
+
import { TypedData } from "./model/TypedData";
|
|
7
|
+
import { SignPersonalMessageDAReturnType } from "./app-binder/SignPersonalMessageDeviceActionTypes";
|
|
8
|
+
import { SignTransactionDAReturnType } from "./app-binder/SignTransactionDeviceActionTypes";
|
|
9
|
+
export interface KeyringEth {
|
|
10
|
+
signTransaction: (derivationPath: string, transaction: Transaction, options?: TransactionOptions) => SignTransactionDAReturnType;
|
|
11
|
+
signMessage: (derivationPath: string, message: string) => SignPersonalMessageDAReturnType;
|
|
12
|
+
signTypedData: (derivationPath: string, typedData: TypedData) => SignTypedDataDAReturnType;
|
|
13
|
+
getAddress: (derivationPath: string, options?: AddressOptions) => GetAddressDAReturnType;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=KeyringEth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyringEth.d.ts","sourceRoot":"","sources":["../../../src/api/KeyringEth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAE5F,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,CACf,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE,kBAAkB,KACzB,2BAA2B,CAAC;IACjC,WAAW,EAAE,CACX,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,KACZ,+BAA+B,CAAC;IACrC,aAAa,EAAE,CACb,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,SAAS,KACjB,yBAAyB,CAAC;IAC/B,UAAU,EAAE,CACV,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,cAAc,KACrB,sBAAsB,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyringEth.js","sourceRoot":"","sources":["../../../src/api/KeyringEth.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ContextModule } from "@ledgerhq/context-module";
|
|
2
|
+
import { DeviceSdk } from "@ledgerhq/device-management-kit";
|
|
3
|
+
import { DeviceSessionId } from "@ledgerhq/device-management-kit/lib/cjs/index.js";
|
|
4
|
+
import { DefaultKeyringEth } from "../internal/DefaultKeyringEth";
|
|
5
|
+
type KeyringEthBuilderConstructorArgs = {
|
|
6
|
+
sdk: DeviceSdk;
|
|
7
|
+
sessionId: DeviceSessionId;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Builder for the `KeyringEth` class.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```
|
|
14
|
+
* const sdk = new KeyringEthBuilder(sdk)
|
|
15
|
+
* .build();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class KeyringEthBuilder {
|
|
19
|
+
private _sdk;
|
|
20
|
+
private _sessionId;
|
|
21
|
+
private _contextModule;
|
|
22
|
+
constructor({ sdk, sessionId }: KeyringEthBuilderConstructorArgs);
|
|
23
|
+
/**
|
|
24
|
+
* Override the default context module
|
|
25
|
+
*
|
|
26
|
+
* @param contextModule
|
|
27
|
+
* @returns this
|
|
28
|
+
*/
|
|
29
|
+
withContextModule(contextModule: ContextModule): this;
|
|
30
|
+
/**
|
|
31
|
+
* Build the ethereum keyring
|
|
32
|
+
*
|
|
33
|
+
* @returns the ethereum keyring
|
|
34
|
+
*/
|
|
35
|
+
build(): DefaultKeyringEth;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=KeyringEthBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyringEthBuilder.d.ts","sourceRoot":"","sources":["../../../src/api/KeyringEthBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAwB,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,KAAK,gCAAgC,GAAG;IACtC,GAAG,EAAE,SAAS,CAAC;IACf,SAAS,EAAE,eAAe,CAAC;CAC5B,CAAC;AAEF;;;;;;;;GAQG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,IAAI,CAAY;IACxB,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,cAAc,CAAgB;gBAE1B,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,gCAAgC;IAOhE;;;;;OAKG;IACH,iBAAiB,CAAC,aAAa,EAAE,aAAa;IAK9C;;;;OAIG;IACI,KAAK;CAOb"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KeyringEthBuilder = void 0;
|
|
4
|
+
const context_module_1 = require("@ledgerhq/context-module");
|
|
5
|
+
const DefaultKeyringEth_1 = require("../internal/DefaultKeyringEth");
|
|
6
|
+
/**
|
|
7
|
+
* Builder for the `KeyringEth` class.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```
|
|
11
|
+
* const sdk = new KeyringEthBuilder(sdk)
|
|
12
|
+
* .build();
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
class KeyringEthBuilder {
|
|
16
|
+
_sdk;
|
|
17
|
+
_sessionId;
|
|
18
|
+
_contextModule;
|
|
19
|
+
constructor({ sdk, sessionId }) {
|
|
20
|
+
this._sdk = sdk;
|
|
21
|
+
this._sessionId = sessionId;
|
|
22
|
+
// default context module for ETH
|
|
23
|
+
this._contextModule = new context_module_1.ContextModuleBuilder().build();
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Override the default context module
|
|
27
|
+
*
|
|
28
|
+
* @param contextModule
|
|
29
|
+
* @returns this
|
|
30
|
+
*/
|
|
31
|
+
withContextModule(contextModule) {
|
|
32
|
+
this._contextModule = contextModule;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Build the ethereum keyring
|
|
37
|
+
*
|
|
38
|
+
* @returns the ethereum keyring
|
|
39
|
+
*/
|
|
40
|
+
build() {
|
|
41
|
+
return new DefaultKeyringEth_1.DefaultKeyringEth({
|
|
42
|
+
sdk: this._sdk,
|
|
43
|
+
sessionId: this._sessionId,
|
|
44
|
+
contextModule: this._contextModule,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.KeyringEthBuilder = KeyringEthBuilder;
|
|
49
|
+
//# sourceMappingURL=KeyringEthBuilder.js.map
|