@trezor/connect 9.1.5 → 9.1.7

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 (186) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +1 -1
  3. package/lib/api/{binanceGetAddress.d.ts → binance/api/binanceGetAddress.d.ts} +4 -4
  4. package/lib/api/{binanceGetAddress.js → binance/api/binanceGetAddress.js} +10 -7
  5. package/lib/api/{binanceGetPublicKey.d.ts → binance/api/binanceGetPublicKey.d.ts} +3 -3
  6. package/lib/api/{binanceGetPublicKey.js → binance/api/binanceGetPublicKey.js} +5 -5
  7. package/lib/api/{binanceSignTransaction.d.ts → binance/api/binanceSignTransaction.d.ts} +3 -2
  8. package/lib/api/{binanceSignTransaction.js → binance/api/binanceSignTransaction.js} +8 -6
  9. package/lib/api/binance/api/index.d.ts +4 -0
  10. package/lib/api/binance/api/index.js +13 -0
  11. package/lib/api/binance/binanceSignTx.d.ts +1 -1
  12. package/lib/api/binance/binanceSignTx.js +2 -1
  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} +4 -4
  23. package/lib/api/{cardanoGetAddress.js → cardano/api/cardanoGetAddress.js} +11 -8
  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} +19 -8
  29. package/lib/api/{cardanoSignTransaction.js → cardano/api/cardanoSignTransaction.js} +33 -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/common/paramsValidator.js +5 -3
  35. package/lib/api/composeTransaction.d.ts +5 -5
  36. package/lib/api/composeTransaction.js +14 -19
  37. package/lib/api/eos/api/eosGetPublicKey.d.ts +11 -0
  38. package/lib/api/{eosGetPublicKey.js → eos/api/eosGetPublicKey.js} +7 -5
  39. package/lib/api/{eosSignTransaction.d.ts → eos/api/eosSignTransaction.d.ts} +3 -2
  40. package/lib/api/{eosSignTransaction.js → eos/api/eosSignTransaction.js} +8 -6
  41. package/lib/api/eos/api/index.d.ts +3 -0
  42. package/lib/api/eos/api/index.js +11 -0
  43. package/lib/api/eos/eosSignTx.d.ts +1 -1
  44. package/lib/api/eos/eosSignTx.js +2 -1
  45. package/lib/api/{ethereumGetAddress.d.ts → ethereum/api/ethereumGetAddress.d.ts} +5 -5
  46. package/lib/api/{ethereumGetAddress.js → ethereum/api/ethereumGetAddress.js} +13 -10
  47. package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +16 -0
  48. package/lib/api/{ethereumGetPublicKey.js → ethereum/api/ethereumGetPublicKey.js} +6 -6
  49. package/lib/api/{ethereumSignMessage.d.ts → ethereum/api/ethereumSignMessage.d.ts} +3 -3
  50. package/lib/api/{ethereumSignMessage.js → ethereum/api/ethereumSignMessage.js} +7 -7
  51. package/lib/api/{ethereumSignTransaction.d.ts → ethereum/api/ethereumSignTransaction.d.ts} +12 -9
  52. package/lib/api/{ethereumSignTransaction.js → ethereum/api/ethereumSignTransaction.js} +38 -43
  53. package/lib/api/{ethereumSignTypedData.d.ts → ethereum/api/ethereumSignTypedData.d.ts} +3 -3
  54. package/lib/api/{ethereumSignTypedData.js → ethereum/api/ethereumSignTypedData.js} +10 -10
  55. package/lib/api/{ethereumVerifyMessage.d.ts → ethereum/api/ethereumVerifyMessage.d.ts} +2 -2
  56. package/lib/api/{ethereumVerifyMessage.js → ethereum/api/ethereumVerifyMessage.js} +3 -3
  57. package/lib/api/ethereum/api/index.d.ts +7 -0
  58. package/lib/api/ethereum/api/index.js +19 -0
  59. package/lib/api/ethereum/ethereumSignTx.d.ts +4 -2
  60. package/lib/api/ethereum/ethereumSignTx.js +19 -3
  61. package/lib/api/firmware/verifyAuthenticityProof.js +1 -1
  62. package/lib/api/firmware/x509certificate.d.ts +1 -0
  63. package/lib/api/firmware/x509certificate.js +34 -2
  64. package/lib/api/getAccountDescriptor.d.ts +20 -0
  65. package/lib/api/getAccountDescriptor.js +162 -0
  66. package/lib/api/getAccountInfo.d.ts +2 -0
  67. package/lib/api/getAddress.d.ts +1 -1
  68. package/lib/api/getAddress.js +4 -1
  69. package/lib/api/index.d.ts +1 -24
  70. package/lib/api/index.js +3 -50
  71. package/lib/api/nem/api/index.d.ts +3 -0
  72. package/lib/api/nem/api/index.js +11 -0
  73. package/lib/api/{nemGetAddress.d.ts → nem/api/nemGetAddress.d.ts} +4 -4
  74. package/lib/api/{nemGetAddress.js → nem/api/nemGetAddress.js} +10 -7
  75. package/lib/api/{nemSignTransaction.d.ts → nem/api/nemSignTransaction.d.ts} +2 -2
  76. package/lib/api/{nemSignTransaction.js → nem/api/nemSignTransaction.js} +7 -6
  77. package/lib/api/nem/nemSignTx.d.ts +1 -1
  78. package/lib/api/nem/nemSignTx.js +2 -1
  79. package/lib/api/ripple/api/index.d.ts +3 -0
  80. package/lib/api/ripple/api/index.js +11 -0
  81. package/lib/api/{rippleGetAddress.d.ts → ripple/api/rippleGetAddress.d.ts} +4 -4
  82. package/lib/api/{rippleGetAddress.js → ripple/api/rippleGetAddress.js} +10 -7
  83. package/lib/api/{rippleSignTransaction.d.ts → ripple/api/rippleSignTransaction.d.ts} +2 -2
  84. package/lib/api/{rippleSignTransaction.js → ripple/api/rippleSignTransaction.js} +7 -5
  85. package/lib/api/signTransaction.js +2 -0
  86. package/lib/api/solana/additionalInfo.d.ts +10 -0
  87. package/lib/api/solana/additionalInfo.js +33 -0
  88. package/lib/api/solana/api/index.d.ts +4 -0
  89. package/lib/api/solana/api/index.js +13 -0
  90. package/lib/api/solana/api/solanaGetAddress.d.ts +23 -0
  91. package/lib/api/solana/api/solanaGetAddress.js +133 -0
  92. package/lib/api/solana/api/solanaGetPublicKey.d.ts +12 -0
  93. package/lib/api/solana/api/solanaGetPublicKey.js +83 -0
  94. package/lib/api/solana/api/solanaSignTransaction.d.ts +10 -0
  95. package/lib/api/solana/api/solanaSignTransaction.js +34 -0
  96. package/lib/api/stellar/api/index.d.ts +3 -0
  97. package/lib/api/stellar/api/index.js +11 -0
  98. package/lib/api/{stellarGetAddress.d.ts → stellar/api/stellarGetAddress.d.ts} +4 -4
  99. package/lib/api/{stellarGetAddress.js → stellar/api/stellarGetAddress.js} +10 -7
  100. package/lib/api/{stellarSignTransaction.d.ts → stellar/api/stellarSignTransaction.d.ts} +2 -2
  101. package/lib/api/{stellarSignTransaction.js → stellar/api/stellarSignTransaction.js} +6 -6
  102. package/lib/api/tezos/api/index.d.ts +4 -0
  103. package/lib/api/tezos/api/index.js +13 -0
  104. package/lib/api/{tezosGetAddress.d.ts → tezos/api/tezosGetAddress.d.ts} +4 -4
  105. package/lib/api/{tezosGetAddress.js → tezos/api/tezosGetAddress.js} +10 -7
  106. package/lib/api/{tezosGetPublicKey.d.ts → tezos/api/tezosGetPublicKey.d.ts} +3 -3
  107. package/lib/api/{tezosGetPublicKey.js → tezos/api/tezosGetPublicKey.js} +7 -5
  108. package/lib/api/{tezosSignTransaction.d.ts → tezos/api/tezosSignTransaction.d.ts} +2 -2
  109. package/lib/api/{tezosSignTransaction.js → tezos/api/tezosSignTransaction.js} +5 -5
  110. package/lib/api/tezos/tezosSignTx.d.ts +1 -1
  111. package/lib/api/tezos/tezosSignTx.js +2 -1
  112. package/lib/backend/Blockchain.js +3 -0
  113. package/lib/constants/cardano.js +2 -2
  114. package/lib/constants/nem.js +3 -3
  115. package/lib/constants/network.d.ts +3 -0
  116. package/lib/constants/network.js +13 -1
  117. package/lib/core/AbstractMethod.js +3 -0
  118. package/lib/core/index.d.ts +3 -1
  119. package/lib/core/index.js +17 -4
  120. package/lib/core/method.d.ts +2 -2
  121. package/lib/core/method.js +8 -2
  122. package/lib/core/method.native.d.ts +5 -0
  123. package/lib/core/method.native.js +34 -0
  124. package/lib/data/DataManager.d.ts +22 -0
  125. package/lib/data/config.d.ts +22 -0
  126. package/lib/data/config.js +12 -1
  127. package/lib/data/connectSettings.js +4 -0
  128. package/lib/data/defaultFeeLevels.js +9 -0
  129. package/lib/data/deviceAuthenticityConfig.js +4 -1
  130. package/lib/data/firmwareInfo.d.ts +1 -1
  131. package/lib/data/firmwareInfo.js +4 -1
  132. package/lib/data/version.d.ts +1 -1
  133. package/lib/data/version.js +1 -1
  134. package/lib/device/Device.d.ts +3 -1
  135. package/lib/device/Device.js +23 -4
  136. package/lib/device/DeviceCommands.d.ts +2 -2
  137. package/lib/device/DeviceCommands.js +19 -3
  138. package/lib/device/DeviceList.js +4 -1
  139. package/lib/events/popup.d.ts +19 -3
  140. package/lib/events/popup.js +3 -0
  141. package/lib/events/ui-request.d.ts +1 -1
  142. package/lib/factory.js +5 -0
  143. package/lib/types/api/binance/index.d.ts +1 -0
  144. package/lib/types/api/bitcoin/index.d.ts +2 -0
  145. package/lib/types/api/cardano/index.d.ts +2 -0
  146. package/lib/types/api/cardanoComposeTransaction.d.ts +44 -0
  147. package/lib/types/api/cardanoComposeTransaction.js +3 -0
  148. package/lib/types/api/cardanoSignTransaction.d.ts +9 -0
  149. package/lib/types/api/composeTransaction.d.ts +28 -54
  150. package/lib/types/api/eos/index.d.ts +1 -0
  151. package/lib/types/api/ethereum/index.d.ts +2 -0
  152. package/lib/types/api/getAccountDescriptor.d.ts +16 -0
  153. package/lib/types/api/getAccountDescriptor.js +3 -0
  154. package/lib/types/api/index.d.ts +10 -0
  155. package/lib/types/api/nem/index.d.ts +1 -0
  156. package/lib/types/api/ripple/index.d.ts +1 -0
  157. package/lib/types/api/solana/index.d.ts +22 -0
  158. package/lib/types/api/solana/index.js +3 -0
  159. package/lib/types/api/solanaGetAddress.d.ts +4 -0
  160. package/lib/types/api/solanaGetAddress.js +3 -0
  161. package/lib/types/api/solanaGetPublicKey.d.ts +5 -0
  162. package/lib/types/api/solanaGetPublicKey.js +3 -0
  163. package/lib/types/api/solanaSignTransaction.d.ts +4 -0
  164. package/lib/types/api/solanaSignTransaction.js +3 -0
  165. package/lib/types/api/tezos/index.d.ts +1 -0
  166. package/lib/types/coinInfo.d.ts +5 -16
  167. package/lib/types/device.d.ts +1 -1
  168. package/lib/types/device.js +1 -1
  169. package/lib/types/index.d.ts +3 -1
  170. package/lib/types/index.js +1 -0
  171. package/lib/types/params.d.ts +3 -0
  172. package/lib/types/settings.d.ts +1 -0
  173. package/lib/utils/debug.d.ts +6 -3
  174. package/lib/utils/debug.js +13 -7
  175. package/lib/utils/deviceFeaturesUtils.js +8 -5
  176. package/lib/utils/formatUtils.d.ts +2 -0
  177. package/lib/utils/formatUtils.js +19 -1
  178. package/lib/workers/workers-browser.d.ts +2 -1
  179. package/lib/workers/workers-browser.js +3 -1
  180. package/lib/workers/workers-react-native.d.ts +2 -1
  181. package/lib/workers/workers-react-native.js +3 -1
  182. package/lib/workers/workers.d.ts +8 -5
  183. package/lib/workers/workers.js +34 -10
  184. package/package.json +22 -19
  185. package/lib/api/eosGetPublicKey.d.ts +0 -11
  186. package/lib/api/ethereumGetPublicKey.d.ts +0 -16
