@trezor/connect 9.0.0-beta.3 → 9.0.0-beta.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 (109) hide show
  1. package/README.md +11 -1
  2. package/lib/api/binance/binanceSignTx.d.ts +1 -1
  3. package/lib/api/binanceSignTransaction.d.ts +1 -1
  4. package/lib/api/bitcoin/enhanceSignTx.d.ts +1 -1
  5. package/lib/api/bitcoin/refTx.d.ts +1 -1
  6. package/lib/api/bitcoin/signtx.d.ts +1 -1
  7. package/lib/api/bitcoin/signtxLegacy.d.ts +1 -1
  8. package/lib/api/cardano/cardanoAddressParameters.d.ts +1 -1
  9. package/lib/api/cardano/cardanoAuxiliaryData.d.ts +1 -1
  10. package/lib/api/cardano/cardanoCertificate.d.ts +1 -1
  11. package/lib/api/cardano/cardanoInputs.d.ts +1 -0
  12. package/lib/api/cardano/cardanoInputs.js +12 -1
  13. package/lib/api/cardano/cardanoOutputs.d.ts +6 -3
  14. package/lib/api/cardano/cardanoOutputs.js +37 -1
  15. package/lib/api/cardano/cardanoTokenBundle.d.ts +1 -1
  16. package/lib/api/cardano/cardanoUtils.d.ts +3 -0
  17. package/lib/api/cardano/cardanoUtils.js +17 -0
  18. package/lib/api/cardano/cardanoWitnesses.js +4 -4
  19. package/lib/api/cardanoGetAddress.d.ts +1 -1
  20. package/lib/api/cardanoGetNativeScriptHash.d.ts +1 -1
  21. package/lib/api/cardanoGetPublicKey.d.ts +1 -1
  22. package/lib/api/cardanoSignTransaction.d.ts +8 -4
  23. package/lib/api/cardanoSignTransaction.js +40 -17
  24. package/lib/api/composeTransaction.d.ts +1 -1
  25. package/lib/api/eos/eosSignTx.d.ts +1 -1
  26. package/lib/api/eosGetPublicKey.d.ts +1 -1
  27. package/lib/api/ethereum/ethereumSignTx.d.ts +1 -1
  28. package/lib/api/ethereum/ethereumSignTypedData.d.ts +1 -1
  29. package/lib/api/ethereumSignTransaction.d.ts +1 -1
  30. package/lib/api/ethereumSignTypedData.d.ts +1 -1
  31. package/lib/api/firmware/calculateFirmwareHash.d.ts +6 -0
  32. package/lib/api/firmware/calculateFirmwareHash.js +26 -0
  33. package/lib/api/firmware/getBinary.d.ts +2 -2
  34. package/lib/api/firmware/getBinary.js +2 -3
  35. package/lib/api/firmware/index.d.ts +5 -0
  36. package/lib/api/firmware/index.js +13 -0
  37. package/lib/api/firmware/modifyFirmware.d.ts +3 -5
  38. package/lib/api/firmware/modifyFirmware.js +12 -10
  39. package/lib/api/{management → firmware}/uploadFirmware.d.ts +0 -0
  40. package/lib/api/{management → firmware}/uploadFirmware.js +0 -0
  41. package/lib/api/firmwareUpdate.d.ts +4 -1
  42. package/lib/api/firmwareUpdate.js +8 -13
  43. package/lib/api/getFirmwareHash.d.ts +7 -0
  44. package/lib/api/getFirmwareHash.js +29 -0
  45. package/lib/api/index.d.ts +1 -0
  46. package/lib/api/index.js +4 -2
  47. package/lib/api/nem/nemSignTx.d.ts +1 -1
  48. package/lib/api/signTransaction.d.ts +2 -2
  49. package/lib/api/stellar/stellarSignTx.d.ts +1 -1
  50. package/lib/api/stellarSignTransaction.d.ts +1 -1
  51. package/lib/api/tezos/tezosSignTx.d.ts +1 -1
  52. package/lib/constants/errors.js +1 -1
  53. package/lib/core/index.d.ts +1 -1
  54. package/lib/core/method.d.ts +1 -1
  55. package/lib/data/firmwareInfo.js +0 -9
  56. package/lib/data/version.d.ts +1 -1
  57. package/lib/data/version.js +1 -1
  58. package/lib/device/DeviceList.js +3 -1
  59. package/lib/factory.js +1 -0
  60. package/lib/types/api/binance/index.d.ts +29 -0
  61. package/lib/types/api/binance/index.js +3 -0
  62. package/lib/types/api/binanceSignTransaction.d.ts +1 -27
  63. package/lib/types/api/bitcoin/index.d.ts +82 -0
  64. package/lib/types/api/bitcoin/index.js +3 -0
  65. package/lib/types/api/cardano/index.d.ts +193 -0
  66. package/lib/types/api/cardano/index.js +3 -0
  67. package/lib/types/api/cardanoGetAddress.d.ts +1 -31
  68. package/lib/types/api/cardanoGetNativeScriptHash.d.ts +1 -18
  69. package/lib/types/api/cardanoGetPublicKey.d.ts +1 -12
  70. package/lib/types/api/cardanoSignTransaction.d.ts +1 -127
  71. package/lib/types/api/eos/index.d.ts +119 -0
  72. package/lib/types/api/eos/index.js +3 -0
  73. package/lib/types/api/eosGetPublicKey.d.ts +1 -10
  74. package/lib/types/api/eosSignTransaction.d.ts +1 -107
  75. package/lib/types/api/ethereum/index.d.ts +86 -0
  76. package/lib/types/api/ethereum/index.js +3 -0
  77. package/lib/types/api/ethereumSignMessage.d.ts +1 -5
  78. package/lib/types/api/ethereumSignTransaction.d.ts +1 -37
  79. package/lib/types/api/ethereumSignTypedData.d.ts +1 -37
  80. package/lib/types/api/ethereumVerifyMessage.d.ts +1 -6
  81. package/lib/types/api/firmwareUpdate.d.ts +6 -3
  82. package/lib/types/api/getFirmwareHash.d.ts +4 -0
  83. package/lib/types/api/getFirmwareHash.js +3 -0
  84. package/lib/types/api/index.d.ts +2 -0
  85. package/lib/types/api/nem/index.d.ts +90 -0
  86. package/lib/types/api/nem/index.js +3 -0
  87. package/lib/types/api/nemSignTransaction.d.ts +2 -89
  88. package/lib/types/api/ripple/index.d.ts +21 -0
  89. package/lib/types/api/ripple/index.js +3 -0
  90. package/lib/types/api/rippleSignTransaction.d.ts +1 -20
  91. package/lib/types/api/signMessage.d.ts +1 -7
  92. package/lib/types/api/signTransaction.d.ts +1 -67
  93. package/lib/types/api/stellar/index.d.ts +180 -0
  94. package/lib/types/api/stellar/index.js +3 -0
  95. package/lib/types/api/stellarSignTransaction.d.ts +1 -179
  96. package/lib/types/api/tezos/index.d.ts +58 -0
  97. package/lib/types/api/tezos/index.js +3 -0
  98. package/lib/types/api/tezosSignTransaction.d.ts +1 -57
  99. package/lib/types/api/verifyMessage.d.ts +1 -7
  100. package/lib/types/index.d.ts +8 -4
  101. package/lib/types/index.js +8 -0
  102. package/lib/utils/assetUtils.d.ts +2 -0
  103. package/lib/utils/assetUtils.js +22 -0
  104. package/lib/utils/assets-native.d.ts +2 -0
  105. package/lib/utils/assets-native.js +7 -0
  106. package/lib/utils/assets.js +5 -13
  107. package/lib/utils/deviceFeaturesUtils.js +1 -1
  108. package/package.json +7 -4
  109. package/CHANGELOG.md +0 -26
