@ledgerhq/device-signer-kit-cosmos 0.0.0-develop-20260228001144
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 +303 -0
- package/lib/cjs/api/SignerCosmos.js +2 -0
- package/lib/cjs/api/SignerCosmos.js.map +7 -0
- package/lib/cjs/api/SignerCosmosBuilder.js +2 -0
- package/lib/cjs/api/SignerCosmosBuilder.js.map +7 -0
- package/lib/cjs/api/SignerCosmosBuilder.test.js +2 -0
- package/lib/cjs/api/SignerCosmosBuilder.test.js.map +7 -0
- package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js +2 -0
- package/lib/cjs/api/app-binder/GetAddressDeviceActionTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/GetAppConfigDeviceActionTypes.js +2 -0
- package/lib/cjs/api/app-binder/GetAppConfigDeviceActionTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js +2 -0
- package/lib/cjs/api/app-binder/SignTransactionDeviceActionTypes.js.map +7 -0
- package/lib/cjs/api/index.js +2 -0
- package/lib/cjs/api/index.js.map +7 -0
- package/lib/cjs/api/model/AppConfig.js +2 -0
- package/lib/cjs/api/model/AppConfig.js.map +7 -0
- package/lib/cjs/api/model/JsonObject.js +2 -0
- package/lib/cjs/api/model/JsonObject.js.map +7 -0
- package/lib/cjs/api/model/JsonTransactionFormat.js +2 -0
- package/lib/cjs/api/model/JsonTransactionFormat.js.map +7 -0
- package/lib/cjs/api/model/PubKey.js +2 -0
- package/lib/cjs/api/model/PubKey.js.map +7 -0
- package/lib/cjs/api/model/Signature.js +2 -0
- package/lib/cjs/api/model/Signature.js.map +7 -0
- package/lib/cjs/index.js +2 -0
- package/lib/cjs/index.js.map +7 -0
- package/lib/cjs/internal/DefaultSignerCosmos.js +2 -0
- package/lib/cjs/internal/DefaultSignerCosmos.js.map +7 -0
- package/lib/cjs/internal/DefaultSignerCosmos.test.js +2 -0
- package/lib/cjs/internal/DefaultSignerCosmos.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/CosmosAppBinder.js +2 -0
- package/lib/cjs/internal/app-binder/CosmosAppBinder.js.map +7 -0
- package/lib/cjs/internal/app-binder/CosmosAppBinder.test.js +2 -0
- package/lib/cjs/internal/app-binder/CosmosAppBinder.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetAddressCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetAppConfigCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetAppConfigCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/GetAppConfigCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetAppConfigCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/SignTransactionCommand.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/utils/CosmosApplicationError.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/utils/CosmosApplicationError.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/utils/CosmosApplicationErrors.js +2 -0
- package/lib/cjs/internal/app-binder/command/utils/CosmosApplicationErrors.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/utils/EncodeDerivationPath.js +2 -0
- package/lib/cjs/internal/app-binder/command/utils/EncodeDerivationPath.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/utils/EncodeDerivationPath.test.js +2 -0
- package/lib/cjs/internal/app-binder/command/utils/EncodeDerivationPath.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.js +2 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.js.map +7 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.test.js +2 -0
- package/lib/cjs/internal/app-binder/di/appBinderModule.test.js.map +7 -0
- package/lib/cjs/internal/app-binder/di/appBinderTypes.js +2 -0
- package/lib/cjs/internal/app-binder/di/appBinderTypes.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/SignTransactionTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/SignTransactionTask.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/SignTransactionTask.test.js +2 -0
- package/lib/cjs/internal/app-binder/task/SignTransactionTask.test.js.map +7 -0
- package/lib/cjs/internal/di.js +2 -0
- package/lib/cjs/internal/di.js.map +7 -0
- package/lib/cjs/internal/externalTypes.js +2 -0
- package/lib/cjs/internal/externalTypes.js.map +7 -0
- package/lib/cjs/internal/use-cases/address/GetAddressUseCase.js +2 -0
- package/lib/cjs/internal/use-cases/address/GetAddressUseCase.js.map +7 -0
- package/lib/cjs/internal/use-cases/address/GetAddressUseCase.test.js +2 -0
- package/lib/cjs/internal/use-cases/address/GetAddressUseCase.test.js.map +7 -0
- package/lib/cjs/internal/use-cases/address/di/addressModule.js +2 -0
- package/lib/cjs/internal/use-cases/address/di/addressModule.js.map +7 -0
- package/lib/cjs/internal/use-cases/address/di/addressModule.test.js +2 -0
- package/lib/cjs/internal/use-cases/address/di/addressModule.test.js.map +7 -0
- package/lib/cjs/internal/use-cases/address/di/addressTypes.js +2 -0
- package/lib/cjs/internal/use-cases/address/di/addressTypes.js.map +7 -0
- package/lib/cjs/internal/use-cases/config/GetAppConfigUseCase.js +2 -0
- package/lib/cjs/internal/use-cases/config/GetAppConfigUseCase.js.map +7 -0
- package/lib/cjs/internal/use-cases/config/GetAppConfigUseCase.test.js +2 -0
- package/lib/cjs/internal/use-cases/config/GetAppConfigUseCase.test.js.map +7 -0
- package/lib/cjs/internal/use-cases/config/di/configModule.js +2 -0
- package/lib/cjs/internal/use-cases/config/di/configModule.js.map +7 -0
- package/lib/cjs/internal/use-cases/config/di/configModule.test.js +2 -0
- package/lib/cjs/internal/use-cases/config/di/configModule.test.js.map +7 -0
- package/lib/cjs/internal/use-cases/config/di/configTypes.js +2 -0
- package/lib/cjs/internal/use-cases/config/di/configTypes.js.map +7 -0
- package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.js +2 -0
- package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.js.map +7 -0
- package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.test.js +2 -0
- package/lib/cjs/internal/use-cases/transaction/SignTransactionUseCase.test.js.map +7 -0
- package/lib/cjs/internal/use-cases/transaction/di/transactionModule.js +2 -0
- package/lib/cjs/internal/use-cases/transaction/di/transactionModule.js.map +7 -0
- package/lib/cjs/internal/use-cases/transaction/di/transactionModule.test.js +2 -0
- package/lib/cjs/internal/use-cases/transaction/di/transactionModule.test.js.map +7 -0
- package/lib/cjs/internal/use-cases/transaction/di/transactionTypes.js +2 -0
- package/lib/cjs/internal/use-cases/transaction/di/transactionTypes.js.map +7 -0
- package/lib/cjs/package.json +60 -0
- package/lib/esm/api/SignerCosmos.js +1 -0
- package/lib/esm/api/SignerCosmos.js.map +7 -0
- package/lib/esm/api/SignerCosmosBuilder.js +2 -0
- package/lib/esm/api/SignerCosmosBuilder.js.map +7 -0
- package/lib/esm/api/SignerCosmosBuilder.test.js +2 -0
- package/lib/esm/api/SignerCosmosBuilder.test.js.map +7 -0
- package/lib/esm/api/app-binder/GetAddressDeviceActionTypes.js +1 -0
- package/lib/esm/api/app-binder/GetAddressDeviceActionTypes.js.map +7 -0
- package/lib/esm/api/app-binder/GetAppConfigDeviceActionTypes.js +1 -0
- package/lib/esm/api/app-binder/GetAppConfigDeviceActionTypes.js.map +7 -0
- package/lib/esm/api/app-binder/SignTransactionDeviceActionTypes.js +1 -0
- package/lib/esm/api/app-binder/SignTransactionDeviceActionTypes.js.map +7 -0
- package/lib/esm/api/index.js +2 -0
- package/lib/esm/api/index.js.map +7 -0
- package/lib/esm/api/model/AppConfig.js +1 -0
- package/lib/esm/api/model/AppConfig.js.map +7 -0
- package/lib/esm/api/model/JsonObject.js +1 -0
- package/lib/esm/api/model/JsonObject.js.map +7 -0
- package/lib/esm/api/model/JsonTransactionFormat.js +1 -0
- package/lib/esm/api/model/JsonTransactionFormat.js.map +7 -0
- package/lib/esm/api/model/PubKey.js +1 -0
- package/lib/esm/api/model/PubKey.js.map +7 -0
- package/lib/esm/api/model/Signature.js +1 -0
- package/lib/esm/api/model/Signature.js.map +7 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +7 -0
- package/lib/esm/internal/DefaultSignerCosmos.js +2 -0
- package/lib/esm/internal/DefaultSignerCosmos.js.map +7 -0
- package/lib/esm/internal/DefaultSignerCosmos.test.js +2 -0
- package/lib/esm/internal/DefaultSignerCosmos.test.js.map +7 -0
- package/lib/esm/internal/app-binder/CosmosAppBinder.js +2 -0
- package/lib/esm/internal/app-binder/CosmosAppBinder.js.map +7 -0
- package/lib/esm/internal/app-binder/CosmosAppBinder.test.js +2 -0
- package/lib/esm/internal/app-binder/CosmosAppBinder.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetAddressCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/GetAddressCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetAddressCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/GetAddressCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetAppConfigCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/GetAppConfigCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/GetAppConfigCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/GetAppConfigCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.test.js +2 -0
- package/lib/esm/internal/app-binder/command/SignTransactionCommand.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/utils/CosmosApplicationError.test.js +2 -0
- package/lib/esm/internal/app-binder/command/utils/CosmosApplicationError.test.js.map +7 -0
- package/lib/esm/internal/app-binder/command/utils/CosmosApplicationErrors.js +2 -0
- package/lib/esm/internal/app-binder/command/utils/CosmosApplicationErrors.js.map +7 -0
- package/lib/esm/internal/app-binder/command/utils/EncodeDerivationPath.js +2 -0
- package/lib/esm/internal/app-binder/command/utils/EncodeDerivationPath.js.map +7 -0
- package/lib/esm/internal/app-binder/command/utils/EncodeDerivationPath.test.js +2 -0
- package/lib/esm/internal/app-binder/command/utils/EncodeDerivationPath.test.js.map +7 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.js +2 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.js.map +7 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.test.js +2 -0
- package/lib/esm/internal/app-binder/di/appBinderModule.test.js.map +7 -0
- package/lib/esm/internal/app-binder/di/appBinderTypes.js +2 -0
- package/lib/esm/internal/app-binder/di/appBinderTypes.js.map +7 -0
- package/lib/esm/internal/app-binder/task/SignTransactionTask.js +2 -0
- package/lib/esm/internal/app-binder/task/SignTransactionTask.js.map +7 -0
- package/lib/esm/internal/app-binder/task/SignTransactionTask.test.js +2 -0
- package/lib/esm/internal/app-binder/task/SignTransactionTask.test.js.map +7 -0
- package/lib/esm/internal/di.js +2 -0
- package/lib/esm/internal/di.js.map +7 -0
- package/lib/esm/internal/externalTypes.js +2 -0
- package/lib/esm/internal/externalTypes.js.map +7 -0
- package/lib/esm/internal/use-cases/address/GetAddressUseCase.js +2 -0
- package/lib/esm/internal/use-cases/address/GetAddressUseCase.js.map +7 -0
- package/lib/esm/internal/use-cases/address/GetAddressUseCase.test.js +2 -0
- package/lib/esm/internal/use-cases/address/GetAddressUseCase.test.js.map +7 -0
- package/lib/esm/internal/use-cases/address/di/addressModule.js +2 -0
- package/lib/esm/internal/use-cases/address/di/addressModule.js.map +7 -0
- package/lib/esm/internal/use-cases/address/di/addressModule.test.js +2 -0
- package/lib/esm/internal/use-cases/address/di/addressModule.test.js.map +7 -0
- package/lib/esm/internal/use-cases/address/di/addressTypes.js +2 -0
- package/lib/esm/internal/use-cases/address/di/addressTypes.js.map +7 -0
- package/lib/esm/internal/use-cases/config/GetAppConfigUseCase.js +2 -0
- package/lib/esm/internal/use-cases/config/GetAppConfigUseCase.js.map +7 -0
- package/lib/esm/internal/use-cases/config/GetAppConfigUseCase.test.js +2 -0
- package/lib/esm/internal/use-cases/config/GetAppConfigUseCase.test.js.map +7 -0
- package/lib/esm/internal/use-cases/config/di/configModule.js +2 -0
- package/lib/esm/internal/use-cases/config/di/configModule.js.map +7 -0
- package/lib/esm/internal/use-cases/config/di/configModule.test.js +2 -0
- package/lib/esm/internal/use-cases/config/di/configModule.test.js.map +7 -0
- package/lib/esm/internal/use-cases/config/di/configTypes.js +2 -0
- package/lib/esm/internal/use-cases/config/di/configTypes.js.map +7 -0
- package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.js +2 -0
- package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.js.map +7 -0
- package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.test.js +2 -0
- package/lib/esm/internal/use-cases/transaction/SignTransactionUseCase.test.js.map +7 -0
- package/lib/esm/internal/use-cases/transaction/di/transactionModule.js +2 -0
- package/lib/esm/internal/use-cases/transaction/di/transactionModule.js.map +7 -0
- package/lib/esm/internal/use-cases/transaction/di/transactionModule.test.js +2 -0
- package/lib/esm/internal/use-cases/transaction/di/transactionModule.test.js.map +7 -0
- package/lib/esm/internal/use-cases/transaction/di/transactionTypes.js +2 -0
- package/lib/esm/internal/use-cases/transaction/di/transactionTypes.js.map +7 -0
- package/lib/esm/package.json +60 -0
- package/lib/types/api/SignerCosmos.d.ts +16 -0
- package/lib/types/api/SignerCosmos.d.ts.map +1 -0
- package/lib/types/api/SignerCosmosBuilder.d.ts +22 -0
- package/lib/types/api/SignerCosmosBuilder.d.ts.map +1 -0
- package/lib/types/api/SignerCosmosBuilder.test.d.ts +2 -0
- package/lib/types/api/SignerCosmosBuilder.test.d.ts.map +1 -0
- package/lib/types/api/app-binder/GetAddressDeviceActionTypes.d.ts +10 -0
- package/lib/types/api/app-binder/GetAddressDeviceActionTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/GetAppConfigDeviceActionTypes.d.ts +10 -0
- package/lib/types/api/app-binder/GetAppConfigDeviceActionTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts +12 -0
- package/lib/types/api/app-binder/SignTransactionDeviceActionTypes.d.ts.map +1 -0
- package/lib/types/api/index.d.ts +7 -0
- package/lib/types/api/index.d.ts.map +1 -0
- package/lib/types/api/model/AppConfig.d.ts +6 -0
- package/lib/types/api/model/AppConfig.d.ts.map +1 -0
- package/lib/types/api/model/JsonObject.d.ts +6 -0
- package/lib/types/api/model/JsonObject.d.ts.map +1 -0
- package/lib/types/api/model/JsonTransactionFormat.d.ts +31 -0
- package/lib/types/api/model/JsonTransactionFormat.d.ts.map +1 -0
- package/lib/types/api/model/PubKey.d.ts +5 -0
- package/lib/types/api/model/PubKey.d.ts.map +1 -0
- package/lib/types/api/model/Signature.d.ts +2 -0
- package/lib/types/api/model/Signature.d.ts.map +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/internal/DefaultSignerCosmos.d.ts +18 -0
- package/lib/types/internal/DefaultSignerCosmos.d.ts.map +1 -0
- package/lib/types/internal/DefaultSignerCosmos.test.d.ts +2 -0
- package/lib/types/internal/DefaultSignerCosmos.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/CosmosAppBinder.d.ts +22 -0
- package/lib/types/internal/app-binder/CosmosAppBinder.d.ts.map +1 -0
- package/lib/types/internal/app-binder/CosmosAppBinder.test.d.ts +2 -0
- package/lib/types/internal/app-binder/CosmosAppBinder.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetAddressCommand.d.ts +27 -0
- package/lib/types/internal/app-binder/command/GetAddressCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetAddressCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/GetAddressCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetAppConfigCommand.d.ts +17 -0
- package/lib/types/internal/app-binder/command/GetAppConfigCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetAppConfigCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/GetAppConfigCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts +38 -0
- package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignTransactionCommand.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/SignTransactionCommand.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/utils/CosmosApplicationError.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/utils/CosmosApplicationError.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/utils/CosmosApplicationErrors.d.ts +22 -0
- package/lib/types/internal/app-binder/command/utils/CosmosApplicationErrors.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/utils/EncodeDerivationPath.d.ts +2 -0
- package/lib/types/internal/app-binder/command/utils/EncodeDerivationPath.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/utils/EncodeDerivationPath.test.d.ts +2 -0
- package/lib/types/internal/app-binder/command/utils/EncodeDerivationPath.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/di/appBinderModule.d.ts +3 -0
- package/lib/types/internal/app-binder/di/appBinderModule.d.ts.map +1 -0
- package/lib/types/internal/app-binder/di/appBinderModule.test.d.ts +2 -0
- package/lib/types/internal/app-binder/di/appBinderModule.test.d.ts.map +1 -0
- package/lib/types/internal/app-binder/di/appBinderTypes.d.ts +4 -0
- package/lib/types/internal/app-binder/di/appBinderTypes.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/SignTransactionTask.d.ts +17 -0
- package/lib/types/internal/app-binder/task/SignTransactionTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/SignTransactionTask.test.d.ts +2 -0
- package/lib/types/internal/app-binder/task/SignTransactionTask.test.d.ts.map +1 -0
- package/lib/types/internal/di.d.ts +9 -0
- package/lib/types/internal/di.d.ts.map +1 -0
- package/lib/types/internal/externalTypes.d.ts +6 -0
- package/lib/types/internal/externalTypes.d.ts.map +1 -0
- package/lib/types/internal/use-cases/address/GetAddressUseCase.d.ts +9 -0
- package/lib/types/internal/use-cases/address/GetAddressUseCase.d.ts.map +1 -0
- package/lib/types/internal/use-cases/address/GetAddressUseCase.test.d.ts +2 -0
- package/lib/types/internal/use-cases/address/GetAddressUseCase.test.d.ts.map +1 -0
- package/lib/types/internal/use-cases/address/di/addressModule.d.ts +3 -0
- package/lib/types/internal/use-cases/address/di/addressModule.d.ts.map +1 -0
- package/lib/types/internal/use-cases/address/di/addressModule.test.d.ts +2 -0
- package/lib/types/internal/use-cases/address/di/addressModule.test.d.ts.map +1 -0
- package/lib/types/internal/use-cases/address/di/addressTypes.d.ts +4 -0
- package/lib/types/internal/use-cases/address/di/addressTypes.d.ts.map +1 -0
- package/lib/types/internal/use-cases/config/GetAppConfigUseCase.d.ts +8 -0
- package/lib/types/internal/use-cases/config/GetAppConfigUseCase.d.ts.map +1 -0
- package/lib/types/internal/use-cases/config/GetAppConfigUseCase.test.d.ts +2 -0
- package/lib/types/internal/use-cases/config/GetAppConfigUseCase.test.d.ts.map +1 -0
- package/lib/types/internal/use-cases/config/di/configModule.d.ts +3 -0
- package/lib/types/internal/use-cases/config/di/configModule.d.ts.map +1 -0
- package/lib/types/internal/use-cases/config/di/configModule.test.d.ts +2 -0
- package/lib/types/internal/use-cases/config/di/configModule.test.d.ts.map +1 -0
- package/lib/types/internal/use-cases/config/di/configTypes.d.ts +4 -0
- package/lib/types/internal/use-cases/config/di/configTypes.d.ts.map +1 -0
- package/lib/types/internal/use-cases/transaction/SignTransactionUseCase.d.ts +9 -0
- package/lib/types/internal/use-cases/transaction/SignTransactionUseCase.d.ts.map +1 -0
- package/lib/types/internal/use-cases/transaction/SignTransactionUseCase.test.d.ts +2 -0
- package/lib/types/internal/use-cases/transaction/SignTransactionUseCase.test.d.ts.map +1 -0
- package/lib/types/internal/use-cases/transaction/di/transactionModule.d.ts +3 -0
- package/lib/types/internal/use-cases/transaction/di/transactionModule.d.ts.map +1 -0
- package/lib/types/internal/use-cases/transaction/di/transactionModule.test.d.ts +2 -0
- package/lib/types/internal/use-cases/transaction/di/transactionModule.test.d.ts.map +1 -0
- package/lib/types/internal/use-cases/transaction/di/transactionTypes.d.ts +4 -0
- package/lib/types/internal/use-cases/transaction/di/transactionTypes.d.ts.map +1 -0
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -0
- package/package.json +60 -0
package/LICENSE.MD
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2024-present Ledger
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# Ledger Cosmos Signer Implementation
|
|
2
|
+
|
|
3
|
+
This module provides the implementation of the Ledger Cosmos signer of the Device Management Kit. It enables interaction with the Cosmos application on a Ledger device including:
|
|
4
|
+
|
|
5
|
+
- Retrieving the Cosmos address using a given derivation path and HRP (Human-Readable Part);
|
|
6
|
+
- Signing a Cosmos transaction;
|
|
7
|
+
- Retrieving the app configuration;
|
|
8
|
+
|
|
9
|
+
## 🔹 Index
|
|
10
|
+
|
|
11
|
+
1. [How it works](#-how-it-works)
|
|
12
|
+
2. [Installation](#-installation)
|
|
13
|
+
3. [Initialisation](#-initialisation)
|
|
14
|
+
4. [Use Cases](#-use-cases)
|
|
15
|
+
- [Get Address](#use-case-1-get-address)
|
|
16
|
+
- [Sign Transaction](#use-case-2-sign-transaction)
|
|
17
|
+
- [Get App Configuration](#use-case-3-get-app-configuration)
|
|
18
|
+
5. [Observable Behavior](#-observable-behavior)
|
|
19
|
+
6. [Example](#-example)
|
|
20
|
+
|
|
21
|
+
## 🔹 How it works
|
|
22
|
+
|
|
23
|
+
The Ledger Cosmos Signer 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. 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 Signer exposes dedicated and independent use cases that can be directly utilized by end users.
|
|
24
|
+
|
|
25
|
+
## 🔹 Installation
|
|
26
|
+
|
|
27
|
+
> **Note:** This module is not standalone; it depends on the [@ledgerhq/device-management-kit](https://github.com/LedgerHQ/device-sdk-ts/tree/develop/packages/device-management-kit) package, so you need to install it first.
|
|
28
|
+
|
|
29
|
+
To install the `device-signer-kit-cosmos` package, run the following command:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npm install @ledgerhq/device-signer-kit-cosmos
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 🔹 Initialisation
|
|
36
|
+
|
|
37
|
+
To initialise a Cosmos signer instance, you need a Ledger Device Management Kit instance and the ID of the session of the connected device. Use the `SignerCosmosBuilder`:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
const signerCosmos = new SignerCosmosBuilder({ dmk, sessionId }).build();
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 🔹 Use Cases
|
|
44
|
+
|
|
45
|
+
The `SignerCosmosBuilder.build()` method will return a `SignerCosmos` instance that exposes 3 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`.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### Use Case 1: Get Address
|
|
50
|
+
|
|
51
|
+
This method allows users to retrieve the Cosmos address based on a given `derivationPath` and `hrp` (Human-Readable Part, e.g. `"cosmos"` for Cosmos Hub, `"osmosis"` for Osmosis).
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
const { observable, cancel } = signerCosmos.getAddress(
|
|
55
|
+
derivationPath,
|
|
56
|
+
hrp,
|
|
57
|
+
options,
|
|
58
|
+
);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### **Parameters**
|
|
62
|
+
|
|
63
|
+
- `derivationPath`
|
|
64
|
+
|
|
65
|
+
- **Required**
|
|
66
|
+
- **Type:** `string` (e.g., `"44'/118'/0'/0/0"`)
|
|
67
|
+
- The derivation path used for the Cosmos address. See [here](https://www.ledger.com/blog/understanding-crypto-addresses-and-derivation-paths) for more information.
|
|
68
|
+
|
|
69
|
+
- `hrp`
|
|
70
|
+
|
|
71
|
+
- **Required**
|
|
72
|
+
- **Type:** `string` (e.g., `"cosmos"`, `"osmosis"`)
|
|
73
|
+
- The Human-Readable Part that identifies the Cosmos chain (used for bech32 encoding of the address).
|
|
74
|
+
|
|
75
|
+
- `options`
|
|
76
|
+
|
|
77
|
+
- Optional
|
|
78
|
+
- Type: `AddressOptions`
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
type AddressOptions = {
|
|
82
|
+
checkOnDevice?: boolean;
|
|
83
|
+
skipOpenApp?: boolean;
|
|
84
|
+
};
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- `checkOnDevice`: An optional boolean indicating whether user confirmation on the device is required (`true`) or not (`false`).
|
|
88
|
+
- `skipOpenApp`: An optional boolean indicating whether to skip opening the Cosmos app on the device (`true`) or not (`false`). Use when the app is already open.
|
|
89
|
+
|
|
90
|
+
#### **Returns**
|
|
91
|
+
|
|
92
|
+
- `observable` Emits DeviceActionState updates, including the following details:
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
type PubKey = {
|
|
96
|
+
publicKey: Uint8Array;
|
|
97
|
+
address: string; // Bech32 address
|
|
98
|
+
};
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- `cancel` A function to cancel the action on the Ledger device.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Use Case 2: Sign Transaction
|
|
106
|
+
|
|
107
|
+
Securely sign a Cosmos transaction on Ledger devices.
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
const { observable, cancel } = signerCosmos.signTransaction(
|
|
111
|
+
derivationPath,
|
|
112
|
+
hrp,
|
|
113
|
+
transaction,
|
|
114
|
+
options,
|
|
115
|
+
);
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### **Parameters**
|
|
119
|
+
|
|
120
|
+
- `derivationPath`
|
|
121
|
+
|
|
122
|
+
- **Required**
|
|
123
|
+
- **Type:** `string` (e.g., `"44'/118'/0'/0/0"`)
|
|
124
|
+
- The derivation path used for the Cosmos address. See [here](https://www.ledger.com/blog/understanding-crypto-addresses-and-derivation-paths) for more information.
|
|
125
|
+
|
|
126
|
+
- `hrp`
|
|
127
|
+
|
|
128
|
+
- **Required**
|
|
129
|
+
- **Type:** `string` (e.g., `"cosmos"`, `"osmosis"`)
|
|
130
|
+
- The Human-Readable Part that identifies the Cosmos chain (used for bech32 encoding of the address).
|
|
131
|
+
|
|
132
|
+
- `transaction`
|
|
133
|
+
|
|
134
|
+
- **Required**
|
|
135
|
+
- **Type:** `Uint8Array`
|
|
136
|
+
- The serialized transaction bytes to sign.
|
|
137
|
+
|
|
138
|
+
- `options`
|
|
139
|
+
|
|
140
|
+
- Optional
|
|
141
|
+
- Type: `TransactionOptions`
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
type TransactionOptions = {
|
|
145
|
+
skipOpenApp?: boolean;
|
|
146
|
+
};
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
- `skipOpenApp`: An optional boolean indicating whether to skip opening the Cosmos app on the device (`true`) or not (`false`). Use when the app is already open.
|
|
150
|
+
|
|
151
|
+
#### **Returns**
|
|
152
|
+
|
|
153
|
+
- `observable` Emits DeviceActionState updates, including the following details:
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
type Signature = Uint8Array;
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
- `cancel` A function to cancel the action on the Ledger device.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### Internal Flow
|
|
164
|
+
|
|
165
|
+
Under the hood, this method subscribes to an
|
|
166
|
+
`Observable<DeviceActionState<SignTransactionCommandResponse, SignTransactionDAError, SignTransactionDAIntermediateValue>>`.
|
|
167
|
+
|
|
168
|
+
#### DeviceActionState
|
|
169
|
+
|
|
170
|
+
Represents the lifecycle of a device action:
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
type DeviceActionState<Output, Error, IntermediateValue> =
|
|
174
|
+
| { status: DeviceActionStatus.NotStarted }
|
|
175
|
+
| { status: DeviceActionStatus.Pending; intermediateValue: IntermediateValue }
|
|
176
|
+
| { status: DeviceActionStatus.Stopped }
|
|
177
|
+
| { status: DeviceActionStatus.Completed; output: Output }
|
|
178
|
+
| { status: DeviceActionStatus.Error; error: Error };
|
|
179
|
+
|
|
180
|
+
enum DeviceActionStatus {
|
|
181
|
+
NotStarted = "not-started",
|
|
182
|
+
Pending = "pending",
|
|
183
|
+
Stopped = "stopped",
|
|
184
|
+
Completed = "completed",
|
|
185
|
+
Error = "error",
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
- **NotStarted** → Action hasn't begun.
|
|
190
|
+
- **Pending** → Waiting for user confirmation on the device.
|
|
191
|
+
Includes an `intermediateValue` of type `SignTransactionDAIntermediateValue`.
|
|
192
|
+
- **Stopped** → Action was cancelled before completion.
|
|
193
|
+
- **Completed** → Provides the signature (`SignTransactionCommandResponse`).
|
|
194
|
+
- **Error** → The device or signing operation failed (`SignTransactionDAError`).
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
### Use Case 3: Get App Configuration
|
|
199
|
+
|
|
200
|
+
This method allows the user to fetch the current app configuration.
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
const { observable, cancel } = signerCosmos.getAppConfig();
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
#### **Returns**
|
|
207
|
+
|
|
208
|
+
- `observable` Emits DeviceActionState updates, including the following details:
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
type AppConfig = {
|
|
212
|
+
major: number;
|
|
213
|
+
minor: number;
|
|
214
|
+
patch: number;
|
|
215
|
+
};
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
- `cancel` A function to cancel the action on the Ledger device.
|
|
219
|
+
|
|
220
|
+
## 🔹 Observable Behavior
|
|
221
|
+
|
|
222
|
+
Each method returns an [Observable](https://rxjs.dev/guide/observable) emitting updates structured as [`DeviceActionState`](https://github.com/LedgerHQ/device-sdk-ts/blob/develop/packages/device-management-kit/src/api/device-action/model/DeviceActionState.ts). These updates reflect the operation's progress and status:
|
|
223
|
+
|
|
224
|
+
- **NotStarted**: The operation hasn't started.
|
|
225
|
+
- **Pending**: The operation is in progress and may require user interaction.
|
|
226
|
+
- **Stopped**: The operation was canceled or stopped.
|
|
227
|
+
- **Completed**: The operation completed successfully, with results available.
|
|
228
|
+
- **Error**: An error occurred.
|
|
229
|
+
|
|
230
|
+
**Example Observable Subscription:**
|
|
231
|
+
|
|
232
|
+
```typescript
|
|
233
|
+
observable.subscribe({
|
|
234
|
+
next: (state: DeviceActionState) => {
|
|
235
|
+
switch (state.status) {
|
|
236
|
+
case DeviceActionStatus.NotStarted: {
|
|
237
|
+
console.log("The action is not started yet.");
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
case DeviceActionStatus.Pending: {
|
|
241
|
+
const { intermediateValue } = state;
|
|
242
|
+
console.log(
|
|
243
|
+
"The action is pending and the intermediate value is: ",
|
|
244
|
+
intermediateValue,
|
|
245
|
+
);
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
case DeviceActionStatus.Stopped: {
|
|
249
|
+
console.log("The action has been stopped.");
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
case DeviceActionStatus.Completed: {
|
|
253
|
+
const { output } = state;
|
|
254
|
+
console.log("The action has been completed: ", output);
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
case DeviceActionStatus.Error: {
|
|
258
|
+
const { error } = state;
|
|
259
|
+
console.log("An error occurred during the action: ", error);
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Intermediate Values in Pending Status:**
|
|
268
|
+
|
|
269
|
+
When the status is DeviceActionStatus.Pending, the state will include an `intermediateValue` object that provides useful information for interaction:
|
|
270
|
+
|
|
271
|
+
```typescript
|
|
272
|
+
const { requiredUserInteraction } = intermediateValue;
|
|
273
|
+
|
|
274
|
+
switch (requiredUserInteraction) {
|
|
275
|
+
case UserInteractionRequired.VerifyAddress: {
|
|
276
|
+
console.log("User needs to verify the address displayed on the device.");
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
case UserInteractionRequired.SignTransaction: {
|
|
280
|
+
console.log("User needs to sign the transaction displayed on the device.");
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
case UserInteractionRequired.ConfirmOpenApp: {
|
|
284
|
+
console.log("The user needs to confirm on the device to open the app.");
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
case UserInteractionRequired.UnlockDevice: {
|
|
288
|
+
console.log("The user needs to unlock the device.");
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
case UserInteractionRequired.None: {
|
|
292
|
+
console.log("No user action needed.");
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
default:
|
|
296
|
+
const uncaughtUserInteraction: never = requiredUserInteraction;
|
|
297
|
+
console.error("Unhandled user interaction case:", uncaughtUserInteraction);
|
|
298
|
+
}
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## 🔹 Example
|
|
302
|
+
|
|
303
|
+
We encourage you to explore the Cosmos Signer 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,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var A=(n,t,o,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of s(t))!a.call(n,e)&&e!==o&&r(n,e,{get:()=>t[e],enumerable:!(p=i(t,e))||p.enumerable});return n};var g=n=>A(r({},"__esModule",{value:!0}),n);var d={};module.exports=g(d);
|
|
2
|
+
//# sourceMappingURL=SignerCosmos.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/SignerCosmos.ts"],
|
|
4
|
+
"sourcesContent": ["import { type GetAddressDAReturnType } from \"@api/app-binder/GetAddressDeviceActionTypes\";\nimport { type GetAppConfigDAReturnType } from \"@api/app-binder/GetAppConfigDeviceActionTypes\";\nimport { type SignTransactionDAReturnType } from \"@api/app-binder/SignTransactionDeviceActionTypes\";\n\nexport type AddressOptions = {\n checkOnDevice?: boolean;\n skipOpenApp?: boolean;\n};\n\nexport type TransactionOptions = {\n skipOpenApp?: boolean;\n};\n\nexport interface SignerCosmos {\n getAppConfig: () => GetAppConfigDAReturnType;\n\n getAddress: (\n derivationPath: string,\n hrp: string,\n options?: AddressOptions,\n ) => GetAddressDAReturnType;\n\n signTransaction: (\n derivationPath: string,\n hrp: string,\n transaction: Uint8Array,\n options?: TransactionOptions,\n ) => SignTransactionDAReturnType;\n}\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["SignerCosmos_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(s,e)=>{for(var i in e)r(s,i,{get:e[i],enumerable:!0})},g=(s,e,i,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of d(e))!a.call(s,o)&&o!==i&&r(s,o,{get:()=>e[o],enumerable:!(t=m(e,o))||t.enumerable});return s};var p=s=>g(r({},"__esModule",{value:!0}),s);var l={};c(l,{SignerCosmosBuilder:()=>u});module.exports=p(l);var n=require("../internal/DefaultSignerCosmos");class u{_dmk;_sessionId;constructor({dmk:e,sessionId:i}){this._dmk=e,this._sessionId=i}build(){return new n.DefaultSignerCosmos({dmk:this._dmk,sessionId:this._sessionId})}}0&&(module.exports={SignerCosmosBuilder});
|
|
2
|
+
//# sourceMappingURL=SignerCosmosBuilder.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/SignerCosmosBuilder.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type DeviceManagementKit,\n type DeviceSessionId,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type SignerCosmos } from \"@api/SignerCosmos\";\nimport { DefaultSignerCosmos } from \"@internal/DefaultSignerCosmos\";\n\ntype SignerCosmosBuilderConstructorArgs = {\n dmk: DeviceManagementKit;\n sessionId: DeviceSessionId;\n};\n\n/**\n * Builder for the `SignerCosmos` class.\n */\nexport class SignerCosmosBuilder {\n private readonly _dmk: DeviceManagementKit;\n private readonly _sessionId: DeviceSessionId;\n\n constructor({ dmk, sessionId }: SignerCosmosBuilderConstructorArgs) {\n this._dmk = dmk;\n this._sessionId = sessionId;\n }\n\n /**\n * Build the signer instance\n *\n * @returns the signer instance\n */\n public build(): SignerCosmos {\n return new DefaultSignerCosmos({\n dmk: this._dmk,\n sessionId: this._sessionId,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,IAAA,eAAAC,EAAAH,GAMA,IAAAI,EAAoC,yCAU7B,MAAMF,CAAoB,CACd,KACA,WAEjB,YAAY,CAAE,IAAAG,EAAK,UAAAC,CAAU,EAAuC,CAClE,KAAK,KAAOD,EACZ,KAAK,WAAaC,CACpB,CAOO,OAAsB,CAC3B,OAAO,IAAI,sBAAoB,CAC7B,IAAK,KAAK,KACV,UAAW,KAAK,UAClB,CAAC,CACH,CACF",
|
|
6
|
+
"names": ["SignerCosmosBuilder_exports", "__export", "SignerCosmosBuilder", "__toCommonJS", "import_DefaultSignerCosmos", "dmk", "sessionId"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./SignerCosmosBuilder"),s=require("../internal/DefaultSignerCosmos");describe("SignerCosmosBuilder",()=>{it("should build a SignerCosmos instance",()=>{const i={},o="test-session-id",n=new e.SignerCosmosBuilder({dmk:i,sessionId:o}).build();expect(n).toBeInstanceOf(s.DefaultSignerCosmos)})});
|
|
2
|
+
//# sourceMappingURL=SignerCosmosBuilder.test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/SignerCosmosBuilder.test.ts"],
|
|
4
|
+
"sourcesContent": ["import { type DeviceManagementKit } from \"@ledgerhq/device-management-kit\";\n\nimport { SignerCosmosBuilder } from \"@api/SignerCosmosBuilder\";\nimport { DefaultSignerCosmos } from \"@internal/DefaultSignerCosmos\";\n\ndescribe(\"SignerCosmosBuilder\", () => {\n it(\"should build a SignerCosmos instance\", () => {\n //ARRANGE\n const dmk = {} as DeviceManagementKit;\n const sessionId = \"test-session-id\";\n const builder = new SignerCosmosBuilder({ dmk, sessionId });\n\n //ACT\n const signer = builder.build();\n\n //ASSERT\n expect(signer).toBeInstanceOf(DefaultSignerCosmos);\n });\n});\n"],
|
|
5
|
+
"mappings": "aAEA,IAAAA,EAAoC,oCACpCC,EAAoC,yCAEpC,SAAS,sBAAuB,IAAM,CACpC,GAAG,uCAAwC,IAAM,CAE/C,MAAMC,EAAM,CAAC,EACPC,EAAY,kBAIZC,EAHU,IAAI,sBAAoB,CAAE,IAAAF,EAAK,UAAAC,CAAU,CAAC,EAGnC,MAAM,EAG7B,OAAOC,CAAM,EAAE,eAAe,qBAAmB,CACnD,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["import_SignerCosmosBuilder", "import_DefaultSignerCosmos", "dmk", "sessionId", "signer"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var m=(r,e,p,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of n(e))!A.call(r,t)&&t!==p&&o(r,t,{get:()=>e[t],enumerable:!(d=s(e,t))||d.enumerable});return r};var u=r=>m(o({},"__esModule",{value:!0}),r);var i={};module.exports=u(i);
|
|
2
|
+
//# sourceMappingURL=GetAddressDeviceActionTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/GetAddressDeviceActionTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type CommandErrorResult,\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type GetAddressCommandResponse } from \"@internal/app-binder/command/GetAddressCommand\";\nimport { type CosmosErrorCodes } from \"@internal/app-binder/command/utils/CosmosApplicationErrors\";\n\ntype GetAddressDAUserInteractionRequired =\n | UserInteractionRequired.None\n | UserInteractionRequired.VerifyAddress;\n\nexport type GetAddressDAOutput =\n SendCommandInAppDAOutput<GetAddressCommandResponse>;\n\nexport type GetAddressDAError =\n | OpenAppDAError\n | CommandErrorResult<CosmosErrorCodes>[\"error\"];\n\nexport type GetAddressDAIntermediateValue =\n SendCommandInAppDAIntermediateValue<GetAddressDAUserInteractionRequired>;\n\nexport type GetAddressDAReturnType = ExecuteDeviceActionReturnType<\n GetAddressDAOutput,\n GetAddressDAError,\n GetAddressDAIntermediateValue\n>;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["GetAddressDeviceActionTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var u=(p,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of i(e))!m.call(p,t)&&t!==n&&o(p,t,{get:()=>e[t],enumerable:!(r=A(e,t))||r.enumerable});return p};var C=p=>u(o({},"__esModule",{value:!0}),p);var d={};module.exports=C(d);
|
|
2
|
+
//# sourceMappingURL=GetAppConfigDeviceActionTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/GetAppConfigDeviceActionTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type CommandErrorResult,\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type GetAppConfigCommandResponse } from \"@internal/app-binder/command/GetAppConfigCommand\";\nimport { type CosmosErrorCodes } from \"@internal/app-binder/command/utils/CosmosApplicationErrors\";\n\ntype GetAppConfigDAUserInteractionRequired = UserInteractionRequired.None;\n\nexport type GetAppConfigDAOutput =\n SendCommandInAppDAOutput<GetAppConfigCommandResponse>;\n\nexport type GetAppConfigDAError =\n | OpenAppDAError\n | CommandErrorResult<CosmosErrorCodes>[\"error\"];\n\nexport type GetAppConfigDAIntermediateValue =\n SendCommandInAppDAIntermediateValue<GetAppConfigDAUserInteractionRequired>;\n\nexport type GetAppConfigDAReturnType = ExecuteDeviceActionReturnType<\n GetAppConfigDAOutput,\n GetAppConfigDAError,\n GetAppConfigDAIntermediateValue\n>;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["GetAppConfigDeviceActionTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var c=(n,e,i,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of a(e))!s.call(n,r)&&r!==i&&o(n,r,{get:()=>e[r],enumerable:!(t=p(e,r))||t.enumerable});return n};var u=n=>c(o({},"__esModule",{value:!0}),n);var A={};module.exports=u(A);
|
|
2
|
+
//# sourceMappingURL=SignTransactionDeviceActionTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/SignTransactionDeviceActionTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type CommandErrorResult,\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type OpenAppDARequiredInteraction,\n type SendCommandInAppDAOutput,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type SignTransactionCommandResponse } from \"@internal/app-binder/command/SignTransactionCommand\";\nimport { type CosmosErrorCodes } from \"@internal/app-binder/command/utils/CosmosApplicationErrors\";\n\nexport type SignTransactionDAOutput =\n SendCommandInAppDAOutput<SignTransactionCommandResponse>;\nexport type SignTransactionDAError =\n | OpenAppDAError\n | CommandErrorResult<CosmosErrorCodes>[\"error\"];\n\ntype SignTransactionDARequiredInteraction =\n | OpenAppDARequiredInteraction\n | UserInteractionRequired.SignTransaction;\n\nexport type SignTransactionDAIntermediateValue = {\n requiredUserInteraction: SignTransactionDARequiredInteraction;\n};\n\nexport type SignTransactionDAReturnType = ExecuteDeviceActionReturnType<\n SignTransactionDAOutput,\n SignTransactionDAError,\n SignTransactionDAIntermediateValue\n>;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["SignTransactionDeviceActionTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var p in e)o(t,p,{get:e[p],enumerable:!0})},u=(t,e,p,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of s(e))!a.call(t,r)&&r!==p&&o(t,r,{get:()=>e[r],enumerable:!(n=i(e,r))||n.enumerable});return t};var d=t=>u(o({},"__esModule",{value:!0}),t);var m={};y(m,{SignerCosmosBuilder:()=>A.SignerCosmosBuilder});module.exports=d(m);var A=require("./SignerCosmosBuilder");0&&(module.exports={SignerCosmosBuilder});
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/index.ts"],
|
|
4
|
+
"sourcesContent": ["export {\n type GetAddressDAError,\n type GetAddressDAIntermediateValue,\n type GetAddressDAOutput,\n type GetAddressDAReturnType,\n} from \"@api/app-binder/GetAddressDeviceActionTypes\";\nexport {\n type GetAppConfigDAError,\n type GetAppConfigDAIntermediateValue,\n type GetAppConfigDAOutput,\n type GetAppConfigDAReturnType,\n} from \"@api/app-binder/GetAppConfigDeviceActionTypes\";\nexport {\n type SignTransactionDAError,\n type SignTransactionDAIntermediateValue,\n type SignTransactionDAOutput,\n type SignTransactionDAReturnType,\n} from \"@api/app-binder/SignTransactionDeviceActionTypes\";\nexport { type JsonTransactionFormat } from \"@api/model/JsonTransactionFormat\";\nexport { type SignerCosmos } from \"@api/SignerCosmos\";\nexport { SignerCosmosBuilder } from \"@api/SignerCosmosBuilder\";\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gEAAAE,EAAAF,GAoBA,IAAAG,EAAoC",
|
|
6
|
+
"names": ["api_exports", "__export", "__toCommonJS", "import_SignerCosmosBuilder"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var a=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of t(r))!u.call(e,m)&&m!==o&&p(e,m,{get:()=>r[m],enumerable:!(n=b(r,m))||n.enumerable});return e};var i=e=>a(p({},"__esModule",{value:!0}),e);var c={};module.exports=i(c);
|
|
2
|
+
//# sourceMappingURL=AppConfig.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/AppConfig.ts"],
|
|
4
|
+
"sourcesContent": ["export type AppConfig = {\n major: number;\n minor: number;\n patch: number;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["AppConfig_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var m=(i,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!c.call(i,n)&&n!==o&&r(i,n,{get:()=>e[n],enumerable:!(t=b(e,n))||t.enumerable});return i};var j=i=>m(r({},"__esModule",{value:!0}),i);var l={};module.exports=j(l);
|
|
2
|
+
//# sourceMappingURL=JsonObject.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/JsonObject.ts"],
|
|
4
|
+
"sourcesContent": ["type Primitive = string | number | boolean | null | undefined;\n\nexport interface JsonObject {\n [key: string]: Primitive | Primitive[] | JsonObject | JsonObject[];\n}\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["JsonObject_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var u=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of c(e))!a.call(t,n)&&n!==r&&o(t,n,{get:()=>e[n],enumerable:!(s=i(e,n))||s.enumerable});return t};var m=t=>u(o({},"__esModule",{value:!0}),t);var g={};module.exports=m(g);
|
|
2
|
+
//# sourceMappingURL=JsonTransactionFormat.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/JsonTransactionFormat.ts"],
|
|
4
|
+
"sourcesContent": ["import { type JsonObject } from \"@api/model/JsonObject\";\n\ninterface Amount extends JsonObject {\n amount: string;\n denom: string;\n}\n\ninterface Fee extends JsonObject {\n amount: Amount[];\n gas: string;\n}\n\ninterface Input extends JsonObject {\n address: string;\n coins: Amount[];\n}\n\ninterface Output extends JsonObject {\n address: string;\n coins: Amount[];\n}\n\ninterface Message extends JsonObject {\n inputs: Input[];\n outputs: Output[];\n}\n\nexport interface JsonTransactionFormat extends JsonObject {\n account_number: string;\n chain_id: string;\n fee: Fee;\n memo: string;\n msgs: Message[];\n sequence: string;\n}\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["JsonTransactionFormat_exports", "__toCommonJS"]
|
|
7
|
+
}
|