@@ -1,12 +1,12 @@
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 cardanoAddressParameters_1 = require("./cardano/cardanoAddressParameters");
8
- const constants_1 = require("../constants");
9
- 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 cardanoAddressParameters_1 = require("../cardanoAddressParameters");
8
+ const constants_1 = require("../../../constants");
9
+ const events_1 = require("../../../events");
10
10
  class CardanoGetAddress extends AbstractMethod_1.AbstractMethod {
11
11
  constructor() {
12
12
  super(...arguments);
@@ -31,6 +31,7 @@ class CardanoGetAddress extends AbstractMethod_1.AbstractMethod {
31
31
  { name: 'derivationType', type: 'number' },
32
32
  { name: 'address', type: 'string' },
33
33
  { name: 'showOnTrezor', type: 'boolean' },
34
+ { name: 'chunkify', type: 'boolean' },
34
35
  ]);
35
36
  (0, cardanoAddressParameters_1.validateAddressParameters)(batch.addressParameters);
36
37
  return {
@@ -42,6 +43,7 @@ class CardanoGetAddress extends AbstractMethod_1.AbstractMethod {
42
43
  ? batch.derivationType
43
44
  : constants_1.PROTO.CardanoDerivationType.ICARUS_TREZOR,
44
45
  show_display: typeof batch.showOnTrezor === 'boolean' ? batch.showOnTrezor : true,
46
+ chunkify: typeof batch.chunkify === 'boolean' ? batch.chunkify : false,
45
47
  };
46
48
  });