@@ -0,0 +1,86 @@
1
+ export interface EthereumSignMessage {
2
+ path: string | number[];
3
+ message: string;
4
+ hex?: boolean;
5
+ }
6
+ export interface EthereumTransaction {
7
+ to: string;
8
+ value: string;
9
+ gasPrice: string;
10
+ gasLimit: string;
11
+ maxFeePerGas?: typeof undefined;
12
+ maxPriorityFeePerGas?: typeof undefined;
13
+ nonce: string;
14
+ data?: string;
15
+ chainId: number;
16
+ txType?: number;
17
+ }
18
+ export interface EthereumAccessList {
19
+ address: string;
20
+ storageKeys: string[];
21
+ }
22
+ export interface EthereumTransactionEIP1559 {
23
+ to: string;
24
+ value: string;
25
+ gasLimit: string;
26
+ gasPrice?: typeof undefined;
27
+ nonce: string;
28
+ data?: string;
29
+ chainId: number;
30
+ maxFeePerGas: string;
31
+ maxPriorityFeePerGas: string;
32
+ accessList?: EthereumAccessList[];
33
+ }
34
+ export interface EthereumSignTransaction {
35
+ path: string | number[];
36
+ transaction: EthereumTransaction | EthereumTransactionEIP1559;
37
+ }
38
+ export interface EthereumSignedTx {
39
+ v: string;
40
+ r: string;
41
+ s: string;
42
+ }
43
+ interface EthereumSignTypedDataTypeProperty {
44
+ name: string;
45
+ type: string;
46
+ }
47
+ export interface EthereumSignTypedDataTypes {
48
+ EIP712Domain: EthereumSignTypedDataTypeProperty[];
49
+ [additionalProperties: string]: EthereumSignTypedDataTypeProperty[];
50
+ }
51
+ export interface EthereumSignTypedDataMessage<T extends EthereumSignTypedDataTypes> {
52
+ types: T;
53
+ primaryType: keyof T;
54
+ domain: {
55
+ name?: string;
56
+ version?: string;
57
+ chainId?: number | bigint;
58
+ verifyingContract?: string;
59
+ salt?: ArrayBuffer;
60
+ };
61
+ message: {
62
+ [fieldName: string]: any;
63
+ };
64
+ }
65
+ export interface EthereumSignTypedData<T extends EthereumSignTypedDataTypes> {
66
+ path: string | number[];
67
+ data: EthereumSignTypedDataMessage<T>;
68
+ metamask_v4_compat: boolean;
69
+ domain_separator_hash?: undefined;
70
+ message_hash?: undefined;
71
+ }
72
+ export interface EthereumSignTypedHash<T extends EthereumSignTypedDataTypes> {
73
+ path: string | number[];
74
+ data: EthereumSignTypedDataMessage<T>;
75
+ metamask_v4_compat: boolean;
76
+ domain_separator_hash: string;
77
+ message_hash?: string;
78
+ }
79
+ export interface EthereumVerifyMessage {
80
+ address: string;
81
+ message: string;
82
+ hex?: boolean;
83
+ signature: string;
84
+ }
85
+ export {};
86
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -1,9 +1,5 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- export interface EthereumSignMessage {
4
- path: string | number[];
5
- message: string;
6
- hex?: boolean;
7
- }
3
+ import type { EthereumSignMessage } from './ethereum';
8
4
  export declare function ethereumSignMessage(params: Params<EthereumSignMessage>): Response<PROTO.MessageSignature>;
