@trezor/connect 9.0.0-beta.5 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -14
- package/lib/api/binance/binanceSignTx.d.ts +1 -1
- package/lib/api/binanceSignTransaction.d.ts +1 -1
- package/lib/api/binanceSignTransaction.js +1 -1
- package/lib/api/bitcoin/Fees.js +1 -1
- package/lib/api/bitcoin/TransactionComposer.js +1 -1
- package/lib/api/bitcoin/enhanceSignTx.d.ts +1 -1
- package/lib/api/bitcoin/index.js +9 -9
- package/lib/api/bitcoin/refTx.d.ts +3 -3
- package/lib/api/bitcoin/signtx.d.ts +1 -1
- package/lib/api/bitcoin/signtxLegacy.d.ts +1 -1
- package/lib/api/cardano/cardanoAddressParameters.d.ts +1 -1
- package/lib/api/cardano/cardanoAuxiliaryData.d.ts +1 -1
- package/lib/api/cardano/cardanoCertificate.d.ts +1 -1
- package/lib/api/cardano/cardanoTokenBundle.d.ts +1 -1
- package/lib/api/cardanoGetAddress.d.ts +1 -1
- package/lib/api/cardanoGetNativeScriptHash.d.ts +1 -1
- package/lib/api/cardanoGetPublicKey.d.ts +1 -1
- package/lib/api/cardanoSignTransaction.d.ts +1 -1
- package/lib/api/common/Discovery.js +1 -1
- package/lib/api/common/paramsValidator.d.ts +1 -1
- package/lib/api/composeTransaction.d.ts +1 -1
- package/lib/api/composeTransaction.js +2 -2
- package/lib/api/eos/eosSignTx.d.ts +1 -1
- package/lib/api/eos/eosSignTx.js +1 -1
- package/lib/api/eosGetPublicKey.d.ts +1 -1
- package/lib/api/eosSignTransaction.js +1 -1
- package/lib/api/ethereum/__fixtures__/ethereumSignTypedData.js +1 -1
- package/lib/api/ethereum/ethereumSignTx.d.ts +3 -3
- package/lib/api/ethereum/ethereumSignTypedData.d.ts +1 -1
- package/lib/api/ethereum/ethereumSignTypedData.js +1 -1
- package/lib/api/ethereumSignTransaction.d.ts +1 -1
- package/lib/api/ethereumSignTransaction.js +1 -1
- package/lib/api/ethereumSignTypedData.d.ts +1 -1
- package/lib/api/firmware/calculateFirmwareHash.d.ts +1 -1
- package/lib/api/firmwareUpdate.js +1 -1
- package/lib/api/index.d.ts +0 -1
- package/lib/api/index.js +2 -4
- package/lib/api/nem/nemSignTx.d.ts +1 -1
- package/lib/api/nemSignTransaction.js +1 -1
- package/lib/api/signTransaction.d.ts +2 -2
- package/lib/api/signTransaction.js +1 -1
- package/lib/api/stellar/stellarSignTx.d.ts +1 -1
- package/lib/api/stellarSignTransaction.d.ts +1 -1
- package/lib/api/stellarSignTransaction.js +1 -1
- package/lib/api/tezos/tezosSignTx.d.ts +1 -1
- package/lib/api/tezos/tezosSignTx.js +1 -1
- package/lib/api/tezosSignTransaction.js +1 -1
- package/lib/backend/BlockchainLink.js +1 -1
- package/lib/constants/errors.d.ts +1 -2
- package/lib/constants/errors.js +0 -1
- package/lib/constants/index.js +5 -5
- package/lib/core/AbstractMethod.d.ts +0 -1
- package/lib/core/AbstractMethod.js +1 -2
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.js +1 -14
- package/lib/core/method.d.ts +1 -1
- package/lib/core/method.js +1 -1
- package/lib/data/DataManager.d.ts +2 -4
- package/lib/data/DataManager.js +4 -9
- package/lib/data/config.d.ts +1 -7
- package/lib/data/config.js +1 -9
- package/lib/data/connectSettings.d.ts +1 -1
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/AbortController.js +1 -1
- package/lib/device/DescriptorStream.js +1 -1
- package/lib/device/Device.js +1 -1
- package/lib/device/DeviceCommands.js +2 -2
- package/lib/device/DeviceList.d.ts +1 -5
- package/lib/device/DeviceList.js +8 -34
- package/lib/events/index.d.ts +0 -2
- package/lib/events/index.js +10 -10
- package/lib/events/ui-request.d.ts +1 -9
- package/lib/events/ui-request.js +0 -1
- package/lib/events/ui-response.d.ts +1 -10
- package/lib/events/ui-response.js +0 -1
- package/lib/exports.js +3 -3
- package/lib/factory.d.ts +1 -2
- package/lib/factory.js +1 -2
- package/lib/index-browser.js +1 -2
- package/lib/index.js +2 -35
- package/lib/types/api/binance/index.d.ts +29 -0
- package/lib/types/api/{customMessage.js → binance/index.js} +1 -1
- package/lib/types/api/binanceSignTransaction.d.ts +1 -27
- package/lib/types/api/bitcoin/index.d.ts +82 -0
- package/lib/types/api/bitcoin/index.js +3 -0
- package/lib/types/api/cardano/index.d.ts +193 -0
- package/lib/types/api/cardano/index.js +3 -0
- package/lib/types/api/cardanoGetAddress.d.ts +1 -31
- package/lib/types/api/cardanoGetNativeScriptHash.d.ts +1 -18
- package/lib/types/api/cardanoGetPublicKey.d.ts +1 -12
- package/lib/types/api/cardanoSignTransaction.d.ts +1 -135
- package/lib/types/api/eos/index.d.ts +119 -0
- package/lib/types/api/eos/index.js +3 -0
- package/lib/types/api/eosGetPublicKey.d.ts +1 -10
- package/lib/types/api/eosSignTransaction.d.ts +1 -107
- package/lib/types/api/ethereum/index.d.ts +86 -0
- package/lib/types/api/ethereum/index.js +3 -0
- package/lib/types/api/ethereumSignMessage.d.ts +1 -5
- package/lib/types/api/ethereumSignTransaction.d.ts +1 -37
- package/lib/types/api/ethereumSignTypedData.d.ts +1 -37
- package/lib/types/api/ethereumVerifyMessage.d.ts +1 -6
- package/lib/types/api/index.d.ts +0 -2
- package/lib/types/api/nem/index.d.ts +90 -0
- package/lib/types/api/nem/index.js +3 -0
- package/lib/types/api/nemSignTransaction.d.ts +2 -89
- package/lib/types/api/ripple/index.d.ts +21 -0
- package/lib/types/api/ripple/index.js +3 -0
- package/lib/types/api/rippleSignTransaction.d.ts +1 -20
- package/lib/types/api/signMessage.d.ts +1 -7
- package/lib/types/api/signTransaction.d.ts +1 -67
- package/lib/types/api/stellar/index.d.ts +180 -0
- package/lib/types/api/stellar/index.js +3 -0
- package/lib/types/api/stellarSignTransaction.d.ts +1 -179
- package/lib/types/api/tezos/index.d.ts +58 -0
- package/lib/types/api/tezos/index.js +3 -0
- package/lib/types/api/tezosSignTransaction.d.ts +1 -57
- package/lib/types/api/verifyMessage.d.ts +1 -7
- package/lib/types/index.d.ts +8 -4
- package/lib/types/index.js +15 -7
- package/lib/utils/__fixtures__/accountUtils.js +1 -1
- package/lib/utils/__fixtures__/ethereumUtils.js +1 -1
- package/lib/utils/__fixtures__/formatUtils.js +1 -1
- package/lib/utils/accountUtils.d.ts +2 -2
- package/lib/utils/assets-browser.js +1 -1
- package/lib/utils/assets.js +1 -1
- package/lib/utils/browserUtils.js +1 -1
- package/lib/utils/debug.d.ts +2 -2
- package/lib/utils/deviceFeaturesUtils.d.ts +1 -1
- package/lib/utils/deviceFeaturesUtils.js +1 -1
- package/lib/utils/ethereumUtils.d.ts +1 -1
- package/lib/utils/formatUtils.js +1 -1
- package/lib/utils/hdnodeUtils.d.ts +1 -1
- package/lib/utils/pathUtils.d.ts +2 -2
- package/lib/workers/workers-browser.js +5 -5
- package/lib/workers/workers-react-native.js +4 -4
- package/lib/workers/workers.js +4 -4
- package/package.json +14 -11
- package/lib/api/customMessage.d.ts +0 -13
- package/lib/api/customMessage.js +0 -56
- package/lib/types/api/customMessage.d.ts +0 -12
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { PROTO } from '../../../constants';
|
|
2
|
+
export interface EosGetPublicKey {
|
|
3
|
+
path: string | number[];
|
|
4
|
+
showOnTrezor?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface EosPublicKey {
|
|
7
|
+
wifPublicKey: string;
|
|
8
|
+
rawPublicKey: string;
|
|
9
|
+
path: number[];
|
|
10
|
+
serializedPath: string;
|
|
11
|
+
}
|
|
12
|
+
export interface EosTxHeader {
|
|
13
|
+
expiration: PROTO.UintType;
|
|
14
|
+
refBlockNum: number;
|
|
15
|
+
refBlockPrefix: number;
|
|
16
|
+
maxNetUsageWords: number;
|
|
17
|
+
maxCpuUsageMs: number;
|
|
18
|
+
delaySec: number;
|
|
19
|
+
}
|
|
20
|
+
export interface EosAuthorization {
|
|
21
|
+
threshold: number;
|
|
22
|
+
keys: PROTO.EosAuthorizationKey[];
|
|
23
|
+
accounts: {
|
|
24
|
+
permission: PROTO.EosPermissionLevel;
|
|
25
|
+
weight: number;
|
|
26
|
+
}[];
|
|
27
|
+
waits: PROTO.EosAuthorizationWait[];
|
|
28
|
+
}
|
|
29
|
+
export interface EosTxActionCommon {
|
|
30
|
+
account: string;
|
|
31
|
+
authorization: PROTO.EosPermissionLevel[];
|
|
32
|
+
}
|
|
33
|
+
export declare type EosTxAction = (EosTxActionCommon & {
|
|
34
|
+
name: 'transfer';
|
|
35
|
+
data: {
|
|
36
|
+
from: string;
|
|
37
|
+
to: string;
|
|
38
|
+
quantity: string;
|
|
39
|
+
memo: string;
|
|
40
|
+
};
|
|
41
|
+
}) | (EosTxActionCommon & {
|
|
42
|
+
name: 'delegatebw';
|
|
43
|
+
data: {
|
|
44
|
+
from: string;
|
|
45
|
+
receiver: string;
|
|
46
|
+
stake_net_quantity: string;
|
|
47
|
+
stake_cpu_quantity: string;
|
|
48
|
+
transfer: boolean;
|
|
49
|
+
};
|
|
50
|
+
}) | (EosTxActionCommon & {
|
|
51
|
+
name: 'undelegatebw';
|
|
52
|
+
data: {
|
|
53
|
+
from: string;
|
|
54
|
+
receiver: string;
|
|
55
|
+
unstake_net_quantity: string;
|
|
56
|
+
unstake_cpu_quantity: string;
|
|
57
|
+
};
|
|
58
|
+
}) | (EosTxActionCommon & {
|
|
59
|
+
name: 'buyram';
|
|
60
|
+
data: {
|
|
61
|
+
payer: string;
|
|
62
|
+
receiver: string;
|
|
63
|
+
quant: string;
|
|
64
|
+
};
|
|
65
|
+
}) | (EosTxActionCommon & {
|
|
66
|
+
name: 'buyrambytes';
|
|
67
|
+
data: PROTO.EosActionBuyRamBytes;
|
|
68
|
+
}) | (EosTxActionCommon & {
|
|
69
|
+
name: 'sellram';
|
|
70
|
+
data: PROTO.EosActionSellRam;
|
|
71
|
+
}) | (EosTxActionCommon & {
|
|
72
|
+
name: 'voteproducer';
|
|
73
|
+
data: {
|
|
74
|
+
voter: string;
|
|
75
|
+
proxy: string;
|
|
76
|
+
producers: string[];
|
|
77
|
+
};
|
|
78
|
+
}) | (EosTxActionCommon & {
|
|
79
|
+
name: 'refund';
|
|
80
|
+
data: PROTO.EosActionRefund;
|
|
81
|
+
}) | (EosTxActionCommon & {
|
|
82
|
+
name: 'updateauth';
|
|
83
|
+
data: {
|
|
84
|
+
account: string;
|
|
85
|
+
permission: string;
|
|
86
|
+
parent: string;
|
|
87
|
+
auth: EosAuthorization;
|
|
88
|
+
};
|
|
89
|
+
}) | (EosTxActionCommon & {
|
|
90
|
+
name: 'deleteauth';
|
|
91
|
+
data: PROTO.EosActionDeleteAuth;
|
|
92
|
+
}) | (EosTxActionCommon & {
|
|
93
|
+
name: 'linkauth';
|
|
94
|
+
data: PROTO.EosActionLinkAuth;
|
|
95
|
+
}) | (EosTxActionCommon & {
|
|
96
|
+
name: 'unlinkauth';
|
|
97
|
+
data: PROTO.EosActionUnlinkAuth;
|
|
98
|
+
}) | (EosTxActionCommon & {
|
|
99
|
+
name: 'newaccount';
|
|
100
|
+
data: {
|
|
101
|
+
creator: string;
|
|
102
|
+
name: string;
|
|
103
|
+
owner: EosAuthorization;
|
|
104
|
+
active: EosAuthorization;
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
export interface EosSDKTransaction {
|
|
108
|
+
chainId: string;
|
|
109
|
+
header: EosTxHeader;
|
|
110
|
+
actions: Array<EosTxAction | (EosTxActionCommon & {
|
|
111
|
+
name: string;
|
|
112
|
+
data: string;
|
|
113
|
+
})>;
|
|
114
|
+
}
|
|
115
|
+
export interface EosSignTransaction {
|
|
116
|
+
path: string | number[];
|
|
117
|
+
transaction: EosSDKTransaction;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import type { Params, BundledParams, Response } from '../params';
|
|
2
|
-
|
|
3
|
-
path: string | number[];
|
|
4
|
-
showOnTrezor?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface EosPublicKey {
|
|
7
|
-
wifPublicKey: string;
|
|
8
|
-
rawPublicKey: string;
|
|
9
|
-
path: number[];
|
|
10
|
-
serializedPath: string;
|
|
11
|
-
}
|
|
2
|
+
import { EosGetPublicKey, EosPublicKey } from './eos';
|
|
12
3
|
export declare function eosGetPublicKey(params: Params<EosGetPublicKey>): Response<EosPublicKey>;
|
|
13
4
|
export declare function eosGetPublicKey(params: BundledParams<EosGetPublicKey>): Response<EosPublicKey[]>;
|
|
14
5
|
//# sourceMappingURL=eosGetPublicKey.d.ts.map
|
|
@@ -1,111 +1,5 @@
|
|
|
1
1
|
import type { PROTO } from '../../constants';
|
|
2
2
|
import type { Params, Response } from '../params';
|
|
3
|
-
|
|
4
|
-
expiration: PROTO.UintType;
|
|
5
|
-
refBlockNum: number;
|
|
6
|
-
refBlockPrefix: number;
|
|
7
|
-
maxNetUsageWords: number;
|
|
8
|
-
maxCpuUsageMs: number;
|
|
9
|
-
delaySec: number;
|
|
10
|
-
}
|
|
11
|
-
export interface EosAuthorization {
|
|
12
|
-
threshold: number;
|
|
13
|
-
keys: PROTO.EosAuthorizationKey[];
|
|
14
|
-
accounts: {
|
|
15
|
-
permission: PROTO.EosPermissionLevel;
|
|
16
|
-
weight: number;
|
|
17
|
-
}[];
|
|
18
|
-
waits: PROTO.EosAuthorizationWait[];
|
|
19
|
-
}
|
|
20
|
-
export interface EosTxActionCommon {
|
|
21
|
-
account: string;
|
|
22
|
-
authorization: PROTO.EosPermissionLevel[];
|
|
23
|
-
}
|
|
24
|
-
export declare type EosTxAction = (EosTxActionCommon & {
|
|
25
|
-
name: 'transfer';
|
|
26
|
-
data: {
|
|
27
|
-
from: string;
|
|
28
|
-
to: string;
|
|
29
|
-
quantity: string;
|
|
30
|
-
memo: string;
|
|
31
|
-
};
|
|
32
|
-
}) | (EosTxActionCommon & {
|
|
33
|
-
name: 'delegatebw';
|
|
34
|
-
data: {
|
|
35
|
-
from: string;
|
|
36
|
-
receiver: string;
|
|
37
|
-
stake_net_quantity: string;
|
|
38
|
-
stake_cpu_quantity: string;
|
|
39
|
-
transfer: boolean;
|
|
40
|
-
};
|
|
41
|
-
}) | (EosTxActionCommon & {
|
|
42
|
-
name: 'undelegatebw';
|
|
43
|
-
data: {
|
|
44
|
-
from: string;
|
|
45
|
-
receiver: string;
|
|
46
|
-
unstake_net_quantity: string;
|
|
47
|
-
unstake_cpu_quantity: string;
|
|
48
|
-
};
|
|
49
|
-
}) | (EosTxActionCommon & {
|
|
50
|
-
name: 'buyram';
|
|
51
|
-
data: {
|
|
52
|
-
payer: string;
|
|
53
|
-
receiver: string;
|
|
54
|
-
quant: string;
|
|
55
|
-
};
|
|
56
|
-
}) | (EosTxActionCommon & {
|
|
57
|
-
name: 'buyrambytes';
|
|
58
|
-
data: PROTO.EosActionBuyRamBytes;
|
|
59
|
-
}) | (EosTxActionCommon & {
|
|
60
|
-
name: 'sellram';
|
|
61
|
-
data: PROTO.EosActionSellRam;
|
|
62
|
-
}) | (EosTxActionCommon & {
|
|
63
|
-
name: 'voteproducer';
|
|
64
|
-
data: {
|
|
65
|
-
voter: string;
|
|
66
|
-
proxy: string;
|
|
67
|
-
producers: string[];
|
|
68
|
-
};
|
|
69
|
-
}) | (EosTxActionCommon & {
|
|
70
|
-
name: 'refund';
|
|
71
|
-
data: PROTO.EosActionRefund;
|
|
72
|
-
}) | (EosTxActionCommon & {
|
|
73
|
-
name: 'updateauth';
|
|
74
|
-
data: {
|
|
75
|
-
account: string;
|
|
76
|
-
permission: string;
|
|
77
|
-
parent: string;
|
|
78
|
-
auth: EosAuthorization;
|
|
79
|
-
};
|
|
80
|
-
}) | (EosTxActionCommon & {
|
|
81
|
-
name: 'deleteauth';
|
|
82
|
-
data: PROTO.EosActionDeleteAuth;
|
|
83
|
-
}) | (EosTxActionCommon & {
|
|
84
|
-
name: 'linkauth';
|
|
85
|
-
data: PROTO.EosActionLinkAuth;
|
|
86
|
-
}) | (EosTxActionCommon & {
|
|
87
|
-
name: 'unlinkauth';
|
|
88
|
-
data: PROTO.EosActionUnlinkAuth;
|
|
89
|
-
}) | (EosTxActionCommon & {
|
|
90
|
-
name: 'newaccount';
|
|
91
|
-
data: {
|
|
92
|
-
creator: string;
|
|
93
|
-
name: string;
|
|
94
|
-
owner: EosAuthorization;
|
|
95
|
-
active: EosAuthorization;
|
|
96
|
-
};
|
|
97
|
-
});
|
|
98
|
-
export interface EosSDKTransaction {
|
|
99
|
-
chainId: string;
|
|
100
|
-
header: EosTxHeader;
|
|
101
|
-
actions: Array<EosTxAction | (EosTxActionCommon & {
|
|
102
|
-
name: string;
|
|
103
|
-
data: string;
|
|
104
|
-
})>;
|
|
105
|
-
}
|
|
106
|
-
export interface EosSignTransaction {
|
|
107
|
-
path: string | number[];
|
|
108
|
-
transaction: EosSDKTransaction;
|
|
109
|
-
}
|
|
3
|
+
import type { EosSignTransaction } from './eos';
|
|
110
4
|
export declare function eosSignTransaction(params: Params<EosSignTransaction>): Response<PROTO.EosSignedTx>;
|
|
111
5
|
//# sourceMappingURL=eosSignTransaction.d.ts.map
|
|
@@ -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
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { PROTO } from '../../constants';
|
|
2
2
|
import type { Params, Response } from '../params';
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
package/lib/types/api/index.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ import { cardanoSignTransaction } from './cardanoSignTransaction';
|
|
|
24
24
|
import { changePin } from './changePin';
|
|
25
25
|
import { cipherKeyValue } from './cipherKeyValue';
|
|
26
26
|
import { composeTransaction } from './composeTransaction';
|
|
27
|
-
import { customMessage } from './customMessage';
|
|
28
27
|
import { disableWebUSB } from './disableWebUSB';
|
|
29
28
|
import { dispose } from './dispose';
|
|
30
29
|
import { eosGetPublicKey } from './eosGetPublicKey';
|
|
@@ -99,7 +98,6 @@ export interface TrezorConnect {
|
|
|
99
98
|
changePin: typeof changePin;
|
|
100
99
|
cipherKeyValue: typeof cipherKeyValue;
|
|
101
100
|
composeTransaction: typeof composeTransaction;
|
|
102
|
-
customMessage: typeof customMessage;
|
|
103
101
|
disableWebUSB: typeof disableWebUSB;
|
|
104
102
|
dispose: typeof dispose;
|
|
105
103
|
eosGetPublicKey: typeof eosGetPublicKey;
|
|
@@ -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
|
|
@@ -1,92 +1,5 @@
|
|
|
1
|
-
import type { PROTO
|
|
1
|
+
import type { PROTO } from '../../constants';
|
|
2
2
|
import type { Params, Response } from '../params';
|
|
3
|
-
|
|
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
|