@trezor/connect 9.1.4 → 9.1.6

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.
Files changed (184) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +1 -1
  3. package/lib/api/authenticateDevice.d.ts +7 -0
  4. package/lib/api/authenticateDevice.js +51 -0
  5. package/lib/api/{binanceGetAddress.d.ts → binance/api/binanceGetAddress.d.ts} +3 -3
  6. package/lib/api/{binanceGetAddress.js → binance/api/binanceGetAddress.js} +6 -6
  7. package/lib/api/{binanceGetPublicKey.d.ts → binance/api/binanceGetPublicKey.d.ts} +3 -3
  8. package/lib/api/{binanceGetPublicKey.js → binance/api/binanceGetPublicKey.js} +5 -5
  9. package/lib/api/{binanceSignTransaction.d.ts → binance/api/binanceSignTransaction.d.ts} +2 -2
  10. package/lib/api/{binanceSignTransaction.js → binance/api/binanceSignTransaction.js} +5 -5
  11. package/lib/api/binance/api/index.d.ts +4 -0
  12. package/lib/api/binance/api/index.js +13 -0
  13. package/lib/api/bitcoin/TransactionComposer.d.ts +4 -4
  14. package/lib/api/bitcoin/TransactionComposer.js +4 -18
  15. package/lib/api/bitcoin/inputs.d.ts +2 -2
  16. package/lib/api/bitcoin/inputs.js +4 -5
  17. package/lib/api/bitcoin/outputs.d.ts +4 -4
  18. package/lib/api/bitcoin/outputs.js +14 -23
  19. package/lib/api/blockchainEstimateFee.d.ts +2 -2
  20. package/lib/api/cardano/api/cardanoComposeTransaction.d.ts +8 -0
  21. package/lib/api/cardano/api/cardanoComposeTransaction.js +69 -0
  22. package/lib/api/{cardanoGetAddress.d.ts → cardano/api/cardanoGetAddress.d.ts} +3 -3
  23. package/lib/api/{cardanoGetAddress.js → cardano/api/cardanoGetAddress.js} +7 -7
  24. package/lib/api/{cardanoGetNativeScriptHash.d.ts → cardano/api/cardanoGetNativeScriptHash.d.ts} +3 -3
  25. package/lib/api/{cardanoGetNativeScriptHash.js → cardano/api/cardanoGetNativeScriptHash.js} +5 -5
  26. package/lib/api/{cardanoGetPublicKey.d.ts → cardano/api/cardanoGetPublicKey.d.ts} +3 -3
  27. package/lib/api/{cardanoGetPublicKey.js → cardano/api/cardanoGetPublicKey.js} +6 -6
  28. package/lib/api/{cardanoSignTransaction.d.ts → cardano/api/cardanoSignTransaction.d.ts} +18 -8
  29. package/lib/api/{cardanoSignTransaction.js → cardano/api/cardanoSignTransaction.js} +30 -13
  30. package/lib/api/cardano/api/index.d.ts +6 -0
  31. package/lib/api/cardano/api/index.js +17 -0
  32. package/lib/api/cardano/cardanoUtils.d.ts +6 -0
  33. package/lib/api/cardano/cardanoUtils.js +64 -1
  34. package/lib/api/checkFirmwareAuthenticity.js +7 -5
  35. package/lib/api/common/paramsValidator.js +45 -51
  36. package/lib/api/composeTransaction.d.ts +5 -5
  37. package/lib/api/composeTransaction.js +14 -19
  38. package/lib/api/eos/api/eosGetPublicKey.d.ts +11 -0
  39. package/lib/api/{eosGetPublicKey.js → eos/api/eosGetPublicKey.js} +5 -5
  40. package/lib/api/{eosSignTransaction.d.ts → eos/api/eosSignTransaction.d.ts} +2 -2
  41. package/lib/api/{eosSignTransaction.js → eos/api/eosSignTransaction.js} +5 -5
  42. package/lib/api/eos/api/index.d.ts +3 -0
  43. package/lib/api/eos/api/index.js +11 -0
  44. package/lib/api/{ethereumGetAddress.d.ts → ethereum/api/ethereumGetAddress.d.ts} +4 -4
  45. package/lib/api/{ethereumGetAddress.js → ethereum/api/ethereumGetAddress.js} +9 -9
  46. package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +16 -0
  47. package/lib/api/{ethereumGetPublicKey.js → ethereum/api/ethereumGetPublicKey.js} +6 -6
  48. package/lib/api/{ethereumSignMessage.d.ts → ethereum/api/ethereumSignMessage.d.ts} +3 -3
  49. package/lib/api/{ethereumSignMessage.js → ethereum/api/ethereumSignMessage.js} +7 -7
  50. package/lib/api/{ethereumSignTransaction.d.ts → ethereum/api/ethereumSignTransaction.d.ts} +11 -9
  51. package/lib/api/{ethereumSignTransaction.js → ethereum/api/ethereumSignTransaction.js} +36 -43
  52. package/lib/api/{ethereumSignTypedData.d.ts → ethereum/api/ethereumSignTypedData.d.ts} +3 -3
  53. package/lib/api/{ethereumSignTypedData.js → ethereum/api/ethereumSignTypedData.js} +10 -10
  54. package/lib/api/{ethereumVerifyMessage.d.ts → ethereum/api/ethereumVerifyMessage.d.ts} +2 -2
  55. package/lib/api/{ethereumVerifyMessage.js → ethereum/api/ethereumVerifyMessage.js} +3 -3
  56. package/lib/api/ethereum/api/index.d.ts +7 -0
  57. package/lib/api/ethereum/api/index.js +19 -0
  58. package/lib/api/ethereum/ethereumDefinitions.js +3 -2
  59. package/lib/api/ethereum/ethereumSignTx.d.ts +2 -0
  60. package/lib/api/ethereum/ethereumSignTx.js +15 -1
  61. package/lib/api/firmware/getBinary.js +1 -1
  62. package/lib/api/firmware/verifyAuthenticityProof.d.ts +14 -0
  63. package/lib/api/firmware/verifyAuthenticityProof.js +103 -0
  64. package/lib/api/firmware/x509certificate.d.ts +74 -0
  65. package/lib/api/firmware/x509certificate.js +235 -0
  66. package/lib/api/firmwareUpdate.js +2 -1
  67. package/lib/api/getAccountDescriptor.d.ts +20 -0
  68. package/lib/api/getAccountDescriptor.js +162 -0
  69. package/lib/api/getAccountInfo.d.ts +2 -0
  70. package/lib/api/getAccountInfo.js +1 -5
  71. package/lib/api/getFirmwareHash.js +1 -4
  72. package/lib/api/index.d.ts +2 -24
  73. package/lib/api/index.js +5 -50
  74. package/lib/api/nem/api/index.d.ts +3 -0
  75. package/lib/api/nem/api/index.js +11 -0
  76. package/lib/api/{nemGetAddress.d.ts → nem/api/nemGetAddress.d.ts} +3 -3
  77. package/lib/api/{nemGetAddress.js → nem/api/nemGetAddress.js} +6 -6
  78. package/lib/api/{nemSignTransaction.d.ts → nem/api/nemSignTransaction.d.ts} +2 -2
  79. package/lib/api/{nemSignTransaction.js → nem/api/nemSignTransaction.js} +5 -5
  80. package/lib/api/rebootToBootloader.js +1 -4
  81. package/lib/api/ripple/api/index.d.ts +3 -0
  82. package/lib/api/ripple/api/index.js +11 -0
  83. package/lib/api/{rippleGetAddress.d.ts → ripple/api/rippleGetAddress.d.ts} +3 -3
  84. package/lib/api/{rippleGetAddress.js → ripple/api/rippleGetAddress.js} +6 -6
  85. package/lib/api/{rippleSignTransaction.d.ts → ripple/api/rippleSignTransaction.d.ts} +2 -2
  86. package/lib/api/{rippleSignTransaction.js → ripple/api/rippleSignTransaction.js} +4 -4
  87. package/lib/api/solana/api/index.d.ts +4 -0
  88. package/lib/api/solana/api/index.js +13 -0
  89. package/lib/api/solana/api/solanaGetAddress.d.ts +23 -0
  90. package/lib/api/solana/api/solanaGetAddress.js +131 -0
  91. package/lib/api/solana/api/solanaGetPublicKey.d.ts +12 -0
  92. package/lib/api/solana/api/solanaGetPublicKey.js +84 -0
  93. package/lib/api/solana/api/solanaSignTransaction.d.ts +10 -0
  94. package/lib/api/solana/api/solanaSignTransaction.js +33 -0
  95. package/lib/api/stellar/api/index.d.ts +3 -0
  96. package/lib/api/stellar/api/index.js +11 -0
  97. package/lib/api/{stellarGetAddress.d.ts → stellar/api/stellarGetAddress.d.ts} +3 -3
  98. package/lib/api/{stellarGetAddress.js → stellar/api/stellarGetAddress.js} +6 -6
  99. package/lib/api/{stellarSignTransaction.d.ts → stellar/api/stellarSignTransaction.d.ts} +2 -2
  100. package/lib/api/{stellarSignTransaction.js → stellar/api/stellarSignTransaction.js} +6 -6
  101. package/lib/api/tezos/api/index.d.ts +4 -0
  102. package/lib/api/tezos/api/index.js +13 -0
  103. package/lib/api/{tezosGetAddress.d.ts → tezos/api/tezosGetAddress.d.ts} +3 -3
  104. package/lib/api/{tezosGetAddress.js → tezos/api/tezosGetAddress.js} +6 -6
  105. package/lib/api/{tezosGetPublicKey.d.ts → tezos/api/tezosGetPublicKey.d.ts} +3 -3
  106. package/lib/api/{tezosGetPublicKey.js → tezos/api/tezosGetPublicKey.js} +5 -5
  107. package/lib/api/{tezosSignTransaction.d.ts → tezos/api/tezosSignTransaction.d.ts} +2 -2
  108. package/lib/api/{tezosSignTransaction.js → tezos/api/tezosSignTransaction.js} +5 -5
  109. package/lib/backend/Blockchain.js +2 -0
  110. package/lib/constants/cardano.js +2 -2
  111. package/lib/constants/nem.js +3 -3
  112. package/lib/constants/network.d.ts +3 -0
  113. package/lib/constants/network.js +13 -1
  114. package/lib/core/AbstractMethod.d.ts +1 -0
  115. package/lib/core/AbstractMethod.js +11 -10
  116. package/lib/core/index.d.ts +5 -2
  117. package/lib/core/index.js +28 -7
  118. package/lib/core/method.d.ts +2 -2
  119. package/lib/core/method.js +8 -2
  120. package/lib/core/method.native.d.ts +5 -0
  121. package/lib/core/method.native.js +34 -0
  122. package/lib/data/DataManager.d.ts +64 -7
  123. package/lib/data/DataManager.js +4 -2
  124. package/lib/data/config.d.ts +63 -6
  125. package/lib/data/config.js +39 -23
  126. package/lib/data/connectSettings.js +7 -0
  127. package/lib/data/defaultFeeLevels.js +8 -0
  128. package/lib/data/deviceAuthenticityConfig.d.ts +15 -0
  129. package/lib/data/deviceAuthenticityConfig.js +26 -0
  130. package/lib/data/firmwareInfo.d.ts +3 -2
  131. package/lib/data/firmwareInfo.js +17 -8
  132. package/lib/data/models.d.ts +4 -1
  133. package/lib/data/models.js +6 -3
  134. package/lib/data/version.d.ts +1 -1
  135. package/lib/data/version.js +1 -1
  136. package/lib/device/Device.d.ts +2 -2
  137. package/lib/device/Device.js +22 -13
  138. package/lib/device/DeviceCommands.js +9 -0
  139. package/lib/device/DeviceList.d.ts +1 -0
  140. package/lib/device/DeviceList.js +8 -4
  141. package/lib/events/iframe.d.ts +7 -1
  142. package/lib/events/iframe.js +1 -0
  143. package/lib/events/popup.d.ts +19 -3
  144. package/lib/events/popup.js +3 -0
  145. package/lib/factory.js +6 -0
  146. package/lib/types/api/authenticateDevice.d.ts +21 -0
  147. package/lib/types/api/authenticateDevice.js +3 -0
  148. package/lib/types/api/cardanoComposeTransaction.d.ts +44 -0
  149. package/lib/types/api/cardanoComposeTransaction.js +3 -0
  150. package/lib/types/api/cardanoSignTransaction.d.ts +9 -0
  151. package/lib/types/api/composeTransaction.d.ts +28 -54
  152. package/lib/types/api/ethereum/index.d.ts +1 -0
  153. package/lib/types/api/getAccountDescriptor.d.ts +16 -0
  154. package/lib/types/api/getAccountDescriptor.js +3 -0
  155. package/lib/types/api/index.d.ts +12 -0
  156. package/lib/types/api/solana/index.d.ts +12 -0
  157. package/lib/types/api/solana/index.js +3 -0
  158. package/lib/types/api/solanaGetAddress.d.ts +4 -0
  159. package/lib/types/api/solanaGetAddress.js +3 -0
  160. package/lib/types/api/solanaGetPublicKey.d.ts +5 -0
  161. package/lib/types/api/solanaGetPublicKey.js +3 -0
  162. package/lib/types/api/solanaSignTransaction.d.ts +4 -0
  163. package/lib/types/api/solanaSignTransaction.js +3 -0
  164. package/lib/types/coinInfo.d.ts +5 -15
  165. package/lib/types/device.js +1 -1
  166. package/lib/types/firmware.d.ts +6 -2
  167. package/lib/types/index.d.ts +4 -1
  168. package/lib/types/index.js +1 -0
  169. package/lib/types/settings.d.ts +1 -0
  170. package/lib/utils/assetUtils.js +6 -4
  171. package/lib/utils/debug.d.ts +10 -5
  172. package/lib/utils/debug.js +55 -17
  173. package/lib/utils/deviceFeaturesUtils.js +5 -3
  174. package/lib/utils/formatUtils.d.ts +2 -0
  175. package/lib/utils/formatUtils.js +19 -1
  176. package/lib/workers/workers-browser.d.ts +2 -1
  177. package/lib/workers/workers-browser.js +3 -1
  178. package/lib/workers/workers-react-native.d.ts +2 -1
  179. package/lib/workers/workers-react-native.js +3 -1
  180. package/lib/workers/workers.d.ts +8 -5
  181. package/lib/workers/workers.js +34 -10
  182. package/package.json +25 -18
  183. package/lib/api/eosGetPublicKey.d.ts +0 -11
  184. package/lib/api/ethereumGetPublicKey.d.ts +0 -16
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const constants_1 = require("../constants");
4
- const AbstractMethod_1 = require("../core/AbstractMethod");
5
- const paramsValidator_1 = require("./common/paramsValidator");
6
- const coinInfo_1 = require("../data/coinInfo");
7
- const pathUtils_1 = require("../utils/pathUtils");
8
- const events_1 = require("../events");
3
+ const constants_1 = require("../../../constants");
4
+ const AbstractMethod_1 = require("../../../core/AbstractMethod");
5
+ const paramsValidator_1 = require("../../common/paramsValidator");
6
+ const coinInfo_1 = require("../../../data/coinInfo");
7
+ const pathUtils_1 = require("../../../utils/pathUtils");
8
+ const events_1 = require("../../../events");
9
9
  class CardanoGetPublicKey extends AbstractMethod_1.AbstractMethod {
10
10
  init() {
11
11
  this.requiredPermissions = ['read'];
@@ -1,10 +1,10 @@
1
- import { AbstractMethod } from '../core/AbstractMethod';
2
- import type { CertificateWithPoolOwnersAndRelays } from './cardano/cardanoCertificate';
3
- import { Path, InputWithPath, CollateralInputWithPath } from './cardano/cardanoInputs';
4
- import type { OutputWithData } from './cardano/cardanoOutputs';
5
- import { PROTO } from '../constants';
6
- import type { CardanoSignedTxData } from '../types/api/cardano';
7
- import type { AssetGroupWithTokens } from './cardano/cardanoTokenBundle';
1
+ import { AbstractMethod } from '../../../core/AbstractMethod';
2
+ import type { CertificateWithPoolOwnersAndRelays } from '../cardanoCertificate';
3
+ import { Path, InputWithPath, CollateralInputWithPath } from '../cardanoInputs';
4
+ import type { OutputWithData } from '../cardanoOutputs';
5
+ import { PROTO } from '../../../constants';
6
+ import type { CardanoAuxiliaryDataSupplement, CardanoSignedTxData, CardanoSignedTxWitness } from '../../../types/api/cardano';
7
+ import type { AssetGroupWithTokens } from '../cardanoTokenBundle';
8
8
  declare const CardanoSignTransactionFeatures: Readonly<{
9
9
  TransactionStreaming: string[];
10
10
  TokenMinting: string[];
@@ -41,6 +41,11 @@ export type CardanoSignTransactionParams = {
41
41
  additionalWitnessRequests: Path[];
42
42
  derivationType: PROTO.CardanoDerivationType;
43
43
  includeNetworkId?: boolean;
44
+ unsignedTx?: {
45
+ body: string;
46
+ hash: string;
47
+ };
48
+ testnet?: boolean;
44
49
  };
45
50
  export default class CardanoSignTransaction extends AbstractMethod<'cardanoSignTransaction', CardanoSignTransactionParams> {
46
51
  init(): void;
@@ -49,7 +54,12 @@ export default class CardanoSignTransaction extends AbstractMethod<'cardanoSignT
49
54
  _ensureFeatureIsSupported(feature: keyof typeof CardanoSignTransactionFeatures): void;
50
55
  _ensureFirmwareSupportsParams(): void;
51
56
  _sign_tx(): Promise<CardanoSignedTxData>;
52
- run(): Promise<CardanoSignedTxData>;
57
+ run(): Promise<CardanoSignedTxData | {
58
+ serializedTx: string;
59
+ hash: string;
60
+ witnesses: CardanoSignedTxWitness[];
61
+ auxiliaryDataSupplement?: CardanoAuxiliaryDataSupplement | undefined;
62
+ }>;
53
63
  }
54
64
  export {};
55
65
  //# sourceMappingURL=cardanoSignTransaction.d.ts.map
@@ -1,16 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const AbstractMethod_1 = require("../core/AbstractMethod");
4
- const paramsValidator_1 = require("./common/paramsValidator");
5
- const coinInfo_1 = require("../data/coinInfo");
6
- const pathUtils_1 = require("../utils/pathUtils");
7
- const cardanoAuxiliaryData_1 = require("./cardano/cardanoAuxiliaryData");
8
- const cardanoCertificate_1 = require("./cardano/cardanoCertificate");
9
- const cardanoInputs_1 = require("./cardano/cardanoInputs");
10
- const cardanoOutputs_1 = require("./cardano/cardanoOutputs");
11
- const constants_1 = require("../constants");
12
- const cardanoWitnesses_1 = require("./cardano/cardanoWitnesses");
13
- const cardanoTokenBundle_1 = require("./cardano/cardanoTokenBundle");
3
+ const coin_selection_1 = require("@fivebinaries/coin-selection");
4
+ const AbstractMethod_1 = require("../../../core/AbstractMethod");
5
+ const paramsValidator_1 = require("../../common/paramsValidator");
6
+ const coinInfo_1 = require("../../../data/coinInfo");
7
+ const pathUtils_1 = require("../../../utils/pathUtils");
8
+ const cardanoAuxiliaryData_1 = require("../cardanoAuxiliaryData");
9
+ const cardanoCertificate_1 = require("../cardanoCertificate");
10
+ const cardanoInputs_1 = require("../cardanoInputs");
11
+ const cardanoOutputs_1 = require("../cardanoOutputs");
12
+ const constants_1 = require("../../../constants");
13
+ const cardanoWitnesses_1 = require("../cardanoWitnesses");
14
+ const cardanoTokenBundle_1 = require("../cardanoTokenBundle");
14
15
  const CardanoSignTransactionFeatures = Object.freeze({
15
16
  TransactionStreaming: ['0', '2.4.2'],
16
17
  TokenMinting: ['0', '2.4.3'],
@@ -65,6 +66,8 @@ class CardanoSignTransaction extends AbstractMethod_1.AbstractMethod {
65
66
  { name: 'additionalWitnessRequests', type: 'array', allowEmpty: true },
66
67
  { name: 'derivationType', type: 'number' },
67
68
  { name: 'includeNetworkId', type: 'boolean' },
69
+ { name: 'unsignedTx', type: 'object' },
70
+ { name: 'testnet', type: 'boolean' },
68
71
  ]);
69
72
  const inputsWithPath = payload.inputs.map(cardanoInputs_1.transformInput);
70
73
  const outputsWithData = payload.outputs.map(cardanoOutputs_1.transformOutput);
@@ -148,6 +151,8 @@ class CardanoSignTransaction extends AbstractMethod_1.AbstractMethod {
148
151
  ? payload.derivationType
149
152
  : constants_1.PROTO.CardanoDerivationType.ICARUS_TREZOR,
150
153
  includeNetworkId: payload.includeNetworkId,
154
+ unsignedTx: 'unsignedTx' in payload ? payload.unsignedTx : undefined,
155
+ testnet: 'testnet' in payload ? payload.testnet : undefined,
151
156
  };
152
157
  }
153
158
  get info() {
@@ -329,9 +334,21 @@ class CardanoSignTransaction extends AbstractMethod_1.AbstractMethod {
329
334
  await typedCall('CardanoTxHostAck', 'CardanoSignTxFinished');
330
335
  return { hash: txBodyHashMessage.tx_hash, witnesses, auxiliaryDataSupplement };
331
336
  }
332
- run() {
337
+ async run() {
333
338
  this._ensureFirmwareSupportsParams();
334
- return this._sign_tx();
339
+ const result = await this._sign_tx();
340
+ if (!this.params.unsignedTx)
341
+ return result;
342
+ const { unsignedTx, testnet } = this.params;
343
+ const { hash, witnesses } = result;
344
+ if (hash !== unsignedTx.hash) {
345
+ throw constants_1.ERRORS.TypedError('Runtime', "Constructed transaction doesn't match the hash returned by the device.");
346
+ }
347
+ const serializedTx = coin_selection_1.trezorUtils.signTransaction(unsignedTx.body, witnesses, { testnet });
348
+ return {
349
+ ...result,
350
+ serializedTx,
351
+ };
335
352
  }
336
353
  }
337
354
  exports.default = CardanoSignTransaction;
@@ -0,0 +1,6 @@
1
+ export { default as cardanoGetAddress } from './cardanoGetAddress';
2
+ export { default as cardanoGetNativeScriptHash } from './cardanoGetNativeScriptHash';
3
+ export { default as cardanoGetPublicKey } from './cardanoGetPublicKey';
4
+ export { default as cardanoSignTransaction } from './cardanoSignTransaction';
5
+ export { default as cardanoComposeTransaction } from './cardanoComposeTransaction';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.cardanoComposeTransaction = exports.cardanoSignTransaction = exports.cardanoGetPublicKey = exports.cardanoGetNativeScriptHash = exports.cardanoGetAddress = void 0;
7
+ var cardanoGetAddress_1 = require("./cardanoGetAddress");
8
+ Object.defineProperty(exports, "cardanoGetAddress", { enumerable: true, get: function () { return __importDefault(cardanoGetAddress_1).default; } });
9
+ var cardanoGetNativeScriptHash_1 = require("./cardanoGetNativeScriptHash");
10
+ Object.defineProperty(exports, "cardanoGetNativeScriptHash", { enumerable: true, get: function () { return __importDefault(cardanoGetNativeScriptHash_1).default; } });
11
+ var cardanoGetPublicKey_1 = require("./cardanoGetPublicKey");
12
+ Object.defineProperty(exports, "cardanoGetPublicKey", { enumerable: true, get: function () { return __importDefault(cardanoGetPublicKey_1).default; } });
13
+ var cardanoSignTransaction_1 = require("./cardanoSignTransaction");
14
+ Object.defineProperty(exports, "cardanoSignTransaction", { enumerable: true, get: function () { return __importDefault(cardanoSignTransaction_1).default; } });
15
+ var cardanoComposeTransaction_1 = require("./cardanoComposeTransaction");
16
+ Object.defineProperty(exports, "cardanoComposeTransaction", { enumerable: true, get: function () { return __importDefault(cardanoComposeTransaction_1).default; } });
17
+ //# sourceMappingURL=index.js.map
@@ -1,3 +1,9 @@
1
+ import { types } from '@fivebinaries/coin-selection';
2
+ import { AccountUtxo, CardanoCertificate } from '../../types';
3
+ export declare const transformUtxos: (utxos: AccountUtxo[]) => types.Utxo[];
4
+ export declare const prepareCertificates: (certs: CardanoCertificate[]) => types.Certificate[];
5
+ export declare const getTtl: (testnet: boolean) => number;
6
+ export declare const composeTxPlan: (descriptor: string, utxo: AccountUtxo[], outputs: types.UserOutput[], certificates: CardanoCertificate[], withdrawals: types.Withdrawal[], changeAddress: string, isTestnet: boolean, options?: types.Options) => types.PrecomposedTransaction;
1
7
  export declare const hexStringByteLength: (s: string) => number;
2
8
  export declare const sendChunkedHexString: (typedCall: any, data: string, chunkSize: number, messageType: string) => Promise<void>;
3
9
  //# sourceMappingURL=cardanoUtils.d.ts.map
@@ -1,6 +1,69 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendChunkedHexString = exports.hexStringByteLength = void 0;
3
+ exports.sendChunkedHexString = exports.hexStringByteLength = exports.composeTxPlan = exports.getTtl = exports.prepareCertificates = exports.transformUtxos = void 0;
4
+ const coin_selection_1 = require("@fivebinaries/coin-selection");
5
+ const constants_1 = require("../../constants");
6
+ const CARDANO_DEFAULT_TTL_OFFSET = 7200;
7
+ const transformUtxos = (utxos) => {
8
+ const result = [];
9
+ utxos === null || utxos === void 0 ? void 0 : utxos.forEach(utxo => {
10
+ const foundItem = result.find(res => res.txHash === utxo.txid && res.outputIndex === utxo.vout);
11
+ if (utxo.cardanoSpecific) {
12
+ if (!foundItem) {
13
+ result.push({
14
+ address: utxo.address,
15
+ txHash: utxo.txid,
16
+ outputIndex: utxo.vout,
17
+ amount: [{ quantity: utxo.amount, unit: utxo.cardanoSpecific.unit }],
18
+ });
19
+ }
20
+ else {
21
+ foundItem.amount.push({ quantity: utxo.amount, unit: utxo.cardanoSpecific.unit });
22
+ }
23
+ }
24
+ });
25
+ return result;
26
+ };
27
+ exports.transformUtxos = transformUtxos;
28
+ const prepareCertificates = (certs) => {
29
+ const convertedCerts = [];
30
+ certs.forEach(cert => {
31
+ switch (cert.type) {
32
+ case constants_1.PROTO.CardanoCertificateType.STAKE_DELEGATION:
33
+ convertedCerts.push({
34
+ type: cert.type,
35
+ pool: cert.pool,
36
+ });
37
+ break;
38
+ case constants_1.PROTO.CardanoCertificateType.STAKE_REGISTRATION:
39
+ case constants_1.PROTO.CardanoCertificateType.STAKE_DEREGISTRATION:
40
+ convertedCerts.push({
41
+ type: cert.type,
42
+ });
43
+ break;
44
+ }
45
+ });
46
+ return convertedCerts;
47
+ };
48
+ exports.prepareCertificates = prepareCertificates;
49
+ const getTtl = (testnet) => {
50
+ const shelleySlot = testnet ? 6192449 : 4924800;
51
+ const shelleyTimestamp = testnet ? 1672848449 : 1596491091;
52
+ const currentTimestamp = Math.floor(new Date().getTime() / 1000);
53
+ const currentSlot = shelleySlot + currentTimestamp - shelleyTimestamp;
54
+ return currentSlot + CARDANO_DEFAULT_TTL_OFFSET;
55
+ };
56
+ exports.getTtl = getTtl;
57
+ const composeTxPlan = (descriptor, utxo, outputs, certificates, withdrawals, changeAddress, isTestnet, options) => (0, coin_selection_1.coinSelection)({
58
+ utxos: (0, exports.transformUtxos)(utxo),
59
+ outputs,
60
+ changeAddress,
61
+ certificates: (0, exports.prepareCertificates)(certificates),
62
+ withdrawals,
63
+ accountPubKey: descriptor,
64
+ ttl: (0, exports.getTtl)(isTestnet),
65
+ }, options);
66
+ exports.composeTxPlan = composeTxPlan;
4
67
  const hexStringByteLength = (s) => s.length / 2;
5
68
  exports.hexStringByteLength = hexStringByteLength;
6
69
  const sendChunkedHexString = async (typedCall, data, chunkSize, messageType) => {
@@ -14,15 +14,17 @@ class CheckFirmwareAuthenticity extends AbstractMethod_1.AbstractMethod {
14
14
  this.useDeviceState = false;
15
15
  }
16
16
  async run() {
17
+ var _a;
17
18
  const { device } = this;
18
- const deviceVersion = `${device.features.major_version}.${device.features.minor_version}.${device.features.patch_version}`;
19
- const releases = (0, firmwareInfo_1.getReleases)(device.features.major_version);
20
- const release = releases.find(release => release.version.join('.') === deviceVersion);
19
+ const firmwareVersion = `${device.features.major_version}.${device.features.minor_version}.${device.features.patch_version}`;
20
+ const releases = (0, firmwareInfo_1.getReleases)((_a = device.features) === null || _a === void 0 ? void 0 : _a.internal_model);
21
+ const release = releases.find(release => release.version.join('.') === firmwareVersion);
21
22
  if (!release) {
22
23
  throw constants_1.ERRORS.TypedError('Runtime', 'checkFirmwareAuthenticity: No release found for device firmware');
23
24
  }
24
- const baseUrl = `https://data.trezor.io/firmware/${device.features.major_version}`;
25
- const fwUrl = `${baseUrl}/trezor-${deviceVersion}${device.firmwareType === types_1.FirmwareType.BitcoinOnly ? '-bitcoinonly.bin' : '.bin'}`;
25
+ const deviceModelPath = `${device.features.internal_model}`.toLowerCase();
26
+ const baseUrl = `https://data.trezor.io/firmware/${deviceModelPath}`;
27
+ const fwUrl = `${baseUrl}/trezor-${deviceModelPath}-${firmwareVersion}${device.firmwareType === types_1.FirmwareType.BitcoinOnly ? '-bitcoinonly.bin' : '.bin'}`;
26
28
  const fw = await (0, assets_1.httpRequest)(fwUrl, 'binary');
27
29
  if (!fw) {
28
30
  throw constants_1.ERRORS.TypedError('Runtime', 'checkFirmwareAuthenticity: firmware binary not found');
@@ -68,25 +68,22 @@ const validateCoinPath = (path, coinInfo) => {
68
68
  };
69
69
  exports.validateCoinPath = validateCoinPath;
70
70
  const getFirmwareRange = (method, coinInfo, currentRange) => {
71
- const current = JSON.parse(JSON.stringify(currentRange));
71
+ const range = JSON.parse(JSON.stringify(currentRange));
72
+ const models = Object.keys(range);
72
73
  if (coinInfo) {
73
- if (!coinInfo.support || typeof coinInfo.support.trezor1 !== 'string') {
74
- current['1'].min = '0';
75
- }
76
- else if (utils_1.versionUtils.isNewer(coinInfo.support.trezor1, current['1'].min)) {
77
- current['1'].min = coinInfo.support.trezor1;
78
- }
79
- if (!coinInfo.support || typeof coinInfo.support.trezor2 !== 'string') {
80
- current['2'].min = '0';
81
- }
82
- else if (utils_1.versionUtils.isNewer(coinInfo.support.trezor2, current['2'].min)) {
83
- current['2'].min = coinInfo.support.trezor2;
84
- }
74
+ models.forEach(model => {
75
+ if (!coinInfo.support || typeof coinInfo.support[model] !== 'string') {
76
+ range[model].min = '0';
77
+ }
78
+ else if (range[model].min !== '0' &&
79
+ utils_1.versionUtils.isNewer(coinInfo.support[model], range[model].min)) {
80
+ range[model].min = coinInfo.support[model];
81
+ }
82
+ });
85
83
  }
86
- const coinType = coinInfo ? coinInfo.type : null;
87
- const shortcut = coinInfo ? coinInfo.shortcut.toLowerCase() : null;
88
- const { supportedFirmware } = config_1.config;
89
- const ranges = supportedFirmware
84
+ const coinType = coinInfo === null || coinInfo === void 0 ? void 0 : coinInfo.type;
85
+ const shortcut = coinInfo === null || coinInfo === void 0 ? void 0 : coinInfo.shortcut.toLowerCase();
86
+ const configRules = config_1.config.supportedFirmware
90
87
  .filter(rule => {
91
88
  if (rule.methods) {
92
89
  return rule.methods.includes(method);
@@ -96,45 +93,42 @@ const getFirmwareRange = (method, coinInfo, currentRange) => {
96
93
  }
97
94
  return true;
98
95
  })
99
- .filter(c => {
100
- if (c.coinType) {
101
- return c.coinType === coinType;
96
+ .filter(rule => {
97
+ if (rule.coinType) {
98
+ return rule.coinType === coinType;
102
99
  }
103
- if (c.coin) {
104
- return (typeof c.coin === 'string' ? [c.coin] : c.coin).includes(shortcut);
100
+ if (rule.coin) {
101
+ return (typeof rule.coin === 'string' ? [rule.coin] : rule.coin).includes(shortcut);
105
102
  }
106
- return c.methods || c.capabilities;
103
+ return rule.methods || rule.capabilities;
107
104
  });
108
- ranges.forEach(range => {
109
- const { min, max } = range;
110
- if (min) {
111
- const [t1, t2] = min;
112
- if (t1 === '0' ||
113
- current['1'].min === '0' ||
114
- !utils_1.versionUtils.isNewerOrEqual(current['1'].min, t1)) {
115
- current['1'].min = t1;
116
- }
117
- if (t2 === '0' ||
118
- current['2'].min === '0' ||
119
- !utils_1.versionUtils.isNewerOrEqual(current['2'].min, t2)) {
120
- current['2'].min = t2;
121
- }
122
- }
123
- if (max) {
124
- const [t1, t2] = max;
125
- if (t1 === '0' ||
126
- current['1'].max === '0' ||
127
- !utils_1.versionUtils.isNewerOrEqual(current['1'].max, t1)) {
128
- current['1'].max = t1;
129
- }
130
- if (t2 === '0' ||
131
- current['2'].max === '0' ||
132
- !utils_1.versionUtils.isNewerOrEqual(current['2'].max, t2)) {
133
- current['2'].max = t2;
134
- }
105
+ configRules.forEach(rule => {
106
+ if (rule.min) {
107
+ models.forEach(model => {
108
+ const modelMin = rule.min[model];
109
+ if (modelMin) {
110
+ if (modelMin === '0' ||
111
+ range[model].min === '0' ||
112
+ !utils_1.versionUtils.isNewerOrEqual(range[model].min, modelMin)) {
113
+ range[model].min = modelMin;
114
+ }
115
+ }
116
+ });
117
+ }
118
+ if (rule.max) {
119
+ models.forEach(model => {
120
+ const modelMax = rule.max[model];
121
+ if (modelMax) {
122
+ if (modelMax === '0' ||
123
+ range[model].max === '0' ||
124
+ !utils_1.versionUtils.isNewerOrEqual(range[model].max, modelMax)) {
125
+ range[model].max = modelMax;
126
+ }
127
+ }
128
+ });
135
129
  }
136
130
  });
137
- return current;
131
+ return range;
138
132
  };
139
133
  exports.getFirmwareRange = getFirmwareRange;
140
134
  //# sourceMappingURL=paramsValidator.js.map
@@ -2,9 +2,9 @@ import BigNumber from 'bignumber.js';
2
2
  import { AbstractMethod } from '../core/AbstractMethod';
3
3
  import { Discovery } from './common/Discovery';
4
4
  import { TransactionComposer } from './bitcoin';
5
- import type { ComposeOutput, ComposeResult } from '@trezor/utxo-lib';
5
+ import type { ComposeOutput } from '@trezor/utxo-lib';
6
6
  import type { BitcoinNetworkInfo, DiscoveryAccount, AccountUtxo } from '../types';
7
- import type { SignedTransaction, PrecomposeParams, PrecomposedTransaction } from '../types/api/composeTransaction';
7
+ import type { SignedTransaction, PrecomposeParams, ComposeResult, PrecomposedResult } from '../types/api/composeTransaction';
8
8
  type Params = {
9
9
  outputs: ComposeOutput[];
10
10
  coinInfo: BitcoinNetworkInfo;
@@ -21,13 +21,13 @@ export default class ComposeTransaction extends AbstractMethod<'composeTransacti
21
21
  discovery?: Discovery;
22
22
  init(): void;
23
23
  get info(): string;
24
- precompose(account: PrecomposeParams['account'], feeLevels: PrecomposeParams['feeLevels']): Promise<PrecomposedTransaction[]>;
25
- run(): Promise<SignedTransaction | PrecomposedTransaction[]>;
24
+ precompose(account: PrecomposeParams['account'], feeLevels: PrecomposeParams['feeLevels']): Promise<PrecomposedResult[]>;
25
+ run(): Promise<SignedTransaction | PrecomposedResult[]>;
26
26
  selectAccount(): Promise<{
27
27
  account: DiscoveryAccount;
28
28
  utxo: AccountUtxo[];
29
29
  }>;
30
- selectFee(account: DiscoveryAccount, utxo: AccountUtxo[]): Promise<SignedTransaction | "change-account">;
30
+ selectFee(account: DiscoveryAccount, utxos: AccountUtxo[]): Promise<SignedTransaction | "change-account">;
31
31
  _selectFeeUiResponse(composer: TransactionComposer): Promise<SignedTransaction | 'change-account'>;
32
32
  _sign(tx: ComposeResult): Promise<import("../types").SignedTransaction>;
33
33
  dispose(): void;
@@ -77,7 +77,7 @@ class ComposeTransaction extends AbstractMethod_1.AbstractMethod {
77
77
  address_n,
78
78
  addresses: account.addresses,
79
79
  },
80
- utxo: account.utxo,
80
+ utxos: account.utxo,
81
81
  coinInfo,
82
82
  outputs,
83
83
  baseFee,
@@ -89,21 +89,16 @@ class ComposeTransaction extends AbstractMethod_1.AbstractMethod {
89
89
  composer.composeCustomFee(level.feePerUnit);
90
90
  const tx = { ...composer.composed.custom };
91
91
  if (tx.type === 'final') {
92
- const inputs = tx.transaction.inputs.map(inp => (0, bitcoin_1.inputToTrezor)(inp, this.params.sequence || 0xffffffff));
93
- const { sorted, permutation } = tx.transaction.outputs;
94
- const txOutputs = sorted.map(out => (0, bitcoin_1.outputToTrezor)(out, coinInfo));
95
92
  return {
96
- type: 'final',
97
- max: tx.max,
98
- totalSpent: tx.totalSpent,
99
- fee: tx.fee,
100
- feePerByte: tx.feePerByte,
101
- bytes: tx.bytes,
102
- transaction: {
103
- inputs,
104
- outputs: txOutputs,
105
- outputsPermutation: permutation,
106
- },
93
+ ...tx,
94
+ inputs: tx.inputs.map(inp => (0, bitcoin_1.inputToTrezor)(inp, this.params.sequence)),
95
+ outputs: tx.outputs.map(bitcoin_1.outputToTrezor),
96
+ };
97
+ }
98
+ if (tx.type === 'nonfinal') {
99
+ return {
100
+ ...tx,
101
+ inputs: tx.inputs.map(inp => (0, bitcoin_1.inputToTrezor)(inp, this.params.sequence)),
107
102
  };
108
103
  }
109
104
  return tx;
@@ -184,12 +179,12 @@ class ComposeTransaction extends AbstractMethod_1.AbstractMethod {
184
179
  utxo,
185
180
  };
186
181
  }
187
- async selectFee(account, utxo) {
182
+ async selectFee(account, utxos) {
188
183
  const { coinInfo, outputs } = this.params;
189
184
  const blockchain = await (0, BlockchainLink_1.initBlockchain)(coinInfo, this.postMessage);
190
185
  const composer = new bitcoin_1.TransactionComposer({
191
186
  account,
192
- utxo,
187
+ utxos,
193
188
  coinInfo,
194
189
  outputs,
195
190
  });
@@ -227,8 +222,8 @@ class ComposeTransaction extends AbstractMethod_1.AbstractMethod {
227
222
  throw constants_1.ERRORS.TypedError('Runtime', 'ComposeTransaction: Trying to sign unfinished tx');
228
223
  const { coinInfo } = this.params;
229
224
  const options = (0, bitcoin_1.enhanceSignTx)({}, coinInfo);
230
- const inputs = tx.transaction.inputs.map(inp => (0, bitcoin_1.inputToTrezor)(inp, this.params.sequence || 0xffffffff));
231
- const outputs = tx.transaction.outputs.sorted.map(out => (0, bitcoin_1.outputToTrezor)(out, coinInfo));
225
+ const inputs = tx.inputs.map(inp => (0, bitcoin_1.inputToTrezor)(inp, this.params.sequence));
226
+ const outputs = tx.outputs.map(bitcoin_1.outputToTrezor);
232
227
  let refTxs = [];
233
228
  const requiredRefTxs = (0, bitcoin_1.requireReferencedTransactions)(inputs, options, coinInfo);
234
229
  const refTxsIds = (0, bitcoin_1.getReferencedTransactions)(inputs);
@@ -0,0 +1,11 @@
1
+ import { AbstractMethod } from '../../../core/AbstractMethod';
2
+ import type { PROTO } from '../../../constants';
3
+ export default class EosGetPublicKey extends AbstractMethod<'eosGetPublicKey', PROTO.EosGetPublicKey[]> {
4
+ hasBundle?: boolean;
5
+ confirmed?: boolean;
6
+ init(): void;
7
+ get info(): string;
8
+ confirmation(): Promise<boolean>;
9
+ run(): Promise<import("../../..").EosPublicKey | import("../../..").EosPublicKey[]>;
10
+ }
11
+ //# sourceMappingURL=eosGetPublicKey.d.ts.map
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const AbstractMethod_1 = require("../core/AbstractMethod");
4
- const paramsValidator_1 = require("./common/paramsValidator");
5
- const coinInfo_1 = require("../data/coinInfo");
6
- const pathUtils_1 = require("../utils/pathUtils");
7
- const events_1 = require("../events");
3
+ const AbstractMethod_1 = require("../../../core/AbstractMethod");
4
+ const paramsValidator_1 = require("../../common/paramsValidator");
5
+ const coinInfo_1 = require("../../../data/coinInfo");
6
+ const pathUtils_1 = require("../../../utils/pathUtils");
7
+ const events_1 = require("../../../events");
8
8
  class EosGetPublicKey extends AbstractMethod_1.AbstractMethod {
9
9
  init() {
10
10
  this.requiredPermissions = ['read'];
@@ -1,5 +1,5 @@
1
- import { AbstractMethod } from '../core/AbstractMethod';
2
- import type { PROTO } from '../constants';
1
+ import { AbstractMethod } from '../../../core/AbstractMethod';
2
+ import type { PROTO } from '../../../constants';
3
3
  type Params = {
4
4
  path: number[];
5
5
  chain_id: string;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const AbstractMethod_1 = require("../core/AbstractMethod");
5
- const paramsValidator_1 = require("./common/paramsValidator");
6
- const coinInfo_1 = require("../data/coinInfo");
7
- const pathUtils_1 = require("../utils/pathUtils");
8
- const helper = tslib_1.__importStar(require("./eos/eosSignTx"));
4
+ const AbstractMethod_1 = require("../../../core/AbstractMethod");
5
+ const paramsValidator_1 = require("../../common/paramsValidator");
6
+ const coinInfo_1 = require("../../../data/coinInfo");
7
+ const pathUtils_1 = require("../../../utils/pathUtils");
8
+ const helper = tslib_1.__importStar(require("../eosSignTx"));
9
9
  class EosSignTransaction extends AbstractMethod_1.AbstractMethod {
10
10
  init() {
11
11
  this.requiredPermissions = ['read', 'write'];
@@ -0,0 +1,3 @@
1
+ export { default as eosGetPublicKey } from './eosGetPublicKey';
2
+ export { default as eosSignTransaction } from './eosSignTransaction';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.eosSignTransaction = exports.eosGetPublicKey = void 0;
7
+ var eosGetPublicKey_1 = require("./eosGetPublicKey");
8
+ Object.defineProperty(exports, "eosGetPublicKey", { enumerable: true, get: function () { return __importDefault(eosGetPublicKey_1).default; } });
9
+ var eosSignTransaction_1 = require("./eosSignTransaction");
10
+ Object.defineProperty(exports, "eosSignTransaction", { enumerable: true, get: function () { return __importDefault(eosSignTransaction_1).default; } });
11
+ //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- import { AbstractMethod } from '../core/AbstractMethod';
2
- import { PROTO } from '../constants';
3
- import type { EthereumNetworkInfo } from '../types';
1
+ import { AbstractMethod } from '../../../core/AbstractMethod';
2
+ import { PROTO } from '../../../constants';
3
+ import type { EthereumNetworkInfo } from '../../../types';
4
4
  type Params = PROTO.EthereumGetAddress & {
5
5
  address?: string;
6
6
  network?: EthereumNetworkInfo;
@@ -25,7 +25,7 @@ export default class EthereumGetAddress extends AbstractMethod<'ethereumGetAddre
25
25
  serializedPath: string;
26
26
  address: string;
27
27
  }>;
28
- run(): Promise<import("../types").Address | import("../types").Address[]>;
28
+ run(): Promise<import("../../../types").Address | import("../../../types").Address[]>;
29
29
  }
30
30
  export {};
31
31
  //# sourceMappingURL=ethereumGetAddress.d.ts.map
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const AbstractMethod_1 = require("../core/AbstractMethod");
4
- const paramsValidator_1 = require("./common/paramsValidator");
5
- const pathUtils_1 = require("../utils/pathUtils");
6
- const ethereumUtils_1 = require("../utils/ethereumUtils");
7
- const coinInfo_1 = require("../data/coinInfo");
8
- const formatUtils_1 = require("../utils/formatUtils");
9
- const constants_1 = require("../constants");
10
- const events_1 = require("../events");
11
- const ethereumDefinitions_1 = require("./ethereum/ethereumDefinitions");
3
+ const AbstractMethod_1 = require("../../../core/AbstractMethod");
4
+ const paramsValidator_1 = require("../../common/paramsValidator");
5
+ const pathUtils_1 = require("../../../utils/pathUtils");
6
+ const ethereumUtils_1 = require("../../../utils/ethereumUtils");
7
+ const coinInfo_1 = require("../../../data/coinInfo");
8
+ const formatUtils_1 = require("../../../utils/formatUtils");
9
+ const constants_1 = require("../../../constants");
10
+ const events_1 = require("../../../events");
11
+ const ethereumDefinitions_1 = require("../ethereumDefinitions");
12
12
  class EthereumGetAddress extends AbstractMethod_1.AbstractMethod {
13
13
  constructor() {
14
14
  super(...arguments);
@@ -0,0 +1,16 @@
1
+ import { AbstractMethod } from '../../../core/AbstractMethod';
2
+ import type { PROTO } from '../../../constants';
3
+ import type { EthereumNetworkInfo } from '../../../types';
4
+ type Params = PROTO.EthereumGetPublicKey & {
5
+ network?: EthereumNetworkInfo;
6
+ };
7
+ export default class EthereumGetPublicKey extends AbstractMethod<'ethereumGetPublicKey', Params[]> {
8
+ hasBundle?: boolean;
9
+ confirmed?: boolean;
10
+ init(): void;
11
+ get info(): string;
12
+ confirmation(): Promise<boolean>;
13
+ run(): Promise<import("../../../types/api/getPublicKey").HDNodeResponse | import("../../../types/api/getPublicKey").HDNodeResponse[]>;
14
+ }
15
+ export {};
16
+ //# sourceMappingURL=ethereumGetPublicKey.d.ts.map