9
5
  //# sourceMappingURL=ethereumSignMessage.d.ts.map
@@ -1,40 +1,4 @@
1
1
  import type { Params, Response } from '../params';
2
- export interface EthereumTransaction {
3
- to: string;
4
- value: string;
5
- gasPrice: string;
6
- gasLimit: string;
7
- maxFeePerGas?: typeof undefined;
8
- maxPriorityFeePerGas?: typeof undefined;
9
- nonce: string;
10
- data?: string;
11
- chainId: number;
12
- txType?: number;
13
- }
14
- export interface EthereumAccessList {
15
- address: string;
16
- storageKeys: string[];
17
- }
18
- export interface EthereumTransactionEIP1559 {
19
- to: string;
20
- value: string;
21
- gasLimit: string;
22
- gasPrice?: typeof undefined;
23
- nonce: string;
24
- data?: string;
25
- chainId: number;
26
- maxFeePerGas: string;
27
- maxPriorityFeePerGas: string;
28
- accessList?: EthereumAccessList[];
29
- }
30
- export interface EthereumSignTransaction {
31
- path: string | number[];
32
- transaction: EthereumTransaction | EthereumTransactionEIP1559;
33
- }
34
- export interface EthereumSignedTx {
35
- v: string;
36
- r: string;
37
- s: string;
38
- }
2
+ import type { EthereumSignTransaction, EthereumSignedTx } from './ethereum';
39
3
  export declare function ethereumSignTransaction(params: Params<EthereumSignTransaction>): Response<EthereumSignedTx>;
40
4
  //# sourceMappingURL=ethereumSignTransaction.d.ts.map
