@ledgerhq/device-signer-kit-tron 0.0.0-develop-20260707161641
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 +53 -0
- package/lib/cjs/api/SignerTrx.js +2 -0
- package/lib/cjs/api/SignerTrx.js.map +7 -0
- package/lib/cjs/api/SignerTrxBuilder.js +2 -0
- package/lib/cjs/api/SignerTrxBuilder.js.map +7 -0
- package/lib/cjs/api/SignerTrxBuilder.test.js +2 -0
- package/lib/cjs/api/SignerTrxBuilder.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/GetAppConfigurationDeviceActionTypes.js +2 -0
- package/lib/cjs/api/app-binder/GetAppConfigurationDeviceActionTypes.js.map +7 -0
- package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.js +2 -0
- package/lib/cjs/api/app-binder/SignPersonalMessageDeviceActionTypes.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/AddressOptions.js +2 -0
- package/lib/cjs/api/model/AddressOptions.js.map +7 -0
- package/lib/cjs/api/model/AppConfiguration.js +2 -0
- package/lib/cjs/api/model/AppConfiguration.js.map +7 -0
- package/lib/cjs/api/model/MessageOptions.js +2 -0
- package/lib/cjs/api/model/MessageOptions.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/api/model/TransactionOptions.js +2 -0
- package/lib/cjs/api/model/TransactionOptions.js.map +7 -0
- package/lib/cjs/index.js +2 -0
- package/lib/cjs/index.js.map +7 -0
- package/lib/cjs/internal/DefaultSignerTrx.js +2 -0
- package/lib/cjs/internal/DefaultSignerTrx.js.map +7 -0
- package/lib/cjs/internal/app-binder/TronAppBinder.js +2 -0
- package/lib/cjs/internal/app-binder/TronAppBinder.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/GetAppConfigurationCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/GetAppConfigurationCommand.js.map +7 -0
- package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.js +2 -0
- package/lib/cjs/internal/app-binder/command/SignPersonalMessageCommand.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/utils/tronApplicationErrors.js +2 -0
- package/lib/cjs/internal/app-binder/command/utils/tronApplicationErrors.js.map +7 -0
- package/lib/cjs/internal/app-binder/constants.js +2 -0
- package/lib/cjs/internal/app-binder/constants.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/appBinderTypes.js +2 -0
- package/lib/cjs/internal/app-binder/di/appBinderTypes.js.map +7 -0
- package/lib/cjs/internal/app-binder/task/SignPersonalMessageTask.js +2 -0
- package/lib/cjs/internal/app-binder/task/SignPersonalMessageTask.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/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/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/addressTypes.js +2 -0
- package/lib/cjs/internal/use-cases/address/di/addressTypes.js.map +7 -0
- package/lib/cjs/internal/use-cases/app-configuration/GetAppConfigurationUseCase.js +2 -0
- package/lib/cjs/internal/use-cases/app-configuration/GetAppConfigurationUseCase.js.map +7 -0
- package/lib/cjs/internal/use-cases/app-configuration/di/appConfigurationModule.js +2 -0
- package/lib/cjs/internal/use-cases/app-configuration/di/appConfigurationModule.js.map +7 -0
- package/lib/cjs/internal/use-cases/app-configuration/di/appConfigurationTypes.js +2 -0
- package/lib/cjs/internal/use-cases/app-configuration/di/appConfigurationTypes.js.map +7 -0
- package/lib/cjs/internal/use-cases/message/SignPersonalMessageUseCase.js +2 -0
- package/lib/cjs/internal/use-cases/message/SignPersonalMessageUseCase.js.map +7 -0
- package/lib/cjs/internal/use-cases/message/di/messageModule.js +2 -0
- package/lib/cjs/internal/use-cases/message/di/messageModule.js.map +7 -0
- package/lib/cjs/internal/use-cases/message/di/messageTypes.js +2 -0
- package/lib/cjs/internal/use-cases/message/di/messageTypes.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/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/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/SignerTrx.js +1 -0
- package/lib/esm/api/SignerTrx.js.map +7 -0
- package/lib/esm/api/SignerTrxBuilder.js +2 -0
- package/lib/esm/api/SignerTrxBuilder.js.map +7 -0
- package/lib/esm/api/SignerTrxBuilder.test.js +2 -0
- package/lib/esm/api/SignerTrxBuilder.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/GetAppConfigurationDeviceActionTypes.js +1 -0
- package/lib/esm/api/app-binder/GetAppConfigurationDeviceActionTypes.js.map +7 -0
- package/lib/esm/api/app-binder/SignPersonalMessageDeviceActionTypes.js +1 -0
- package/lib/esm/api/app-binder/SignPersonalMessageDeviceActionTypes.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/AddressOptions.js +1 -0
- package/lib/esm/api/model/AddressOptions.js.map +7 -0
- package/lib/esm/api/model/AppConfiguration.js +1 -0
- package/lib/esm/api/model/AppConfiguration.js.map +7 -0
- package/lib/esm/api/model/MessageOptions.js +1 -0
- package/lib/esm/api/model/MessageOptions.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/api/model/TransactionOptions.js +1 -0
- package/lib/esm/api/model/TransactionOptions.js.map +7 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +7 -0
- package/lib/esm/internal/DefaultSignerTrx.js +2 -0
- package/lib/esm/internal/DefaultSignerTrx.js.map +7 -0
- package/lib/esm/internal/app-binder/TronAppBinder.js +2 -0
- package/lib/esm/internal/app-binder/TronAppBinder.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/GetAppConfigurationCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/GetAppConfigurationCommand.js.map +7 -0
- package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.js +2 -0
- package/lib/esm/internal/app-binder/command/SignPersonalMessageCommand.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/utils/tronApplicationErrors.js +2 -0
- package/lib/esm/internal/app-binder/command/utils/tronApplicationErrors.js.map +7 -0
- package/lib/esm/internal/app-binder/constants.js +2 -0
- package/lib/esm/internal/app-binder/constants.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/appBinderTypes.js +2 -0
- package/lib/esm/internal/app-binder/di/appBinderTypes.js.map +7 -0
- package/lib/esm/internal/app-binder/task/SignPersonalMessageTask.js +2 -0
- package/lib/esm/internal/app-binder/task/SignPersonalMessageTask.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/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/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/addressTypes.js +2 -0
- package/lib/esm/internal/use-cases/address/di/addressTypes.js.map +7 -0
- package/lib/esm/internal/use-cases/app-configuration/GetAppConfigurationUseCase.js +2 -0
- package/lib/esm/internal/use-cases/app-configuration/GetAppConfigurationUseCase.js.map +7 -0
- package/lib/esm/internal/use-cases/app-configuration/di/appConfigurationModule.js +2 -0
- package/lib/esm/internal/use-cases/app-configuration/di/appConfigurationModule.js.map +7 -0
- package/lib/esm/internal/use-cases/app-configuration/di/appConfigurationTypes.js +2 -0
- package/lib/esm/internal/use-cases/app-configuration/di/appConfigurationTypes.js.map +7 -0
- package/lib/esm/internal/use-cases/message/SignPersonalMessageUseCase.js +2 -0
- package/lib/esm/internal/use-cases/message/SignPersonalMessageUseCase.js.map +7 -0
- package/lib/esm/internal/use-cases/message/di/messageModule.js +2 -0
- package/lib/esm/internal/use-cases/message/di/messageModule.js.map +7 -0
- package/lib/esm/internal/use-cases/message/di/messageTypes.js +2 -0
- package/lib/esm/internal/use-cases/message/di/messageTypes.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/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/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/SignerTrx.d.ts +14 -0
- package/lib/types/api/SignerTrx.d.ts.map +1 -0
- package/lib/types/api/SignerTrxBuilder.d.ts +28 -0
- package/lib/types/api/SignerTrxBuilder.d.ts.map +1 -0
- package/lib/types/api/SignerTrxBuilder.test.d.ts +2 -0
- package/lib/types/api/SignerTrxBuilder.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/GetAppConfigurationDeviceActionTypes.d.ts +8 -0
- package/lib/types/api/app-binder/GetAppConfigurationDeviceActionTypes.d.ts.map +1 -0
- package/lib/types/api/app-binder/SignPersonalMessageDeviceActionTypes.d.ts +12 -0
- package/lib/types/api/app-binder/SignPersonalMessageDeviceActionTypes.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 +13 -0
- package/lib/types/api/index.d.ts.map +1 -0
- package/lib/types/api/model/AddressOptions.d.ts +5 -0
- package/lib/types/api/model/AddressOptions.d.ts.map +1 -0
- package/lib/types/api/model/AppConfiguration.d.ts +14 -0
- package/lib/types/api/model/AppConfiguration.d.ts.map +1 -0
- package/lib/types/api/model/MessageOptions.d.ts +4 -0
- package/lib/types/api/model/MessageOptions.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/api/model/TransactionOptions.d.ts +4 -0
- package/lib/types/api/model/TransactionOptions.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/DefaultSignerTrx.d.ts +23 -0
- package/lib/types/internal/DefaultSignerTrx.d.ts.map +1 -0
- package/lib/types/internal/app-binder/TronAppBinder.d.ts +27 -0
- package/lib/types/internal/app-binder/TronAppBinder.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetAddressCommand.d.ts +21 -0
- package/lib/types/internal/app-binder/command/GetAddressCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.d.ts +12 -0
- package/lib/types/internal/app-binder/command/GetAppConfigurationCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignPersonalMessageCommand.d.ts +17 -0
- package/lib/types/internal/app-binder/command/SignPersonalMessageCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts +17 -0
- package/lib/types/internal/app-binder/command/SignTransactionCommand.d.ts.map +1 -0
- package/lib/types/internal/app-binder/command/utils/tronApplicationErrors.d.ts +8 -0
- package/lib/types/internal/app-binder/command/utils/tronApplicationErrors.d.ts.map +1 -0
- package/lib/types/internal/app-binder/constants.d.ts +12 -0
- package/lib/types/internal/app-binder/constants.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/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/SignPersonalMessageTask.d.ts +15 -0
- package/lib/types/internal/app-binder/task/SignPersonalMessageTask.d.ts.map +1 -0
- package/lib/types/internal/app-binder/task/SignTransactionTask.d.ts +15 -0
- package/lib/types/internal/app-binder/task/SignTransactionTask.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 +5 -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/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/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/app-configuration/GetAppConfigurationUseCase.d.ts +8 -0
- package/lib/types/internal/use-cases/app-configuration/GetAppConfigurationUseCase.d.ts.map +1 -0
- package/lib/types/internal/use-cases/app-configuration/di/appConfigurationModule.d.ts +3 -0
- package/lib/types/internal/use-cases/app-configuration/di/appConfigurationModule.d.ts.map +1 -0
- package/lib/types/internal/use-cases/app-configuration/di/appConfigurationTypes.d.ts +4 -0
- package/lib/types/internal/use-cases/app-configuration/di/appConfigurationTypes.d.ts.map +1 -0
- package/lib/types/internal/use-cases/message/SignPersonalMessageUseCase.d.ts +9 -0
- package/lib/types/internal/use-cases/message/SignPersonalMessageUseCase.d.ts.map +1 -0
- package/lib/types/internal/use-cases/message/di/messageModule.d.ts +3 -0
- package/lib/types/internal/use-cases/message/di/messageModule.d.ts.map +1 -0
- package/lib/types/internal/use-cases/message/di/messageTypes.d.ts +4 -0
- package/lib/types/internal/use-cases/message/di/messageTypes.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/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/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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/internal/app-binder/command/utils/tronApplicationErrors.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Tron application APDU error codes.\n *\n * Populated when the commands are implemented\n */\nexport enum TronAppErrorCodes {}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GAKO,IAAKE,YAAA",
|
|
6
|
+
"names": ["tronApplicationErrors_exports", "__export", "TronAppErrorCodes", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var _=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var T=(A,S)=>{for(var N in S)_(A,N,{get:S[N],enumerable:!0})},G=(A,S,N,x)=>{if(S&&typeof S=="object"||typeof S=="function")for(let E of t(S))!I.call(A,E)&&E!==N&&_(A,E,{get:()=>S[E],enumerable:!(x=o(S,E))||x.enumerable});return A};var C=A=>G(_({},"__esModule",{value:!0}),A);var e={};T(e,{APP_NAME:()=>R,CHUNK_SIZE:()=>c,INS:()=>s,LEDGER_CLA:()=>n});module.exports=C(e);const R="Tron",n=224,s={GET_ADDRESS:2,SIGN_TRANSACTION:4,SIGN_TRANSACTION_HASH:5,GET_APP_CONFIGURATION:6,SIGN_PERSONAL_MESSAGE:8,ECDH_SECRET:10},c=250;0&&(module.exports={APP_NAME,CHUNK_SIZE,INS,LEDGER_CLA});
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/internal/app-binder/constants.ts"],
|
|
4
|
+
"sourcesContent": ["export const APP_NAME = \"Tron\";\n\n// Tron application APDU class byte.\nexport const LEDGER_CLA = 0xe0;\n\n// Tron application instruction bytes\nexport const INS = {\n GET_ADDRESS: 0x02,\n SIGN_TRANSACTION: 0x04,\n SIGN_TRANSACTION_HASH: 0x05,\n GET_APP_CONFIGURATION: 0x06,\n SIGN_PERSONAL_MESSAGE: 0x08,\n ECDH_SECRET: 0x0a,\n} as const;\n\n// Maximum APDU payload chunk size used by the Tron application.\nexport const CHUNK_SIZE = 250;\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,EAAA,eAAAC,EAAA,QAAAC,EAAA,eAAAC,IAAA,eAAAC,EAAAN,GAAO,MAAME,EAAW,OAGXG,EAAa,IAGbD,EAAM,CACjB,YAAa,EACb,iBAAkB,EAClB,sBAAuB,EACvB,sBAAuB,EACvB,sBAAuB,EACvB,YAAa,EACf,EAGaD,EAAa",
|
|
6
|
+
"names": ["constants_exports", "__export", "APP_NAME", "CHUNK_SIZE", "INS", "LEDGER_CLA", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var c=(o,p)=>{for(var n in p)i(o,n,{get:p[n],enumerable:!0})},g=(o,p,n,e)=>{if(p&&typeof p=="object"||typeof p=="function")for(let r of B(p))!f.call(o,r)&&r!==n&&i(o,r,{get:()=>p[r],enumerable:!(e=a(p,r))||e.enumerable});return o};var l=o=>g(i({},"__esModule",{value:!0}),o);var u={};c(u,{appBindingModuleFactory:()=>s});module.exports=l(u);var t=require("inversify"),d=require("../../app-binder/di/appBinderTypes"),m=require("../../app-binder/TronAppBinder");const s=()=>new t.ContainerModule(({bind:o})=>{o(d.appBinderTypes.AppBinding).to(m.TronAppBinder)});0&&(module.exports={appBindingModuleFactory});
|
|
2
|
+
//# sourceMappingURL=appBinderModule.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/app-binder/di/appBinderModule.ts"],
|
|
4
|
+
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { appBinderTypes } from \"@internal/app-binder/di/appBinderTypes\";\nimport { TronAppBinder } from \"@internal/app-binder/TronAppBinder\";\n\nexport const appBindingModuleFactory = () =>\n new ContainerModule(({ bind }) => {\n bind(appBinderTypes.AppBinding).to(TronAppBinder);\n });\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAEhCC,EAA+B,kDAC/BC,EAA8B,8CAEvB,MAAMJ,EAA0B,IACrC,IAAI,kBAAgB,CAAC,CAAE,KAAAK,CAAK,IAAM,CAChCA,EAAK,iBAAe,UAAU,EAAE,GAAG,eAAa,CAClD,CAAC",
|
|
6
|
+
"names": ["appBinderModule_exports", "__export", "appBindingModuleFactory", "__toCommonJS", "import_inversify", "import_appBinderTypes", "import_TronAppBinder", "bind"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var s=Object.defineProperty;var e=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var t=Object.prototype.hasOwnProperty;var B=(n,p)=>{for(var o in p)s(n,o,{get:p[o],enumerable:!0})},a=(n,p,o,d)=>{if(p&&typeof p=="object"||typeof p=="function")for(let i of r(p))!t.call(n,i)&&i!==o&&s(n,i,{get:()=>p[i],enumerable:!(d=e(p,i))||d.enumerable});return n};var c=n=>a(s({},"__esModule",{value:!0}),n);var y={};B(y,{appBinderTypes:()=>g});module.exports=c(y);const g={AppBinding:Symbol.for("AppBinding")};0&&(module.exports={appBinderTypes});
|
|
2
|
+
//# sourceMappingURL=appBinderTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/app-binder/di/appBinderTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export const appBinderTypes = {\n AppBinding: Symbol.for(\"AppBinding\"),\n} as const;\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAiB,CAC5B,WAAY,OAAO,IAAI,YAAY,CACrC",
|
|
6
|
+
"names": ["appBinderTypes_exports", "__export", "appBinderTypes", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(e,r)=>{for(var s in r)t(e,s,{get:r[s],enumerable:!0})},d=(e,r,s,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of m(r))!p.call(e,a)&&a!==s&&t(e,a,{get:()=>r[a],enumerable:!(n=i(r,a))||n.enumerable});return e};var l=e=>d(t({},"__esModule",{value:!0}),e);var u={};g(u,{SignPersonalMessageTask:()=>P});module.exports=l(u);var o=require("../../app-binder/command/SignPersonalMessageCommand");class P{constructor(r,s){this.api=r;this.args=s}async run(){return this.api.sendCommand(new o.SignPersonalMessageCommand({derivationPath:this.args.derivationPath,message:this.args.message}))}}0&&(module.exports={SignPersonalMessageTask});
|
|
2
|
+
//# sourceMappingURL=SignPersonalMessageTask.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/app-binder/task/SignPersonalMessageTask.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type CommandResult,\n type InternalApi,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type Signature } from \"@api/model/Signature\";\nimport { SignPersonalMessageCommand } from \"@internal/app-binder/command/SignPersonalMessageCommand\";\nimport { type TronAppErrorCodes } from \"@internal/app-binder/command/utils/tronApplicationErrors\";\n\ntype SignPersonalMessageTaskArgs = {\n derivationPath: string;\n message: Uint8Array;\n};\n\nexport class SignPersonalMessageTask {\n constructor(\n private api: InternalApi,\n private args: SignPersonalMessageTaskArgs,\n ) {}\n\n async run(): Promise<CommandResult<Signature, TronAppErrorCodes>> {\n // TODO: Adapt to Tron's message signing protocol\n return this.api.sendCommand(\n new SignPersonalMessageCommand({\n derivationPath: this.args.derivationPath,\n message: this.args.message,\n }),\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6BAAAE,IAAA,eAAAC,EAAAH,GAMA,IAAAI,EAA2C,mEAQpC,MAAMF,CAAwB,CACnC,YACUG,EACAC,EACR,CAFQ,SAAAD,EACA,UAAAC,CACP,CAEH,MAAM,KAA4D,CAEhE,OAAO,KAAK,IAAI,YACd,IAAI,6BAA2B,CAC7B,eAAgB,KAAK,KAAK,eAC1B,QAAS,KAAK,KAAK,OACrB,CAAC,CACH,CACF,CACF",
|
|
6
|
+
"names": ["SignPersonalMessageTask_exports", "__export", "SignPersonalMessageTask", "__toCommonJS", "import_SignPersonalMessageCommand", "api", "args"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var e=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var g=(a,r)=>{for(var n in r)i(a,n,{get:r[n],enumerable:!0})},c=(a,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of p(r))!m.call(a,t)&&t!==n&&i(a,t,{get:()=>r[t],enumerable:!(o=e(r,t))||o.enumerable});return a};var d=a=>c(i({},"__esModule",{value:!0}),a);var u={};g(u,{SignTransactionTask:()=>T});module.exports=d(u);var s=require("../../app-binder/command/SignTransactionCommand");class T{constructor(r,n){this.api=r;this.args=n}async run(){return this.api.sendCommand(new s.SignTransactionCommand({derivationPath:this.args.derivationPath,serializedTransaction:this.args.transaction}))}}0&&(module.exports={SignTransactionTask});
|
|
2
|
+
//# sourceMappingURL=SignTransactionTask.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/app-binder/task/SignTransactionTask.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type CommandResult,\n type InternalApi,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type Signature } from \"@api/model/Signature\";\nimport { SignTransactionCommand } from \"@internal/app-binder/command/SignTransactionCommand\";\nimport { type TronAppErrorCodes } from \"@internal/app-binder/command/utils/tronApplicationErrors\";\n\ntype SignTransactionTaskArgs = {\n derivationPath: string;\n transaction: Uint8Array;\n};\n\nexport class SignTransactionTask {\n constructor(\n private api: InternalApi,\n private args: SignTransactionTaskArgs,\n ) {}\n\n async run(): Promise<CommandResult<Signature, TronAppErrorCodes>> {\n // TODO: Adapt to Tron's signing protocol\n // Tron transactions are chunked across multiple APDUs; the chunking and\n // token-signature handling live in the serialization task\n return this.api.sendCommand(\n new SignTransactionCommand({\n derivationPath: this.args.derivationPath,\n serializedTransaction: this.args.transaction,\n }),\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,IAAA,eAAAC,EAAAH,GAMA,IAAAI,EAAuC,+DAQhC,MAAMF,CAAoB,CAC/B,YACUG,EACAC,EACR,CAFQ,SAAAD,EACA,UAAAC,CACP,CAEH,MAAM,KAA4D,CAIhE,OAAO,KAAK,IAAI,YACd,IAAI,yBAAuB,CACzB,eAAgB,KAAK,KAAK,eAC1B,sBAAuB,KAAK,KAAK,WACnC,CAAC,CACH,CACF,CACF",
|
|
6
|
+
"names": ["SignTransactionTask_exports", "__export", "SignTransactionTask", "__toCommonJS", "import_SignTransactionCommand", "api", "args"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var t in e)r(o,t,{get:e[t],enumerable:!0})},C=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of f(e))!l.call(o,n)&&n!==t&&r(o,n,{get:()=>e[n],enumerable:!(a=M(e,n))||a.enumerable});return o};var D=o=>C(r({},"__esModule",{value:!0}),o);var v={};u(v,{makeContainer:()=>g});module.exports=D(v);var m=require("inversify"),s=require("./app-binder/di/appBinderModule"),i=require("./externalTypes"),p=require("./use-cases/address/di/addressModule"),d=require("./use-cases/app-configuration/di/appConfigurationModule"),c=require("./use-cases/message/di/messageModule"),y=require("./use-cases/transaction/di/transactionModule");const g=({dmk:o,sessionId:e})=>{const t=new m.Container;return t.bind(i.externalTypes.Dmk).toConstantValue(o),t.bind(i.externalTypes.SessionId).toConstantValue(e),t.loadSync((0,s.appBindingModuleFactory)(),(0,p.addressModuleFactory)(),(0,y.transactionModuleFactory)(),(0,c.messageModuleFactory)(),(0,d.appConfigurationModuleFactory)()),t};0&&(module.exports={makeContainer});
|
|
2
|
+
//# sourceMappingURL=di.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/internal/di.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type DeviceManagementKit,\n type DeviceSessionId,\n} from \"@ledgerhq/device-management-kit\";\nimport { Container } from \"inversify\";\n\nimport { appBindingModuleFactory } from \"@internal/app-binder/di/appBinderModule\";\nimport { externalTypes } from \"@internal/externalTypes\";\nimport { addressModuleFactory } from \"@internal/use-cases/address/di/addressModule\";\nimport { appConfigurationModuleFactory } from \"@internal/use-cases/app-configuration/di/appConfigurationModule\";\nimport { messageModuleFactory } from \"@internal/use-cases/message/di/messageModule\";\nimport { transactionModuleFactory } from \"@internal/use-cases/transaction/di/transactionModule\";\n\ntype MakeContainerProps = {\n dmk: DeviceManagementKit;\n sessionId: DeviceSessionId;\n};\n\nexport const makeContainer = ({ dmk, sessionId }: MakeContainerProps) => {\n const container = new Container();\n\n container.bind<DeviceManagementKit>(externalTypes.Dmk).toConstantValue(dmk);\n container\n .bind<DeviceSessionId>(externalTypes.SessionId)\n .toConstantValue(sessionId);\n\n container.loadSync(\n appBindingModuleFactory(),\n addressModuleFactory(),\n transactionModuleFactory(),\n messageModuleFactory(),\n appConfigurationModuleFactory(),\n );\n\n return container;\n};\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAIA,IAAAI,EAA0B,qBAE1BC,EAAwC,mDACxCC,EAA8B,mCAC9BC,EAAqC,wDACrCC,EAA8C,2EAC9CC,EAAqC,wDACrCC,EAAyC,gEAOlC,MAAMR,EAAgB,CAAC,CAAE,IAAAS,EAAK,UAAAC,CAAU,IAA0B,CACvE,MAAMC,EAAY,IAAI,YAEtB,OAAAA,EAAU,KAA0B,gBAAc,GAAG,EAAE,gBAAgBF,CAAG,EAC1EE,EACG,KAAsB,gBAAc,SAAS,EAC7C,gBAAgBD,CAAS,EAE5BC,EAAU,YACR,2BAAwB,KACxB,wBAAqB,KACrB,4BAAyB,KACzB,wBAAqB,KACrB,iCAA8B,CAChC,EAEOA,CACT",
|
|
6
|
+
"names": ["di_exports", "__export", "makeContainer", "__toCommonJS", "import_inversify", "import_appBinderModule", "import_externalTypes", "import_addressModule", "import_appConfigurationModule", "import_messageModule", "import_transactionModule", "dmk", "sessionId", "container"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var m=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var y=(s,o)=>{for(var n in o)m(s,n,{get:o[n],enumerable:!0})},a=(s,o,n,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of S(o))!l.call(s,e)&&e!==n&&m(s,e,{get:()=>o[e],enumerable:!(r=t(o,e))||r.enumerable});return s};var b=s=>a(m({},"__esModule",{value:!0}),s);var d={};y(d,{externalTypes:()=>c});module.exports=b(d);const c={Dmk:Symbol.for("Dmk"),SessionId:Symbol.for("SessionId")};0&&(module.exports={externalTypes});
|
|
2
|
+
//# sourceMappingURL=externalTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/internal/externalTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export const externalTypes = {\n Dmk: Symbol.for(\"Dmk\"),\n SessionId: Symbol.for(\"SessionId\"),\n} as const;\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAgB,CAC3B,IAAK,OAAO,IAAI,KAAK,EACrB,UAAW,OAAO,IAAI,WAAW,CACnC",
|
|
6
|
+
"names": ["externalTypes_exports", "__export", "externalTypes", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var O=(r,p)=>{for(var e in p)o(r,e,{get:p[e],enumerable:!0})},T=(r,p,e,n)=>{if(p&&typeof p=="object"||typeof p=="function")for(let i of f(p))!y.call(r,i)&&i!==e&&o(r,i,{get:()=>p[i],enumerable:!(n=s(p,i))||n.enumerable});return r};var l=r=>T(o({},"__esModule",{value:!0}),r),A=(r,p,e,n)=>{for(var i=n>1?void 0:n?s(p,e):p,c=r.length-1,m;c>=0;c--)(m=r[c])&&(i=(n?m(p,e,i):m(i))||i);return n&&i&&o(p,e,i),i},B=(r,p)=>(e,n)=>p(e,n,r);var u={};O(u,{GetAddressUseCase:()=>t});module.exports=l(u);var d=require("inversify"),a=require("../../app-binder/di/appBinderTypes");let t=class{_appBinder;constructor(p){this._appBinder=p}execute(p,e){return this._appBinder.getAddress({derivationPath:p,checkOnDevice:e?.checkOnDevice??!1,skipOpenApp:e?.skipOpenApp??!1})}};t=A([(0,d.injectable)(),B(0,(0,d.inject)(a.appBinderTypes.AppBinding))],t);0&&(module.exports={GetAddressUseCase});
|
|
2
|
+
//# sourceMappingURL=GetAddressUseCase.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/use-cases/address/GetAddressUseCase.ts"],
|
|
4
|
+
"sourcesContent": ["import { inject, injectable } from \"inversify\";\n\nimport { type GetAddressDAReturnType } from \"@api/app-binder/GetAddressDeviceActionTypes\";\nimport { type AddressOptions } from \"@api/model/AddressOptions\";\nimport { appBinderTypes } from \"@internal/app-binder/di/appBinderTypes\";\nimport { TronAppBinder } from \"@internal/app-binder/TronAppBinder\";\n\n@injectable()\nexport class GetAddressUseCase {\n private readonly _appBinder: TronAppBinder;\n\n constructor(@inject(appBinderTypes.AppBinding) appBinder: TronAppBinder) {\n this._appBinder = appBinder;\n }\n\n execute(\n derivationPath: string,\n options?: AddressOptions,\n ): GetAddressDAReturnType {\n return this._appBinder.getAddress({\n derivationPath,\n checkOnDevice: options?.checkOnDevice ?? false,\n skipOpenApp: options?.skipOpenApp ?? false,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "okBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmC,qBAInCC,EAA+B,kDAIxB,IAAMC,EAAN,KAAwB,CACZ,WAEjB,YAA+CC,EAA0B,CACvE,KAAK,WAAaA,CACpB,CAEA,QACEC,EACAC,EACwB,CACxB,OAAO,KAAK,WAAW,WAAW,CAChC,eAAAD,EACA,cAAeC,GAAS,eAAiB,GACzC,YAAaA,GAAS,aAAe,EACvC,CAAC,CACH,CACF,EAjBaH,EAANI,EAAA,IADN,cAAW,EAIGC,EAAA,eAAO,iBAAe,UAAU,IAHlCL",
|
|
6
|
+
"names": ["GetAddressUseCase_exports", "__export", "GetAddressUseCase", "__toCommonJS", "import_inversify", "import_appBinderTypes", "GetAddressUseCase", "appBinder", "derivationPath", "options", "__decorateClass", "__decorateParam"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var d=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var C=(e,s)=>{for(var r in s)d(e,r,{get:s[r],enumerable:!0})},c=(e,s,r,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of n(s))!f.call(e,o)&&o!==r&&d(e,o,{get:()=>s[o],enumerable:!(t=i(s,o))||t.enumerable});return e};var l=e=>c(d({},"__esModule",{value:!0}),e);var y={};C(y,{addressModuleFactory:()=>u});module.exports=l(y);var a=require("inversify"),m=require("../../../use-cases/address/di/addressTypes"),p=require("../../../use-cases/address/GetAddressUseCase");const u=()=>new a.ContainerModule(({bind:e})=>{e(m.addressTypes.GetAddressUseCase).to(p.GetAddressUseCase)});0&&(module.exports={addressModuleFactory});
|
|
2
|
+
//# sourceMappingURL=addressModule.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/internal/use-cases/address/di/addressModule.ts"],
|
|
4
|
+
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { addressTypes } from \"@internal/use-cases/address/di/addressTypes\";\nimport { GetAddressUseCase } from \"@internal/use-cases/address/GetAddressUseCase\";\n\nexport const addressModuleFactory = () =>\n new ContainerModule(({ bind }) => {\n bind(addressTypes.GetAddressUseCase).to(GetAddressUseCase);\n });\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAEhCC,EAA6B,uDAC7BC,EAAkC,yDAE3B,MAAMJ,EAAuB,IAClC,IAAI,kBAAgB,CAAC,CAAE,KAAAK,CAAK,IAAM,CAChCA,EAAK,eAAa,iBAAiB,EAAE,GAAG,mBAAiB,CAC3D,CAAC",
|
|
6
|
+
"names": ["addressModule_exports", "__export", "addressModuleFactory", "__toCommonJS", "import_inversify", "import_addressTypes", "import_GetAddressUseCase", "bind"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(e,s)=>{for(var o in s)r(e,o,{get:s[o],enumerable:!0})},y=(e,s,o,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let d of c(s))!n.call(e,d)&&d!==o&&r(e,d,{get:()=>s[d],enumerable:!(t=a(s,d))||t.enumerable});return e};var A=e=>y(r({},"__esModule",{value:!0}),e);var G={};p(G,{addressTypes:()=>C});module.exports=A(G);const C={GetAddressUseCase:Symbol.for("GetAddressUseCase")};0&&(module.exports={addressTypes});
|
|
2
|
+
//# sourceMappingURL=addressTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/internal/use-cases/address/di/addressTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export const addressTypes = {\n GetAddressUseCase: Symbol.for(\"GetAddressUseCase\"),\n} as const;\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAe,CAC1B,kBAAmB,OAAO,IAAI,mBAAmB,CACnD",
|
|
6
|
+
"names": ["addressTypes_exports", "__export", "addressTypes", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var f=(p,r)=>{for(var i in r)o(p,i,{get:r[i],enumerable:!0})},l=(p,r,i,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of u(r))!y.call(p,n)&&n!==i&&o(p,n,{get:()=>r[n],enumerable:!(e=c(r,n))||e.enumerable});return p};var _=p=>l(o({},"__esModule",{value:!0}),p),A=(p,r,i,e)=>{for(var n=e>1?void 0:e?c(r,i):r,m=p.length-1,B;m>=0;m--)(B=p[m])&&(n=(e?B(r,i,n):B(n))||n);return e&&n&&o(r,i,n),n},T=(p,r)=>(i,e)=>r(i,e,p);var g={};f(g,{GetAppConfigurationUseCase:()=>t});module.exports=_(g);var d=require("inversify"),a=require("../../app-binder/di/appBinderTypes");let t=class{_appBinder;constructor(r){this._appBinder=r}execute(){return this._appBinder.getAppConfiguration()}};t=A([(0,d.injectable)(),T(0,(0,d.inject)(a.appBinderTypes.AppBinding))],t);0&&(module.exports={GetAppConfigurationUseCase});
|
|
2
|
+
//# sourceMappingURL=GetAppConfigurationUseCase.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/use-cases/app-configuration/GetAppConfigurationUseCase.ts"],
|
|
4
|
+
"sourcesContent": ["import { inject, injectable } from \"inversify\";\n\nimport { type GetAppConfigurationDAReturnType } from \"@api/app-binder/GetAppConfigurationDeviceActionTypes\";\nimport { appBinderTypes } from \"@internal/app-binder/di/appBinderTypes\";\nimport { TronAppBinder } from \"@internal/app-binder/TronAppBinder\";\n\n@injectable()\nexport class GetAppConfigurationUseCase {\n private readonly _appBinder: TronAppBinder;\n\n constructor(@inject(appBinderTypes.AppBinding) appBinder: TronAppBinder) {\n this._appBinder = appBinder;\n }\n\n execute(): GetAppConfigurationDAReturnType {\n return this._appBinder.getAppConfiguration();\n }\n}\n"],
|
|
5
|
+
"mappings": "okBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmC,qBAGnCC,EAA+B,kDAIxB,IAAMC,EAAN,KAAiC,CACrB,WAEjB,YAA+CC,EAA0B,CACvE,KAAK,WAAaA,CACpB,CAEA,SAA2C,CACzC,OAAO,KAAK,WAAW,oBAAoB,CAC7C,CACF,EAVaD,EAANE,EAAA,IADN,cAAW,EAIGC,EAAA,eAAO,iBAAe,UAAU,IAHlCH",
|
|
6
|
+
"names": ["GetAppConfigurationUseCase_exports", "__export", "GetAppConfigurationUseCase", "__toCommonJS", "import_inversify", "import_appBinderTypes", "GetAppConfigurationUseCase", "appBinder", "__decorateClass", "__decorateParam"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var u=(o,t)=>{for(var r in t)e(o,r,{get:t[r],enumerable:!0})},g=(o,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of m(t))!s.call(o,p)&&p!==r&&e(o,p,{get:()=>t[p],enumerable:!(i=C(t,p))||i.enumerable});return o};var c=o=>g(e({},"__esModule",{value:!0}),o);var l={};u(l,{appConfigurationModuleFactory:()=>d});module.exports=c(l);var n=require("inversify"),a=require("../../../use-cases/app-configuration/di/appConfigurationTypes"),f=require("../../../use-cases/app-configuration/GetAppConfigurationUseCase");const d=()=>new n.ContainerModule(({bind:o})=>{o(a.appConfigurationTypes.GetAppConfigurationUseCase).to(f.GetAppConfigurationUseCase)});0&&(module.exports={appConfigurationModuleFactory});
|
|
2
|
+
//# sourceMappingURL=appConfigurationModule.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/internal/use-cases/app-configuration/di/appConfigurationModule.ts"],
|
|
4
|
+
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { appConfigurationTypes } from \"@internal/use-cases/app-configuration/di/appConfigurationTypes\";\nimport { GetAppConfigurationUseCase } from \"@internal/use-cases/app-configuration/GetAppConfigurationUseCase\";\n\nexport const appConfigurationModuleFactory = () =>\n new ContainerModule(({ bind }) => {\n bind(appConfigurationTypes.GetAppConfigurationUseCase).to(\n GetAppConfigurationUseCase,\n );\n });\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAEhCC,EAAsC,0EACtCC,EAA2C,4EAEpC,MAAMJ,EAAgC,IAC3C,IAAI,kBAAgB,CAAC,CAAE,KAAAK,CAAK,IAAM,CAChCA,EAAK,wBAAsB,0BAA0B,EAAE,GACrD,4BACF,CACF,CAAC",
|
|
6
|
+
"names": ["appConfigurationModule_exports", "__export", "appConfigurationModuleFactory", "__toCommonJS", "import_inversify", "import_appConfigurationTypes", "import_GetAppConfigurationUseCase", "bind"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var C=(e,o)=>{for(var p in o)s(e,p,{get:o[p],enumerable:!0})},f=(e,o,p,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of i(o))!r.call(e,n)&&n!==p&&s(e,n,{get:()=>o[n],enumerable:!(t=a(o,n))||t.enumerable});return e};var g=e=>f(s({},"__esModule",{value:!0}),e);var c={};C(c,{appConfigurationTypes:()=>u});module.exports=g(c);const u={GetAppConfigurationUseCase:Symbol.for("GetAppConfigurationUseCase")};0&&(module.exports={appConfigurationTypes});
|
|
2
|
+
//# sourceMappingURL=appConfigurationTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/internal/use-cases/app-configuration/di/appConfigurationTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export const appConfigurationTypes = {\n GetAppConfigurationUseCase: Symbol.for(\"GetAppConfigurationUseCase\"),\n} as const;\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,2BAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAwB,CACnC,2BAA4B,OAAO,IAAI,4BAA4B,CACrE",
|
|
6
|
+
"names": ["appConfigurationTypes_exports", "__export", "appConfigurationTypes", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var f=(n,p)=>{for(var e in p)o(n,e,{get:p[e],enumerable:!0})},g=(n,p,e,t)=>{if(p&&typeof p=="object"||typeof p=="function")for(let r of a(p))!T.call(n,r)&&r!==e&&o(n,r,{get:()=>p[r],enumerable:!(t=c(p,r))||t.enumerable});return n};var u=n=>g(o({},"__esModule",{value:!0}),n),y=(n,p,e,t)=>{for(var r=t>1?void 0:t?c(p,e):p,d=n.length-1,m;d>=0;d--)(m=n[d])&&(r=(t?m(p,e,r):m(r))||r);return t&&r&&o(p,e,r),r},A=(n,p)=>(e,t)=>p(e,t,n);var O={};f(O,{SignPersonalMessageUseCase:()=>i});module.exports=u(O);var s=require("inversify"),B=require("../../app-binder/di/appBinderTypes");let i=class{_appBinder;constructor(p){this._appBinder=p}execute(p,e,t){const r=typeof e=="string"?new TextEncoder().encode(e):e;return this._appBinder.signPersonalMessage({derivationPath:p,message:r,skipOpenApp:t?.skipOpenApp})}};i=y([(0,s.injectable)(),A(0,(0,s.inject)(B.appBinderTypes.AppBinding))],i);0&&(module.exports={SignPersonalMessageUseCase});
|
|
2
|
+
//# sourceMappingURL=SignPersonalMessageUseCase.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/use-cases/message/SignPersonalMessageUseCase.ts"],
|
|
4
|
+
"sourcesContent": ["import { inject, injectable } from \"inversify\";\n\nimport { type SignPersonalMessageDAReturnType } from \"@api/app-binder/SignPersonalMessageDeviceActionTypes\";\nimport { type MessageOptions } from \"@api/model/MessageOptions\";\nimport { appBinderTypes } from \"@internal/app-binder/di/appBinderTypes\";\nimport { TronAppBinder } from \"@internal/app-binder/TronAppBinder\";\n\n@injectable()\nexport class SignPersonalMessageUseCase {\n private readonly _appBinder: TronAppBinder;\n\n constructor(@inject(appBinderTypes.AppBinding) appBinder: TronAppBinder) {\n this._appBinder = appBinder;\n }\n\n execute(\n derivationPath: string,\n message: string | Uint8Array,\n options?: MessageOptions,\n ): SignPersonalMessageDAReturnType {\n const messageBytes =\n typeof message === \"string\" ? new TextEncoder().encode(message) : message;\n\n return this._appBinder.signPersonalMessage({\n derivationPath,\n message: messageBytes,\n skipOpenApp: options?.skipOpenApp,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "okBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmC,qBAInCC,EAA+B,kDAIxB,IAAMC,EAAN,KAAiC,CACrB,WAEjB,YAA+CC,EAA0B,CACvE,KAAK,WAAaA,CACpB,CAEA,QACEC,EACAC,EACAC,EACiC,CACjC,MAAMC,EACJ,OAAOF,GAAY,SAAW,IAAI,YAAY,EAAE,OAAOA,CAAO,EAAIA,EAEpE,OAAO,KAAK,WAAW,oBAAoB,CACzC,eAAAD,EACA,QAASG,EACT,YAAaD,GAAS,WACxB,CAAC,CACH,CACF,EArBaJ,EAANM,EAAA,IADN,cAAW,EAIGC,EAAA,eAAO,iBAAe,UAAU,IAHlCP",
|
|
6
|
+
"names": ["SignPersonalMessageUseCase_exports", "__export", "SignPersonalMessageUseCase", "__toCommonJS", "import_inversify", "import_appBinderTypes", "SignPersonalMessageUseCase", "appBinder", "derivationPath", "message", "options", "messageBytes", "__decorateClass", "__decorateParam"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var M=(e,s)=>{for(var r in s)a(e,r,{get:s[r],enumerable:!0})},f=(e,s,r,m)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of p(s))!l.call(e,o)&&o!==r&&a(e,o,{get:()=>s[o],enumerable:!(m=i(s,o))||m.enumerable});return e};var C=e=>f(a({},"__esModule",{value:!0}),e);var d={};M(d,{messageModuleFactory:()=>c});module.exports=C(d);var n=require("inversify"),t=require("../../../use-cases/message/di/messageTypes"),g=require("../../../use-cases/message/SignPersonalMessageUseCase");const c=()=>new n.ContainerModule(({bind:e})=>{e(t.messageTypes.SignPersonalMessageUseCase).to(g.SignPersonalMessageUseCase)});0&&(module.exports={messageModuleFactory});
|
|
2
|
+
//# sourceMappingURL=messageModule.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/internal/use-cases/message/di/messageModule.ts"],
|
|
4
|
+
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { messageTypes } from \"@internal/use-cases/message/di/messageTypes\";\nimport { SignPersonalMessageUseCase } from \"@internal/use-cases/message/SignPersonalMessageUseCase\";\n\nexport const messageModuleFactory = () =>\n new ContainerModule(({ bind }) => {\n bind(messageTypes.SignPersonalMessageUseCase).to(\n SignPersonalMessageUseCase,\n );\n });\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAEhCC,EAA6B,uDAC7BC,EAA2C,kEAEpC,MAAMJ,EAAuB,IAClC,IAAI,kBAAgB,CAAC,CAAE,KAAAK,CAAK,IAAM,CAChCA,EAAK,eAAa,0BAA0B,EAAE,GAC5C,4BACF,CACF,CAAC",
|
|
6
|
+
"names": ["messageModule_exports", "__export", "messageModuleFactory", "__toCommonJS", "import_inversify", "import_messageTypes", "import_SignPersonalMessageUseCase", "bind"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var t=Object.prototype.hasOwnProperty;var S=(e,s)=>{for(var o in s)n(e,o,{get:s[o],enumerable:!0})},c=(e,s,o,g)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of l(s))!t.call(e,a)&&a!==o&&n(e,a,{get:()=>s[a],enumerable:!(g=r(s,a))||g.enumerable});return e};var i=e=>c(n({},"__esModule",{value:!0}),e);var p={};S(p,{messageTypes:()=>m});module.exports=i(p);const m={SignPersonalMessageUseCase:Symbol.for("SignPersonalMessageUseCase")};0&&(module.exports={messageTypes});
|
|
2
|
+
//# sourceMappingURL=messageTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/internal/use-cases/message/di/messageTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export const messageTypes = {\n SignPersonalMessageUseCase: Symbol.for(\"SignPersonalMessageUseCase\"),\n} as const;\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAe,CAC1B,2BAA4B,OAAO,IAAI,4BAA4B,CACrE",
|
|
6
|
+
"names": ["messageTypes_exports", "__export", "messageTypes", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var f=(r,p)=>{for(var i in p)e(r,i,{get:p[i],enumerable:!0})},u=(r,p,i,t)=>{if(p&&typeof p=="object"||typeof p=="function")for(let n of T(p))!y.call(r,n)&&n!==i&&e(r,n,{get:()=>p[n],enumerable:!(t=A(p,n))||t.enumerable});return r};var O=r=>u(e({},"__esModule",{value:!0}),r),c=(r,p,i,t)=>{for(var n=t>1?void 0:t?A(p,i):p,m=r.length-1,d;m>=0;m--)(d=r[m])&&(n=(t?d(p,i,n):d(n))||n);return t&&n&&e(p,i,n),n},s=(r,p)=>(i,t)=>p(i,t,r);var l={};f(l,{SignTransactionUseCase:()=>o});module.exports=O(l);var a=require("inversify"),B=require("../../app-binder/di/appBinderTypes");let o=class{_appBinder;constructor(p){this._appBinder=p}execute(p,i,t){return this._appBinder.signTransaction({derivationPath:p,transaction:i,skipOpenApp:t?.skipOpenApp})}};o=c([(0,a.injectable)(),s(0,(0,a.inject)(B.appBinderTypes.AppBinding))],o);0&&(module.exports={SignTransactionUseCase});
|
|
2
|
+
//# sourceMappingURL=SignTransactionUseCase.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/use-cases/transaction/SignTransactionUseCase.ts"],
|
|
4
|
+
"sourcesContent": ["import { inject, injectable } from \"inversify\";\n\nimport { type SignTransactionDAReturnType } from \"@api/app-binder/SignTransactionDeviceActionTypes\";\nimport { type TransactionOptions } from \"@api/model/TransactionOptions\";\nimport { appBinderTypes } from \"@internal/app-binder/di/appBinderTypes\";\nimport { TronAppBinder } from \"@internal/app-binder/TronAppBinder\";\n\n@injectable()\nexport class SignTransactionUseCase {\n private readonly _appBinder: TronAppBinder;\n\n constructor(@inject(appBinderTypes.AppBinding) appBinder: TronAppBinder) {\n this._appBinder = appBinder;\n }\n\n execute(\n derivationPath: string,\n transaction: Uint8Array,\n options?: TransactionOptions,\n ): SignTransactionDAReturnType {\n return this._appBinder.signTransaction({\n derivationPath,\n transaction,\n skipOpenApp: options?.skipOpenApp,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "okBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmC,qBAInCC,EAA+B,kDAIxB,IAAMC,EAAN,KAA6B,CACjB,WAEjB,YAA+CC,EAA0B,CACvE,KAAK,WAAaA,CACpB,CAEA,QACEC,EACAC,EACAC,EAC6B,CAC7B,OAAO,KAAK,WAAW,gBAAgB,CACrC,eAAAF,EACA,YAAAC,EACA,YAAaC,GAAS,WACxB,CAAC,CACH,CACF,EAlBaJ,EAANK,EAAA,IADN,cAAW,EAIGC,EAAA,eAAO,iBAAe,UAAU,IAHlCN",
|
|
6
|
+
"names": ["SignTransactionUseCase_exports", "__export", "SignTransactionUseCase", "__toCommonJS", "import_inversify", "import_appBinderTypes", "SignTransactionUseCase", "appBinder", "derivationPath", "transaction", "options", "__decorateClass", "__decorateParam"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var C=(o,n)=>{for(var r in n)a(o,r,{get:n[r],enumerable:!0})},T=(o,n,r,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of p(n))!f.call(o,t)&&t!==r&&a(o,t,{get:()=>n[t],enumerable:!(e=m(n,t))||e.enumerable});return o};var d=o=>T(a({},"__esModule",{value:!0}),o);var l={};C(l,{transactionModuleFactory:()=>g});module.exports=d(l);var i=require("inversify"),s=require("../../../use-cases/transaction/di/transactionTypes"),c=require("../../../use-cases/transaction/SignTransactionUseCase");const g=()=>new i.ContainerModule(({bind:o})=>{o(s.transactionTypes.SignTransactionUseCase).to(c.SignTransactionUseCase)});0&&(module.exports={transactionModuleFactory});
|
|
2
|
+
//# sourceMappingURL=transactionModule.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/internal/use-cases/transaction/di/transactionModule.ts"],
|
|
4
|
+
"sourcesContent": ["import { ContainerModule } from \"inversify\";\n\nimport { transactionTypes } from \"@internal/use-cases/transaction/di/transactionTypes\";\nimport { SignTransactionUseCase } from \"@internal/use-cases/transaction/SignTransactionUseCase\";\n\nexport const transactionModuleFactory = () =>\n new ContainerModule(({ bind }) => {\n bind(transactionTypes.SignTransactionUseCase).to(SignTransactionUseCase);\n });\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,8BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAgC,qBAEhCC,EAAiC,+DACjCC,EAAuC,kEAEhC,MAAMJ,EAA2B,IACtC,IAAI,kBAAgB,CAAC,CAAE,KAAAK,CAAK,IAAM,CAChCA,EAAK,mBAAiB,sBAAsB,EAAE,GAAG,wBAAsB,CACzE,CAAC",
|
|
6
|
+
"names": ["transactionModule_exports", "__export", "transactionModuleFactory", "__toCommonJS", "import_inversify", "import_transactionTypes", "import_SignTransactionUseCase", "bind"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var S=(n,s)=>{for(var o in s)t(n,o,{get:s[o],enumerable:!0})},T=(n,s,o,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of i(s))!r.call(n,a)&&a!==o&&t(n,a,{get:()=>s[a],enumerable:!(e=c(s,a))||e.enumerable});return n};var g=n=>T(t({},"__esModule",{value:!0}),n);var y={};S(y,{transactionTypes:()=>p});module.exports=g(y);const p={SignTransactionUseCase:Symbol.for("SignTransactionUseCase")};0&&(module.exports={transactionTypes});
|
|
2
|
+
//# sourceMappingURL=transactionTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/internal/use-cases/transaction/di/transactionTypes.ts"],
|
|
4
|
+
"sourcesContent": ["export const transactionTypes = {\n SignTransactionUseCase: Symbol.for(\"SignTransactionUseCase\"),\n} as const;\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAmB,CAC9B,uBAAwB,OAAO,IAAI,wBAAwB,CAC7D",
|
|
6
|
+
"names": ["transactionTypes_exports", "__export", "transactionTypes", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dependencies": {
|
|
3
|
+
"@ledgerhq/signer-utils": "workspace:*",
|
|
4
|
+
"inversify": "catalog:",
|
|
5
|
+
"purify-ts": "catalog:",
|
|
6
|
+
"reflect-metadata": "catalog:",
|
|
7
|
+
"xstate": "catalog:"
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@ledgerhq/device-management-kit": "workspace:*",
|
|
11
|
+
"@ledgerhq/eslint-config-dsdk": "workspace:*",
|
|
12
|
+
"@ledgerhq/ldmk-tool": "workspace:*",
|
|
13
|
+
"@ledgerhq/prettier-config-dsdk": "workspace:*",
|
|
14
|
+
"@ledgerhq/tsconfig-dsdk": "workspace:*",
|
|
15
|
+
"@ledgerhq/vitest-config-dmk": "workspace:*",
|
|
16
|
+
"rxjs": "catalog:",
|
|
17
|
+
"ts-node": "catalog:"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./lib/esm/index.js",
|
|
22
|
+
"require": "./lib/cjs/index.js",
|
|
23
|
+
"types": "./lib/types/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./*": {
|
|
26
|
+
"import": "./lib/esm/*",
|
|
27
|
+
"require": "./lib/cjs/*",
|
|
28
|
+
"types": "./lib/types/*"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"./lib"
|
|
33
|
+
],
|
|
34
|
+
"license": "Apache-2.0",
|
|
35
|
+
"name": "@ledgerhq/device-signer-kit-tron",
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@ledgerhq/device-management-kit": "workspace:*"
|
|
38
|
+
},
|
|
39
|
+
"private": false,
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/LedgerHQ/device-sdk-ts.git"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "pnpm ldmk-tool build --entryPoints src/index.ts,src/**/*.ts --tsconfig tsconfig.prod.json",
|
|
46
|
+
"dev": "concurrently \"pnpm watch:builds\" \"pnpm watch:types\"",
|
|
47
|
+
"lint": "eslint",
|
|
48
|
+
"lint:fix": "pnpm lint --fix",
|
|
49
|
+
"prebuild": "rimraf lib",
|
|
50
|
+
"prettier": "prettier . --check",
|
|
51
|
+
"prettier:fix": "prettier . --write",
|
|
52
|
+
"test": "vitest run",
|
|
53
|
+
"test:coverage": "vitest run --coverage",
|
|
54
|
+
"test:watch": "vitest",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"watch:builds": "pnpm ldmk-tool watch --entryPoints src/index.ts,src/**/*.ts --tsconfig tsconfig.prod.json",
|
|
57
|
+
"watch:types": "concurrently \"tsc --watch -p tsconfig.prod.json\" \"tsc-alias --watch -p tsconfig.prod.json\""
|
|
58
|
+
},
|
|
59
|
+
"version": "0.0.0-develop-20260707161641"
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=SignerTrx.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{DefaultSignerTrx as s}from"../internal/DefaultSignerTrx";class n{_dmk;_sessionId;constructor({dmk:e,sessionId:i}){this._dmk=e,this._sessionId=i}build(){return new s({dmk:this._dmk,sessionId:this._sessionId})}}export{n as SignerTrxBuilder};
|
|
2
|
+
//# sourceMappingURL=SignerTrxBuilder.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/SignerTrxBuilder.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type DeviceManagementKit,\n type DeviceSessionId,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { DefaultSignerTrx } from \"@internal/DefaultSignerTrx\";\n\ntype SignerTrxBuilderConstructorArgs = {\n dmk: DeviceManagementKit;\n sessionId: DeviceSessionId;\n};\n\n/**\n * Builder for the `SignerTrx` class.\n *\n * @example\n * ```\n * const signer = new SignerTrxBuilder({ dmk, sessionId })\n * .build();\n * ```\n */\nexport class SignerTrxBuilder {\n private readonly _dmk: DeviceManagementKit;\n private readonly _sessionId: DeviceSessionId;\n\n constructor({ dmk, sessionId }: SignerTrxBuilderConstructorArgs) {\n this._dmk = dmk;\n this._sessionId = sessionId;\n }\n\n /**\n * Build the Tron signer instance\n *\n * @returns the Tron signer instance\n */\n\n public build() {\n return new DefaultSignerTrx({\n dmk: this._dmk,\n sessionId: this._sessionId,\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "AAKA,OAAS,oBAAAA,MAAwB,6BAgB1B,MAAMC,CAAiB,CACX,KACA,WAEjB,YAAY,CAAE,IAAAC,EAAK,UAAAC,CAAU,EAAoC,CAC/D,KAAK,KAAOD,EACZ,KAAK,WAAaC,CACpB,CAQO,OAAQ,CACb,OAAO,IAAIH,EAAiB,CAC1B,IAAK,KAAK,KACV,UAAW,KAAK,UAClB,CAAC,CACH,CACF",
|
|
6
|
+
"names": ["DefaultSignerTrx", "SignerTrxBuilder", "dmk", "sessionId"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{SignerTrxBuilder as t}from"./SignerTrxBuilder";import{APP_NAME as s,INS as e,LEDGER_CLA as i}from"../internal/app-binder/constants";import{DefaultSignerTrx as c}from"../internal/DefaultSignerTrx";describe("SignerTrxBuilder",()=>{const o={dmk:{},sessionId:""};test("should be an instance of SignerTrxBuilder",()=>{const r=new t(o);expect(r).toBeInstanceOf(t)}),test("should build a DefaultSignerTrx",()=>{const n=new t(o).build();expect(n).toBeInstanceOf(c)})});describe("Tron APDU constants",()=>{test("APP_NAME should be Tron",()=>{expect(s).toBe("Tron")}),test("LEDGER_CLA should be 0xE0",()=>{expect(i).toBe(224)}),test("INS values should match the Tron app protocol",()=>{expect(e.GET_ADDRESS).toBe(2),expect(e.SIGN_TRANSACTION).toBe(4),expect(e.GET_APP_CONFIGURATION).toBe(6),expect(e.SIGN_PERSONAL_MESSAGE).toBe(8)})});
|
|
2
|
+
//# sourceMappingURL=SignerTrxBuilder.test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/SignerTrxBuilder.test.ts"],
|
|
4
|
+
"sourcesContent": ["import { type DeviceManagementKit } from \"@ledgerhq/device-management-kit\";\n\nimport { SignerTrxBuilder } from \"@api/SignerTrxBuilder\";\nimport { APP_NAME, INS, LEDGER_CLA } from \"@internal/app-binder/constants\";\nimport { DefaultSignerTrx } from \"@internal/DefaultSignerTrx\";\n\ndescribe(\"SignerTrxBuilder\", () => {\n const dmk = {} as DeviceManagementKit;\n const defaultConstructorArgs = { dmk, sessionId: \"\" };\n\n test(\"should be an instance of SignerTrxBuilder\", () => {\n const builder = new SignerTrxBuilder(defaultConstructorArgs);\n\n expect(builder).toBeInstanceOf(SignerTrxBuilder);\n });\n\n test(\"should build a DefaultSignerTrx\", () => {\n const builder = new SignerTrxBuilder(defaultConstructorArgs);\n\n const signer = builder.build();\n\n expect(signer).toBeInstanceOf(DefaultSignerTrx);\n });\n});\n\ndescribe(\"Tron APDU constants\", () => {\n test(\"APP_NAME should be Tron\", () => {\n expect(APP_NAME).toBe(\"Tron\");\n });\n\n test(\"LEDGER_CLA should be 0xE0\", () => {\n expect(LEDGER_CLA).toBe(0xe0);\n });\n\n test(\"INS values should match the Tron app protocol\", () => {\n expect(INS.GET_ADDRESS).toBe(0x02);\n expect(INS.SIGN_TRANSACTION).toBe(0x04);\n expect(INS.GET_APP_CONFIGURATION).toBe(0x06);\n expect(INS.SIGN_PERSONAL_MESSAGE).toBe(0x08);\n });\n});\n"],
|
|
5
|
+
"mappings": "AAEA,OAAS,oBAAAA,MAAwB,wBACjC,OAAS,YAAAC,EAAU,OAAAC,EAAK,cAAAC,MAAkB,iCAC1C,OAAS,oBAAAC,MAAwB,6BAEjC,SAAS,mBAAoB,IAAM,CAEjC,MAAMC,EAAyB,CAAE,IADrB,CAAC,EACyB,UAAW,EAAG,EAEpD,KAAK,4CAA6C,IAAM,CACtD,MAAMC,EAAU,IAAIN,EAAiBK,CAAsB,EAE3D,OAAOC,CAAO,EAAE,eAAeN,CAAgB,CACjD,CAAC,EAED,KAAK,kCAAmC,IAAM,CAG5C,MAAMO,EAFU,IAAIP,EAAiBK,CAAsB,EAEpC,MAAM,EAE7B,OAAOE,CAAM,EAAE,eAAeH,CAAgB,CAChD,CAAC,CACH,CAAC,EAED,SAAS,sBAAuB,IAAM,CACpC,KAAK,0BAA2B,IAAM,CACpC,OAAOH,CAAQ,EAAE,KAAK,MAAM,CAC9B,CAAC,EAED,KAAK,4BAA6B,IAAM,CACtC,OAAOE,CAAU,EAAE,KAAK,GAAI,CAC9B,CAAC,EAED,KAAK,gDAAiD,IAAM,CAC1D,OAAOD,EAAI,WAAW,EAAE,KAAK,CAAI,EACjC,OAAOA,EAAI,gBAAgB,EAAE,KAAK,CAAI,EACtC,OAAOA,EAAI,qBAAqB,EAAE,KAAK,CAAI,EAC3C,OAAOA,EAAI,qBAAqB,EAAE,KAAK,CAAI,CAC7C,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["SignerTrxBuilder", "APP_NAME", "INS", "LEDGER_CLA", "DefaultSignerTrx", "defaultConstructorArgs", "builder", "signer"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=GetAddressDeviceActionTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=GetAppConfigurationDeviceActionTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=SignPersonalMessageDeviceActionTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=SignTransactionDeviceActionTypes.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 GetAppConfigurationDAError,\n type GetAppConfigurationDAIntermediateValue,\n type GetAppConfigurationDAOutput,\n type GetAppConfigurationDAReturnType,\n} from \"@api/app-binder/GetAppConfigurationDeviceActionTypes\";\nexport {\n type SignPersonalMessageDAError,\n type SignPersonalMessageDAIntermediateValue,\n type SignPersonalMessageDAOutput,\n type SignPersonalMessageDAReturnType,\n} from \"@api/app-binder/SignPersonalMessageDeviceActionTypes\";\nexport {\n type SignTransactionDAError,\n type SignTransactionDAIntermediateValue,\n type SignTransactionDAOutput,\n type SignTransactionDAReturnType,\n} from \"@api/app-binder/SignTransactionDeviceActionTypes\";\nexport { type AddressOptions } from \"@api/model/AddressOptions\";\nexport { type AppConfiguration } from \"@api/model/AppConfiguration\";\nexport { type MessageOptions } from \"@api/model/MessageOptions\";\nexport { type Signature } from \"@api/model/Signature\";\nexport { type TransactionOptions } from \"@api/model/TransactionOptions\";\nexport { type SignerTrx } from \"@api/SignerTrx\";\nexport { SignerTrxBuilder } from \"@api/SignerTrxBuilder\";\nexport { type TronAppErrorCodes } from \"@internal/app-binder/command/utils/tronApplicationErrors\";\n"],
|
|
5
|
+
"mappings": "AA8BA,OAAS,oBAAAA,MAAwB",
|
|
6
|
+
"names": ["SignerTrxBuilder"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=AddressOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=AppConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=MessageOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=Signature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=TransactionOptions.js.map
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{makeContainer as s}from"./di";import{addressTypes as n}from"./use-cases/address/di/addressTypes";import{appConfigurationTypes as i}from"./use-cases/app-configuration/di/appConfigurationTypes";import{messageTypes as o}from"./use-cases/message/di/messageTypes";import{transactionTypes as a}from"./use-cases/transaction/di/transactionTypes";class c{_container;constructor({dmk:e,sessionId:t}){this._container=s({dmk:e,sessionId:t})}getAddress(e,t){return this._container.get(n.GetAddressUseCase).execute(e,t)}signTransaction(e,t,r){return this._container.get(a.SignTransactionUseCase).execute(e,t,r)}signPersonalMessage(e,t,r){return this._container.get(o.SignPersonalMessageUseCase).execute(e,t,r)}getAppConfiguration(){return this._container.get(i.GetAppConfigurationUseCase).execute()}}export{c as DefaultSignerTrx};
|
|
2
|
+
//# sourceMappingURL=DefaultSignerTrx.js.map
|