47
49
  const useEventListener = payload.useEventListener &&
@@ -88,7 +90,7 @@ class CardanoGetAddress extends AbstractMethod_1.AbstractMethod {
88
90
  const uiResp = await uiPromise.promise;
89
91
  return uiResp.payload;
90
92
  }
91
- async _call({ address_parameters, protocol_magic, network_id, derivation_type, show_display, }) {
93
+ async _call({ address_parameters, protocol_magic, network_id, derivation_type, show_display, chunkify, }) {
92
94
  const cmd = this.device.getCommands();
93
95
  const response = await cmd.typedCall('CardanoGetAddress', 'CardanoAddress', {
94
96
  address_parameters,
@@ -96,6 +98,7 @@ class CardanoGetAddress extends AbstractMethod_1.AbstractMethod {
96
98
  network_id,
97
99
  derivation_type,
98
100
  show_display,
101
+ chunkify,
99
102
  });
100
103
  return response.message;
101
104
  }
@@ -1,6 +1,6 @@
1
- import { PROTO } from '../constants';
2
- import { AbstractMethod } from '../core/AbstractMethod';
3
- import type { CardanoNativeScript } from '../types/api/cardano';
1
+ import { PROTO } from '../../../constants';
2
+ import { AbstractMethod } from '../../../core/AbstractMethod';
3
+ import type { CardanoNativeScript } from '../../../types/api/cardano';
4
4
  export default class CardanoGetNativeScriptHash extends AbstractMethod<'cardanoGetNativeScriptHash', PROTO.CardanoGetNativeScriptHash> {
5
5
  init(): void;
6
6
  get info(): string;
@@ -1,10 +1,10 @@
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");
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
8
  class CardanoGetNativeScriptHash extends AbstractMethod_1.AbstractMethod {
9
9
  init() {
10
10
  this.requiredPermissions = ['read'];
@@ -1,5 +1,5 @@
1
- import { PROTO } from '../constants';
2
- import { AbstractMethod } from '../core/AbstractMethod';
1
+ import { PROTO } from '../../../constants';
2
+ import { AbstractMethod } from '../../../core/AbstractMethod';
3
3
  interface Params extends PROTO.CardanoGetPublicKey {
4
4
  suppressBackupWarning?: boolean;
5
5
  }
@@ -10,7 +10,7 @@ export default class CardanoGetPublicKey extends AbstractMethod<'cardanoGetPubli
10
10
  get info(): string;
11
11
  confirmation(): Promise<boolean>;
12
12
  noBackupConfirmation(allowSuppression?: boolean): Promise<boolean>;
13
- run(): Promise<import("..").CardanoPublicKey | import("..").CardanoPublicKey[]>;
13
+ run(): Promise<import("../../..").CardanoPublicKey | import("../../..").CardanoPublicKey[]>;
14
14
  }
15
15
  export {};
16
16
  //# sourceMappingURL=cardanoGetPublicKey.d.ts.map
@@ -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,12 @@ 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;
49
+ chunkify?: boolean;
44
50
  };
45
51
  export default class CardanoSignTransaction extends AbstractMethod<'cardanoSignTransaction', CardanoSignTransactionParams> {
46
52
  init(): void;
@@ -49,7 +55,12 @@ export default class CardanoSignTransaction extends AbstractMethod<'cardanoSignT
49
55
  _ensureFeatureIsSupported(feature: keyof typeof CardanoSignTransactionFeatures): void;
50
56
  _ensureFirmwareSupportsParams(): void;
51
57
  _sign_tx(): Promise<CardanoSignedTxData>;
52
- run(): Promise<CardanoSignedTxData>;
58
+ run(): Promise<CardanoSignedTxData | {
59
+ serializedTx: string;
60
+ hash: string;
61
+ witnesses: CardanoSignedTxWitness[];
62
+ auxiliaryDataSupplement?: CardanoAuxiliaryDataSupplement | undefined;
63
+ }>;
53
64
  }
54
65
  export {};
55
66
  //# 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,9 @@ 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' },
71
+ { name: 'chunkify', type: 'boolean' },
68
72
  ]);
69
73
  const inputsWithPath = payload.inputs.map(cardanoInputs_1.transformInput);
70
74
  const outputsWithData = payload.outputs.map(cardanoOutputs_1.transformOutput);
@@ -148,6 +152,9 @@ class CardanoSignTransaction extends AbstractMethod_1.AbstractMethod {
148
152
  ? payload.derivationType
149
153
  : constants_1.PROTO.CardanoDerivationType.ICARUS_TREZOR,
150
154
  includeNetworkId: payload.includeNetworkId,
155
+ unsignedTx: 'unsignedTx' in payload ? payload.unsignedTx : undefined,
156
+ testnet: 'testnet' in payload ? payload.testnet : undefined,
157
+ chunkify: typeof payload.chunkify === 'boolean' ? payload.chunkify : false,
151
158
  };
152
159
  }