@@ -1,42 +1,6 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- interface EthereumSignTypedDataTypeProperty {
4
- name: string;
5
- type: string;
6
- }
7
- export interface EthereumSignTypedDataTypes {
8
- EIP712Domain: EthereumSignTypedDataTypeProperty[];
9
- [additionalProperties: string]: EthereumSignTypedDataTypeProperty[];
10
- }
11
- export interface EthereumSignTypedDataMessage<T extends EthereumSignTypedDataTypes> {
12
- types: T;
13
- primaryType: keyof T;
14
- domain: {
15
- name?: string;
16
- version?: string;
17
- chainId?: number | bigint;
18
- verifyingContract?: string;
19
- salt?: ArrayBuffer;
20
- };
21
- message: {
22
- [fieldName: string]: any;
23
- };
24
- }
25
- export interface EthereumSignTypedData<T extends EthereumSignTypedDataTypes> {
26
- path: string | number[];
27
- data: EthereumSignTypedDataMessage<T>;
28
- metamask_v4_compat: boolean;
29
- domain_separator_hash?: undefined;
30
- message_hash?: undefined;
31
- }
32
- export interface EthereumSignTypedHash<T extends EthereumSignTypedDataTypes> {
33
- path: string | number[];
34
- data: EthereumSignTypedDataMessage<T>;
35
- metamask_v4_compat: boolean;
36
- domain_separator_hash: string;
37
- message_hash?: string;
38
- }
3
+ import type { EthereumSignTypedDataTypes, EthereumSignTypedData, EthereumSignTypedHash } from './ethereum';
39
4
  export declare function ethereumSignTypedData<T extends EthereumSignTypedDataTypes>(params: Params<EthereumSignTypedData<T>>): Response<PROTO.EthereumTypedDataSignature>;
40
5
  export declare function ethereumSignTypedData<T extends EthereumSignTypedDataTypes>(params: Params<EthereumSignTypedHash<T>>): Response<PROTO.EthereumTypedDataSignature>;
41
- export {};
42
6
  //# sourceMappingURL=ethereumSignTypedData.d.ts.map
@@ -1,10 +1,5 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- export interface EthereumVerifyMessage {
4
- address: string;
5
- message: string;
6
- hex?: boolean;
7
- signature: string;
8
- }
3
+ import type { EthereumVerifyMessage } from './ethereum';
9
4
  export declare function ethereumVerifyMessage(params: Params<EthereumVerifyMessage>): Response<PROTO.Success>;
10
5
  //# sourceMappingURL=ethereumVerifyMessage.d.ts.map
@@ -1,4 +1,3 @@
1
- import type { PROTO } from '../../constants';
2
1
  import type { Params, Response } from '../params';
