@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
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,53 @@
|
|
|
1
|
+
# Signer Tron
|
|
2
|
+
|
|
3
|
+
This package provides a signer implementation for Tron (TRX).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @ledgerhq/device-signer-kit-tron
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { SignerTrxBuilder } from "@ledgerhq/device-signer-kit-tron";
|
|
15
|
+
|
|
16
|
+
const signer = new SignerTrxBuilder({ dmk, sessionId }).build();
|
|
17
|
+
|
|
18
|
+
// Get address (Tron uses the BIP44 coin type 195)
|
|
19
|
+
const { observable } = signer.getAddress("44'/195'/0'/0/0", {
|
|
20
|
+
checkOnDevice: true,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Sign a raw transaction
|
|
24
|
+
const { observable: signObservable } = signer.signTransaction(
|
|
25
|
+
"44'/195'/0'/0/0",
|
|
26
|
+
rawTransaction,
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
// Sign a personal message
|
|
30
|
+
const { observable: messageObservable } = signer.signPersonalMessage(
|
|
31
|
+
"44'/195'/0'/0/0",
|
|
32
|
+
"Hello Tron",
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
// Read the Tron app configuration
|
|
36
|
+
const { observable: configObservable } = signer.getAppConfiguration();
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Development
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Install dependencies
|
|
43
|
+
pnpm install
|
|
44
|
+
|
|
45
|
+
# Build
|
|
46
|
+
pnpm build
|
|
47
|
+
|
|
48
|
+
# Test
|
|
49
|
+
pnpm test
|
|
50
|
+
|
|
51
|
+
# Lint
|
|
52
|
+
pnpm lint
|
|
53
|
+
```
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var g=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of p(t))!a.call(e,n)&&n!==s&&i(e,n,{get:()=>t[n],enumerable:!(r=o(t,n))||r.enumerable});return e};var A=e=>g(i({},"__esModule",{value:!0}),e);var y={};module.exports=A(y);
|
|
2
|
+
//# sourceMappingURL=SignerTrx.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/SignerTrx.ts"],
|
|
4
|
+
"sourcesContent": ["import { type GetAddressDAReturnType } from \"@api/app-binder/GetAddressDeviceActionTypes\";\nimport { type GetAppConfigurationDAReturnType } from \"@api/app-binder/GetAppConfigurationDeviceActionTypes\";\nimport { type SignPersonalMessageDAReturnType } from \"@api/app-binder/SignPersonalMessageDeviceActionTypes\";\nimport { type SignTransactionDAReturnType } from \"@api/app-binder/SignTransactionDeviceActionTypes\";\nimport { type AddressOptions } from \"@api/model/AddressOptions\";\nimport { type MessageOptions } from \"@api/model/MessageOptions\";\nimport { type TransactionOptions } from \"@api/model/TransactionOptions\";\n\nexport interface SignerTrx {\n getAddress: (\n derivationPath: string,\n options?: AddressOptions,\n ) => GetAddressDAReturnType;\n\n signTransaction: (\n derivationPath: string,\n transaction: Uint8Array,\n options?: TransactionOptions,\n ) => SignTransactionDAReturnType;\n\n signPersonalMessage: (\n derivationPath: string,\n message: string | Uint8Array,\n options?: MessageOptions,\n ) => SignPersonalMessageDAReturnType;\n\n getAppConfiguration: () => GetAppConfigurationDAReturnType;\n}\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["SignerTrx_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var m=(i,e)=>{for(var s in e)t(i,s,{get:e[s],enumerable:!0})},u=(i,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of a(e))!c.call(i,r)&&r!==s&&t(i,r,{get:()=>e[r],enumerable:!(n=d(e,r))||n.enumerable});return i};var g=i=>u(t({},"__esModule",{value:!0}),i);var p={};m(p,{SignerTrxBuilder:()=>l});module.exports=g(p);var o=require("../internal/DefaultSignerTrx");class l{_dmk;_sessionId;constructor({dmk:e,sessionId:s}){this._dmk=e,this._sessionId=s}build(){return new o.DefaultSignerTrx({dmk:this._dmk,sessionId:this._sessionId})}}0&&(module.exports={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": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAKA,IAAAI,EAAiC,sCAgB1B,MAAMF,CAAiB,CACX,KACA,WAEjB,YAAY,CAAE,IAAAG,EAAK,UAAAC,CAAU,EAAoC,CAC/D,KAAK,KAAOD,EACZ,KAAK,WAAaC,CACpB,CAQO,OAAQ,CACb,OAAO,IAAI,mBAAiB,CAC1B,IAAK,KAAK,KACV,UAAW,KAAK,UAClB,CAAC,CACH,CACF",
|
|
6
|
+
"names": ["SignerTrxBuilder_exports", "__export", "SignerTrxBuilder", "__toCommonJS", "import_DefaultSignerTrx", "dmk", "sessionId"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=require("./SignerTrxBuilder"),e=require("../internal/app-binder/constants"),n=require("../internal/DefaultSignerTrx");describe("SignerTrxBuilder",()=>{const o={dmk:{},sessionId:""};test("should be an instance of SignerTrxBuilder",()=>{const r=new t.SignerTrxBuilder(o);expect(r).toBeInstanceOf(t.SignerTrxBuilder)}),test("should build a DefaultSignerTrx",()=>{const s=new t.SignerTrxBuilder(o).build();expect(s).toBeInstanceOf(n.DefaultSignerTrx)})});describe("Tron APDU constants",()=>{test("APP_NAME should be Tron",()=>{expect(e.APP_NAME).toBe("Tron")}),test("LEDGER_CLA should be 0xE0",()=>{expect(e.LEDGER_CLA).toBe(224)}),test("INS values should match the Tron app protocol",()=>{expect(e.INS.GET_ADDRESS).toBe(2),expect(e.INS.SIGN_TRANSACTION).toBe(4),expect(e.INS.GET_APP_CONFIGURATION).toBe(6),expect(e.INS.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,IAAAA,EAAiC,iCACjCC,EAA0C,0CAC1CC,EAAiC,sCAEjC,SAAS,mBAAoB,IAAM,CAEjC,MAAMC,EAAyB,CAAE,IADrB,CAAC,EACyB,UAAW,EAAG,EAEpD,KAAK,4CAA6C,IAAM,CACtD,MAAMC,EAAU,IAAI,mBAAiBD,CAAsB,EAE3D,OAAOC,CAAO,EAAE,eAAe,kBAAgB,CACjD,CAAC,EAED,KAAK,kCAAmC,IAAM,CAG5C,MAAMC,EAFU,IAAI,mBAAiBF,CAAsB,EAEpC,MAAM,EAE7B,OAAOE,CAAM,EAAE,eAAe,kBAAgB,CAChD,CAAC,CACH,CAAC,EAED,SAAS,sBAAuB,IAAM,CACpC,KAAK,0BAA2B,IAAM,CACpC,OAAO,UAAQ,EAAE,KAAK,MAAM,CAC9B,CAAC,EAED,KAAK,4BAA6B,IAAM,CACtC,OAAO,YAAU,EAAE,KAAK,GAAI,CAC9B,CAAC,EAED,KAAK,gDAAiD,IAAM,CAC1D,OAAO,MAAI,WAAW,EAAE,KAAK,CAAI,EACjC,OAAO,MAAI,gBAAgB,EAAE,KAAK,CAAI,EACtC,OAAO,MAAI,qBAAqB,EAAE,KAAK,CAAI,EAC3C,OAAO,MAAI,qBAAqB,EAAE,KAAK,CAAI,CAC7C,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["import_SignerTrxBuilder", "import_constants", "import_DefaultSignerTrx", "defaultConstructorArgs", "builder", "signer"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var m=(r,e,n,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of s(e))!A.call(r,t)&&t!==n&&p(r,t,{get:()=>e[t],enumerable:!(d=o(e,t))||d.enumerable});return r};var u=r=>m(p({},"__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 TronAppErrorCodes } from \"@internal/app-binder/command/utils/tronApplicationErrors\";\n\ntype GetAddressDAUserInteractionRequired =\n | UserInteractionRequired.None\n | UserInteractionRequired.VerifyAddress;\n\nexport type GetAddressDAOutput =\n SendCommandInAppDAOutput<GetAddressCommandResponse>;\n\nexport type GetAddressDAError =\n | OpenAppDAError\n | CommandErrorResult<TronAppErrorCodes>[\"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 r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var a=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of A(e))!u.call(t,p)&&p!==o&&r(t,p,{get:()=>e[p],enumerable:!(n=i(e,p))||n.enumerable});return t};var m=t=>a(r({},"__esModule",{value:!0}),t);var d={};module.exports=m(d);
|
|
2
|
+
//# sourceMappingURL=GetAppConfigurationDeviceActionTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/GetAppConfigurationDeviceActionTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type ExecuteDeviceActionReturnType,\n type SendCommandInAppDAError,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type AppConfiguration } from \"@api/model/AppConfiguration\";\nimport { type TronAppErrorCodes } from \"@internal/app-binder/command/utils/tronApplicationErrors\";\n\nexport type GetAppConfigurationDAOutput =\n SendCommandInAppDAOutput<AppConfiguration>;\n\nexport type GetAppConfigurationDAError =\n SendCommandInAppDAError<TronAppErrorCodes>;\n\nexport type GetAppConfigurationDAIntermediateValue =\n SendCommandInAppDAIntermediateValue<UserInteractionRequired.None>;\n\nexport type GetAppConfigurationDAReturnType = ExecuteDeviceActionReturnType<\n GetAppConfigurationDAOutput,\n GetAppConfigurationDAError,\n GetAppConfigurationDAIntermediateValue\n>;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["GetAppConfigurationDeviceActionTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var g=(r,e,p,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!i.call(r,t)&&t!==p&&o(r,t,{get:()=>e[t],enumerable:!(n=s(e,t))||n.enumerable});return r};var u=r=>g(o({},"__esModule",{value:!0}),r);var A={};module.exports=u(A);
|
|
2
|
+
//# sourceMappingURL=SignPersonalMessageDeviceActionTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/app-binder/SignPersonalMessageDeviceActionTypes.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type CommandErrorResult,\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type OpenAppDARequiredInteraction,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type Signature } from \"@api/model/Signature\";\nimport { type TronAppErrorCodes } from \"@internal/app-binder/command/utils/tronApplicationErrors\";\n\nexport type SignPersonalMessageDAOutput = Signature;\n\nexport type SignPersonalMessageDAError =\n | OpenAppDAError\n | CommandErrorResult<TronAppErrorCodes>[\"error\"];\n\ntype SignPersonalMessageDARequiredInteraction =\n | OpenAppDARequiredInteraction\n | UserInteractionRequired.SignPersonalMessage;\n\nexport type SignPersonalMessageDAIntermediateValue = {\n requiredUserInteraction: SignPersonalMessageDARequiredInteraction;\n};\n\nexport type SignPersonalMessageDAReturnType = ExecuteDeviceActionReturnType<\n SignPersonalMessageDAOutput,\n SignPersonalMessageDAError,\n SignPersonalMessageDAIntermediateValue\n>;\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["SignPersonalMessageDeviceActionTypes_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var u=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of a(r))!c.call(e,t)&&t!==o&&i(e,t,{get:()=>r[t],enumerable:!(n=p(r,t))||n.enumerable});return e};var A=e=>u(i({},"__esModule",{value:!0}),e);var s={};module.exports=A(s);
|
|
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 UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type Signature } from \"@api/model/Signature\";\nimport { type TronAppErrorCodes } from \"@internal/app-binder/command/utils/tronApplicationErrors\";\n\nexport type SignTransactionDAOutput = Signature;\n\nexport type SignTransactionDAError =\n | OpenAppDAError\n | CommandErrorResult<TronAppErrorCodes>[\"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 a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var A=(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))!y.call(t,r)&&r!==p&&o(t,r,{get:()=>e[r],enumerable:!(n=a(e,r))||n.enumerable});return t};var g=t=>u(o({},"__esModule",{value:!0}),t);var f={};A(f,{SignerTrxBuilder:()=>i.SignerTrxBuilder});module.exports=g(f);var i=require("./SignerTrxBuilder");0&&(module.exports={SignerTrxBuilder});
|
|
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 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": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0DAAAE,EAAAF,GA8BA,IAAAG,EAAiC",
|
|
6
|
+
"names": ["api_exports", "__export", "__toCommonJS", "import_SignerTrxBuilder"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var a=(p,e,c,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of t(e))!O.call(p,o)&&o!==c&&s(p,o,{get:()=>e[o],enumerable:!(n=i(e,o))||n.enumerable});return p};var b=p=>a(s({},"__esModule",{value:!0}),p);var d={};module.exports=b(d);
|
|
2
|
+
//# sourceMappingURL=AddressOptions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/AddressOptions.ts"],
|
|
4
|
+
"sourcesContent": ["export type AddressOptions = {\n checkOnDevice?: boolean;\n skipOpenApp?: boolean;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["AddressOptions_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var b=(n,o,t,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!i.call(n,a)&&a!==t&&r(n,a,{get:()=>o[a],enumerable:!(e=l(o,a))||e.enumerable});return n};var p=n=>b(r({},"__esModule",{value:!0}),n);var g={};module.exports=p(g);
|
|
2
|
+
//# sourceMappingURL=AppConfiguration.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/AppConfiguration.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Tron device app configuration, as reported by the `getAppConfiguration` APDU.\n *\n * Mirrors the shape returned by `@ledgerhq/hw-app-trx`.\n */\nexport type AppConfiguration = {\n version: string;\n versionN: number;\n allowData: boolean;\n allowContract: boolean;\n truncateAddress: boolean;\n signByHash: boolean;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["AppConfiguration_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var b=(e,p,t,s)=>{if(p&&typeof p=="object"||typeof p=="function")for(let o of i(p))!O.call(e,o)&&o!==t&&n(e,o,{get:()=>p[o],enumerable:!(s=a(p,o))||s.enumerable});return e};var g=e=>b(n({},"__esModule",{value:!0}),e);var k={};module.exports=g(k);
|
|
2
|
+
//# sourceMappingURL=MessageOptions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/MessageOptions.ts"],
|
|
4
|
+
"sourcesContent": ["export type MessageOptions = {\n skipOpenApp?: boolean;\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["MessageOptions_exports", "__toCommonJS"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var o=(t,r,n,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of y(r))!g.call(t,e)&&e!==n&&i(t,e,{get:()=>r[e],enumerable:!(a=p(r,e))||a.enumerable});return t};var u=t=>o(i({},"__esModule",{value:!0}),t);var x={};module.exports=u(x);
|
|
2
|
+
//# sourceMappingURL=Signature.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var t=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var O=(n,p,a,e)=>{if(p&&typeof p=="object"||typeof p=="function")for(let o of s(p))!r.call(n,o)&&o!==a&&t(n,o,{get:()=>p[o],enumerable:!(e=i(p,o))||e.enumerable});return n};var b=n=>O(t({},"__esModule",{value:!0}),n);var c={};module.exports=b(c);
|
|
2
|
+
//# sourceMappingURL=TransactionOptions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/model/TransactionOptions.ts"],
|
|
4
|
+
"sourcesContent": ["export type TransactionOptions = {\n skipOpenApp?: boolean;\n // Tron-specific options are added in a later task\n};\n"],
|
|
5
|
+
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
+
"names": ["TransactionOptions_exports", "__toCommonJS"]
|
|
7
|
+
}
|
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var x=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(r,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of b(o))!c.call(r,m)&&m!==t&&x(r,m,{get:()=>o[m],enumerable:!(i=a(o,m))||i.enumerable});return r},e=(r,o,t)=>(f(r,o,"default"),t&&f(t,o,"default"));var d=r=>f(x({},"__esModule",{value:!0}),r);var p={};module.exports=d(p);var h=require("reflect-metadata");e(p,require("./api/index"),module.exports);0&&(module.exports={...require("./api/index")});
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["// inversify requirement\nimport \"reflect-metadata\";\n\nexport * from \"@api/index\";\n"],
|
|
5
|
+
"mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GACA,IAAAE,EAAO,4BAEPC,EAAAH,EAAc,sBAHd",
|
|
6
|
+
"names": ["index_exports", "__toCommonJS", "import_reflect_metadata", "__reExport"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},A=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of f(e))!u.call(r,n)&&n!==t&&i(r,n,{get:()=>e[n],enumerable:!(s=y(e,n))||s.enumerable});return r};var T=r=>A(i({},"__esModule",{value:!0}),r);var d={};c(d,{DefaultSignerTrx:()=>C});module.exports=T(d);var o=require("./di"),a=require("./use-cases/address/di/addressTypes"),p=require("./use-cases/app-configuration/di/appConfigurationTypes"),g=require("./use-cases/message/di/messageTypes"),m=require("./use-cases/transaction/di/transactionTypes");class C{_container;constructor({dmk:e,sessionId:t}){this._container=(0,o.makeContainer)({dmk:e,sessionId:t})}getAddress(e,t){return this._container.get(a.addressTypes.GetAddressUseCase).execute(e,t)}signTransaction(e,t,s){return this._container.get(m.transactionTypes.SignTransactionUseCase).execute(e,t,s)}signPersonalMessage(e,t,s){return this._container.get(g.messageTypes.SignPersonalMessageUseCase).execute(e,t,s)}getAppConfiguration(){return this._container.get(p.appConfigurationTypes.GetAppConfigurationUseCase).execute()}}0&&(module.exports={DefaultSignerTrx});
|
|
2
|
+
//# sourceMappingURL=DefaultSignerTrx.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/internal/DefaultSignerTrx.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type DeviceManagementKit,\n type DeviceSessionId,\n} from \"@ledgerhq/device-management-kit\";\nimport { type Container } from \"inversify\";\n\nimport { type GetAddressDAReturnType } from \"@api/app-binder/GetAddressDeviceActionTypes\";\nimport { type GetAppConfigurationDAReturnType } from \"@api/app-binder/GetAppConfigurationDeviceActionTypes\";\nimport { type SignPersonalMessageDAReturnType } from \"@api/app-binder/SignPersonalMessageDeviceActionTypes\";\nimport { type SignTransactionDAReturnType } from \"@api/app-binder/SignTransactionDeviceActionTypes\";\nimport { type AddressOptions } from \"@api/model/AddressOptions\";\nimport { type MessageOptions } from \"@api/model/MessageOptions\";\nimport { type TransactionOptions } from \"@api/model/TransactionOptions\";\nimport { type SignerTrx } from \"@api/SignerTrx\";\nimport { makeContainer } from \"@internal/di\";\nimport { addressTypes } from \"@internal/use-cases/address/di/addressTypes\";\nimport { type GetAddressUseCase } from \"@internal/use-cases/address/GetAddressUseCase\";\nimport { appConfigurationTypes } from \"@internal/use-cases/app-configuration/di/appConfigurationTypes\";\nimport { type GetAppConfigurationUseCase } from \"@internal/use-cases/app-configuration/GetAppConfigurationUseCase\";\nimport { messageTypes } from \"@internal/use-cases/message/di/messageTypes\";\nimport { type SignPersonalMessageUseCase } from \"@internal/use-cases/message/SignPersonalMessageUseCase\";\nimport { transactionTypes } from \"@internal/use-cases/transaction/di/transactionTypes\";\nimport { type SignTransactionUseCase } from \"@internal/use-cases/transaction/SignTransactionUseCase\";\n\ntype DefaultSignerTrxConstructorArgs = {\n dmk: DeviceManagementKit;\n sessionId: DeviceSessionId;\n};\n\nexport class DefaultSignerTrx implements SignerTrx {\n private readonly _container: Container;\n\n constructor({ dmk, sessionId }: DefaultSignerTrxConstructorArgs) {\n this._container = makeContainer({ dmk, sessionId });\n }\n\n getAddress(\n derivationPath: string,\n options?: AddressOptions,\n ): GetAddressDAReturnType {\n return this._container\n .get<GetAddressUseCase>(addressTypes.GetAddressUseCase)\n .execute(derivationPath, options);\n }\n\n signTransaction(\n derivationPath: string,\n transaction: Uint8Array,\n options?: TransactionOptions,\n ): SignTransactionDAReturnType {\n return this._container\n .get<SignTransactionUseCase>(transactionTypes.SignTransactionUseCase)\n .execute(derivationPath, transaction, options);\n }\n\n signPersonalMessage(\n derivationPath: string,\n message: string | Uint8Array,\n options?: MessageOptions,\n ): SignPersonalMessageDAReturnType {\n return this._container\n .get<SignPersonalMessageUseCase>(messageTypes.SignPersonalMessageUseCase)\n .execute(derivationPath, message, options);\n }\n\n getAppConfiguration(): GetAppConfigurationDAReturnType {\n return this._container\n .get<GetAppConfigurationUseCase>(\n appConfigurationTypes.GetAppConfigurationUseCase,\n )\n .execute();\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAcA,IAAAI,EAA8B,wBAC9BC,EAA6B,uDAE7BC,EAAsC,0EAEtCC,EAA6B,uDAE7BC,EAAiC,+DAQ1B,MAAMN,CAAsC,CAChC,WAEjB,YAAY,CAAE,IAAAO,EAAK,UAAAC,CAAU,EAAoC,CAC/D,KAAK,cAAa,iBAAc,CAAE,IAAAD,EAAK,UAAAC,CAAU,CAAC,CACpD,CAEA,WACEC,EACAC,EACwB,CACxB,OAAO,KAAK,WACT,IAAuB,eAAa,iBAAiB,EACrD,QAAQD,EAAgBC,CAAO,CACpC,CAEA,gBACED,EACAE,EACAD,EAC6B,CAC7B,OAAO,KAAK,WACT,IAA4B,mBAAiB,sBAAsB,EACnE,QAAQD,EAAgBE,EAAaD,CAAO,CACjD,CAEA,oBACED,EACAG,EACAF,EACiC,CACjC,OAAO,KAAK,WACT,IAAgC,eAAa,0BAA0B,EACvE,QAAQD,EAAgBG,EAASF,CAAO,CAC7C,CAEA,qBAAuD,CACrD,OAAO,KAAK,WACT,IACC,wBAAsB,0BACxB,EACC,QAAQ,CACb,CACF",
|
|
6
|
+
"names": ["DefaultSignerTrx_exports", "__export", "DefaultSignerTrx", "__toCommonJS", "import_di", "import_addressTypes", "import_appConfigurationTypes", "import_messageTypes", "import_transactionTypes", "dmk", "sessionId", "derivationPath", "options", "transaction", "message"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var c=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var l=(i,e)=>{for(var n in e)c(i,n,{get:e[n],enumerable:!0})},P=(i,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of y(e))!I.call(i,t)&&t!==n&&c(i,t,{get:()=>e[t],enumerable:!(o=v(e,t))||o.enumerable});return i};var O=i=>P(c({},"__esModule",{value:!0}),i),k=(i,e,n,o)=>{for(var t=o>1?void 0:o?v(e,n):e,m=i.length-1,d;m>=0;m--)(d=i[m])&&(t=(o?d(e,n,t):d(t))||t);return o&&t&&c(e,n,t),t},A=(i,e)=>(n,o)=>e(n,o,i);var T={};l(T,{TronAppBinder:()=>a});module.exports=O(T);var s=require("@ledgerhq/device-management-kit"),p=require("inversify"),D=require("../app-binder/command/GetAddressCommand"),g=require("../app-binder/command/GetAppConfigurationCommand"),r=require("../app-binder/constants"),h=require("../app-binder/task/SignPersonalMessageTask"),f=require("../app-binder/task/SignTransactionTask"),u=require("../externalTypes");let a=class{constructor(e,n){this.dmk=e;this.sessionId=n}getAddress(e){return this.dmk.executeDeviceAction({sessionId:this.sessionId,deviceAction:new s.SendCommandInAppDeviceAction({input:{command:new D.GetAddressCommand({derivationPath:e.derivationPath,checkOnDevice:e.checkOnDevice}),appName:r.APP_NAME,requiredUserInteraction:e.checkOnDevice?s.UserInteractionRequired.VerifyAddress:s.UserInteractionRequired.None,skipOpenApp:e.skipOpenApp}})})}signTransaction(e){return this.dmk.executeDeviceAction({sessionId:this.sessionId,deviceAction:new s.CallTaskInAppDeviceAction({input:{task:async n=>new f.SignTransactionTask(n,{derivationPath:e.derivationPath,transaction:e.transaction}).run(),appName:r.APP_NAME,requiredUserInteraction:s.UserInteractionRequired.SignTransaction,skipOpenApp:e.skipOpenApp??!1}})})}signPersonalMessage(e){return this.dmk.executeDeviceAction({sessionId:this.sessionId,deviceAction:new s.CallTaskInAppDeviceAction({input:{task:async n=>new h.SignPersonalMessageTask(n,{derivationPath:e.derivationPath,message:e.message}).run(),appName:r.APP_NAME,requiredUserInteraction:s.UserInteractionRequired.SignPersonalMessage,skipOpenApp:e.skipOpenApp??!1}})})}getAppConfiguration(){return this.dmk.executeDeviceAction({sessionId:this.sessionId,deviceAction:new s.SendCommandInAppDeviceAction({input:{command:new g.GetAppConfigurationCommand,appName:r.APP_NAME,requiredUserInteraction:s.UserInteractionRequired.None,skipOpenApp:!1}})})}};a=k([(0,p.injectable)(),A(0,(0,p.inject)(u.externalTypes.Dmk)),A(1,(0,p.inject)(u.externalTypes.SessionId))],a);0&&(module.exports={TronAppBinder});
|
|
2
|
+
//# sourceMappingURL=TronAppBinder.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/internal/app-binder/TronAppBinder.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n CallTaskInAppDeviceAction,\n type DeviceManagementKit,\n type DeviceSessionId,\n SendCommandInAppDeviceAction,\n UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\nimport { inject, injectable } from \"inversify\";\n\nimport { type GetAddressDAReturnType } from \"@api/app-binder/GetAddressDeviceActionTypes\";\nimport { type GetAppConfigurationDAReturnType } from \"@api/app-binder/GetAppConfigurationDeviceActionTypes\";\nimport { type SignPersonalMessageDAReturnType } from \"@api/app-binder/SignPersonalMessageDeviceActionTypes\";\nimport { type SignTransactionDAReturnType } from \"@api/app-binder/SignTransactionDeviceActionTypes\";\nimport { GetAddressCommand } from \"@internal/app-binder/command/GetAddressCommand\";\nimport { GetAppConfigurationCommand } from \"@internal/app-binder/command/GetAppConfigurationCommand\";\nimport { APP_NAME } from \"@internal/app-binder/constants\";\nimport { SignPersonalMessageTask } from \"@internal/app-binder/task/SignPersonalMessageTask\";\nimport { SignTransactionTask } from \"@internal/app-binder/task/SignTransactionTask\";\nimport { externalTypes } from \"@internal/externalTypes\";\n\n@injectable()\nexport class TronAppBinder {\n constructor(\n @inject(externalTypes.Dmk) private dmk: DeviceManagementKit,\n @inject(externalTypes.SessionId) private sessionId: DeviceSessionId,\n ) {}\n\n getAddress(args: {\n derivationPath: string;\n checkOnDevice: boolean;\n skipOpenApp: boolean;\n }): GetAddressDAReturnType {\n return this.dmk.executeDeviceAction({\n sessionId: this.sessionId,\n deviceAction: new SendCommandInAppDeviceAction({\n input: {\n command: new GetAddressCommand({\n derivationPath: args.derivationPath,\n checkOnDevice: args.checkOnDevice,\n }),\n appName: APP_NAME,\n requiredUserInteraction: args.checkOnDevice\n ? UserInteractionRequired.VerifyAddress\n : UserInteractionRequired.None,\n skipOpenApp: args.skipOpenApp,\n },\n }),\n });\n }\n\n signTransaction(args: {\n derivationPath: string;\n transaction: Uint8Array;\n skipOpenApp?: boolean;\n }): SignTransactionDAReturnType {\n return this.dmk.executeDeviceAction({\n sessionId: this.sessionId,\n deviceAction: new CallTaskInAppDeviceAction({\n input: {\n task: async (internalApi) =>\n new SignTransactionTask(internalApi, {\n derivationPath: args.derivationPath,\n transaction: args.transaction,\n }).run(),\n appName: APP_NAME,\n requiredUserInteraction: UserInteractionRequired.SignTransaction,\n skipOpenApp: args.skipOpenApp ?? false,\n },\n }),\n });\n }\n\n signPersonalMessage(args: {\n derivationPath: string;\n message: Uint8Array;\n skipOpenApp?: boolean;\n }): SignPersonalMessageDAReturnType {\n return this.dmk.executeDeviceAction({\n sessionId: this.sessionId,\n deviceAction: new CallTaskInAppDeviceAction({\n input: {\n task: async (internalApi) =>\n new SignPersonalMessageTask(internalApi, {\n derivationPath: args.derivationPath,\n message: args.message,\n }).run(),\n appName: APP_NAME,\n requiredUserInteraction: UserInteractionRequired.SignPersonalMessage,\n skipOpenApp: args.skipOpenApp ?? false,\n },\n }),\n });\n }\n\n getAppConfiguration(): GetAppConfigurationDAReturnType {\n return this.dmk.executeDeviceAction({\n sessionId: this.sessionId,\n deviceAction: new SendCommandInAppDeviceAction({\n input: {\n command: new GetAppConfigurationCommand(),\n appName: APP_NAME,\n requiredUserInteraction: UserInteractionRequired.None,\n skipOpenApp: false,\n },\n }),\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "okBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAMO,2CACPC,EAAmC,qBAMnCC,EAAkC,0DAClCC,EAA2C,mEAC3CC,EAAyB,0CACzBC,EAAwC,6DACxCC,EAAoC,yDACpCC,EAA8B,mCAGvB,IAAMC,EAAN,KAAoB,CACzB,YACqCC,EACMC,EACzC,CAFmC,SAAAD,EACM,eAAAC,CACxC,CAEH,WAAWC,EAIgB,CACzB,OAAO,KAAK,IAAI,oBAAoB,CAClC,UAAW,KAAK,UAChB,aAAc,IAAI,+BAA6B,CAC7C,MAAO,CACL,QAAS,IAAI,oBAAkB,CAC7B,eAAgBA,EAAK,eACrB,cAAeA,EAAK,aACtB,CAAC,EACD,QAAS,WACT,wBAAyBA,EAAK,cAC1B,0BAAwB,cACxB,0BAAwB,KAC5B,YAAaA,EAAK,WACpB,CACF,CAAC,CACH,CAAC,CACH,CAEA,gBAAgBA,EAIgB,CAC9B,OAAO,KAAK,IAAI,oBAAoB,CAClC,UAAW,KAAK,UAChB,aAAc,IAAI,4BAA0B,CAC1C,MAAO,CACL,KAAM,MAAOC,GACX,IAAI,sBAAoBA,EAAa,CACnC,eAAgBD,EAAK,eACrB,YAAaA,EAAK,WACpB,CAAC,EAAE,IAAI,EACT,QAAS,WACT,wBAAyB,0BAAwB,gBACjD,YAAaA,EAAK,aAAe,EACnC,CACF,CAAC,CACH,CAAC,CACH,CAEA,oBAAoBA,EAIgB,CAClC,OAAO,KAAK,IAAI,oBAAoB,CAClC,UAAW,KAAK,UAChB,aAAc,IAAI,4BAA0B,CAC1C,MAAO,CACL,KAAM,MAAOC,GACX,IAAI,0BAAwBA,EAAa,CACvC,eAAgBD,EAAK,eACrB,QAASA,EAAK,OAChB,CAAC,EAAE,IAAI,EACT,QAAS,WACT,wBAAyB,0BAAwB,oBACjD,YAAaA,EAAK,aAAe,EACnC,CACF,CAAC,CACH,CAAC,CACH,CAEA,qBAAuD,CACrD,OAAO,KAAK,IAAI,oBAAoB,CAClC,UAAW,KAAK,UAChB,aAAc,IAAI,+BAA6B,CAC7C,MAAO,CACL,QAAS,IAAI,6BACb,QAAS,WACT,wBAAyB,0BAAwB,KACjD,YAAa,EACf,CACF,CAAC,CACH,CAAC,CACH,CACF,EAtFaH,EAANK,EAAA,IADN,cAAW,EAGPC,EAAA,eAAO,gBAAc,GAAG,GACxBA,EAAA,eAAO,gBAAc,SAAS,IAHtBN",
|
|
6
|
+
"names": ["TronAppBinder_exports", "__export", "TronAppBinder", "__toCommonJS", "import_device_management_kit", "import_inversify", "import_GetAddressCommand", "import_GetAppConfigurationCommand", "import_constants", "import_SignPersonalMessageTask", "import_SignTransactionTask", "import_externalTypes", "TronAppBinder", "dmk", "sessionId", "args", "internalApi", "__decorateClass", "__decorateParam"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var p=(r,e)=>{for(var d in e)o(r,d,{get:e[d],enumerable:!0})},A=(r,e,d,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of m(e))!a.call(r,s)&&s!==d&&o(r,s,{get:()=>e[s],enumerable:!(n=t(e,s))||n.enumerable});return r};var C=r=>A(o({},"__esModule",{value:!0}),r);var l={};p(l,{GetAddressCommand:()=>i});module.exports=C(l);class i{name="GetAddress";_args;constructor(e){this._args=e}get args(){return this._args}getApdu(){throw new Error("GetAddressCommand.getApdu() not implemented")}parseResponse(e){throw new Error("GetAddressCommand.parseResponse() not implemented")}}0&&(module.exports={GetAddressCommand});
|
|
2
|
+
//# sourceMappingURL=GetAddressCommand.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/app-binder/command/GetAddressCommand.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type Apdu,\n type ApduResponse,\n type Command,\n type CommandResult,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type TronAppErrorCodes } from \"./utils/tronApplicationErrors\";\n\nexport type GetAddressCommandArgs = {\n readonly derivationPath: string;\n readonly checkOnDevice?: boolean;\n readonly returnChainCode?: boolean;\n};\n\nexport type GetAddressCommandResponse = {\n readonly publicKey: string;\n readonly address: string;\n readonly chainCode?: string;\n};\n\nexport class GetAddressCommand\n implements\n Command<GetAddressCommandResponse, GetAddressCommandArgs, TronAppErrorCodes>\n{\n readonly name = \"GetAddress\";\n\n private readonly _args: GetAddressCommandArgs;\n\n constructor(args: GetAddressCommandArgs) {\n this._args = args;\n }\n\n get args(): GetAddressCommandArgs {\n return this._args;\n }\n\n getApdu(): Apdu {\n // TODO: Implement APDU construction using this._args\n throw new Error(\"GetAddressCommand.getApdu() not implemented\");\n }\n\n parseResponse(\n _apduResponse: ApduResponse,\n ): CommandResult<GetAddressCommandResponse, TronAppErrorCodes> {\n // TODO: Implement response parsing\n throw new Error(\"GetAddressCommand.parseResponse() not implemented\");\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GAqBO,MAAME,CAGb,CACW,KAAO,aAEC,MAEjB,YAAYE,EAA6B,CACvC,KAAK,MAAQA,CACf,CAEA,IAAI,MAA8B,CAChC,OAAO,KAAK,KACd,CAEA,SAAgB,CAEd,MAAM,IAAI,MAAM,6CAA6C,CAC/D,CAEA,cACEC,EAC6D,CAE7D,MAAM,IAAI,MAAM,mDAAmD,CACrE,CACF",
|
|
6
|
+
"names": ["GetAddressCommand_exports", "__export", "GetAddressCommand", "__toCommonJS", "args", "_apduResponse"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var d=(p,o)=>{for(var n in o)r(p,n,{get:o[n],enumerable:!0})},s=(p,o,n,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of a(o))!i.call(p,e)&&e!==n&&r(p,e,{get:()=>o[e],enumerable:!(t=m(o,e))||t.enumerable});return p};var C=p=>s(r({},"__esModule",{value:!0}),p);var u={};d(u,{GetAppConfigurationCommand:()=>A});module.exports=C(u);class A{name="GetAppConfiguration";args=void 0;getApdu(){throw new Error("GetAppConfigurationCommand.getApdu() not implemented")}parseResponse(o){throw new Error("GetAppConfigurationCommand.parseResponse() not implemented")}}0&&(module.exports={GetAppConfigurationCommand});
|
|
2
|
+
//# sourceMappingURL=GetAppConfigurationCommand.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/app-binder/command/GetAppConfigurationCommand.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type Apdu,\n type ApduResponse,\n type Command,\n type CommandResult,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type AppConfiguration } from \"@api/model/AppConfiguration\";\n\nimport { type TronAppErrorCodes } from \"./utils/tronApplicationErrors\";\n\nexport type GetAppConfigurationCommandArgs = void;\n\nexport type GetAppConfigurationCommandResponse = AppConfiguration;\n\nexport class GetAppConfigurationCommand\n implements\n Command<\n GetAppConfigurationCommandResponse,\n GetAppConfigurationCommandArgs,\n TronAppErrorCodes\n >\n{\n readonly name = \"GetAppConfiguration\";\n\n readonly args: GetAppConfigurationCommandArgs = undefined;\n\n getApdu(): Apdu {\n // TODO: Implement APDU construction\n throw new Error(\"GetAppConfigurationCommand.getApdu() not implemented\");\n }\n\n parseResponse(\n _apduResponse: ApduResponse,\n ): CommandResult<GetAppConfigurationCommandResponse, TronAppErrorCodes> {\n // TODO: Implement response parsing\n throw new Error(\n \"GetAppConfigurationCommand.parseResponse() not implemented\",\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAeO,MAAME,CAOb,CACW,KAAO,sBAEP,KAAuC,OAEhD,SAAgB,CAEd,MAAM,IAAI,MAAM,sDAAsD,CACxE,CAEA,cACEE,EACsE,CAEtE,MAAM,IAAI,MACR,4DACF,CACF,CACF",
|
|
6
|
+
"names": ["GetAppConfigurationCommand_exports", "__export", "GetAppConfigurationCommand", "__toCommonJS", "_apduResponse"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var t=(s,e)=>{for(var r in e)o(s,r,{get:e[r],enumerable:!0})},d=(s,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!g.call(s,n)&&n!==r&&o(s,n,{get:()=>e[n],enumerable:!(a=m(e,n))||a.enumerable});return s};var i=s=>d(o({},"__esModule",{value:!0}),s);var C={};t(C,{SignPersonalMessageCommand:()=>l});module.exports=i(C);class l{name="SignPersonalMessage";_args;constructor(e){this._args=e}get args(){return this._args}getApdu(){throw new Error("SignPersonalMessageCommand.getApdu() not implemented")}parseResponse(e){throw new Error("SignPersonalMessageCommand.parseResponse() not implemented")}}0&&(module.exports={SignPersonalMessageCommand});
|
|
2
|
+
//# sourceMappingURL=SignPersonalMessageCommand.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/app-binder/command/SignPersonalMessageCommand.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type Apdu,\n type ApduResponse,\n type Command,\n type CommandResult,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type Signature } from \"@api/model/Signature\";\n\nimport { type TronAppErrorCodes } from \"./utils/tronApplicationErrors\";\n\nexport type SignPersonalMessageCommandArgs = {\n readonly derivationPath: string;\n readonly message: Uint8Array;\n};\n\nexport type SignPersonalMessageCommandResponse = Signature;\n\nexport class SignPersonalMessageCommand\n implements\n Command<\n SignPersonalMessageCommandResponse,\n SignPersonalMessageCommandArgs,\n TronAppErrorCodes\n >\n{\n readonly name = \"SignPersonalMessage\";\n\n private readonly _args: SignPersonalMessageCommandArgs;\n\n constructor(args: SignPersonalMessageCommandArgs) {\n this._args = args;\n }\n\n get args(): SignPersonalMessageCommandArgs {\n return this._args;\n }\n\n getApdu(): Apdu {\n // TODO: Implement APDU construction\n throw new Error(\"SignPersonalMessageCommand.getApdu() not implemented\");\n }\n\n parseResponse(\n _apduResponse: ApduResponse,\n ): CommandResult<SignPersonalMessageCommandResponse, TronAppErrorCodes> {\n // TODO: Implement response parsing\n throw new Error(\n \"SignPersonalMessageCommand.parseResponse() not implemented\",\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gCAAAE,IAAA,eAAAC,EAAAH,GAkBO,MAAME,CAOb,CACW,KAAO,sBAEC,MAEjB,YAAYE,EAAsC,CAChD,KAAK,MAAQA,CACf,CAEA,IAAI,MAAuC,CACzC,OAAO,KAAK,KACd,CAEA,SAAgB,CAEd,MAAM,IAAI,MAAM,sDAAsD,CACxE,CAEA,cACEC,EACsE,CAEtE,MAAM,IAAI,MACR,4DACF,CACF,CACF",
|
|
6
|
+
"names": ["SignPersonalMessageCommand_exports", "__export", "SignPersonalMessageCommand", "__toCommonJS", "args", "_apduResponse"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var p=(r,n)=>{for(var a in n)e(r,a,{get:n[a],enumerable:!0})},d=(r,n,a,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of m(n))!i.call(r,o)&&o!==a&&e(r,o,{get:()=>n[o],enumerable:!(s=t(n,o))||s.enumerable});return r};var g=r=>d(e({},"__esModule",{value:!0}),r);var c={};p(c,{SignTransactionCommand:()=>C});module.exports=g(c);class C{name="SignTransaction";_args;constructor(n){this._args=n}get args(){return this._args}getApdu(){throw new Error("SignTransactionCommand.getApdu() not implemented")}parseResponse(n){throw new Error("SignTransactionCommand.parseResponse() not implemented")}}0&&(module.exports={SignTransactionCommand});
|
|
2
|
+
//# sourceMappingURL=SignTransactionCommand.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/internal/app-binder/command/SignTransactionCommand.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n type Apdu,\n type ApduResponse,\n type Command,\n type CommandResult,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type Signature } from \"@api/model/Signature\";\n\nimport { type TronAppErrorCodes } from \"./utils/tronApplicationErrors\";\n\nexport type SignTransactionCommandArgs = {\n readonly derivationPath: string;\n readonly serializedTransaction: Uint8Array;\n};\n\nexport type SignTransactionCommandResponse = Signature;\n\nexport class SignTransactionCommand\n implements\n Command<\n SignTransactionCommandResponse,\n SignTransactionCommandArgs,\n TronAppErrorCodes\n >\n{\n readonly name = \"SignTransaction\";\n\n private readonly _args: SignTransactionCommandArgs;\n\n constructor(args: SignTransactionCommandArgs) {\n this._args = args;\n }\n\n get args(): SignTransactionCommandArgs {\n return this._args;\n }\n\n getApdu(): Apdu {\n // TODO: Implement APDU construction\n throw new Error(\"SignTransactionCommand.getApdu() not implemented\");\n }\n\n parseResponse(\n _apduResponse: ApduResponse,\n ): CommandResult<SignTransactionCommandResponse, TronAppErrorCodes> {\n // TODO: Implement response parsing\n throw new Error(\"SignTransactionCommand.parseResponse() not implemented\");\n }\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,4BAAAE,IAAA,eAAAC,EAAAH,GAkBO,MAAME,CAOb,CACW,KAAO,kBAEC,MAEjB,YAAYE,EAAkC,CAC5C,KAAK,MAAQA,CACf,CAEA,IAAI,MAAmC,CACrC,OAAO,KAAK,KACd,CAEA,SAAgB,CAEd,MAAM,IAAI,MAAM,kDAAkD,CACpE,CAEA,cACEC,EACkE,CAElE,MAAM,IAAI,MAAM,wDAAwD,CAC1E,CACF",
|
|
6
|
+
"names": ["SignTransactionCommand_exports", "__export", "SignTransactionCommand", "__toCommonJS", "args", "_apduResponse"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var b=(m,e)=>{for(var o in e)p(m,o,{get:e[o],enumerable:!0})},c=(m,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of x(e))!a.call(m,n)&&n!==o&&p(m,n,{get:()=>e[n],enumerable:!(r=u(e,n))||r.enumerable});return m};var d=m=>c(p({},"__esModule",{value:!0}),m);var f={};b(f,{TronAppErrorCodes:()=>t});module.exports=d(f);var t=(m=>m)(t||{});0&&(module.exports={TronAppErrorCodes});
|
|
2
|
+
//# sourceMappingURL=tronApplicationErrors.js.map
|