153
160
  get info() {
@@ -249,6 +256,7 @@ class CardanoSignTransaction extends AbstractMethod_1.AbstractMethod {
249
256
  reference_inputs_count: this.params.referenceInputs.length,
250
257
  derivation_type: this.params.derivationType,
251
258
  include_network_id: this.params.includeNetworkId,
259
+ chunkify: this.params.chunkify,
252
260
  };
253
261
  await typedCall('CardanoSignTxInit', 'CardanoTxItemAck', signTxInitMessage);
254
262
  for (const { input } of this.params.inputsWithPath) {
@@ -329,9 +337,21 @@ class CardanoSignTransaction extends AbstractMethod_1.AbstractMethod {
329
337
  await typedCall('CardanoTxHostAck', 'CardanoSignTxFinished');
330
338
  return { hash: txBodyHashMessage.tx_hash, witnesses, auxiliaryDataSupplement };
331
339
  }
332
- run() {
340
+ async run() {
333
341
  this._ensureFirmwareSupportsParams();
334
- return this._sign_tx();
342
+ const result = await this._sign_tx();
343
+ if (!this.params.unsignedTx)
344
+ return result;
345
+ const { unsignedTx, testnet } = this.params;
346
+ const { hash, witnesses } = result;
347
+ if (hash !== unsignedTx.hash) {
348
+ throw constants_1.ERRORS.TypedError('Runtime', "Constructed transaction doesn't match the hash returned by the device.");
349
+ }
350
+ const serializedTx = coin_selection_1.trezorUtils.signTransaction(unsignedTx.body, witnesses, { testnet });
351
+ return {
352
+ ...result,
353
+ serializedTx,
354
+ };
335
355
  }
336
356
  }
337
357
  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) => {
@@ -72,12 +72,14 @@ const getFirmwareRange = (method, coinInfo, currentRange) => {
72
72
  const models = Object.keys(range);
73
73
  if (coinInfo) {
74
74
  models.forEach(model => {
75
- if (!coinInfo.support || typeof coinInfo.support[model] !== 'string') {
75
+ const supportVersion = coinInfo.support ? coinInfo.support[model] : false;
76
+ if (supportVersion === false) {
76
77
  range[model].min = '0';
77
78
  }
78
79
  else if (range[model].min !== '0' &&
79
- utils_1.versionUtils.isNewer(coinInfo.support[model], range[model].min)) {
80
- range[model].min = coinInfo.support[model];
80
+ typeof supportVersion === 'string' &&
81
+ utils_1.versionUtils.isNewer(supportVersion, range[model].min)) {
82
+ range[model].min = supportVersion;
81
83
  }
82
84
  });
83
85
  }
@@ -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'];
@@ -18,11 +18,13 @@ class EosGetPublicKey extends AbstractMethod_1.AbstractMethod {
18
18
  (0, paramsValidator_1.validateParams)(batch, [
19
19
  { name: 'path', required: true },
20
20
  { name: 'showOnTrezor', type: 'boolean' },
21
+ { name: 'chunkify', type: 'boolean' },
21
22
  ]);
22
23
  const path = (0, pathUtils_1.validatePath)(batch.path, 3);
23
24
  return {
24
25
  address_n: path,
25
26
  show_display: typeof batch.showOnTrezor === 'boolean' ? batch.showOnTrezor : false,
27
+ chunkify: typeof batch.chunkify === 'boolean' ? batch.chunkify : false,
26
28
  };
27
29
  });
28
30
  }
@@ -1,10 +1,11 @@
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;
6
6
  header: PROTO.EosTxHeader;
7
7
  ack: PROTO.EosTxActionAck[];
8
+ chunkify: boolean;
8
9
  };
9
10
  export default class EosSignTransaction extends AbstractMethod<'eosSignTransaction', Params> {
10
11
  init(): void;
@@ -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'];
@@ -14,6 +14,7 @@ class EosSignTransaction extends AbstractMethod_1.AbstractMethod {
14
14
  (0, paramsValidator_1.validateParams)(payload, [
15
15
  { name: 'path', required: true },
16
16
  { name: 'transaction', required: true },
17
+ { name: 'chunkify', type: 'boolean' },
17
18
  ]);
18
19
  const path = (0, pathUtils_1.validatePath)(payload.path, 3);
19
20
  const { chain_id, header, ack } = helper.validate(payload.transaction);
@@ -22,13 +23,14 @@ class EosSignTransaction extends AbstractMethod_1.AbstractMethod {
22
23
  chain_id,
23
24
  header,
24
25
  ack,
26
+ chunkify: typeof payload.chunkify === 'boolean' ? payload.chunkify : false,
25
27
  };
26
28
  }
27
29
  get info() {
28
30
  return 'Sign EOS transaction';
29
31
  }
30
32
  async run() {
31
- const response = await helper.signTx(this.device.getCommands().typedCall.bind(this.device.getCommands()), this.params.path, this.params.chain_id, this.params.header, this.params.ack);
33
+ const response = await helper.signTx(this.device.getCommands().typedCall.bind(this.device.getCommands()), this.params.path, this.params.chain_id, this.params.header, this.params.ack, this.params.chunkify);
32
34
  return {
33
35
  signature: response.signature,
34
36
  };
@@ -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
@@ -13,5 +13,5 @@ export declare const validate: (tx: EosSDKTransaction) => {
13
13
  };
14
14
  ack: PROTO.EosTxActionAck[];
15
15
  };
16
- export declare const signTx: (typedCall: TypedCall, address_n: number[], chain_id: string, header: PROTO.EosTxHeader, actions: PROTO.EosTxActionAck[]) => Promise<PROTO.EosSignedTx>;
16
+ export declare const signTx: (typedCall: TypedCall, address_n: number[], chain_id: string, header: PROTO.EosTxHeader, actions: PROTO.EosTxActionAck[], chunkify: boolean) => Promise<PROTO.EosSignedTx>;
17
17
  //# sourceMappingURL=eosSignTx.d.ts.map
@@ -334,12 +334,13 @@ const processTxRequest = async (typedCall, message, actions, index) => {
334
334
  }
335
335
  return processTxRequest(typedCall, ack.message, actions, index);
336
336
  };
337
- const signTx = async (typedCall, address_n, chain_id, header, actions) => {
337
+ const signTx = async (typedCall, address_n, chain_id, header, actions, chunkify) => {
338
338
  const response = await typedCall('EosSignTx', 'EosTxActionRequest', {
339
339
  address_n,
340
340
  chain_id,
341
341
  header,
342
342
  num_actions: actions.length,
343
+ chunkify,
343
344
  });
344
345
  return processTxRequest(typedCall, response.message, actions, 0);
345
346
  };