@trezor/connect 9.4.7 → 9.4.8-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 +59 -8
- package/README.md +1 -1
- package/lib/api/applyFlags.d.ts +1 -1
- package/lib/api/applyFlags.js +1 -1
- package/lib/api/applySettings.d.ts +1 -1
- package/lib/api/authenticateDevice.js +1 -1
- package/lib/api/authorizeCoinjoin.d.ts +1 -1
- package/lib/api/authorizeCoinjoin.js +1 -1
- package/lib/api/backupDevice.d.ts +1 -1
- package/lib/api/backupDevice.js +1 -1
- package/lib/api/binance/api/binanceGetAddress.d.ts +1 -1
- package/lib/api/binance/api/binanceGetAddress.js +3 -3
- package/lib/api/binance/api/binanceGetPublicKey.d.ts +1 -1
- package/lib/api/binance/api/binanceGetPublicKey.js +2 -2
- package/lib/api/binance/api/binanceSignTransaction.js +2 -2
- package/lib/api/binance/binanceSignTx.d.ts +1 -1
- package/lib/api/bitcoin/TransactionComposer.d.ts +1 -1
- package/lib/api/bitcoin/inputs.d.ts +1 -1
- package/lib/api/bitcoin/inputs.js +1 -1
- package/lib/api/bitcoin/outputs.js +2 -2
- package/lib/api/bitcoin/refTx.d.ts +2 -2
- package/lib/api/bitcoin/refTx.js +4 -4
- package/lib/api/bitcoin/signtx.d.ts +2 -2
- package/lib/api/bitcoin/signtxLegacy.d.ts +1 -1
- package/lib/api/bitcoin/signtxVerify.d.ts +1 -1
- package/lib/api/blockchainDisconnect.js +2 -2
- package/lib/api/blockchainEstimateFee.d.ts +1 -1
- package/lib/api/blockchainEstimateFee.js +3 -2
- package/lib/api/blockchainEvmRpcCall.js +2 -2
- package/lib/api/blockchainGetAccountBalanceHistory.d.ts +1 -1
- package/lib/api/blockchainGetAccountBalanceHistory.js +1 -1
- package/lib/api/blockchainGetCurrentFiatRates.d.ts +1 -1
- package/lib/api/blockchainGetCurrentFiatRates.js +1 -1
- package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +1 -1
- package/lib/api/blockchainGetFiatRatesForTimestamps.js +1 -1
- package/lib/api/blockchainGetInfo.js +1 -1
- package/lib/api/blockchainGetTransactions.js +1 -1
- package/lib/api/blockchainSetCustomBackend.js +1 -1
- package/lib/api/blockchainSubscribe.d.ts +1 -1
- package/lib/api/blockchainSubscribe.js +1 -1
- package/lib/api/blockchainSubscribeFiatRates.d.ts +1 -1
- package/lib/api/blockchainSubscribeFiatRates.js +1 -1
- package/lib/api/blockchainUnsubscribe.d.ts +1 -1
- package/lib/api/blockchainUnsubscribe.js +1 -1
- package/lib/api/blockchainUnsubscribeFiatRates.js +1 -1
- package/lib/api/cancelCoinjoinAuthorization.d.ts +1 -1
- package/lib/api/cardano/api/cardanoComposeTransaction.d.ts +1 -1
- package/lib/api/cardano/api/cardanoComposeTransaction.js +3 -11
- package/lib/api/cardano/api/cardanoGetAddress.d.ts +1 -1
- package/lib/api/cardano/api/cardanoGetAddress.js +4 -4
- package/lib/api/cardano/api/cardanoGetNativeScriptHash.js +2 -2
- package/lib/api/cardano/api/cardanoGetPublicKey.js +2 -2
- package/lib/api/cardano/api/cardanoSignTransaction.d.ts +3 -3
- package/lib/api/cardano/api/cardanoSignTransaction.js +4 -4
- 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.js +1 -1
- package/lib/api/cardano/cardanoUtils.js +30 -0
- package/lib/api/changePin.d.ts +1 -1
- package/lib/api/changePin.js +1 -1
- package/lib/api/changeWipeCode.d.ts +1 -1
- package/lib/api/cipherKeyValue.d.ts +1 -1
- package/lib/api/cipherKeyValue.js +3 -3
- package/lib/api/common/Discovery.d.ts +2 -2
- package/lib/api/common/paramsValidator.js +1 -1
- package/lib/api/composeTransaction.d.ts +3 -3
- package/lib/api/composeTransaction.js +9 -9
- package/lib/api/eos/api/eosGetPublicKey.d.ts +1 -1
- package/lib/api/eos/api/eosGetPublicKey.js +2 -2
- package/lib/api/eos/api/eosSignTransaction.d.ts +1 -1
- package/lib/api/eos/api/eosSignTransaction.js +2 -2
- package/lib/api/eos/eosSignTx.d.ts +3 -3
- package/lib/api/ethereum/api/ethereumGetAddress.d.ts +3 -3
- package/lib/api/ethereum/api/ethereumGetAddress.js +6 -6
- package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +1 -1
- package/lib/api/ethereum/api/ethereumGetPublicKey.js +3 -3
- package/lib/api/ethereum/api/ethereumSignMessage.d.ts +1 -1
- package/lib/api/ethereum/api/ethereumSignMessage.js +3 -3
- package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +2 -2
- package/lib/api/ethereum/api/ethereumSignTransaction.js +4 -4
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +2 -1
- package/lib/api/ethereum/api/ethereumSignTypedData.js +6 -6
- package/lib/api/ethereum/api/ethereumVerifyMessage.d.ts +1 -1
- package/lib/api/ethereum/api/ethereumVerifyMessage.js +2 -2
- package/lib/api/ethereum/ethereumDefinitions.d.ts +2 -2
- package/lib/api/ethereum/ethereumDefinitions.js +1 -0
- package/lib/api/firmware/getBinaryForFirmwareUpgrade.js +2 -2
- package/lib/api/firmware/parseFirmwareHeaders.d.ts +2 -1
- package/lib/api/firmware/uploadFirmware.d.ts +1 -1
- package/lib/api/firmware/uploadFirmware.js +1 -1
- package/lib/api/firmware/verifyAuthenticityProof.d.ts +1 -1
- package/lib/api/firmware/verifyEntropy.d.ts +19 -0
- package/lib/api/firmware/verifyEntropy.js +112 -0
- package/lib/api/getAccountDescriptor.js +4 -4
- package/lib/api/getAccountInfo.d.ts +21 -1
- package/lib/api/getAccountInfo.js +7 -7
- package/lib/api/getAddress.d.ts +1 -1
- package/lib/api/getAddress.js +3 -3
- package/lib/api/getCoinInfo.d.ts +3 -0
- package/lib/api/getCoinInfo.js +1 -1
- package/lib/api/getDeviceState.js +1 -1
- package/lib/api/getFirmwareHash.d.ts +1 -1
- package/lib/api/getFirmwareHash.js +1 -1
- package/lib/api/getOwnershipId.d.ts +1 -1
- package/lib/api/getOwnershipId.js +2 -2
- package/lib/api/getOwnershipProof.d.ts +1 -1
- package/lib/api/getOwnershipProof.js +2 -2
- package/lib/api/getPublicKey.d.ts +1 -1
- package/lib/api/getPublicKey.js +4 -4
- package/lib/api/loadDevice.d.ts +1 -1
- package/lib/api/loadDevice.js +1 -1
- package/lib/api/nem/api/nemGetAddress.d.ts +1 -1
- package/lib/api/nem/api/nemGetAddress.js +3 -3
- package/lib/api/nem/api/nemSignTransaction.d.ts +1 -1
- package/lib/api/nem/api/nemSignTransaction.js +2 -2
- package/lib/api/pushTransaction.js +2 -2
- package/lib/api/recoveryDevice.d.ts +1 -1
- package/lib/api/requestLogin.d.ts +1 -1
- package/lib/api/requestLogin.js +2 -2
- package/lib/api/resetDevice.d.ts +3 -1
- package/lib/api/resetDevice.js +58 -3
- package/lib/api/ripple/api/rippleGetAddress.d.ts +1 -1
- package/lib/api/ripple/api/rippleGetAddress.js +3 -3
- package/lib/api/ripple/api/rippleSignTransaction.d.ts +1 -1
- package/lib/api/ripple/api/rippleSignTransaction.js +2 -2
- package/lib/api/setBrightness.d.ts +1 -1
- package/lib/api/setBrightness.js +1 -1
- package/lib/api/setBusy.d.ts +1 -1
- package/lib/api/setBusy.js +1 -1
- package/lib/api/setProxy.js +1 -1
- package/lib/api/showDeviceTutorial.d.ts +1 -1
- package/lib/api/showDeviceTutorial.js +1 -1
- package/lib/api/signMessage.d.ts +1 -1
- package/lib/api/signMessage.js +2 -2
- package/lib/api/signTransaction.d.ts +2 -2
- package/lib/api/signTransaction.js +3 -3
- package/lib/api/solana/api/index.d.ts +1 -0
- package/lib/api/solana/api/index.js +3 -1
- package/lib/api/solana/api/solanaComposeTransaction.d.ts +25 -0
- package/lib/api/solana/api/solanaComposeTransaction.js +61 -0
- package/lib/api/solana/api/solanaGetAddress.js +2 -2
- package/lib/api/solana/api/solanaGetPublicKey.js +2 -2
- package/lib/api/solana/api/solanaSignTransaction.d.ts +9 -1
- package/lib/api/solana/api/solanaSignTransaction.js +20 -2
- package/lib/api/solana/solanaUtils.d.ts +48 -0
- package/lib/api/solana/solanaUtils.js +213 -0
- package/lib/api/stellar/api/stellarGetAddress.d.ts +1 -1
- package/lib/api/stellar/api/stellarGetAddress.js +3 -3
- package/lib/api/stellar/api/stellarSignTransaction.js +3 -3
- package/lib/api/tezos/api/tezosGetAddress.d.ts +1 -1
- package/lib/api/tezos/api/tezosGetAddress.js +3 -3
- package/lib/api/tezos/api/tezosGetPublicKey.d.ts +1 -1
- package/lib/api/tezos/api/tezosGetPublicKey.js +2 -2
- package/lib/api/tezos/api/tezosSignTransaction.d.ts +1 -1
- package/lib/api/tezos/api/tezosSignTransaction.js +2 -2
- package/lib/api/tezos/tezosSignTx.d.ts +17 -17
- package/lib/api/unlockPath.d.ts +1 -1
- package/lib/api/verifyMessage.d.ts +1 -1
- package/lib/api/verifyMessage.js +3 -3
- package/lib/backend/BackendManager.d.ts +1 -1
- package/lib/backend/BackendManager.js +1 -1
- package/lib/backend/Blockchain.d.ts +2 -2
- package/lib/backend/Blockchain.js +4 -7
- package/lib/constants/errors.d.ts +2 -0
- package/lib/constants/errors.js +4 -0
- package/lib/core/AbstractMethod.d.ts +2 -2
- package/lib/core/AbstractMethod.js +2 -1
- package/lib/core/index.d.ts +3 -3
- package/lib/core/index.js +44 -48
- package/lib/core/onCallFirmwareUpdate.d.ts +3 -8
- package/lib/core/onCallFirmwareUpdate.js +63 -21
- package/lib/data/DataManager.js +1 -5
- package/lib/data/coinInfo.d.ts +15 -131
- package/lib/data/coinInfo.js +8 -8
- package/lib/data/config.d.ts +23 -0
- package/lib/data/config.js +4 -0
- package/lib/data/connectSettings.js +1 -1
- package/lib/data/defaultFeeLevels.d.ts +2 -2
- package/lib/data/defaultFeeLevels.js +34 -14
- package/lib/data/deviceAuthenticityConfigTypes.d.ts +1 -0
- package/lib/data/deviceAuthenticityConfigTypes.js +2 -2
- package/lib/data/firmwareInfo.js +1 -1
- package/lib/data/models.js +5 -1
- package/lib/data/transportInfo.d.ts +0 -1
- package/lib/data/transportInfo.js +41 -28
- package/lib/data/udevInfo.d.ts +0 -1
- package/lib/data/udevInfo.js +2 -5
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +11 -10
- package/lib/device/Device.js +47 -17
- package/lib/device/DeviceCommands.d.ts +2 -2
- package/lib/device/DeviceCommands.js +42 -27
- package/lib/device/DeviceList.d.ts +27 -22
- package/lib/device/DeviceList.js +222 -133
- package/lib/device/StateStorage.js +11 -13
- package/lib/device/prompts.js +28 -36
- package/lib/device/resolveDescriptorForTaproot.d.ts +2 -2
- package/lib/device/resolveDescriptorForTaproot.js +5 -13
- package/lib/events/blockchain.d.ts +1 -1
- package/lib/events/call.d.ts +1 -1
- package/lib/events/core.d.ts +3 -3
- package/lib/events/device.d.ts +11 -1
- package/lib/events/device.js +1 -0
- package/lib/events/popup.d.ts +2 -2
- package/lib/events/transport.d.ts +15 -9
- package/lib/events/transport.js +10 -1
- package/lib/events/ui-promise.d.ts +1 -1
- package/lib/events/ui-request.d.ts +3 -3
- package/lib/factory.d.ts +3 -2
- package/lib/factory.js +3 -1
- package/lib/impl/core-in-module.d.ts +4 -2
- package/lib/impl/core-in-module.js +9 -1
- package/lib/impl/dynamic.d.ts +4 -2
- package/lib/impl/dynamic.js +5 -4
- package/lib/index-browser.js +1 -0
- package/lib/index.js +11 -3
- package/lib/types/account.d.ts +1 -1
- package/lib/types/api/authenticateDevice.d.ts +1 -0
- package/lib/types/api/authorizeCoinjoin.d.ts +1 -1
- package/lib/types/api/authorizeCoinjoin.js +1 -1
- package/lib/types/api/binanceGetAddress.d.ts +1 -1
- package/lib/types/api/binanceGetPublicKey.d.ts +1 -1
- package/lib/types/api/blockchainEstimateFee.d.ts +1 -1
- package/lib/types/api/blockchainSetCustomBackend.d.ts +1 -1
- package/lib/types/api/blockchainSubscribe.d.ts +1 -1
- package/lib/types/api/cardanoComposeTransaction.d.ts +112 -6
- package/lib/types/api/cardanoComposeTransaction.js +77 -0
- package/lib/types/api/cardanoGetAddress.d.ts +1 -1
- package/lib/types/api/cardanoGetPublicKey.d.ts +1 -1
- package/lib/types/api/changeLanguage.d.ts +1 -1
- package/lib/types/api/cipherKeyValue.d.ts +1 -1
- package/lib/types/api/composeTransaction.d.ts +1 -1
- package/lib/types/api/eosGetPublicKey.d.ts +1 -1
- package/lib/types/api/ethereumGetAddress.d.ts +1 -1
- package/lib/types/api/ethereumGetPublicKey.d.ts +1 -1
- package/lib/types/api/ethereumSignTypedData.d.ts +1 -1
- package/lib/types/api/firmwareUpdate.d.ts +11 -2
- package/lib/types/api/getAccountDescriptor.d.ts +1 -1
- package/lib/types/api/getAccountInfo.d.ts +1 -1
- package/lib/types/api/getAddress.d.ts +2 -1
- package/lib/types/api/getCoinInfo.d.ts +1 -1
- package/lib/types/api/getDeviceState.d.ts +1 -1
- package/lib/types/api/getFeatures.d.ts +1 -1
- package/lib/types/api/getOwnershipId.d.ts +2 -1
- package/lib/types/api/getOwnershipProof.d.ts +2 -1
- package/lib/types/api/getPublicKey.d.ts +1 -1
- package/lib/types/api/index.d.ts +7 -3
- package/lib/types/api/nem/index.d.ts +1 -1
- package/lib/types/api/nemGetAddress.d.ts +1 -1
- package/lib/types/api/on.d.ts +1 -1
- package/lib/types/api/recoveryDevice.d.ts +1 -1
- package/lib/types/api/rippleGetAddress.d.ts +1 -1
- package/lib/types/api/setTransports.d.ts +4 -0
- package/lib/types/api/setTransports.js +3 -0
- package/lib/types/api/solana/index.d.ts +41 -0
- package/lib/types/api/solana/index.js +31 -1
- package/lib/types/api/solanaComposeTransaction.d.ts +4 -0
- package/lib/types/api/solanaComposeTransaction.js +3 -0
- package/lib/types/api/solanaGetAddress.d.ts +1 -1
- package/lib/types/api/solanaGetPublicKey.d.ts +1 -1
- package/lib/types/api/stellarGetAddress.d.ts +1 -1
- package/lib/types/api/tezosGetAddress.d.ts +1 -1
- package/lib/types/api/tezosGetPublicKey.d.ts +1 -1
- package/lib/types/api/unlockPath.d.ts +1 -1
- package/lib/types/coinInfo.d.ts +33 -0
- package/lib/types/coinInfo.js +8 -2
- package/lib/types/params.d.ts +1 -1
- package/lib/utils/abortablePromise.d.ts +5 -0
- package/lib/utils/abortablePromise.js +17 -0
- package/lib/utils/accountUtils.d.ts +1 -1
- package/lib/utils/accountUtils.js +1 -1
- package/lib/utils/assetUtils.js +1 -2
- package/lib/utils/assets-browser.d.ts +1 -1
- package/lib/utils/assets.js +1 -1
- package/lib/utils/assets.native.d.ts +1 -1
- package/lib/utils/deviceFeaturesUtils.d.ts +1 -1
- package/lib/utils/deviceFeaturesUtils.js +6 -12
- package/lib/utils/ethereumUtils.d.ts +3 -2
- package/lib/utils/firmwareUtils.d.ts +1 -1
- package/lib/utils/firmwareUtils.js +11 -4
- package/lib/utils/pathUtils.d.ts +1 -1
- package/lib/utils/urlUtils.js +2 -0
- package/lib/workers/workers-browser.d.ts +2 -2
- package/lib/workers/workers-browser.js +2 -2
- package/lib/workers/workers.native.d.ts +1 -1
- package/lib/workers/workers.native.js +2 -2
- package/package.json +22 -12
- package/lib/utils/promiseUtils.d.ts +0 -5
- package/lib/utils/promiseUtils.js +0 -14
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
|
+
const constants_1 = require("../../../constants");
|
|
4
5
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
5
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
6
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
7
|
-
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
8
|
-
const cardanoAddressParameters_1 = require("../cardanoAddressParameters");
|
|
9
|
-
const constants_1 = require("../../../constants");
|
|
10
7
|
const events_1 = require("../../../events");
|
|
11
8
|
const types_1 = require("../../../types");
|
|
12
9
|
const cardano_1 = require("../../../types/api/cardano");
|
|
10
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
11
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
12
|
+
const cardanoAddressParameters_1 = require("../cardanoAddressParameters");
|
|
13
13
|
class CardanoGetAddress extends AbstractMethod_1.AbstractMethod {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
4
|
const constants_1 = require("../../../constants");
|
|
5
5
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
6
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
7
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
8
|
-
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
9
7
|
const cardano_1 = require("../../../types/api/cardano");
|
|
8
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
9
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
10
10
|
class CardanoGetNativeScriptHash extends AbstractMethod_1.AbstractMethod {
|
|
11
11
|
init() {
|
|
12
12
|
this.requiredPermissions = ['read'];
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
4
|
const constants_1 = require("../../../constants");
|
|
5
5
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
6
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
7
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
8
|
-
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
9
7
|
const events_1 = require("../../../events");
|
|
10
8
|
const types_1 = require("../../../types");
|
|
11
9
|
const cardano_1 = require("../../../types/api/cardano");
|
|
10
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
11
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
12
12
|
class CardanoGetPublicKey extends AbstractMethod_1.AbstractMethod {
|
|
13
13
|
init() {
|
|
14
14
|
this.requiredPermissions = ['read'];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { PROTO } from '../../../constants';
|
|
1
2
|
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
3
|
+
import { type CardanoSignedTxData } from '../../../types/api/cardano';
|
|
2
4
|
import type { CertificateWithPoolOwnersAndRelays } from '../cardanoCertificate';
|
|
3
|
-
import {
|
|
5
|
+
import { CollateralInputWithPath, InputWithPath, Path } from '../cardanoInputs';
|
|
4
6
|
import type { OutputWithData } from '../cardanoOutputs';
|
|
5
|
-
import { PROTO } from '../../../constants';
|
|
6
|
-
import { type CardanoSignedTxData } from '../../../types/api/cardano';
|
|
7
7
|
import type { AssetGroupWithTokens } from '../cardanoTokenBundle';
|
|
8
8
|
declare const CardanoSignTransactionFeatures: Readonly<{
|
|
9
9
|
Conway: string[];
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const coin_selection_1 = require("@fivebinaries/coin-selection");
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
5
6
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
6
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
7
7
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
8
|
+
const cardano_1 = require("../../../types/api/cardano");
|
|
8
9
|
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
10
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
9
11
|
const cardanoAuxiliaryData_1 = require("../cardanoAuxiliaryData");
|
|
10
12
|
const cardanoCertificate_1 = require("../cardanoCertificate");
|
|
11
13
|
const cardanoInputs_1 = require("../cardanoInputs");
|
|
12
14
|
const cardanoOutputs_1 = require("../cardanoOutputs");
|
|
13
|
-
const constants_1 = require("../../../constants");
|
|
14
|
-
const cardano_1 = require("../../../types/api/cardano");
|
|
15
|
-
const cardanoWitnesses_1 = require("../cardanoWitnesses");
|
|
16
15
|
const cardanoTokenBundle_1 = require("../cardanoTokenBundle");
|
|
16
|
+
const cardanoWitnesses_1 = require("../cardanoWitnesses");
|
|
17
17
|
const CardanoSignTransactionFeatures = Object.freeze({
|
|
18
18
|
Conway: ['0', '2.7.1'],
|
|
19
19
|
});
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addressParametersFromProto = exports.addressParametersToProto = exports.modifyAddressParametersForBackwardsCompatibility = exports.validateAddressParameters = void 0;
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
-
const pathUtils_1 = require("../../utils/pathUtils");
|
|
6
5
|
const constants_1 = require("../../constants");
|
|
7
6
|
const cardano_1 = require("../../types/api/cardano");
|
|
7
|
+
const pathUtils_1 = require("../../utils/pathUtils");
|
|
8
8
|
const validateAddressParameters = (addressParameters) => {
|
|
9
9
|
(0, schema_utils_1.Assert)(cardano_1.CardanoAddressParameters, addressParameters);
|
|
10
10
|
if (addressParameters.path) {
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.modifyAuxiliaryDataForBackwardsCompatibility = exports.transformAuxiliaryData = void 0;
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
5
|
const cardanoAddressParameters_1 = require("./cardanoAddressParameters");
|
|
6
|
-
const pathUtils_1 = require("../../utils/pathUtils");
|
|
7
6
|
const constants_1 = require("../../constants");
|
|
8
7
|
const cardano_1 = require("../../types/api/cardano");
|
|
8
|
+
const pathUtils_1 = require("../../utils/pathUtils");
|
|
9
9
|
const MAX_DELEGATION_COUNT = 32;
|
|
10
10
|
const transformDelegation = (delegation) => {
|
|
11
11
|
if (delegation.votingPublicKey) {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transformCertificate = void 0;
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
-
const pathUtils_1 = require("../../utils/pathUtils");
|
|
6
5
|
const constants_1 = require("../../constants");
|
|
7
6
|
const cardano_1 = require("../../types/api/cardano");
|
|
7
|
+
const pathUtils_1 = require("../../utils/pathUtils");
|
|
8
8
|
const ipv4AddressToHex = (ipv4Address) => Buffer.from(ipv4Address.split('.').map(ipPart => parseInt(ipPart, 10))).toString('hex');
|
|
9
9
|
const ipv6AddressToHex = (ipv6Address) => ipv6Address.split(':').join('');
|
|
10
10
|
const validatePoolRelay = (relay) => {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transformReferenceInput = exports.transformCollateralInput = exports.transformInput = exports.InputWithPathParam = exports.InputWithPath = exports.Path = void 0;
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
-
const pathUtils_1 = require("../../utils/pathUtils");
|
|
6
5
|
const constants_1 = require("../../constants");
|
|
7
6
|
const exports_1 = require("../../exports");
|
|
7
|
+
const pathUtils_1 = require("../../utils/pathUtils");
|
|
8
8
|
exports.Path = schema_utils_1.Type.Array(schema_utils_1.Type.Number());
|
|
9
9
|
exports.InputWithPath = schema_utils_1.Type.Object({
|
|
10
10
|
input: constants_1.PROTO.CardanoTxInput,
|
|
@@ -28,6 +28,7 @@ exports.transformUtxos = transformUtxos;
|
|
|
28
28
|
const prepareCertificates = (certs) => {
|
|
29
29
|
const convertedCerts = [];
|
|
30
30
|
certs.forEach(cert => {
|
|
31
|
+
var _a, _b, _c, _d;
|
|
31
32
|
switch (cert.type) {
|
|
32
33
|
case constants_1.PROTO.CardanoCertificateType.STAKE_DELEGATION:
|
|
33
34
|
convertedCerts.push({
|
|
@@ -41,6 +42,35 @@ const prepareCertificates = (certs) => {
|
|
|
41
42
|
type: cert.type,
|
|
42
43
|
});
|
|
43
44
|
break;
|
|
45
|
+
case constants_1.PROTO.CardanoCertificateType.VOTE_DELEGATION:
|
|
46
|
+
if (((_a = cert.dRep) === null || _a === void 0 ? void 0 : _a.type) === constants_1.PROTO.CardanoDRepType.ABSTAIN ||
|
|
47
|
+
((_b = cert.dRep) === null || _b === void 0 ? void 0 : _b.type) === constants_1.PROTO.CardanoDRepType.NO_CONFIDENCE) {
|
|
48
|
+
convertedCerts.push({
|
|
49
|
+
type: cert.type,
|
|
50
|
+
dRep: {
|
|
51
|
+
type: cert.dRep.type,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
else if (((_c = cert.dRep) === null || _c === void 0 ? void 0 : _c.type) === constants_1.PROTO.CardanoDRepType.KEY_HASH) {
|
|
56
|
+
convertedCerts.push({
|
|
57
|
+
type: cert.type,
|
|
58
|
+
dRep: {
|
|
59
|
+
type: cert.dRep.type,
|
|
60
|
+
keyHash: cert.dRep.keyHash,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else if (((_d = cert.dRep) === null || _d === void 0 ? void 0 : _d.type) === constants_1.PROTO.CardanoDRepType.SCRIPT_HASH) {
|
|
65
|
+
convertedCerts.push({
|
|
66
|
+
type: cert.type,
|
|
67
|
+
dRep: {
|
|
68
|
+
type: cert.dRep.type,
|
|
69
|
+
scriptHash: cert.dRep.scriptHash,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
44
74
|
}
|
|
45
75
|
});
|
|
46
76
|
return convertedCerts;
|
package/lib/api/changePin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
2
1
|
import { PROTO } from '../constants';
|
|
2
|
+
import { AbstractMethod } from '../core/AbstractMethod';
|
|
3
3
|
export default class ChangePin extends AbstractMethod<'changePin', PROTO.ChangePin> {
|
|
4
4
|
init(): void;
|
|
5
5
|
run(): Promise<{
|
package/lib/api/changePin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
|
-
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
5
4
|
const constants_1 = require("../constants");
|
|
5
|
+
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
6
6
|
class ChangePin extends AbstractMethod_1.AbstractMethod {
|
|
7
7
|
init() {
|
|
8
8
|
this.requiredPermissions = ['management'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
2
1
|
import type { PROTO } from '../constants';
|
|
2
|
+
import { AbstractMethod } from '../core/AbstractMethod';
|
|
3
3
|
export default class ChangeWipeCode extends AbstractMethod<'changeWipeCode', PROTO.ChangeWipeCode> {
|
|
4
4
|
init(): void;
|
|
5
5
|
run(): Promise<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
2
1
|
import type { PROTO } from '../constants';
|
|
2
|
+
import { AbstractMethod } from '../core/AbstractMethod';
|
|
3
3
|
export default class CipherKeyValue extends AbstractMethod<'cipherKeyValue', PROTO.CipherKeyValue[]> {
|
|
4
4
|
hasBundle?: boolean;
|
|
5
5
|
init(): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
|
-
const events_1 = require("../events");
|
|
5
4
|
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
5
|
+
const events_1 = require("../events");
|
|
6
6
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
7
|
-
const pathUtils_1 = require("../utils/pathUtils");
|
|
8
|
-
const params_1 = require("../types/params");
|
|
9
7
|
const cipherKeyValue_1 = require("../types/api/cipherKeyValue");
|
|
8
|
+
const params_1 = require("../types/params");
|
|
9
|
+
const pathUtils_1 = require("../utils/pathUtils");
|
|
10
10
|
class CipherKeyValue extends AbstractMethod_1.AbstractMethod {
|
|
11
11
|
init() {
|
|
12
12
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
|
-
import { PROTO } from '../../constants';
|
|
3
2
|
import { Blockchain } from '../../backend/BlockchainLink';
|
|
3
|
+
import { PROTO } from '../../constants';
|
|
4
4
|
import { DeviceCommands } from '../../device/DeviceCommands';
|
|
5
|
-
import type { CoinInfo,
|
|
5
|
+
import type { CoinInfo, DiscoveryAccount, DiscoveryAccountType } from '../../types';
|
|
6
6
|
import type { GetAccountInfo } from '../../types/api/getAccountInfo';
|
|
7
7
|
type DiscoveryType = {
|
|
8
8
|
type: DiscoveryAccountType;
|
|
@@ -4,8 +4,8 @@ exports.getFirmwareRange = exports.validateCoinPath = void 0;
|
|
|
4
4
|
exports.validateParams = validateParams;
|
|
5
5
|
const utils_1 = require("@trezor/utils");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
|
-
const pathUtils_1 = require("../../utils/pathUtils");
|
|
8
7
|
const config_1 = require("../../data/config");
|
|
8
|
+
const pathUtils_1 = require("../../utils/pathUtils");
|
|
9
9
|
const invalidParameter = (message) => constants_1.ERRORS.TypedError('Method_InvalidParameter', message);
|
|
10
10
|
function validateParams(params, schema) {
|
|
11
11
|
schema.forEach(field => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BigNumber } from '@trezor/utils/lib/bigNumber';
|
|
2
2
|
import type { ComposeOutput, TransactionInputOutputSortingStrategy } from '@trezor/utxo-lib';
|
|
3
3
|
import { AbstractMethod } from '../core/AbstractMethod';
|
|
4
|
-
import { Discovery } from './common/Discovery';
|
|
5
4
|
import { TransactionComposer } from './bitcoin';
|
|
6
|
-
import type { BitcoinNetworkInfo, DiscoveryAccount
|
|
7
|
-
import
|
|
5
|
+
import type { AccountUtxo, BitcoinNetworkInfo, DiscoveryAccount } from '../types';
|
|
6
|
+
import { Discovery } from './common/Discovery';
|
|
7
|
+
import type { ComposeResult, PrecomposeParams, PrecomposedResult, SignedTransaction } from '../types/api/composeTransaction';
|
|
8
8
|
type Params = {
|
|
9
9
|
outputs: ComposeOutput[];
|
|
10
10
|
coinInfo: BitcoinNetworkInfo;
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const bigNumber_1 = require("@trezor/utils/lib/bigNumber");
|
|
5
|
-
const
|
|
5
|
+
const resolveAfter_1 = require("@trezor/utils/lib/resolveAfter");
|
|
6
|
+
const BlockchainLink_1 = require("../backend/BlockchainLink");
|
|
6
7
|
const constants_1 = require("../constants");
|
|
8
|
+
const utxo_1 = require("../constants/utxo");
|
|
9
|
+
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
7
10
|
const events_1 = require("../events");
|
|
11
|
+
const bitcoin_1 = require("./bitcoin");
|
|
8
12
|
const Discovery_1 = require("./common/Discovery");
|
|
9
13
|
const paramsValidator_1 = require("./common/paramsValidator");
|
|
10
|
-
const pathUtils = tslib_1.__importStar(require("../utils/pathUtils"));
|
|
11
|
-
const promiseUtils_1 = require("../utils/promiseUtils");
|
|
12
|
-
const formatUtils_1 = require("../utils/formatUtils");
|
|
13
14
|
const coinInfo_1 = require("../data/coinInfo");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const utxo_1 = require("../constants/utxo");
|
|
15
|
+
const formatUtils_1 = require("../utils/formatUtils");
|
|
16
|
+
const pathUtils = tslib_1.__importStar(require("../utils/pathUtils"));
|
|
17
17
|
class ComposeTransaction extends AbstractMethod_1.AbstractMethod {
|
|
18
18
|
init() {
|
|
19
19
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -179,7 +179,7 @@ class ComposeTransaction extends AbstractMethod_1.AbstractMethod {
|
|
|
179
179
|
discovery.removeAllListeners();
|
|
180
180
|
discovery.stop();
|
|
181
181
|
if (!discovery.completed) {
|
|
182
|
-
await (0,
|
|
182
|
+
await (0, resolveAfter_1.resolveAfter)(501).promise;
|
|
183
183
|
}
|
|
184
184
|
const account = discovery.accounts[uiResp.payload];
|
|
185
185
|
this.params.coinInfo = (0, coinInfo_1.fixCoinInfoNetwork)(this.params.coinInfo, account.address_n);
|
|
@@ -203,7 +203,7 @@ class ComposeTransaction extends AbstractMethod_1.AbstractMethod {
|
|
|
203
203
|
const hasFunds = composer.composeAllFeeLevels();
|
|
204
204
|
if (!hasFunds) {
|
|
205
205
|
this.postMessage((0, events_1.createUiMessage)(events_1.UI.INSUFFICIENT_FUNDS));
|
|
206
|
-
await (0,
|
|
206
|
+
await (0, resolveAfter_1.resolveAfter)(2000, null).promise;
|
|
207
207
|
return 'change-account';
|
|
208
208
|
}
|
|
209
209
|
this.postMessage((0, events_1.createUiMessage)(events_1.UI.SELECT_FEE, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
2
1
|
import type { PROTO } from '../../../constants';
|
|
2
|
+
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
3
3
|
export default class EosGetPublicKey extends AbstractMethod<'eosGetPublicKey', PROTO.EosGetPublicKey[]> {
|
|
4
4
|
hasBundle?: boolean;
|
|
5
5
|
init(): void;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
4
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
5
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
6
5
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
7
|
-
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
8
6
|
const events_1 = require("../../../events");
|
|
9
7
|
const types_1 = require("../../../types");
|
|
8
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
9
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
10
10
|
class EosGetPublicKey extends AbstractMethod_1.AbstractMethod {
|
|
11
11
|
init() {
|
|
12
12
|
this.requiredPermissions = ['read'];
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
5
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
6
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
7
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
7
|
+
const eos_1 = require("../../../types/api/eos");
|
|
8
8
|
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
9
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
9
10
|
const helper = tslib_1.__importStar(require("../eosSignTx"));
|
|
10
|
-
const eos_1 = require("../../../types/api/eos");
|
|
11
11
|
class EosSignTransaction extends AbstractMethod_1.AbstractMethod {
|
|
12
12
|
init() {
|
|
13
13
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PROTO } from '../../constants';
|
|
2
|
-
import type { EosSDKTransaction } from '../../types/api/eos';
|
|
3
2
|
import type { TypedCall } from '../../device/DeviceCommands';
|
|
3
|
+
import type { EosSDKTransaction } from '../../types/api/eos';
|
|
4
4
|
export declare const validate: (tx: EosSDKTransaction) => {
|
|
5
5
|
chain_id: string;
|
|
6
6
|
header: {
|
|
@@ -76,8 +76,8 @@ export declare const validate: (tx: EosSDKTransaction) => {
|
|
|
76
76
|
producers: string[];
|
|
77
77
|
} | undefined;
|
|
78
78
|
update_auth?: {
|
|
79
|
-
permission: string;
|
|
80
79
|
account: string;
|
|
80
|
+
permission: string;
|
|
81
81
|
parent: string;
|
|
82
82
|
auth: {
|
|
83
83
|
keys: {
|
|
@@ -101,8 +101,8 @@ export declare const validate: (tx: EosSDKTransaction) => {
|
|
|
101
101
|
};
|
|
102
102
|
} | undefined;
|
|
103
103
|
delete_auth?: {
|
|
104
|
-
permission: string;
|
|
105
104
|
account: string;
|
|
105
|
+
permission: string;
|
|
106
106
|
} | undefined;
|
|
107
107
|
link_auth?: {
|
|
108
108
|
type: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
2
1
|
import { PROTO } from '../../../constants';
|
|
3
|
-
import
|
|
2
|
+
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
3
|
+
import type { EthereumNetworkInfoDefinitionValues } from '../../../types';
|
|
4
4
|
type Params = PROTO.EthereumGetAddress & {
|
|
5
5
|
address?: string;
|
|
6
|
-
network?:
|
|
6
|
+
network?: EthereumNetworkInfoDefinitionValues;
|
|
7
7
|
encoded_network?: ArrayBuffer;
|
|
8
8
|
};
|
|
9
9
|
export default class EthereumGetAddress extends AbstractMethod<'ethereumGetAddress', Params[]> {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
|
+
const constants_1 = require("../../../constants");
|
|
4
5
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
5
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
6
|
-
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
7
|
-
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
8
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
9
|
-
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
10
|
-
const constants_1 = require("../../../constants");
|
|
11
7
|
const events_1 = require("../../../events");
|
|
12
|
-
const ethereumDefinitions_1 = require("../ethereumDefinitions");
|
|
13
8
|
const types_1 = require("../../../types");
|
|
14
9
|
const getAddress_1 = require("../../../types/api/getAddress");
|
|
10
|
+
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
11
|
+
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
12
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
13
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
14
|
+
const ethereumDefinitions_1 = require("../ethereumDefinitions");
|
|
15
15
|
class EthereumGetAddress extends AbstractMethod_1.AbstractMethod {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
2
1
|
import type { PROTO } from '../../../constants';
|
|
2
|
+
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
3
3
|
import type { EthereumNetworkInfo } from '../../../types';
|
|
4
4
|
type Params = PROTO.EthereumGetPublicKey & {
|
|
5
5
|
network?: EthereumNetworkInfo;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
4
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
5
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
6
|
-
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
7
|
-
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
8
5
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
9
6
|
const events_1 = require("../../../events");
|
|
10
7
|
const types_1 = require("../../../types");
|
|
8
|
+
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
9
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
10
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
11
11
|
class EthereumGetPublicKey extends AbstractMethod_1.AbstractMethod {
|
|
12
12
|
init() {
|
|
13
13
|
this.requiredPermissions = ['read'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessagesSchema } from '@trezor/protobuf';
|
|
2
|
-
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
3
2
|
import type { PROTO } from '../../../constants';
|
|
3
|
+
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
4
4
|
import { EthereumNetworkInfo } from '../../../types';
|
|
5
5
|
type Params = PROTO.EthereumSignMessage & {
|
|
6
6
|
network?: EthereumNetworkInfo;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
4
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
5
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
6
|
-
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
7
5
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
6
|
+
const types_1 = require("../../../types");
|
|
8
7
|
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
9
8
|
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
9
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
10
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
10
11
|
const ethereumDefinitions_1 = require("../ethereumDefinitions");
|
|
11
|
-
const types_1 = require("../../../types");
|
|
12
12
|
class EthereumSignMessage extends AbstractMethod_1.AbstractMethod {
|
|
13
13
|
init() {
|
|
14
14
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { MessagesSchema } from '@trezor/protobuf';
|
|
2
2
|
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
3
|
+
import { EthereumNetworkInfoDefinitionValues } from '../../../types';
|
|
3
4
|
import type { EthereumTransaction, EthereumTransactionEIP1559 } from '../../../types/api/ethereum';
|
|
4
|
-
import { EthereumNetworkInfo } from '../../../types';
|
|
5
5
|
type Params = {
|
|
6
6
|
path: number[];
|
|
7
|
-
network?:
|
|
7
|
+
network?: EthereumNetworkInfoDefinitionValues;
|
|
8
8
|
definitions?: MessagesSchema.EthereumDefinitions;
|
|
9
9
|
chunkify: boolean;
|
|
10
10
|
} & ({
|
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
5
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
6
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
7
|
-
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
8
6
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
7
|
+
const types_1 = require("../../../types");
|
|
9
8
|
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
10
9
|
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
11
|
-
const
|
|
10
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
11
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
12
12
|
const ethereumDefinitions_1 = require("../ethereumDefinitions");
|
|
13
|
-
const
|
|
13
|
+
const helper = tslib_1.__importStar(require("../ethereumSignTx"));
|
|
14
14
|
const strip = (0, formatUtils_1.deepTransform)(value => {
|
|
15
15
|
let stripped = (0, formatUtils_1.stripHexPrefix)(value);
|
|
16
16
|
if (stripped.length % 2 !== 0) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessagesSchema } from '@trezor/protobuf';
|
|
2
2
|
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
3
|
-
import { EthereumSignTypedDataTypes, EthereumSignTypedData as EthereumSignTypedDataParams, EthereumSignTypedHash as EthereumSignTypedHashParams } from '../../../types/api/ethereum';
|
|
4
3
|
import { EthereumNetworkInfo } from '../../../types';
|
|
4
|
+
import { EthereumSignTypedData as EthereumSignTypedDataParams, EthereumSignTypedDataTypes, EthereumSignTypedHash as EthereumSignTypedHashParams } from '../../../types/api/ethereum';
|
|
5
5
|
type Params = (Omit<EthereumSignTypedDataParams<EthereumSignTypedDataTypes>, 'path'> | Omit<EthereumSignTypedHashParams<EthereumSignTypedDataTypes>, 'path'>) & {
|
|
6
6
|
address_n: number[];
|
|
7
7
|
network?: EthereumNetworkInfo;
|
|
@@ -64,6 +64,7 @@ declare const Params: import("@trezor/schema-utils").TIntersect<[import("@trezor
|
|
|
64
64
|
T3B1: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils").TLiteral<false>]>;
|
|
65
65
|
T3T1: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils").TLiteral<false>]>;
|
|
66
66
|
T3W1: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils").TLiteral<false>]>;
|
|
67
|
+
UNKNOWN: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils").TLiteral<false>]>;
|
|
67
68
|
}>;
|
|
68
69
|
decimals: import("@trezor/schema-utils").TNumber;
|
|
69
70
|
blockchainLink: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const protobuf_1 = require("@trezor/protobuf");
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
5
6
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
6
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
7
|
-
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
8
7
|
const coinInfo_1 = require("../../../data/coinInfo");
|
|
9
|
-
const
|
|
10
|
-
const constants_1 = require("../../../constants");
|
|
8
|
+
const types_1 = require("../../../types");
|
|
11
9
|
const ethereum_1 = require("../../../types/api/ethereum");
|
|
12
|
-
const
|
|
10
|
+
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
13
11
|
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
12
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
13
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
14
14
|
const ethereumDefinitions_1 = require("../ethereumDefinitions");
|
|
15
|
-
const
|
|
15
|
+
const ethereumSignTypedData_1 = require("../ethereumSignTypedData");
|
|
16
16
|
const Params = schema_utils_1.Type.Intersect([
|
|
17
17
|
schema_utils_1.Type.Union([
|
|
18
18
|
schema_utils_1.Type.Omit(ethereum_1.EthereumSignTypedData, schema_utils_1.Type.Literal('path')),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
2
1
|
import type { PROTO } from '../../../constants';
|
|
2
|
+
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
3
3
|
export default class EthereumVerifyMessage extends AbstractMethod<'ethereumVerifyMessage', PROTO.EthereumVerifyMessage> {
|
|
4
4
|
init(): void;
|
|
5
5
|
get info(): string;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
4
4
|
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
5
|
-
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
6
|
-
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
7
5
|
const types_1 = require("../../../types");
|
|
6
|
+
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
7
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
8
8
|
class EthereumVerifyMessage extends AbstractMethod_1.AbstractMethod {
|
|
9
9
|
init() {
|
|
10
10
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessagesSchema } from '@trezor/protobuf';
|
|
2
2
|
import { Static } from '@trezor/schema-utils';
|
|
3
|
-
import {
|
|
3
|
+
import { EthereumNetworkInfoDefinitionValues } from '../../types';
|
|
4
4
|
interface GetEthereumDefinitions {
|
|
5
5
|
chainId?: number;
|
|
6
6
|
slip44?: number;
|
|
@@ -42,6 +42,6 @@ export declare const EthereumDefinitionDecoded: import("@trezor/schema-utils").T
|
|
|
42
42
|
}>>;
|
|
43
43
|
}>;
|
|
44
44
|
export declare const decodeEthereumDefinition: (encodedDefinition: MessagesSchema.EthereumDefinitions) => EthereumDefinitionDecoded;
|
|
45
|
-
export declare const ethereumNetworkInfoFromDefinition: (definition: EthereumNetworkDefinitionDecoded) =>
|
|
45
|
+
export declare const ethereumNetworkInfoFromDefinition: (definition: EthereumNetworkDefinitionDecoded) => EthereumNetworkInfoDefinitionValues;
|
|
46
46
|
export {};
|
|
47
47
|
//# sourceMappingURL=ethereumDefinitions.d.ts.map
|