@trezor/connect 9.1.4 → 9.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +1 -1
- package/lib/api/authenticateDevice.d.ts +7 -0
- package/lib/api/authenticateDevice.js +51 -0
- package/lib/api/{binanceGetAddress.d.ts → binance/api/binanceGetAddress.d.ts} +3 -3
- package/lib/api/{binanceGetAddress.js → binance/api/binanceGetAddress.js} +6 -6
- package/lib/api/{binanceGetPublicKey.d.ts → binance/api/binanceGetPublicKey.d.ts} +3 -3
- package/lib/api/{binanceGetPublicKey.js → binance/api/binanceGetPublicKey.js} +5 -5
- package/lib/api/{binanceSignTransaction.d.ts → binance/api/binanceSignTransaction.d.ts} +2 -2
- package/lib/api/{binanceSignTransaction.js → binance/api/binanceSignTransaction.js} +5 -5
- package/lib/api/binance/api/index.d.ts +4 -0
- package/lib/api/binance/api/index.js +13 -0
- package/lib/api/bitcoin/TransactionComposer.d.ts +4 -4
- package/lib/api/bitcoin/TransactionComposer.js +4 -18
- package/lib/api/bitcoin/inputs.d.ts +2 -2
- package/lib/api/bitcoin/inputs.js +4 -5
- package/lib/api/bitcoin/outputs.d.ts +4 -4
- package/lib/api/bitcoin/outputs.js +14 -23
- package/lib/api/blockchainEstimateFee.d.ts +2 -2
- package/lib/api/cardano/api/cardanoComposeTransaction.d.ts +8 -0
- package/lib/api/cardano/api/cardanoComposeTransaction.js +69 -0
- package/lib/api/{cardanoGetAddress.d.ts → cardano/api/cardanoGetAddress.d.ts} +3 -3
- package/lib/api/{cardanoGetAddress.js → cardano/api/cardanoGetAddress.js} +7 -7
- package/lib/api/{cardanoGetNativeScriptHash.d.ts → cardano/api/cardanoGetNativeScriptHash.d.ts} +3 -3
- package/lib/api/{cardanoGetNativeScriptHash.js → cardano/api/cardanoGetNativeScriptHash.js} +5 -5
- package/lib/api/{cardanoGetPublicKey.d.ts → cardano/api/cardanoGetPublicKey.d.ts} +3 -3
- package/lib/api/{cardanoGetPublicKey.js → cardano/api/cardanoGetPublicKey.js} +6 -6
- package/lib/api/{cardanoSignTransaction.d.ts → cardano/api/cardanoSignTransaction.d.ts} +18 -8
- package/lib/api/{cardanoSignTransaction.js → cardano/api/cardanoSignTransaction.js} +30 -13
- package/lib/api/cardano/api/index.d.ts +6 -0
- package/lib/api/cardano/api/index.js +17 -0
- package/lib/api/cardano/cardanoUtils.d.ts +6 -0
- package/lib/api/cardano/cardanoUtils.js +64 -1
- package/lib/api/checkFirmwareAuthenticity.js +7 -5
- package/lib/api/common/paramsValidator.js +45 -51
- package/lib/api/composeTransaction.d.ts +5 -5
- package/lib/api/composeTransaction.js +14 -19
- package/lib/api/eos/api/eosGetPublicKey.d.ts +11 -0
- package/lib/api/{eosGetPublicKey.js → eos/api/eosGetPublicKey.js} +5 -5
- package/lib/api/{eosSignTransaction.d.ts → eos/api/eosSignTransaction.d.ts} +2 -2
- package/lib/api/{eosSignTransaction.js → eos/api/eosSignTransaction.js} +5 -5
- package/lib/api/eos/api/index.d.ts +3 -0
- package/lib/api/eos/api/index.js +11 -0
- package/lib/api/{ethereumGetAddress.d.ts → ethereum/api/ethereumGetAddress.d.ts} +4 -4
- package/lib/api/{ethereumGetAddress.js → ethereum/api/ethereumGetAddress.js} +9 -9
- package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +16 -0
- package/lib/api/{ethereumGetPublicKey.js → ethereum/api/ethereumGetPublicKey.js} +6 -6
- package/lib/api/{ethereumSignMessage.d.ts → ethereum/api/ethereumSignMessage.d.ts} +3 -3
- package/lib/api/{ethereumSignMessage.js → ethereum/api/ethereumSignMessage.js} +7 -7
- package/lib/api/{ethereumSignTransaction.d.ts → ethereum/api/ethereumSignTransaction.d.ts} +11 -9
- package/lib/api/{ethereumSignTransaction.js → ethereum/api/ethereumSignTransaction.js} +36 -43
- package/lib/api/{ethereumSignTypedData.d.ts → ethereum/api/ethereumSignTypedData.d.ts} +3 -3
- package/lib/api/{ethereumSignTypedData.js → ethereum/api/ethereumSignTypedData.js} +10 -10
- package/lib/api/{ethereumVerifyMessage.d.ts → ethereum/api/ethereumVerifyMessage.d.ts} +2 -2
- package/lib/api/{ethereumVerifyMessage.js → ethereum/api/ethereumVerifyMessage.js} +3 -3
- package/lib/api/ethereum/api/index.d.ts +7 -0
- package/lib/api/ethereum/api/index.js +19 -0
- package/lib/api/ethereum/ethereumDefinitions.js +3 -2
- package/lib/api/ethereum/ethereumSignTx.d.ts +2 -0
- package/lib/api/ethereum/ethereumSignTx.js +15 -1
- package/lib/api/firmware/getBinary.js +1 -1
- package/lib/api/firmware/verifyAuthenticityProof.d.ts +14 -0
- package/lib/api/firmware/verifyAuthenticityProof.js +103 -0
- package/lib/api/firmware/x509certificate.d.ts +74 -0
- package/lib/api/firmware/x509certificate.js +235 -0
- package/lib/api/firmwareUpdate.js +2 -1
- package/lib/api/getAccountDescriptor.d.ts +20 -0
- package/lib/api/getAccountDescriptor.js +162 -0
- package/lib/api/getAccountInfo.d.ts +2 -0
- package/lib/api/getAccountInfo.js +1 -5
- package/lib/api/getFirmwareHash.js +1 -4
- package/lib/api/index.d.ts +2 -24
- package/lib/api/index.js +5 -50
- package/lib/api/nem/api/index.d.ts +3 -0
- package/lib/api/nem/api/index.js +11 -0
- package/lib/api/{nemGetAddress.d.ts → nem/api/nemGetAddress.d.ts} +3 -3
- package/lib/api/{nemGetAddress.js → nem/api/nemGetAddress.js} +6 -6
- package/lib/api/{nemSignTransaction.d.ts → nem/api/nemSignTransaction.d.ts} +2 -2
- package/lib/api/{nemSignTransaction.js → nem/api/nemSignTransaction.js} +5 -5
- package/lib/api/rebootToBootloader.js +1 -4
- package/lib/api/ripple/api/index.d.ts +3 -0
- package/lib/api/ripple/api/index.js +11 -0
- package/lib/api/{rippleGetAddress.d.ts → ripple/api/rippleGetAddress.d.ts} +3 -3
- package/lib/api/{rippleGetAddress.js → ripple/api/rippleGetAddress.js} +6 -6
- package/lib/api/{rippleSignTransaction.d.ts → ripple/api/rippleSignTransaction.d.ts} +2 -2
- package/lib/api/{rippleSignTransaction.js → ripple/api/rippleSignTransaction.js} +4 -4
- package/lib/api/solana/api/index.d.ts +4 -0
- package/lib/api/solana/api/index.js +13 -0
- package/lib/api/solana/api/solanaGetAddress.d.ts +23 -0
- package/lib/api/solana/api/solanaGetAddress.js +131 -0
- package/lib/api/solana/api/solanaGetPublicKey.d.ts +12 -0
- package/lib/api/solana/api/solanaGetPublicKey.js +84 -0
- package/lib/api/solana/api/solanaSignTransaction.d.ts +10 -0
- package/lib/api/solana/api/solanaSignTransaction.js +33 -0
- package/lib/api/stellar/api/index.d.ts +3 -0
- package/lib/api/stellar/api/index.js +11 -0
- package/lib/api/{stellarGetAddress.d.ts → stellar/api/stellarGetAddress.d.ts} +3 -3
- package/lib/api/{stellarGetAddress.js → stellar/api/stellarGetAddress.js} +6 -6
- package/lib/api/{stellarSignTransaction.d.ts → stellar/api/stellarSignTransaction.d.ts} +2 -2
- package/lib/api/{stellarSignTransaction.js → stellar/api/stellarSignTransaction.js} +6 -6
- package/lib/api/tezos/api/index.d.ts +4 -0
- package/lib/api/tezos/api/index.js +13 -0
- package/lib/api/{tezosGetAddress.d.ts → tezos/api/tezosGetAddress.d.ts} +3 -3
- package/lib/api/{tezosGetAddress.js → tezos/api/tezosGetAddress.js} +6 -6
- package/lib/api/{tezosGetPublicKey.d.ts → tezos/api/tezosGetPublicKey.d.ts} +3 -3
- package/lib/api/{tezosGetPublicKey.js → tezos/api/tezosGetPublicKey.js} +5 -5
- package/lib/api/{tezosSignTransaction.d.ts → tezos/api/tezosSignTransaction.d.ts} +2 -2
- package/lib/api/{tezosSignTransaction.js → tezos/api/tezosSignTransaction.js} +5 -5
- package/lib/backend/Blockchain.js +2 -0
- package/lib/constants/cardano.js +2 -2
- package/lib/constants/nem.js +3 -3
- package/lib/constants/network.d.ts +3 -0
- package/lib/constants/network.js +13 -1
- package/lib/core/AbstractMethod.d.ts +1 -0
- package/lib/core/AbstractMethod.js +11 -10
- package/lib/core/index.d.ts +5 -2
- package/lib/core/index.js +28 -7
- package/lib/core/method.d.ts +2 -2
- package/lib/core/method.js +8 -2
- package/lib/core/method.native.d.ts +5 -0
- package/lib/core/method.native.js +34 -0
- package/lib/data/DataManager.d.ts +64 -7
- package/lib/data/DataManager.js +4 -2
- package/lib/data/config.d.ts +63 -6
- package/lib/data/config.js +39 -23
- package/lib/data/connectSettings.js +7 -0
- package/lib/data/defaultFeeLevels.js +8 -0
- package/lib/data/deviceAuthenticityConfig.d.ts +15 -0
- package/lib/data/deviceAuthenticityConfig.js +26 -0
- package/lib/data/firmwareInfo.d.ts +3 -2
- package/lib/data/firmwareInfo.js +17 -8
- package/lib/data/models.d.ts +4 -1
- package/lib/data/models.js +6 -3
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +2 -2
- package/lib/device/Device.js +22 -13
- package/lib/device/DeviceCommands.js +9 -0
- package/lib/device/DeviceList.d.ts +1 -0
- package/lib/device/DeviceList.js +8 -4
- package/lib/events/iframe.d.ts +7 -1
- package/lib/events/iframe.js +1 -0
- package/lib/events/popup.d.ts +19 -3
- package/lib/events/popup.js +3 -0
- package/lib/factory.js +6 -0
- package/lib/types/api/authenticateDevice.d.ts +21 -0
- package/lib/types/api/authenticateDevice.js +3 -0
- package/lib/types/api/cardanoComposeTransaction.d.ts +44 -0
- package/lib/types/api/cardanoComposeTransaction.js +3 -0
- package/lib/types/api/cardanoSignTransaction.d.ts +9 -0
- package/lib/types/api/composeTransaction.d.ts +28 -54
- package/lib/types/api/ethereum/index.d.ts +1 -0
- package/lib/types/api/getAccountDescriptor.d.ts +16 -0
- package/lib/types/api/getAccountDescriptor.js +3 -0
- package/lib/types/api/index.d.ts +12 -0
- package/lib/types/api/solana/index.d.ts +12 -0
- package/lib/types/api/solana/index.js +3 -0
- package/lib/types/api/solanaGetAddress.d.ts +4 -0
- package/lib/types/api/solanaGetAddress.js +3 -0
- package/lib/types/api/solanaGetPublicKey.d.ts +5 -0
- package/lib/types/api/solanaGetPublicKey.js +3 -0
- package/lib/types/api/solanaSignTransaction.d.ts +4 -0
- package/lib/types/api/solanaSignTransaction.js +3 -0
- package/lib/types/coinInfo.d.ts +5 -15
- package/lib/types/device.js +1 -1
- package/lib/types/firmware.d.ts +6 -2
- package/lib/types/index.d.ts +4 -1
- package/lib/types/index.js +1 -0
- package/lib/types/settings.d.ts +1 -0
- package/lib/utils/assetUtils.js +6 -4
- package/lib/utils/debug.d.ts +10 -5
- package/lib/utils/debug.js +55 -17
- package/lib/utils/deviceFeaturesUtils.js +5 -3
- package/lib/utils/formatUtils.d.ts +2 -0
- package/lib/utils/formatUtils.js +19 -1
- package/lib/workers/workers-browser.d.ts +2 -1
- package/lib/workers/workers-browser.js +3 -1
- package/lib/workers/workers-react-native.d.ts +2 -1
- package/lib/workers/workers-react-native.js +3 -1
- package/lib/workers/workers.d.ts +8 -5
- package/lib/workers/workers.js +34 -10
- package/package.json +25 -18
- package/lib/api/eosGetPublicKey.d.ts +0 -11
- package/lib/api/ethereumGetPublicKey.d.ts +0 -16
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const AbstractMethod_1 = require("
|
|
4
|
-
const paramsValidator_1 = require("
|
|
5
|
-
const pathUtils_1 = require("
|
|
6
|
-
const ethereumUtils_1 = require("
|
|
7
|
-
const coinInfo_1 = require("
|
|
8
|
-
const events_1 = require("
|
|
3
|
+
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
4
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
5
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
6
|
+
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
7
|
+
const coinInfo_1 = require("../../../data/coinInfo");
|
|
8
|
+
const events_1 = require("../../../events");
|
|
9
9
|
class EthereumGetPublicKey extends AbstractMethod_1.AbstractMethod {
|
|
10
10
|
init() {
|
|
11
11
|
this.requiredPermissions = ['read'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AbstractMethod } from '
|
|
2
|
-
import type { PROTO } from '
|
|
3
|
-
import type { EthereumNetworkInfo } from '
|
|
1
|
+
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
2
|
+
import type { PROTO } from '../../../constants';
|
|
3
|
+
import type { EthereumNetworkInfo } from '../../../types';
|
|
4
4
|
import type { EthereumDefinitions } from '@trezor/protobuf/lib/messages';
|
|
5
5
|
type Params = PROTO.EthereumSignMessage & {
|
|
6
6
|
network?: EthereumNetworkInfo;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const AbstractMethod_1 = require("
|
|
4
|
-
const paramsValidator_1 = require("
|
|
5
|
-
const pathUtils_1 = require("
|
|
6
|
-
const coinInfo_1 = require("
|
|
7
|
-
const ethereumUtils_1 = require("
|
|
8
|
-
const formatUtils_1 = require("
|
|
9
|
-
const ethereumDefinitions_1 = require("
|
|
3
|
+
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
4
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
5
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
6
|
+
const coinInfo_1 = require("../../../data/coinInfo");
|
|
7
|
+
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
8
|
+
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
9
|
+
const ethereumDefinitions_1 = require("../ethereumDefinitions");
|
|
10
10
|
class EthereumSignMessage extends AbstractMethod_1.AbstractMethod {
|
|
11
11
|
init() {
|
|
12
12
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { AbstractMethod } from '
|
|
2
|
-
import type { EthereumTransaction, EthereumTransactionEIP1559 } from '
|
|
3
|
-
import type { EthereumNetworkInfo } from '
|
|
1
|
+
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
2
|
+
import type { EthereumTransaction, EthereumTransactionEIP1559 } from '../../../types/api/ethereum';
|
|
3
|
+
import type { EthereumNetworkInfo } from '../../../types';
|
|
4
4
|
import type { EthereumDefinitions } from '@trezor/protobuf/lib/messages';
|
|
5
5
|
type Params = {
|
|
6
6
|
path: number[];
|
|
7
|
-
tx: ({
|
|
8
|
-
type: 'legacy';
|
|
9
|
-
} & EthereumTransaction) | ({
|
|
10
|
-
type: 'eip1559';
|
|
11
|
-
} & EthereumTransactionEIP1559);
|
|
12
7
|
network?: EthereumNetworkInfo;
|
|
13
8
|
definitions?: EthereumDefinitions;
|
|
14
|
-
}
|
|
9
|
+
} & ({
|
|
10
|
+
type: 'legacy';
|
|
11
|
+
tx: EthereumTransaction;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'eip1559';
|
|
14
|
+
tx: EthereumTransactionEIP1559;
|
|
15
|
+
});
|
|
15
16
|
export default class EthereumSignTransaction extends AbstractMethod<'ethereumSignTransaction', Params> {
|
|
16
17
|
init(): void;
|
|
17
18
|
initAsync(): Promise<void>;
|
|
18
19
|
get info(): string;
|
|
19
20
|
run(): Promise<{
|
|
21
|
+
serializedTx: string;
|
|
20
22
|
v: string;
|
|
21
23
|
r: string;
|
|
22
24
|
s: string;
|
|
@@ -1,30 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const AbstractMethod_1 = require("
|
|
5
|
-
const paramsValidator_1 = require("
|
|
6
|
-
const pathUtils_1 = require("
|
|
7
|
-
const coinInfo_1 = require("
|
|
8
|
-
const ethereumUtils_1 = require("
|
|
9
|
-
const formatUtils_1 = require("
|
|
10
|
-
const helper = tslib_1.__importStar(require("
|
|
11
|
-
const ethereumDefinitions_1 = require("
|
|
12
|
-
const strip = value => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
stripped = `0${stripped}`;
|
|
17
|
-
}
|
|
18
|
-
return stripped;
|
|
19
|
-
}
|
|
20
|
-
if (Array.isArray(value)) {
|
|
21
|
-
return value.map(strip);
|
|
22
|
-
}
|
|
23
|
-
if (typeof value === 'object') {
|
|
24
|
-
return Object.entries(value).reduce((acc, [k, v]) => ({ ...acc, [k]: strip(v) }), {});
|
|
4
|
+
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
5
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
6
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
7
|
+
const coinInfo_1 = require("../../../data/coinInfo");
|
|
8
|
+
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
9
|
+
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
10
|
+
const helper = tslib_1.__importStar(require("../ethereumSignTx"));
|
|
11
|
+
const ethereumDefinitions_1 = require("../ethereumDefinitions");
|
|
12
|
+
const strip = (0, formatUtils_1.deepTransform)(value => {
|
|
13
|
+
let stripped = (0, formatUtils_1.stripHexPrefix)(value);
|
|
14
|
+
if (stripped.length % 2 !== 0) {
|
|
15
|
+
stripped = `0${stripped}`;
|
|
25
16
|
}
|
|
26
|
-
return
|
|
27
|
-
};
|
|
17
|
+
return stripped;
|
|
18
|
+
});
|
|
28
19
|
class EthereumSignTransaction extends AbstractMethod_1.AbstractMethod {
|
|
29
20
|
init() {
|
|
30
21
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -36,10 +27,10 @@ class EthereumSignTransaction extends AbstractMethod_1.AbstractMethod {
|
|
|
36
27
|
const path = (0, pathUtils_1.validatePath)(payload.path, 3);
|
|
37
28
|
const network = (0, coinInfo_1.getEthereumNetwork)(path);
|
|
38
29
|
const tx = payload.transaction;
|
|
39
|
-
const isEIP1559 = tx.maxFeePerGas && tx.maxPriorityFeePerGas;
|
|
30
|
+
const isEIP1559 = typeof tx.maxFeePerGas === 'string' && typeof tx.maxPriorityFeePerGas === 'string';
|
|
40
31
|
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(isEIP1559 ? 'eip1559' : this.name, network, this.firmwareRange);
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
if (isEIP1559) {
|
|
33
|
+
(0, paramsValidator_1.validateParams)(tx, [
|
|
43
34
|
{ name: 'to', type: 'string', required: true },
|
|
44
35
|
{ name: 'value', type: 'string', required: true },
|
|
45
36
|
{ name: 'gasLimit', type: 'string', required: true },
|
|
@@ -48,8 +39,11 @@ class EthereumSignTransaction extends AbstractMethod_1.AbstractMethod {
|
|
|
48
39
|
{ name: 'nonce', type: 'string', required: true },
|
|
49
40
|
{ name: 'data', type: 'string' },
|
|
50
41
|
{ name: 'chainId', type: 'number', required: true },
|
|
51
|
-
]
|
|
52
|
-
:
|
|
42
|
+
]);
|
|
43
|
+
this.params = { path, network, type: 'eip1559', tx: strip(tx) };
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
(0, paramsValidator_1.validateParams)(tx, [
|
|
53
47
|
{ name: 'to', type: 'string', required: true },
|
|
54
48
|
{ name: 'value', type: 'string', required: true },
|
|
55
49
|
{ name: 'gasLimit', type: 'string', required: true },
|
|
@@ -58,19 +52,12 @@ class EthereumSignTransaction extends AbstractMethod_1.AbstractMethod {
|
|
|
58
52
|
{ name: 'data', type: 'string' },
|
|
59
53
|
{ name: 'chainId', type: 'number' },
|
|
60
54
|
{ name: 'txType', type: 'number' },
|
|
61
|
-
];
|
|
62
|
-
|
|
55
|
+
]);
|
|
56
|
+
this.params = { path, network, type: 'legacy', tx: strip(tx) };
|
|
57
|
+
}
|
|
63
58
|
if (typeof tx.chainId !== 'number') {
|
|
64
59
|
console.warn('TrezorConnect.ethereumSignTransaction: Missing chainId parameter!');
|
|
65
60
|
}
|
|
66
|
-
this.params = {
|
|
67
|
-
path,
|
|
68
|
-
tx: {
|
|
69
|
-
type: isEIP1559 ? 'eip1559' : 'legacy',
|
|
70
|
-
...strip(tx),
|
|
71
|
-
},
|
|
72
|
-
network,
|
|
73
|
-
};
|
|
74
61
|
}
|
|
75
62
|
async initAsync() {
|
|
76
63
|
if (this.params.tx.chainId === 1 && !this.params.tx.data) {
|
|
@@ -91,11 +78,17 @@ class EthereumSignTransaction extends AbstractMethod_1.AbstractMethod {
|
|
|
91
78
|
get info() {
|
|
92
79
|
return (0, ethereumUtils_1.getNetworkLabel)('Sign #NETWORK transaction', this.params.network);
|
|
93
80
|
}
|
|
94
|
-
run() {
|
|
95
|
-
const { tx, definitions } = this.params;
|
|
96
|
-
|
|
97
|
-
? helper.ethereumSignTxEIP1559(this.device.getCommands().typedCall.bind(this.device.getCommands()), this.params.path, tx.to, tx.value, tx.gasLimit, tx.maxFeePerGas, tx.maxPriorityFeePerGas, tx.nonce, tx.chainId, tx.data, tx.accessList, definitions)
|
|
98
|
-
: helper.ethereumSignTx(this.device.getCommands().typedCall.bind(this.device.getCommands()), this.params.path, tx.to, tx.value, tx.gasLimit, tx.gasPrice, tx.nonce, tx.chainId, tx.data, tx.txType, definitions);
|
|
81
|
+
async run() {
|
|
82
|
+
const { type, tx, definitions } = this.params;
|
|
83
|
+
const signature = type === 'eip1559'
|
|
84
|
+
? await helper.ethereumSignTxEIP1559(this.device.getCommands().typedCall.bind(this.device.getCommands()), this.params.path, tx.to, tx.value, tx.gasLimit, tx.maxFeePerGas, tx.maxPriorityFeePerGas, tx.nonce, tx.chainId, tx.data, tx.accessList, definitions)
|
|
85
|
+
: await helper.ethereumSignTx(this.device.getCommands().typedCall.bind(this.device.getCommands()), this.params.path, tx.to, tx.value, tx.gasLimit, tx.gasPrice, tx.nonce, tx.chainId, tx.data, tx.txType, definitions);
|
|
86
|
+
const serializedTx = helper.serializeEthereumTx({
|
|
87
|
+
...tx,
|
|
88
|
+
...signature,
|
|
89
|
+
type: type === 'legacy' ? 0 : 2,
|
|
90
|
+
}, tx.chainId);
|
|
91
|
+
return { ...signature, serializedTx };
|
|
99
92
|
}
|
|
100
93
|
}
|
|
101
94
|
exports.default = EthereumSignTransaction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AbstractMethod } from '
|
|
2
|
-
import type { EthereumSignTypedDataTypes, EthereumSignTypedData as EthereumSignTypedDataParams, EthereumSignTypedHash as EthereumSignTypedHashParams } from '
|
|
3
|
-
import type { EthereumNetworkInfo } from '
|
|
1
|
+
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
2
|
+
import type { EthereumSignTypedDataTypes, EthereumSignTypedData as EthereumSignTypedDataParams, EthereumSignTypedHash as EthereumSignTypedHashParams } from '../../../types/api/ethereum';
|
|
3
|
+
import type { EthereumNetworkInfo } from '../../../types';
|
|
4
4
|
import type { EthereumDefinitions } from '@trezor/protobuf/lib/messages';
|
|
5
5
|
type Params = (Omit<EthereumSignTypedDataParams<EthereumSignTypedDataTypes>, 'path'> | Omit<EthereumSignTypedHashParams<EthereumSignTypedDataTypes>, 'path'>) & {
|
|
6
6
|
address_n: number[];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const AbstractMethod_1 = require("
|
|
4
|
-
const paramsValidator_1 = require("
|
|
5
|
-
const pathUtils_1 = require("
|
|
6
|
-
const coinInfo_1 = require("
|
|
7
|
-
const ethereumUtils_1 = require("
|
|
8
|
-
const constants_1 = require("
|
|
9
|
-
const ethereumSignTypedData_1 = require("
|
|
10
|
-
const formatUtils_1 = require("
|
|
11
|
-
const ethereumDefinitions_1 = require("
|
|
12
|
-
const types_1 = require("
|
|
3
|
+
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
4
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
5
|
+
const pathUtils_1 = require("../../../utils/pathUtils");
|
|
6
|
+
const coinInfo_1 = require("../../../data/coinInfo");
|
|
7
|
+
const ethereumUtils_1 = require("../../../utils/ethereumUtils");
|
|
8
|
+
const constants_1 = require("../../../constants");
|
|
9
|
+
const ethereumSignTypedData_1 = require("../ethereumSignTypedData");
|
|
10
|
+
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
11
|
+
const ethereumDefinitions_1 = require("../ethereumDefinitions");
|
|
12
|
+
const types_1 = require("../../../types");
|
|
13
13
|
class EthereumSignTypedData extends AbstractMethod_1.AbstractMethod {
|
|
14
14
|
init() {
|
|
15
15
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractMethod } from '
|
|
2
|
-
import type { PROTO } from '
|
|
1
|
+
import { AbstractMethod } from '../../../core/AbstractMethod';
|
|
2
|
+
import type { PROTO } from '../../../constants';
|
|
3
3
|
export default class EthereumVerifyMessage extends AbstractMethod<'ethereumVerifyMessage', PROTO.EthereumVerifyMessage> {
|
|
4
4
|
init(): void;
|
|
5
5
|
get info(): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const AbstractMethod_1 = require("
|
|
4
|
-
const paramsValidator_1 = require("
|
|
5
|
-
const formatUtils_1 = require("
|
|
3
|
+
const AbstractMethod_1 = require("../../../core/AbstractMethod");
|
|
4
|
+
const paramsValidator_1 = require("../../common/paramsValidator");
|
|
5
|
+
const formatUtils_1 = require("../../../utils/formatUtils");
|
|
6
6
|
class EthereumVerifyMessage extends AbstractMethod_1.AbstractMethod {
|
|
7
7
|
init() {
|
|
8
8
|
this.requiredPermissions = ['read', 'write'];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as ethereumGetAddress } from './ethereumGetAddress';
|
|
2
|
+
export { default as ethereumGetPublicKey } from './ethereumGetPublicKey';
|
|
3
|
+
export { default as ethereumSignMessage } from './ethereumSignMessage';
|
|
4
|
+
export { default as ethereumSignTransaction } from './ethereumSignTransaction';
|
|
5
|
+
export { default as ethereumSignTypedData } from './ethereumSignTypedData';
|
|
6
|
+
export { default as ethereumVerifyMessage } from './ethereumVerifyMessage';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ethereumVerifyMessage = exports.ethereumSignTypedData = exports.ethereumSignTransaction = exports.ethereumSignMessage = exports.ethereumGetPublicKey = exports.ethereumGetAddress = void 0;
|
|
7
|
+
var ethereumGetAddress_1 = require("./ethereumGetAddress");
|
|
8
|
+
Object.defineProperty(exports, "ethereumGetAddress", { enumerable: true, get: function () { return __importDefault(ethereumGetAddress_1).default; } });
|
|
9
|
+
var ethereumGetPublicKey_1 = require("./ethereumGetPublicKey");
|
|
10
|
+
Object.defineProperty(exports, "ethereumGetPublicKey", { enumerable: true, get: function () { return __importDefault(ethereumGetPublicKey_1).default; } });
|
|
11
|
+
var ethereumSignMessage_1 = require("./ethereumSignMessage");
|
|
12
|
+
Object.defineProperty(exports, "ethereumSignMessage", { enumerable: true, get: function () { return __importDefault(ethereumSignMessage_1).default; } });
|
|
13
|
+
var ethereumSignTransaction_1 = require("./ethereumSignTransaction");
|
|
14
|
+
Object.defineProperty(exports, "ethereumSignTransaction", { enumerable: true, get: function () { return __importDefault(ethereumSignTransaction_1).default; } });
|
|
15
|
+
var ethereumSignTypedData_1 = require("./ethereumSignTypedData");
|
|
16
|
+
Object.defineProperty(exports, "ethereumSignTypedData", { enumerable: true, get: function () { return __importDefault(ethereumSignTypedData_1).default; } });
|
|
17
|
+
var ethereumVerifyMessage_1 = require("./ethereumVerifyMessage");
|
|
18
|
+
Object.defineProperty(exports, "ethereumVerifyMessage", { enumerable: true, get: function () { return __importDefault(ethereumVerifyMessage_1).default; } });
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -93,8 +93,9 @@ const ethereumNetworkInfoFromDefinition = (definition) => ({
|
|
|
93
93
|
shortcut: definition.symbol,
|
|
94
94
|
support: {
|
|
95
95
|
connect: true,
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
T1B1: '1.6.2',
|
|
97
|
+
T2T1: '2.0.7',
|
|
98
|
+
T2B1: '2.6.1',
|
|
98
99
|
},
|
|
99
100
|
blockchainLink: undefined,
|
|
100
101
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { TxData, FeeMarketEIP1559TxData } from '@ethereumjs/tx';
|
|
1
2
|
import { EthereumDefinitions } from '@trezor/protobuf/lib/messages';
|
|
2
3
|
import type { TypedCall } from '../../device/DeviceCommands';
|
|
3
4
|
import type { EthereumAccessList } from '../../types/api/ethereum';
|
|
5
|
+
export declare const serializeEthereumTx: (txData: TxData | FeeMarketEIP1559TxData, chainId: number) => string;
|
|
4
6
|
export declare const ethereumSignTx: (typedCall: TypedCall, address_n: number[], to: string, value: string, gas_limit: string, gas_price: string, nonce: string, chain_id: number, data?: string, tx_type?: number, definitions?: EthereumDefinitions) => Promise<{
|
|
5
7
|
v: string;
|
|
6
8
|
r: string;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ethereumSignTxEIP1559 = exports.ethereumSignTx = void 0;
|
|
3
|
+
exports.ethereumSignTxEIP1559 = exports.ethereumSignTx = exports.serializeEthereumTx = void 0;
|
|
4
|
+
const common_1 = require("@ethereumjs/common");
|
|
5
|
+
const tx_1 = require("@ethereumjs/tx");
|
|
4
6
|
const constants_1 = require("../../constants");
|
|
7
|
+
const formatUtils_1 = require("../../utils/formatUtils");
|
|
5
8
|
const splitString = (str, len) => {
|
|
6
9
|
if (str == null) {
|
|
7
10
|
return ['', ''];
|
|
@@ -31,6 +34,17 @@ const processTxRequest = async (typedCall, request, data, chain_id) => {
|
|
|
31
34
|
const response = await typedCall('EthereumTxAck', 'EthereumTxRequest', { data_chunk: first });
|
|
32
35
|
return processTxRequest(typedCall, response.message, rest, chain_id);
|
|
33
36
|
};
|
|
37
|
+
const deepHexPrefix = (0, formatUtils_1.deepTransform)(formatUtils_1.addHexPrefix);
|
|
38
|
+
const serializeEthereumTx = (txData, chainId) => {
|
|
39
|
+
const txOptions = chainId === 61
|
|
40
|
+
? {
|
|
41
|
+
common: common_1.Common.custom({ name: 'ethereum-classic', networkId: 1, chainId: 61 }, { baseChain: common_1.Chain.Mainnet, hardfork: common_1.Hardfork.Petersburg }),
|
|
42
|
+
}
|
|
43
|
+
: { chain: chainId };
|
|
44
|
+
const ethTx = tx_1.TransactionFactory.fromTxData(deepHexPrefix(txData), txOptions);
|
|
45
|
+
return `0x${Buffer.from(ethTx.serialize()).toString('hex')}`;
|
|
46
|
+
};
|
|
47
|
+
exports.serializeEthereumTx = serializeEthereumTx;
|
|
34
48
|
const stripLeadingZeroes = (str) => {
|
|
35
49
|
while (/^00/.test(str)) {
|
|
36
50
|
str = str.slice(2);
|
|
@@ -10,7 +10,7 @@ const getBinary = ({ features, releases, baseUrl, version, btcOnly, intermediary
|
|
|
10
10
|
throw new Error('Features of unexpected shape provided');
|
|
11
11
|
}
|
|
12
12
|
if (intermediaryVersion) {
|
|
13
|
-
return (0, assets_1.httpRequest)(`${baseUrl}/firmware/
|
|
13
|
+
return (0, assets_1.httpRequest)(`${baseUrl}/firmware/t1b1/trezor-t1b1-inter-v${intermediaryVersion}.bin`, 'binary');
|
|
14
14
|
}
|
|
15
15
|
const infoByBootloader = (0, firmwareInfo_1.getInfo)({ features, releases });
|
|
16
16
|
const releaseByFirmware = releases.find(r => version &&
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { PROTO } from '../../constants';
|
|
3
|
+
import { DeviceAuthenticityConfig } from '../../data/deviceAuthenticityConfig';
|
|
4
|
+
import { AuthenticateDeviceResult } from '../../types/api/authenticateDevice';
|
|
5
|
+
interface AuthenticityProofData extends PROTO.AuthenticityProof {
|
|
6
|
+
challenge: Buffer;
|
|
7
|
+
config: DeviceAuthenticityConfig;
|
|
8
|
+
allowDebugKeys?: boolean;
|
|
9
|
+
deviceModel: keyof typeof PROTO.DeviceModelInternal;
|
|
10
|
+
}
|
|
11
|
+
export declare const getRandomChallenge: () => Buffer;
|
|
12
|
+
export declare const verifyAuthenticityProof: ({ certificates, signature, challenge, config, allowDebugKeys, deviceModel, }: AuthenticityProofData) => Promise<AuthenticateDeviceResult>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=verifyAuthenticityProof.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifyAuthenticityProof = exports.getRandomChallenge = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const crypto = tslib_1.__importStar(require("crypto"));
|
|
6
|
+
const utils_1 = require("@trezor/utils");
|
|
7
|
+
const x509certificate_1 = require("./x509certificate");
|
|
8
|
+
const verifySignature = async (rawKey, data, signature) => {
|
|
9
|
+
const signer = crypto.createVerify('sha256');
|
|
10
|
+
signer.update(Buffer.from(data));
|
|
11
|
+
const SubtleCrypto = typeof window !== 'undefined' ? window.crypto.subtle : crypto.subtle;
|
|
12
|
+
if (!SubtleCrypto) {
|
|
13
|
+
throw new Error('SubtleCrypto not supported');
|
|
14
|
+
}
|
|
15
|
+
const ecPubKey = await SubtleCrypto.importKey('raw', rawKey, { name: 'ECDSA', namedCurve: 'P-256' }, true, ['verify']);
|
|
16
|
+
const spkiPubKey = await SubtleCrypto.exportKey('spki', ecPubKey);
|
|
17
|
+
const key = `-----BEGIN PUBLIC KEY-----\n${Buffer.from(spkiPubKey).toString('base64')}\n-----END PUBLIC KEY-----`;
|
|
18
|
+
return signer.verify({ key }, Buffer.from(signature));
|
|
19
|
+
};
|
|
20
|
+
const getRandomChallenge = () => crypto.randomBytes(32);
|
|
21
|
+
exports.getRandomChallenge = getRandomChallenge;
|
|
22
|
+
const verifyAuthenticityProof = async ({ certificates, signature, challenge, config, allowDebugKeys, deviceModel, }) => {
|
|
23
|
+
const modelConfig = config[deviceModel];
|
|
24
|
+
if (!modelConfig) {
|
|
25
|
+
throw new Error(`Pubkeys for ${deviceModel} not found in config`);
|
|
26
|
+
}
|
|
27
|
+
const { caPubKeys, debug } = modelConfig;
|
|
28
|
+
const caCert = (0, x509certificate_1.parseCertificate)(new Uint8Array(Buffer.from(certificates[1], 'hex')));
|
|
29
|
+
const caPubKey = Buffer.from(caCert.tbsCertificate.subjectPublicKeyInfo.bits.bytes).toString('hex');
|
|
30
|
+
const deviceCert = (0, x509certificate_1.parseCertificate)(new Uint8Array(Buffer.from(certificates[0], 'hex')));
|
|
31
|
+
const rootPubKeys = allowDebugKeys
|
|
32
|
+
? modelConfig.rootPubKeys.concat((debug === null || debug === void 0 ? void 0 : debug.rootPubKeys) || [])
|
|
33
|
+
: modelConfig.rootPubKeys;
|
|
34
|
+
const isCertSignedByRootPubkey = await Promise.all(rootPubKeys.map(rootPubKey => verifySignature(Buffer.from(rootPubKey, 'hex'), caCert.tbsCertificate.asn1.raw, caCert.signatureValue.bits.bytes)));
|
|
35
|
+
const rootPubKeyIndex = isCertSignedByRootPubkey.findIndex(valid => !!valid);
|
|
36
|
+
const rootPubKey = rootPubKeys[rootPubKeyIndex];
|
|
37
|
+
const isDebugRootPubKey = debug === null || debug === void 0 ? void 0 : debug.rootPubKeys.includes(rootPubKey);
|
|
38
|
+
const caCertValidityFrom = caCert.tbsCertificate.validity.from.getTime();
|
|
39
|
+
if (caCertValidityFrom > new Date().getTime()) {
|
|
40
|
+
throw new Error(`CA validity from ${caCertValidityFrom} cant't be in the future!`);
|
|
41
|
+
}
|
|
42
|
+
if (!rootPubKey) {
|
|
43
|
+
const configExpired = new Date(config.timestamp).getTime() < caCertValidityFrom;
|
|
44
|
+
return {
|
|
45
|
+
valid: false,
|
|
46
|
+
configExpired,
|
|
47
|
+
caPubKey,
|
|
48
|
+
error: 'ROOT_PUBKEY_NOT_FOUND',
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const [subject] = deviceCert.tbsCertificate.subject;
|
|
52
|
+
if (!subject.parameters || subject.algorithm !== '2.5.4.3') {
|
|
53
|
+
throw new Error('Missing certificate subject');
|
|
54
|
+
}
|
|
55
|
+
const subjectValue = Buffer.from(subject.parameters.asn1.contents.subarray(0, 4)).toString();
|
|
56
|
+
if (subjectValue !== deviceModel) {
|
|
57
|
+
return {
|
|
58
|
+
valid: false,
|
|
59
|
+
caPubKey,
|
|
60
|
+
error: 'INVALID_DEVICE_MODEL',
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const isDeviceCertValid = await verifySignature(Buffer.from(caCert.tbsCertificate.subjectPublicKeyInfo.bits.bytes), deviceCert.tbsCertificate.asn1.raw, deviceCert.signatureValue.bits.bytes);
|
|
64
|
+
const challengePrefix = Buffer.from('AuthenticateDevice:');
|
|
65
|
+
const prefixedChallenge = Buffer.concat([
|
|
66
|
+
utils_1.bufferUtils.getChunkSize(challengePrefix.length),
|
|
67
|
+
challengePrefix,
|
|
68
|
+
utils_1.bufferUtils.getChunkSize(challenge.length),
|
|
69
|
+
challenge,
|
|
70
|
+
]);
|
|
71
|
+
const isSignatureValid = await verifySignature(Buffer.from(deviceCert.tbsCertificate.subjectPublicKeyInfo.bits.bytes), prefixedChallenge, (0, x509certificate_1.fixSignature)(Buffer.from(signature, 'hex')));
|
|
72
|
+
if (rootPubKey && isDeviceCertValid && isSignatureValid) {
|
|
73
|
+
if ((!isDebugRootPubKey && !caPubKeys.includes(caPubKey)) ||
|
|
74
|
+
(isDebugRootPubKey && !(debug === null || debug === void 0 ? void 0 : debug.caPubKeys.includes(caPubKey)))) {
|
|
75
|
+
const configExpired = new Date(config.timestamp).getTime() < caCertValidityFrom;
|
|
76
|
+
return {
|
|
77
|
+
valid: false,
|
|
78
|
+
configExpired,
|
|
79
|
+
caPubKey,
|
|
80
|
+
error: 'CA_PUBKEY_NOT_FOUND',
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
valid: true,
|
|
85
|
+
caPubKey,
|
|
86
|
+
debugKey: isDebugRootPubKey,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (!isDeviceCertValid) {
|
|
90
|
+
return {
|
|
91
|
+
valid: false,
|
|
92
|
+
caPubKey,
|
|
93
|
+
error: 'INVALID_DEVICE_CERTIFICATE',
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
valid: false,
|
|
98
|
+
caPubKey,
|
|
99
|
+
error: 'INVALID_DEVICE_SIGNATURE',
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
exports.verifyAuthenticityProof = verifyAuthenticityProof;
|
|
103
|
+
//# sourceMappingURL=verifyAuthenticityProof.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
interface Asn1 {
|
|
2
|
+
cls: number;
|
|
3
|
+
tag: number;
|
|
4
|
+
structured: boolean;
|
|
5
|
+
byteLength: number;
|
|
6
|
+
contents: Uint8Array;
|
|
7
|
+
raw: Uint8Array;
|
|
8
|
+
}
|
|
9
|
+
export declare const fixSignature: (byteArray: Uint8Array) => Uint8Array;
|
|
10
|
+
export declare const parseName: (asn1: Asn1) => {
|
|
11
|
+
asn1: Asn1;
|
|
12
|
+
algorithm: string;
|
|
13
|
+
parameters: {
|
|
14
|
+
asn1: Asn1;
|
|
15
|
+
} | null;
|
|
16
|
+
}[];
|
|
17
|
+
export declare const parseCertificate: (byteArray: Uint8Array) => {
|
|
18
|
+
asn1: Asn1;
|
|
19
|
+
tbsCertificate: {
|
|
20
|
+
asn1: Asn1;
|
|
21
|
+
version: Asn1;
|
|
22
|
+
serialNumber: Asn1;
|
|
23
|
+
signature: {
|
|
24
|
+
asn1: Asn1;
|
|
25
|
+
algorithm: string;
|
|
26
|
+
parameters: {
|
|
27
|
+
asn1: Asn1;
|
|
28
|
+
} | null;
|
|
29
|
+
};
|
|
30
|
+
issuer: Asn1;
|
|
31
|
+
validity: {
|
|
32
|
+
from: Date;
|
|
33
|
+
to: Date;
|
|
34
|
+
};
|
|
35
|
+
subject: {
|
|
36
|
+
asn1: Asn1;
|
|
37
|
+
algorithm: string;
|
|
38
|
+
parameters: {
|
|
39
|
+
asn1: Asn1;
|
|
40
|
+
} | null;
|
|
41
|
+
}[];
|
|
42
|
+
subjectPublicKeyInfo: {
|
|
43
|
+
asn1: Asn1;
|
|
44
|
+
algorithm: {
|
|
45
|
+
asn1: Asn1;
|
|
46
|
+
algorithm: string;
|
|
47
|
+
parameters: {
|
|
48
|
+
asn1: Asn1;
|
|
49
|
+
} | null;
|
|
50
|
+
};
|
|
51
|
+
bits: {
|
|
52
|
+
unusedBits: number;
|
|
53
|
+
bytes: Uint8Array;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
extensions: Asn1;
|
|
57
|
+
};
|
|
58
|
+
signatureAlgorithm: {
|
|
59
|
+
asn1: Asn1;
|
|
60
|
+
algorithm: string;
|
|
61
|
+
parameters: {
|
|
62
|
+
asn1: Asn1;
|
|
63
|
+
} | null;
|
|
64
|
+
};
|
|
65
|
+
signatureValue: {
|
|
66
|
+
asn1: Asn1;
|
|
67
|
+
bits: {
|
|
68
|
+
unusedBits: number;
|
|
69
|
+
bytes: Uint8Array;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export {};
|
|
74
|
+
//# sourceMappingURL=x509certificate.d.ts.map
|