3
2
  export interface FirmwareUpdateBinary {
4
3
  binary: ArrayBuffer;
@@ -9,6 +8,10 @@ export interface FirmwareUpdate {
9
8
  baseUrl?: string;
10
9
  intermediary?: boolean;
11
10
  }
12
- export declare function firmwareUpdate(params: Params<FirmwareUpdate>): Response<PROTO.Success>;
13
- export declare function firmwareUpdate(params: Params<FirmwareUpdateBinary>): Response<PROTO.Success>;
11
+ export interface FirmwareUpdateResponse {
12
+ hash: string;
13
+ challenge: string;
14
+ }
15
+ export declare function firmwareUpdate(params: Params<FirmwareUpdate>): Response<FirmwareUpdateResponse>;
16
+ export declare function firmwareUpdate(params: Params<FirmwareUpdateBinary>): Response<FirmwareUpdateResponse>;
14
17
  //# sourceMappingURL=firmwareUpdate.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { PROTO } from '../../constants';
2
+ import type { Params, Response } from '../params';
3
+ export declare function getFirmwareHash(params: Params<PROTO.GetFirmwareHash>): Response<PROTO.FirmwareHash>;
4
+ //# sourceMappingURL=getFirmwareHash.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=getFirmwareHash.js.map
@@ -41,6 +41,7 @@ import { getAddress } from './getAddress';
41
41
  import { getCoinInfo } from './getCoinInfo';
42
42
  import { getDeviceState } from './getDeviceState';
43
43
  import { getFeatures } from './getFeatures';
44
+ import { getFirmwareHash } from './getFirmwareHash';
44
45
  import { getOwnershipId } from './getOwnershipId';
45
46
  import { getOwnershipProof } from './getOwnershipProof';
46
47
  import { getPublicKey } from './getPublicKey';
@@ -115,6 +116,7 @@ export interface TrezorConnect {
115
116
  getCoinInfo: typeof getCoinInfo;
116
117
  getDeviceState: typeof getDeviceState;
117
118
  getFeatures: typeof getFeatures;
119
+ getFirmwareHash: typeof getFirmwareHash;
118
120
  getOwnershipId: typeof getOwnershipId;
119
121
  getOwnershipProof: typeof getOwnershipProof;
120
122
  getPublicKey: typeof getPublicKey;
@@ -0,0 +1,90 @@
1
+ import type { PROTO, NEM } from '../../../constants';
2
+ export interface MosaicID {
3
+ namespaceId: string;
4
+ name: string;
5
+ }
6
+ export interface MosaicDefinition {
7
+ levy?: {
8
+ type?: PROTO.NEMMosaicLevy;
9
+ fee?: number;
10
+ recipient?: string;
11
+ mosaicId?: MosaicID;
12
+ };
13
+ id: MosaicID;
14
+ description: string;
15
+ properties?: {
16
+ name: 'divisibility' | 'initialSupply' | 'supplyMutable' | 'transferable';
17
+ value: string;
18
+ }[];
19
+ }
20
+ export interface NEMMosaic {
21
+ mosaicId: MosaicID;
22
+ quantity: number;
23
+ }
24
+ export interface Modification {
25
+ modificationType: PROTO.NEMModificationType;
26
+ cosignatoryAccount: string;
27
+ }
28
+ export interface Message {
29
+ payload?: string;
30
+ type?: number;
31
+ publicKey?: string;
32
+ }
33
+ export interface TransactionCommon {
34
+ version: NEM.TxVersion;
35
+ timeStamp: number;
36
+ fee: number;
37
+ deadline: number;
38
+ signer?: string;
39
+ }
40
+ export declare type NEMTransferTransaction = TransactionCommon & {
41
+ type: NEM.TxType.TRANSFER;
42
+ recipient: string;
43
+ amount: PROTO.UintType;
44
+ mosaics?: NEMMosaic[];
45
+ message?: Message;
46
+ };
47
+ export declare type NEMImportanceTransaction = TransactionCommon & {
48
+ type: NEM.TxType.IMPORTANCE_TRANSFER;
49
+ importanceTransfer: {
50
+ mode: PROTO.NEMImportanceTransferMode;
51
+ publicKey: string;
52
+ };
53
+ };
54
+ export declare type NEMAggregateModificationTransaction = TransactionCommon & {
55
+ type: NEM.TxType.AGGREGATE_MODIFICATION;
56
+ modifications?: Modification[];
57
+ minCosignatories: {
58
+ relativeChange: number;
59
+ };
60
+ };
61
+ export declare type NEMProvisionNamespaceTransaction = TransactionCommon & {
62
+ type: NEM.TxType.PROVISION_NAMESPACE;
63
+ newPart: string;
64
+ parent?: string;
65
+ rentalFeeSink: string;
66
+ rentalFee: number;
67
+ };
68
+ export declare type NEMMosaicCreationTransaction = TransactionCommon & {
69
+ type: NEM.TxType.MOSAIC_CREATION;
70
+ mosaicDefinition: MosaicDefinition;
71
+ creationFeeSink: string;
72
+ creationFee: number;
73
+ };
74
+ export declare type NEMSupplyChangeTransaction = TransactionCommon & {
75
+ type: NEM.TxType.SUPPLY_CHANGE;
76
+ mosaicId: MosaicID;
77
+ supplyType: PROTO.NEMSupplyChangeType;
78
+ delta: number;
79
+ };
80
+ export declare type NEMRegularTransaction = NEMTransferTransaction | NEMImportanceTransaction | NEMAggregateModificationTransaction | NEMProvisionNamespaceTransaction | NEMMosaicCreationTransaction | NEMSupplyChangeTransaction;
81
+ export declare type NEMMultisigTransaction = TransactionCommon & {
82
+ type: NEM.TxType.COSIGNING | NEM.TxType.MULTISIG | NEM.TxType.MULTISIG_SIGNATURE;
83
+ otherTrans: NEMRegularTransaction;
84
+ };
85
+ export declare type NEMTransaction = NEMRegularTransaction | NEMMultisigTransaction;
86
+ export interface NEMSignTransaction {
87
+ path: string | number[];
88
+ transaction: NEMTransaction;
89
+ }
90
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -1,92 +1,5 @@
1
- import type { PROTO, NEM } from '../../constants';
1
+ import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- export interface MosaicID {
4
- namespaceId: string;
5
- name: string;
6
- }
7
- export interface MosaicDefinition {
8
- levy?: {
9
- type?: PROTO.NEMMosaicLevy;
10
- fee?: number;
11
- recipient?: string;
12
- mosaicId?: MosaicID;
13
- };
14
- id: MosaicID;
15
- description: string;
16
- properties?: {
17
- name: 'divisibility' | 'initialSupply' | 'supplyMutable' | 'transferable';
18
- value: string;
19
- }[];
20
- }
21
- export interface NEMMosaic {
22
- mosaicId: MosaicID;
23
- quantity: number;
24
- }
25
- export interface Modification {
26
- modificationType: PROTO.NEMModificationType;
27
- cosignatoryAccount: string;
28
- }
29
- export interface Message {
30
- payload?: string;
31
- type?: number;
32
- publicKey?: string;
33
- }
34
- export interface TransactionCommon {
35
- version: NEM.TxVersion;
36
- timeStamp: number;
37
- fee: number;
38
- deadline: number;
39
- signer?: string;
40
- }
41
- export declare type NEMTransferTransaction = TransactionCommon & {
42
- type: NEM.TxType.TRANSFER;
43
- recipient: string;
44
- amount: PROTO.UintType;
45
- mosaics?: NEMMosaic[];
46
- message?: Message;
47
- };
48
- export declare type NEMImportanceTransaction = TransactionCommon & {
49
- type: NEM.TxType.IMPORTANCE_TRANSFER;
50
- importanceTransfer: {
51
- mode: PROTO.NEMImportanceTransferMode;
52
- publicKey: string;
53
- };
54
- };
55
- export declare type NEMAggregateModificationTransaction = TransactionCommon & {
56
- type: NEM.TxType.AGGREGATE_MODIFICATION;
57
- modifications?: Modification[];
58
- minCosignatories: {
59
- relativeChange: number;
60
- };
61
- };
62
- export declare type NEMProvisionNamespaceTransaction = TransactionCommon & {
63
- type: NEM.TxType.PROVISION_NAMESPACE;
64
- newPart: string;
65
- parent?: string;
66
- rentalFeeSink: string;
67
- rentalFee: number;
68
- };
69
- export declare type NEMMosaicCreationTransaction = TransactionCommon & {
70
- type: NEM.TxType.MOSAIC_CREATION;
71
- mosaicDefinition: MosaicDefinition;
72
- creationFeeSink: string;
73
- creationFee: number;
74
- };
75
- export declare type NEMSupplyChangeTransaction = TransactionCommon & {
76
- type: NEM.TxType.SUPPLY_CHANGE;
77
- mosaicId: MosaicID;
78
- supplyType: PROTO.NEMSupplyChangeType;
79
- delta: number;
80
- };
81
- export declare type NEMRegularTransaction = NEMTransferTransaction | NEMImportanceTransaction | NEMAggregateModificationTransaction | NEMProvisionNamespaceTransaction | NEMMosaicCreationTransaction | NEMSupplyChangeTransaction;
82
- export declare type NEMMultisigTransaction = TransactionCommon & {
83
- type: NEM.TxType.COSIGNING | NEM.TxType.MULTISIG | NEM.TxType.MULTISIG_SIGNATURE;
84
- otherTrans: NEMRegularTransaction;
85
- };
86
- export declare type NEMTransaction = NEMRegularTransaction | NEMMultisigTransaction;
87
- export interface NEMSignTransaction {
88
- path: string | number[];
89
- transaction: NEMTransaction;
90
- }
3
+ import type { NEMSignTransaction } from './nem';
91
4
  export declare function nemSignTransaction(params: Params<NEMSignTransaction>): Response<PROTO.NEMSignedTx>;
92
5
  //# sourceMappingURL=nemSignTransaction.d.ts.map
@@ -0,0 +1,21 @@
1
+ export interface RipplePayment {
2
+ amount: string;
3
+ destination: string;
4
+ destinationTag?: number;
5
+ }
6
+ export interface RippleTransaction {
7
+ fee: string;
8
+ flags?: number;
9
+ sequence: number;
10
+ maxLedgerVersion?: number;
11
+ payment: RipplePayment;
12
+ }
13
+ export interface RippleSignTransaction {
14
+ path: string | number[];
15
+ transaction: RippleTransaction;
16
+ }
17
+ export interface RippleSignedTx {
18
+ serializedTx: string;
19
+ signature: string;
20
+ }
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -1,23 +1,4 @@
1
1
  import type { Params, Response } from '../params';
2
- export interface RipplePayment {
3
- amount: string;
4
- destination: string;
5
- destinationTag?: number;
6
- }
7
- export interface RippleTransaction {
8
- fee: string;
9
- flags?: number;
10
- sequence: number;
11
- maxLedgerVersion?: number;
12
- payment: RipplePayment;
13
- }
14
- export interface RippleSignTransaction {
15
- path: string | number[];
16
- transaction: RippleTransaction;
17
- }
18
- export interface RippleSignedTx {
19
- serializedTx: string;
20
- signature: string;
21
- }
2
+ import type { RippleSignTransaction, RippleSignedTx } from './ripple';
22
3
  export declare function rippleSignTransaction(params: Params<RippleSignTransaction>): Response<RippleSignedTx>;
23
4
  //# sourceMappingURL=rippleSignTransaction.d.ts.map
@@ -1,11 +1,5 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- export interface SignMessage {
4
- path: string | number[];
5
- coin: string;
6
- message: string;
7
- hex?: boolean;
8
- no_script_type?: boolean;
9
- }
3
+ import type { SignMessage } from './bitcoin';
10
4
  export declare function signMessage(params: Params<SignMessage>): Response<PROTO.MessageSignature>;
11
5
  //# sourceMappingURL=signMessage.d.ts.map
@@ -1,70 +1,4 @@
1
- import type { AccountAddresses } from '@trezor/blockchain-link';
2
- import type { PROTO } from '../../constants';
3
1
  import type { Params, Response } from '../params';
4
- export declare type RefTransaction = {
5
- hash: string;
6
- version: number;
7
- inputs: PROTO.PrevInput[];
8
- bin_outputs: PROTO.TxOutputBinType[];
9
- outputs?: typeof undefined;
10
- lock_time: number;
11
- extra_data?: string;
12
- expiry?: number;
13
- overwintered?: boolean;
14
- version_group_id?: number;
15
- timestamp?: number;
16
- branch_id?: number;
17
- } | {
18
- hash: string;
19
- version: number;
20
- inputs: PROTO.TxInput[];
21
- bin_outputs?: typeof undefined;
22
- outputs: PROTO.TxOutputType[];
23
- lock_time: number;
24
- extra_data?: string;
25
- expiry?: number;
26
- overwintered?: boolean;
27
- version_group_id?: number;
28
- timestamp?: number;
29
- branch_id?: number;
30
- };
31
- export interface TransactionOptions {
32
- version?: number;
33
- lock_time?: number;
34
- expiry?: number;
35
- overwintered?: boolean;
36
- version_group_id?: number;
37
- timestamp?: number;
38
- branch_id?: number;
39
- decred_staking_ticket?: boolean;
40
- amount_unit?: PROTO.AmountUnit;
41
- }
42
- export interface SignTransaction {
43
- inputs: PROTO.TxInputType[];
44
- outputs: PROTO.TxOutputType[];
45
- paymentRequests?: PROTO.TxAckPaymentRequest[];
46
- refTxs?: RefTransaction[];
47
- account?: {
48
- addresses: AccountAddresses;
49
- };
50
- coin: string;
51
- locktime?: number;
52
- timestamp?: number;
53
- version?: number;
54
- expiry?: number;
55
- overwintered?: boolean;
56
- versionGroupId?: number;
57
- branchId?: number;
58
- decredStakingTicket?: boolean;
59
- push?: boolean;
60
- preauthorized?: boolean;
61
- amountUnit?: PROTO.AmountUnit;
62
- }
63
- export declare type SignedTransaction = {
64
- signatures: string[];
65
- serializedTx: string;
66
- witnesses?: (string | undefined)[];
67
- txid?: string;
68
- };
2
+ import type { SignTransaction, SignedTransaction } from './bitcoin';
69
3
  export declare function signTransaction(params: Params<SignTransaction>): Response<SignedTransaction>;
70
4
  //# sourceMappingURL=signTransaction.d.ts.map