@trezor/connect 9.4.3-beta.1 → 9.4.3-beta.2
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/CHANGELOG.md +43 -4
- package/README.md +1 -1
- package/lib/api/applyFlags.js +1 -1
- package/lib/api/applySettings.js +1 -1
- package/lib/api/authenticateDevice.js +1 -1
- package/lib/api/authorizeCoinjoin.js +1 -1
- package/lib/api/backupDevice.js +1 -1
- package/lib/api/binance/api/binanceGetAddress.js +2 -1
- package/lib/api/binance/api/binanceGetPublicKey.js +2 -1
- package/lib/api/binance/api/binanceSignTransaction.js +2 -1
- package/lib/api/binance/binanceSignTx.js +1 -1
- package/lib/api/bitcoin/Fees.js +2 -2
- package/lib/api/bitcoin/TransactionComposer.d.ts +3 -3
- package/lib/api/bitcoin/TransactionComposer.js +2 -2
- package/lib/api/bitcoin/refTx.js +1 -1
- package/lib/api/blockchainDisconnect.js +1 -1
- package/lib/api/blockchainEvmRpcCall.d.ts +16 -0
- package/lib/api/blockchainEvmRpcCall.js +45 -0
- package/lib/api/cancelCoinjoinAuthorization.js +1 -1
- package/lib/api/cardano/api/cardanoGetAddress.js +2 -1
- package/lib/api/cardano/api/cardanoGetNativeScriptHash.js +2 -1
- package/lib/api/cardano/api/cardanoGetPublicKey.js +2 -1
- package/lib/api/cardano/api/cardanoSignTransaction.js +2 -1
- package/lib/api/cardano/cardanoAddressParameters.js +1 -1
- package/lib/api/cardano/cardanoAuxiliaryData.js +1 -1
- package/lib/api/cardano/cardanoCertificate.js +1 -1
- package/lib/api/cardano/cardanoInputs.d.ts +8 -8
- package/lib/api/cardano/cardanoInputs.js +1 -1
- package/lib/api/cardano/cardanoOutputs.d.ts +22 -22
- package/lib/api/cardano/cardanoOutputs.js +1 -1
- package/lib/api/cardano/cardanoTokenBundle.d.ts +6 -6
- package/lib/api/cardano/cardanoTokenBundle.js +1 -1
- package/lib/api/changeLanguage.js +1 -1
- package/lib/api/changePin.js +1 -1
- package/lib/api/cipherKeyValue.js +1 -1
- package/lib/api/common/paramsValidator.js +1 -1
- package/lib/api/composeTransaction.d.ts +9 -3
- package/lib/api/composeTransaction.js +7 -4
- package/lib/api/eos/api/eosGetPublicKey.js +2 -1
- package/lib/api/eos/api/eosSignTransaction.js +2 -1
- package/lib/api/eos/eosSignTx.d.ts +3 -3
- package/lib/api/ethereum/api/ethereumGetAddress.js +2 -1
- package/lib/api/ethereum/api/ethereumGetPublicKey.js +2 -1
- package/lib/api/ethereum/api/ethereumSignMessage.d.ts +1 -1
- package/lib/api/ethereum/api/ethereumSignMessage.js +2 -1
- package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +1 -1
- package/lib/api/ethereum/api/ethereumSignTransaction.js +13 -7
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +58 -57
- package/lib/api/ethereum/api/ethereumSignTypedData.js +3 -2
- package/lib/api/ethereum/api/ethereumVerifyMessage.js +2 -1
- package/lib/api/ethereum/ethereumDefinitions.d.ts +21 -21
- package/lib/api/ethereum/ethereumDefinitions.js +6 -5
- package/lib/api/firmware/getBinary.js +1 -1
- package/lib/api/firmware/x509certificate.js +3 -5
- package/lib/api/getAccountDescriptor.js +1 -1
- package/lib/api/getAddress.js +1 -1
- package/lib/api/getCoinInfo.d.ts +3 -0
- package/lib/api/getCoinInfo.js +1 -1
- package/lib/api/getFirmwareHash.js +1 -1
- package/lib/api/getOwnershipId.js +1 -1
- package/lib/api/getOwnershipProof.js +1 -1
- package/lib/api/getPublicKey.js +1 -1
- package/lib/api/index.d.ts +2 -1
- package/lib/api/index.js +5 -3
- package/lib/api/loadDevice.d.ts +14 -0
- package/lib/api/loadDevice.js +44 -0
- package/lib/api/nem/api/nemGetAddress.js +2 -1
- package/lib/api/nem/api/nemSignTransaction.js +2 -1
- package/lib/api/pushTransaction.js +1 -1
- package/lib/api/rebootToBootloader.js +1 -1
- package/lib/api/recoveryDevice.js +1 -1
- package/lib/api/requestLogin.js +1 -1
- package/lib/api/resetDevice.js +1 -1
- package/lib/api/ripple/api/rippleGetAddress.js +2 -1
- package/lib/api/ripple/api/rippleSignTransaction.js +2 -1
- package/lib/api/setBrightness.js +1 -1
- package/lib/api/setBusy.js +1 -1
- package/lib/api/signMessage.js +1 -1
- package/lib/api/solana/api/solanaGetAddress.js +2 -1
- package/lib/api/solana/api/solanaGetPublicKey.js +2 -1
- package/lib/api/solana/api/solanaSignTransaction.js +2 -1
- package/lib/api/stellar/api/stellarGetAddress.js +2 -1
- package/lib/api/stellar/api/stellarSignTransaction.js +2 -1
- package/lib/api/stellar/stellarSignTx.js +1 -1
- package/lib/api/tezos/api/tezosGetAddress.js +2 -1
- package/lib/api/tezos/api/tezosGetPublicKey.js +2 -1
- package/lib/api/tezos/api/tezosSignTransaction.js +2 -1
- package/lib/api/tezos/tezosSignTx.js +1 -1
- package/lib/api/unlockPath.js +1 -1
- package/lib/api/verifyMessage.js +1 -1
- package/lib/backend/Blockchain.d.ts +3 -0
- package/lib/backend/Blockchain.js +3 -0
- package/lib/constants/errors.d.ts +3 -0
- package/lib/constants/errors.js +3 -0
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/index.js +3 -1
- package/lib/constants/nem.d.ts +3 -3
- package/lib/constants/utxo.d.ts +3 -0
- package/lib/constants/utxo.js +5 -0
- package/lib/core/AbstractMethod.d.ts +13 -5
- package/lib/core/AbstractMethod.js +50 -24
- package/lib/core/index.js +41 -30
- package/lib/core/onCallFirmwareUpdate.d.ts +2 -2
- package/lib/core/onCallFirmwareUpdate.js +5 -5
- package/lib/data/DataManager.d.ts +0 -181
- package/lib/data/DataManager.js +40 -6
- package/lib/data/analyticsInfo.js +2 -1
- package/lib/data/coinInfo.d.ts +14 -0
- package/lib/data/config.d.ts +20 -22
- package/lib/data/config.js +15 -40
- package/lib/data/connectSettings.js +5 -4
- package/lib/data/deviceAuthenticityConfig.js +17 -0
- package/lib/data/deviceAuthenticityConfigTypes.d.ts +32 -23
- package/lib/data/firmwareInfo.d.ts +1 -1
- package/lib/data/models.d.ts +9 -0
- package/lib/data/models.js +9 -0
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +143 -36
- package/lib/device/Device.js +226 -119
- package/lib/device/DeviceCommands.js +4 -4
- package/lib/device/DeviceList.d.ts +13 -21
- package/lib/device/DeviceList.js +54 -168
- package/lib/device/prompts.js +3 -2
- package/lib/device/resolveDescriptorForTaproot.d.ts +1 -1
- package/lib/events/call.d.ts +5 -5
- package/lib/events/call.js +2 -2
- package/lib/events/device.d.ts +0 -6
- package/lib/events/device.js +0 -6
- package/lib/events/transport.d.ts +1 -1
- package/lib/factory.d.ts +6 -6
- package/lib/factory.js +132 -136
- package/lib/impl/dynamic.d.ts +13 -19
- package/lib/impl/dynamic.js +0 -9
- package/lib/index-browser.d.ts +3 -1
- package/lib/index-browser.js +0 -3
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -13
- package/lib/types/api/applySettings.d.ts +13 -13
- package/lib/types/api/authenticateDevice.d.ts +33 -24
- package/lib/types/api/authorizeCoinjoin.d.ts +10 -10
- package/lib/types/api/binance/index.d.ts +143 -143
- package/lib/types/api/binance/index.js +1 -1
- package/lib/types/api/bitcoin/index.d.ts +11 -11
- package/lib/types/api/bitcoin/index.js +1 -1
- package/lib/types/api/blockchainEvmRpcCall.d.ts +4 -0
- package/lib/types/api/{checkFirmwareAuthenticity.js → blockchainEvmRpcCall.js} +1 -1
- package/lib/types/api/cancelCoinjoinAuthorization.d.ts +1 -1
- package/lib/types/api/cardano/index.d.ts +507 -507
- package/lib/types/api/changeLanguage.d.ts +6 -6
- package/lib/types/api/cipherKeyValue.d.ts +8 -8
- package/lib/types/api/cipherKeyValue.js +1 -1
- package/lib/types/api/composeTransaction.d.ts +13 -7
- package/lib/types/api/eos/index.d.ts +525 -525
- package/lib/types/api/eos/index.js +1 -1
- package/lib/types/api/ethereum/index.d.ts +100 -100
- package/lib/types/api/firmwareUpdate.d.ts +5 -5
- package/lib/types/api/getAccountDescriptor.d.ts +4 -4
- package/lib/types/api/getAddress.d.ts +32 -32
- package/lib/types/api/getOwnershipId.d.ts +24 -24
- package/lib/types/api/getOwnershipProof.d.ts +28 -28
- package/lib/types/api/getPublicKey.d.ts +24 -24
- package/lib/types/api/getPublicKey.js +1 -1
- package/lib/types/api/index.d.ts +4 -8
- package/lib/types/api/init.d.ts +4 -2
- package/lib/types/api/loadDevice.d.ts +4 -0
- package/lib/types/api/loadDevice.js +3 -0
- package/lib/types/api/nem/index.d.ts +612 -612
- package/lib/types/api/nem/index.js +1 -1
- package/lib/types/api/nemGetAddress.d.ts +6 -6
- package/lib/types/api/pushTransaction.d.ts +3 -3
- package/lib/types/api/recoveryDevice.d.ts +9 -9
- package/lib/types/api/requestLogin.d.ts +25 -25
- package/lib/types/api/ripple/index.d.ts +21 -21
- package/lib/types/api/ripple/index.js +1 -1
- package/lib/types/api/solana/index.d.ts +23 -23
- package/lib/types/api/solana/index.js +1 -1
- package/lib/types/api/stellar/index.d.ts +582 -582
- package/lib/types/api/stellar/index.js +1 -1
- package/lib/types/api/tezos/index.d.ts +120 -120
- package/lib/types/api/tezos/index.js +1 -1
- package/lib/types/api/unlockPath.d.ts +2 -2
- package/lib/types/coinInfo.d.ts +231 -224
- package/lib/types/device.d.ts +13 -1
- package/lib/types/device.js +3 -1
- package/lib/types/fees.d.ts +19 -19
- package/lib/types/firmware.d.ts +1 -1
- package/lib/types/params.d.ts +21 -18
- package/lib/types/settings.d.ts +15 -9
- package/lib/types/utils.d.ts +1 -0
- package/lib/types/utils.js +3 -0
- package/lib/utils/addressUtils.js +2 -2
- package/lib/utils/assetUtils.js +3 -3
- package/lib/utils/deviceFeaturesUtils.js +1 -1
- package/lib/utils/uiPromiseManager.d.ts +2 -1
- package/lib/utils/uiPromiseManager.js +3 -3
- package/package.json +12 -12
- package/lib/api/checkFirmwareAuthenticity.d.ts +0 -11
- package/lib/api/checkFirmwareAuthenticity.js +0 -63
- package/lib/types/api/checkFirmwareAuthenticity.d.ts +0 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessagesSchema } from '@trezor/protobuf';
|
|
2
|
-
import { EthereumNetworkInfo } from '../../types';
|
|
3
2
|
import { Static } from '@trezor/schema-utils';
|
|
3
|
+
import { EthereumNetworkInfo } from '../../types';
|
|
4
4
|
interface GetEthereumDefinitions {
|
|
5
5
|
chainId?: number;
|
|
6
6
|
slip44?: number;
|
|
@@ -12,33 +12,33 @@ export declare const getEthereumDefinitions: ({ chainId, slip44, contractAddress
|
|
|
12
12
|
}>;
|
|
13
13
|
export type EthereumNetworkDefinitionDecoded = Static<typeof EthereumNetworkDefinitionDecoded>;
|
|
14
14
|
export declare const EthereumNetworkDefinitionDecoded: import("@trezor/schema-utils").TObject<{
|
|
15
|
-
chain_id: import("@
|
|
16
|
-
name: import("@
|
|
17
|
-
slip44: import("@
|
|
18
|
-
symbol: import("@
|
|
15
|
+
chain_id: import("@trezor/schema-utils").TNumber;
|
|
16
|
+
name: import("@trezor/schema-utils").TString;
|
|
17
|
+
slip44: import("@trezor/schema-utils").TNumber;
|
|
18
|
+
symbol: import("@trezor/schema-utils").TString;
|
|
19
19
|
}>;
|
|
20
20
|
export type EthereumTokenDefinitionDecoded = Static<typeof EthereumTokenDefinitionDecoded>;
|
|
21
21
|
export declare const EthereumTokenDefinitionDecoded: import("@trezor/schema-utils").TObject<{
|
|
22
|
-
address: import("@
|
|
23
|
-
chain_id: import("@
|
|
24
|
-
decimals: import("@
|
|
25
|
-
name: import("@
|
|
26
|
-
symbol: import("@
|
|
22
|
+
address: import("@trezor/schema-utils").TString;
|
|
23
|
+
chain_id: import("@trezor/schema-utils").TNumber;
|
|
24
|
+
decimals: import("@trezor/schema-utils").TNumber;
|
|
25
|
+
name: import("@trezor/schema-utils").TString;
|
|
26
|
+
symbol: import("@trezor/schema-utils").TString;
|
|
27
27
|
}>;
|
|
28
28
|
export type EthereumDefinitionDecoded = Static<typeof EthereumDefinitionDecoded>;
|
|
29
29
|
export declare const EthereumDefinitionDecoded: import("@trezor/schema-utils").TObject<{
|
|
30
|
-
network: import("@
|
|
31
|
-
chain_id: import("@
|
|
32
|
-
name: import("@
|
|
33
|
-
slip44: import("@
|
|
34
|
-
symbol: import("@
|
|
30
|
+
network: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
31
|
+
chain_id: import("@trezor/schema-utils").TNumber;
|
|
32
|
+
name: import("@trezor/schema-utils").TString;
|
|
33
|
+
slip44: import("@trezor/schema-utils").TNumber;
|
|
34
|
+
symbol: import("@trezor/schema-utils").TString;
|
|
35
35
|
}>>;
|
|
36
|
-
token: import("@
|
|
37
|
-
address: import("@
|
|
38
|
-
chain_id: import("@
|
|
39
|
-
decimals: import("@
|
|
40
|
-
name: import("@
|
|
41
|
-
symbol: import("@
|
|
36
|
+
token: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
37
|
+
address: import("@trezor/schema-utils").TString;
|
|
38
|
+
chain_id: import("@trezor/schema-utils").TNumber;
|
|
39
|
+
decimals: import("@trezor/schema-utils").TNumber;
|
|
40
|
+
name: import("@trezor/schema-utils").TString;
|
|
41
|
+
symbol: import("@trezor/schema-utils").TString;
|
|
42
42
|
}>>;
|
|
43
43
|
}>;
|
|
44
44
|
export declare const decodeEthereumDefinition: (encodedDefinition: MessagesSchema.EthereumDefinitions) => EthereumDefinitionDecoded;
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ethereumNetworkInfoFromDefinition = exports.decodeEthereumDefinition = exports.EthereumDefinitionDecoded = exports.EthereumTokenDefinitionDecoded = exports.EthereumNetworkDefinitionDecoded = exports.getEthereumDefinitions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const cross_fetch_1 = tslib_1.__importDefault(require("cross-fetch"));
|
|
6
|
-
const protocol_1 = require("@trezor/protocol");
|
|
7
6
|
const protobuf_1 = require("@trezor/protobuf");
|
|
7
|
+
const protocol_1 = require("@trezor/protocol");
|
|
8
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
8
9
|
const DataManager_1 = require("../../data/DataManager");
|
|
9
10
|
const coinInfo_1 = require("../../data/coinInfo");
|
|
10
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
11
11
|
const getEthereumDefinitions = async ({ chainId, slip44, contractAddress, }) => {
|
|
12
12
|
const definitions = {};
|
|
13
13
|
if (!chainId && !slip44) {
|
|
@@ -101,9 +101,10 @@ const ethereumNetworkInfoFromDefinition = (definition) => ({
|
|
|
101
101
|
connect: true,
|
|
102
102
|
T1B1: '1.6.2',
|
|
103
103
|
T2T1: '2.0.7',
|
|
104
|
-
T2B1: '2.
|
|
105
|
-
T3B1: '2.
|
|
106
|
-
T3T1: '2.
|
|
104
|
+
T2B1: '2.0.0',
|
|
105
|
+
T3B1: '2.0.0',
|
|
106
|
+
T3T1: '2.0.0',
|
|
107
|
+
T3W1: '2.0.0',
|
|
107
108
|
},
|
|
108
109
|
blockchainLink: undefined,
|
|
109
110
|
});
|
|
@@ -40,11 +40,9 @@ const derToAsn1 = (byteArray) => {
|
|
|
40
40
|
if (byteArray[position] === 0x80) {
|
|
41
41
|
throw new Error('Unsupported length encoding');
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
byteLength = position + length;
|
|
47
|
-
contents = byteArray.subarray(position, byteLength);
|
|
43
|
+
const length = getLength();
|
|
44
|
+
const byteLength = position + length;
|
|
45
|
+
const contents = byteArray.subarray(position, byteLength);
|
|
48
46
|
const raw = byteArray.subarray(0, byteLength);
|
|
49
47
|
return {
|
|
50
48
|
cls,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
5
6
|
const pathUtils_1 = require("../utils/pathUtils");
|
|
@@ -9,7 +10,6 @@ const constants_1 = require("../constants");
|
|
|
9
10
|
const events_1 = require("../events");
|
|
10
11
|
const types_1 = require("../types");
|
|
11
12
|
const getAccountDescriptor_1 = require("../types/api/getAccountDescriptor");
|
|
12
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
13
13
|
class GetAccountDescriptor extends AbstractMethod_1.AbstractMethod {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
package/lib/api/getAddress.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
5
6
|
const pathUtils_1 = require("../utils/pathUtils");
|
|
@@ -7,7 +8,6 @@ const coinInfo_1 = require("../data/coinInfo");
|
|
|
7
8
|
const constants_1 = require("../constants");
|
|
8
9
|
const events_1 = require("../events");
|
|
9
10
|
const types_1 = require("../types");
|
|
10
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
11
11
|
const getAddress_1 = require("../types/api/getAddress");
|
|
12
12
|
class GetAddress extends AbstractMethod_1.AbstractMethod {
|
|
13
13
|
constructor() {
|
package/lib/api/getCoinInfo.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export default class GetCoinInfo extends AbstractMethod<'getCoinInfo', Params> {
|
|
|
23
23
|
T2B1: string | false;
|
|
24
24
|
T3B1: string | false;
|
|
25
25
|
T3T1: string | false;
|
|
26
|
+
T3W1: string | false;
|
|
26
27
|
connect: boolean;
|
|
27
28
|
};
|
|
28
29
|
decimals: number;
|
|
@@ -80,6 +81,7 @@ export default class GetCoinInfo extends AbstractMethod<'getCoinInfo', Params> {
|
|
|
80
81
|
T2B1: string | false;
|
|
81
82
|
T3B1: string | false;
|
|
82
83
|
T3T1: string | false;
|
|
84
|
+
T3W1: string | false;
|
|
83
85
|
connect: boolean;
|
|
84
86
|
};
|
|
85
87
|
decimals: number;
|
|
@@ -112,6 +114,7 @@ export default class GetCoinInfo extends AbstractMethod<'getCoinInfo', Params> {
|
|
|
112
114
|
T2B1: string | false;
|
|
113
115
|
T3B1: string | false;
|
|
114
116
|
T3T1: string | false;
|
|
117
|
+
T3W1: string | false;
|
|
115
118
|
connect: boolean;
|
|
116
119
|
};
|
|
117
120
|
decimals: number;
|
package/lib/api/getCoinInfo.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const constants_1 = require("../constants");
|
|
5
6
|
const coinInfo_1 = require("../data/coinInfo");
|
|
6
7
|
const types_1 = require("../types");
|
|
7
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
8
8
|
class GetCoinInfo extends AbstractMethod_1.AbstractMethod {
|
|
9
9
|
init() {
|
|
10
10
|
this.requiredPermissions = [];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const constants_1 = require("../constants");
|
|
5
6
|
const events_1 = require("../events");
|
|
6
7
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
7
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
8
8
|
class GetFirmwareHash extends AbstractMethod_1.AbstractMethod {
|
|
9
9
|
init() {
|
|
10
10
|
this.requiredPermissions = ['management'];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
5
6
|
const pathUtils_1 = require("../utils/pathUtils");
|
|
6
7
|
const coinInfo_1 = require("../data/coinInfo");
|
|
7
8
|
const events_1 = require("../events");
|
|
8
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
9
9
|
const exports_1 = require("../exports");
|
|
10
10
|
const getOwnershipId_1 = require("../types/api/getOwnershipId");
|
|
11
11
|
class GetOwnershipId extends AbstractMethod_1.AbstractMethod {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
5
6
|
const pathUtils_1 = require("../utils/pathUtils");
|
|
6
7
|
const coinInfo_1 = require("../data/coinInfo");
|
|
7
8
|
const events_1 = require("../events");
|
|
8
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
9
9
|
const exports_1 = require("../exports");
|
|
10
10
|
const getOwnershipProof_1 = require("../types/api/getOwnershipProof");
|
|
11
11
|
class GetOwnershipProof extends AbstractMethod_1.AbstractMethod {
|
package/lib/api/getPublicKey.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
5
6
|
const pathUtils_1 = require("../utils/pathUtils");
|
|
6
7
|
const events_1 = require("../events");
|
|
7
8
|
const coinInfo_1 = require("../data/coinInfo");
|
|
8
9
|
const accountUtils_1 = require("../utils/accountUtils");
|
|
9
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
10
10
|
const types_1 = require("../types");
|
|
11
11
|
const getPublicKey_1 = require("../types/api/getPublicKey");
|
|
12
12
|
class GetPublicKey extends AbstractMethod_1.AbstractMethod {
|
package/lib/api/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { default as blockchainDisconnect } from './blockchainDisconnect';
|
|
|
9
9
|
export { default as blockchainEstimateFee } from './blockchainEstimateFee';
|
|
10
10
|
export { default as blockchainGetAccountBalanceHistory } from './blockchainGetAccountBalanceHistory';
|
|
11
11
|
export { default as blockchainGetCurrentFiatRates } from './blockchainGetCurrentFiatRates';
|
|
12
|
+
export { default as blockchainEvmRpcCall } from './blockchainEvmRpcCall';
|
|
12
13
|
export { default as blockchainGetFiatRatesForTimestamps } from './blockchainGetFiatRatesForTimestamps';
|
|
13
14
|
export { default as blockchainGetTransactions } from './blockchainGetTransactions';
|
|
14
15
|
export { default as blockchainSetCustomBackend } from './blockchainSetCustomBackend';
|
|
@@ -37,6 +38,7 @@ export { default as rebootToBootloader } from './rebootToBootloader';
|
|
|
37
38
|
export { default as recoveryDevice } from './recoveryDevice';
|
|
38
39
|
export { default as requestLogin } from './requestLogin';
|
|
39
40
|
export { default as resetDevice } from './resetDevice';
|
|
41
|
+
export { default as loadDevice } from './loadDevice';
|
|
40
42
|
export { default as setBrightness } from './setBrightness';
|
|
41
43
|
export { default as setBusy } from './setBusy';
|
|
42
44
|
export { default as setProxy } from './setProxy';
|
|
@@ -45,5 +47,4 @@ export { default as signTransaction } from './signTransaction';
|
|
|
45
47
|
export { default as unlockPath } from './unlockPath';
|
|
46
48
|
export { default as verifyMessage } from './verifyMessage';
|
|
47
49
|
export { default as wipeDevice } from './wipeDevice';
|
|
48
|
-
export { default as checkFirmwareAuthenticity } from './checkFirmwareAuthenticity';
|
|
49
50
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/api/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.wipeDevice = exports.verifyMessage = exports.unlockPath = exports.signTransaction = exports.signMessage = exports.setProxy = exports.setBusy = exports.setBrightness = exports.loadDevice = exports.resetDevice = exports.requestLogin = exports.recoveryDevice = exports.rebootToBootloader = exports.pushTransaction = exports.getSettings = exports.getPublicKey = exports.getOwnershipProof = exports.getOwnershipId = exports.getFirmwareHash = exports.getFeatures = exports.getDeviceState = exports.getCoinInfo = exports.getAddress = exports.getAccountInfo = exports.getAccountDescriptor = exports.composeTransaction = exports.cipherKeyValue = exports.changeWipeCode = exports.changePin = exports.changeLanguage = exports.blockchainUnsubscribeFiatRates = exports.blockchainUnsubscribe = exports.blockchainSubscribeFiatRates = exports.blockchainSubscribe = exports.blockchainSetCustomBackend = exports.blockchainGetTransactions = exports.blockchainGetFiatRatesForTimestamps = exports.blockchainEvmRpcCall = exports.blockchainGetCurrentFiatRates = exports.blockchainGetAccountBalanceHistory = exports.blockchainEstimateFee = exports.blockchainDisconnect = exports.backupDevice = exports.showDeviceTutorial = exports.cancelCoinjoinAuthorization = exports.authorizeCoinjoin = exports.authenticateDevice = exports.applySettings = exports.applyFlags = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var applyFlags_1 = require("./applyFlags");
|
|
6
6
|
Object.defineProperty(exports, "applyFlags", { enumerable: true, get: function () { return tslib_1.__importDefault(applyFlags_1).default; } });
|
|
@@ -24,6 +24,8 @@ var blockchainGetAccountBalanceHistory_1 = require("./blockchainGetAccountBalanc
|
|
|
24
24
|
Object.defineProperty(exports, "blockchainGetAccountBalanceHistory", { enumerable: true, get: function () { return tslib_1.__importDefault(blockchainGetAccountBalanceHistory_1).default; } });
|
|
25
25
|
var blockchainGetCurrentFiatRates_1 = require("./blockchainGetCurrentFiatRates");
|
|
26
26
|
Object.defineProperty(exports, "blockchainGetCurrentFiatRates", { enumerable: true, get: function () { return tslib_1.__importDefault(blockchainGetCurrentFiatRates_1).default; } });
|
|
27
|
+
var blockchainEvmRpcCall_1 = require("./blockchainEvmRpcCall");
|
|
28
|
+
Object.defineProperty(exports, "blockchainEvmRpcCall", { enumerable: true, get: function () { return tslib_1.__importDefault(blockchainEvmRpcCall_1).default; } });
|
|
27
29
|
var blockchainGetFiatRatesForTimestamps_1 = require("./blockchainGetFiatRatesForTimestamps");
|
|
28
30
|
Object.defineProperty(exports, "blockchainGetFiatRatesForTimestamps", { enumerable: true, get: function () { return tslib_1.__importDefault(blockchainGetFiatRatesForTimestamps_1).default; } });
|
|
29
31
|
var blockchainGetTransactions_1 = require("./blockchainGetTransactions");
|
|
@@ -80,6 +82,8 @@ var requestLogin_1 = require("./requestLogin");
|
|
|
80
82
|
Object.defineProperty(exports, "requestLogin", { enumerable: true, get: function () { return tslib_1.__importDefault(requestLogin_1).default; } });
|
|
81
83
|
var resetDevice_1 = require("./resetDevice");
|
|
82
84
|
Object.defineProperty(exports, "resetDevice", { enumerable: true, get: function () { return tslib_1.__importDefault(resetDevice_1).default; } });
|
|
85
|
+
var loadDevice_1 = require("./loadDevice");
|
|
86
|
+
Object.defineProperty(exports, "loadDevice", { enumerable: true, get: function () { return tslib_1.__importDefault(loadDevice_1).default; } });
|
|
83
87
|
var setBrightness_1 = require("./setBrightness");
|
|
84
88
|
Object.defineProperty(exports, "setBrightness", { enumerable: true, get: function () { return tslib_1.__importDefault(setBrightness_1).default; } });
|
|
85
89
|
var setBusy_1 = require("./setBusy");
|
|
@@ -96,6 +100,4 @@ var verifyMessage_1 = require("./verifyMessage");
|
|
|
96
100
|
Object.defineProperty(exports, "verifyMessage", { enumerable: true, get: function () { return tslib_1.__importDefault(verifyMessage_1).default; } });
|
|
97
101
|
var wipeDevice_1 = require("./wipeDevice");
|
|
98
102
|
Object.defineProperty(exports, "wipeDevice", { enumerable: true, get: function () { return tslib_1.__importDefault(wipeDevice_1).default; } });
|
|
99
|
-
var checkFirmwareAuthenticity_1 = require("./checkFirmwareAuthenticity");
|
|
100
|
-
Object.defineProperty(exports, "checkFirmwareAuthenticity", { enumerable: true, get: function () { return tslib_1.__importDefault(checkFirmwareAuthenticity_1).default; } });
|
|
101
103
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractMethod } from '../core/AbstractMethod';
|
|
2
|
+
import { PROTO } from '../constants';
|
|
3
|
+
export default class LoadDevice extends AbstractMethod<'loadDevice', PROTO.LoadDevice> {
|
|
4
|
+
init(): void;
|
|
5
|
+
get info(): string;
|
|
6
|
+
get confirmation(): {
|
|
7
|
+
view: "device-management";
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<{
|
|
11
|
+
message: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=loadDevice.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
|
+
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
5
|
+
const events_1 = require("../events");
|
|
6
|
+
const paramsValidator_1 = require("./common/paramsValidator");
|
|
7
|
+
const constants_1 = require("../constants");
|
|
8
|
+
class LoadDevice extends AbstractMethod_1.AbstractMethod {
|
|
9
|
+
init() {
|
|
10
|
+
this.allowDeviceMode = [events_1.UI.INITIALIZE];
|
|
11
|
+
this.useDeviceState = false;
|
|
12
|
+
this.requiredPermissions = ['management'];
|
|
13
|
+
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, null, this.firmwareRange);
|
|
14
|
+
const { payload } = this;
|
|
15
|
+
(0, schema_utils_1.Assert)(constants_1.PROTO.LoadDevice, payload);
|
|
16
|
+
this.params = {
|
|
17
|
+
mnemonics: payload.mnemonics,
|
|
18
|
+
pin: payload.pin,
|
|
19
|
+
passphrase_protection: payload.passphrase_protection,
|
|
20
|
+
language: payload.language,
|
|
21
|
+
label: payload.label,
|
|
22
|
+
skip_checksum: payload.skip_checksum,
|
|
23
|
+
u2f_counter: payload.u2f_counter,
|
|
24
|
+
needs_backup: payload.needs_backup,
|
|
25
|
+
no_backup: payload.no_backup,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
get info() {
|
|
29
|
+
return 'Load seed and related internal settings.';
|
|
30
|
+
}
|
|
31
|
+
get confirmation() {
|
|
32
|
+
return {
|
|
33
|
+
view: 'device-management',
|
|
34
|
+
label: 'Do you really you want to load device?',
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
async run() {
|
|
38
|
+
const cmd = this.device.getCommands();
|
|
39
|
+
const response = await cmd.typedCall('LoadDevice', 'Success', this.params);
|
|
40
|
+
return response.message;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = LoadDevice;
|
|
44
|
+
//# sourceMappingURL=loadDevice.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
5
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
6
7
|
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
7
8
|
const constants_1 = require("../../../constants");
|
|
8
9
|
const events_1 = require("../../../events");
|
|
9
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
10
10
|
const types_1 = require("../../../types");
|
|
11
11
|
const getAddress_1 = require("../../../types/api/getAddress");
|
|
12
12
|
const MAINNET = 0x68;
|
|
@@ -20,6 +20,7 @@ class NEMGetAddress extends AbstractMethod_1.AbstractMethod {
|
|
|
20
20
|
init() {
|
|
21
21
|
this.noBackupConfirmationMode = 'always';
|
|
22
22
|
this.requiredPermissions = ['read'];
|
|
23
|
+
this.requiredDeviceCapabilities = ['Capability_NEM'];
|
|
23
24
|
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, (0, coinInfo_1.getMiscNetwork)('NEM'), this.firmwareRange);
|
|
24
25
|
this.hasBundle = !!this.payload.bundle;
|
|
25
26
|
const payload = !this.payload.bundle
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
5
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
5
6
|
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
6
7
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
7
8
|
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
8
9
|
const helper = tslib_1.__importStar(require("../nemSignTx"));
|
|
9
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
10
10
|
const nem_1 = require("../../../types/api/nem");
|
|
11
11
|
class NEMSignTransaction extends AbstractMethod_1.AbstractMethod {
|
|
12
12
|
init() {
|
|
13
13
|
var _a;
|
|
14
14
|
this.requiredPermissions = ['read', 'write'];
|
|
15
|
+
this.requiredDeviceCapabilities = ['Capability_NEM'];
|
|
15
16
|
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, (0, coinInfo_1.getMiscNetwork)('NEM'), this.firmwareRange);
|
|
16
17
|
const { payload } = this;
|
|
17
18
|
if ((_a = payload === null || payload === void 0 ? void 0 : payload.transaction) === null || _a === void 0 ? void 0 : _a.timestamp) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const coinInfo_1 = require("../data/coinInfo");
|
|
5
6
|
const constants_1 = require("../constants");
|
|
6
7
|
const BlockchainLink_1 = require("../backend/BlockchainLink");
|
|
7
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
8
8
|
const pushTransaction_1 = require("../types/api/pushTransaction");
|
|
9
9
|
class PushTransaction extends AbstractMethod_1.AbstractMethod {
|
|
10
10
|
init() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
5
6
|
const events_1 = require("../events");
|
|
6
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
7
7
|
const constants_1 = require("../constants");
|
|
8
8
|
class RebootToBootloader extends AbstractMethod_1.AbstractMethod {
|
|
9
9
|
init() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const events_1 = require("../events");
|
|
5
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
6
6
|
const recoveryDevice_1 = require("../types/api/recoveryDevice");
|
|
7
7
|
class RecoveryDevice extends AbstractMethod_1.AbstractMethod {
|
|
8
8
|
init() {
|
package/lib/api/requestLogin.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
5
6
|
const constants_1 = require("../constants");
|
|
6
7
|
const events_1 = require("../events");
|
|
7
8
|
const DataManager_1 = require("../data/DataManager");
|
|
8
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
9
9
|
const requestLogin_1 = require("../types/api/requestLogin");
|
|
10
10
|
class RequestLogin extends AbstractMethod_1.AbstractMethod {
|
|
11
11
|
init() {
|
package/lib/api/resetDevice.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const events_1 = require("../events");
|
|
5
6
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
6
7
|
const constants_1 = require("../constants");
|
|
7
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
8
8
|
class ResetDevice extends AbstractMethod_1.AbstractMethod {
|
|
9
9
|
init() {
|
|
10
10
|
this.allowDeviceMode = [events_1.UI.INITIALIZE, events_1.UI.SEEDLESS];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
5
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
6
7
|
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
7
8
|
const constants_1 = require("../../../constants");
|
|
8
9
|
const events_1 = require("../../../events");
|
|
9
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
10
10
|
const types_1 = require("../../../types");
|
|
11
11
|
const getAddress_1 = require("../../../types/api/getAddress");
|
|
12
12
|
class RippleGetAddress extends AbstractMethod_1.AbstractMethod {
|
|
@@ -17,6 +17,7 @@ class RippleGetAddress extends AbstractMethod_1.AbstractMethod {
|
|
|
17
17
|
init() {
|
|
18
18
|
this.noBackupConfirmationMode = 'always';
|
|
19
19
|
this.requiredPermissions = ['read'];
|
|
20
|
+
this.requiredDeviceCapabilities = ['Capability_Ripple'];
|
|
20
21
|
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, (0, coinInfo_1.getMiscNetwork)('Ripple'), this.firmwareRange);
|
|
21
22
|
this.hasBundle = !!this.payload.bundle;
|
|
22
23
|
const payload = !this.payload.bundle
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
5
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
6
7
|
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
7
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
8
8
|
const ripple_1 = require("../../../types/api/ripple");
|
|
9
9
|
class RippleSignTransaction extends AbstractMethod_1.AbstractMethod {
|
|
10
10
|
init() {
|
|
11
11
|
this.requiredPermissions = ['read', 'write'];
|
|
12
|
+
this.requiredDeviceCapabilities = ['Capability_Ripple'];
|
|
12
13
|
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, (0, coinInfo_1.getMiscNetwork)('Ripple'), this.firmwareRange);
|
|
13
14
|
const { payload } = this;
|
|
14
15
|
(0, schema_utils_1.AssertWeak)(ripple_1.RippleSignTransaction, payload);
|
package/lib/api/setBrightness.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const constants_1 = require("../constants");
|
|
5
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
6
6
|
class SetBrightness extends AbstractMethod_1.AbstractMethod {
|
|
7
7
|
init() {
|
|
8
8
|
this.requiredPermissions = ['management'];
|
package/lib/api/setBusy.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const events_1 = require("../events");
|
|
5
6
|
const constants_1 = require("../constants");
|
|
6
7
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
7
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
8
8
|
class SetBusy extends AbstractMethod_1.AbstractMethod {
|
|
9
9
|
init() {
|
|
10
10
|
this.useDeviceState = false;
|
package/lib/api/signMessage.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
5
6
|
const pathUtils_1 = require("../utils/pathUtils");
|
|
6
7
|
const coinInfo_1 = require("../data/coinInfo");
|
|
7
8
|
const formatUtils_1 = require("../utils/formatUtils");
|
|
8
9
|
const types_1 = require("../types");
|
|
9
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
10
10
|
class SignMessage extends AbstractMethod_1.AbstractMethod {
|
|
11
11
|
init() {
|
|
12
12
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const constants_1 = require("../../../constants");
|
|
4
5
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
5
6
|
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
6
7
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
7
8
|
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
8
9
|
const events_1 = require("../../../events");
|
|
9
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
10
10
|
const types_1 = require("../../../types");
|
|
11
11
|
const getAddress_1 = require("../../../types/api/getAddress");
|
|
12
12
|
class SolanaGetAddress extends AbstractMethod_1.AbstractMethod {
|
|
@@ -17,6 +17,7 @@ class SolanaGetAddress extends AbstractMethod_1.AbstractMethod {
|
|
|
17
17
|
init() {
|
|
18
18
|
this.noBackupConfirmationMode = 'always';
|
|
19
19
|
this.requiredPermissions = ['read'];
|
|
20
|
+
this.requiredDeviceCapabilities = ['Capability_Solana'];
|
|
20
21
|
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, (0, coinInfo_1.getMiscNetwork)('Solana'), this.firmwareRange);
|
|
21
22
|
this.hasBundle = !!this.payload.bundle;
|
|
22
23
|
const payload = !this.payload.bundle
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
5
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
6
7
|
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
7
8
|
const events_1 = require("../../../events");
|
|
8
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
9
9
|
const types_1 = require("../../../types");
|
|
10
10
|
class SolanaGetPublicKey extends AbstractMethod_1.AbstractMethod {
|
|
11
11
|
init() {
|
|
12
12
|
this.noBackupConfirmationMode = 'always';
|
|
13
13
|
this.requiredPermissions = ['read'];
|
|
14
|
+
this.requiredDeviceCapabilities = ['Capability_Solana'];
|
|
14
15
|
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, (0, coinInfo_1.getMiscNetwork)('Solana'), this.firmwareRange);
|
|
15
16
|
this.hasBundle = !!this.payload.bundle;
|
|
16
17
|
const payload = !this.payload.bundle
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
3
4
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
4
5
|
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
5
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
6
7
|
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
7
8
|
const additionalInfo_1 = require("../additionalInfo");
|
|
8
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
9
9
|
const solana_1 = require("../../../types/api/solana");
|
|
10
10
|
class SolanaSignTransaction extends AbstractMethod_1.AbstractMethod {
|
|
11
11
|
init() {
|
|
12
12
|
this.requiredPermissions = ['read', 'write'];
|
|
13
|
+
this.requiredDeviceCapabilities = ['Capability_Solana'];
|
|
13
14
|
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, (0, coinInfo_1.getMiscNetwork)('Solana'), this.firmwareRange);
|
|
14
15
|
const { payload } = this;
|
|
15
16
|
(0, schema_utils_1.AssertWeak)(solana_1.SolanaSignTransaction, payload);
|