@onekeyfe/hd-core 0.1.6 → 0.1.9
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/dist/api/CipherKeyValue.d.ts +1 -1
- package/dist/api/CipherKeyValue.d.ts.map +1 -1
- package/dist/api/FirmwareUpdate.d.ts +1 -3
- package/dist/api/FirmwareUpdate.d.ts.map +1 -1
- package/dist/api/GetFeatures.d.ts +1 -47
- package/dist/api/GetFeatures.d.ts.map +1 -1
- package/dist/api/btc/BTCGetAddress.d.ts +1 -1
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts +1 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts +2 -5
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
- package/dist/api/btc/BTCSignTransaction.d.ts +1 -1
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts +2 -4
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
- package/dist/api/btc/helpers/signtx.d.ts +1 -1
- package/dist/api/btc/helpers/signtx.d.ts.map +1 -1
- package/dist/api/btc/helpers/signtxLegacy.d.ts +1 -1
- package/dist/api/btc/helpers/signtxLegacy.d.ts.map +1 -1
- package/dist/api/device/DeviceBackup.d.ts +2 -4
- package/dist/api/device/DeviceBackup.d.ts.map +1 -1
- package/dist/api/device/DeviceChangePin.d.ts +2 -4
- package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
- package/dist/api/device/DeviceFlags.d.ts +2 -4
- package/dist/api/device/DeviceFlags.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts +2 -4
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
- package/dist/api/device/DeviceRecovery.d.ts +2 -4
- package/dist/api/device/DeviceRecovery.d.ts.map +1 -1
- package/dist/api/device/DeviceReset.d.ts +2 -4
- package/dist/api/device/DeviceReset.d.ts.map +1 -1
- package/dist/api/device/DeviceSettings.d.ts +2 -4
- package/dist/api/device/DeviceSettings.d.ts.map +1 -1
- package/dist/api/device/DeviceUpdateReboot.d.ts +2 -4
- package/dist/api/device/DeviceUpdateReboot.d.ts.map +1 -1
- package/dist/api/device/DeviceVerify.d.ts +8 -0
- package/dist/api/device/DeviceVerify.d.ts.map +1 -0
- package/dist/api/device/DeviceWipe.d.ts +2 -4
- package/dist/api/device/DeviceWipe.d.ts.map +1 -1
- package/dist/api/evm/EVMGetAddress.d.ts +1 -1
- package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
- package/dist/api/evm/EVMGetPublicKey.d.ts +1 -1
- package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessage.d.ts +2 -5
- package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessageEIP712.d.ts +2 -5
- package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTransaction.d.ts +1 -1
- package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTypedData.d.ts +6 -5
- package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
- package/dist/api/evm/EVMVerifyMessage.d.ts +2 -4
- package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
- package/dist/api/firmware/uploadFirmware.d.ts +1 -3
- package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
- package/dist/api/helpers/pathUtils.d.ts +1 -1
- package/dist/api/helpers/pathUtils.d.ts.map +1 -1
- package/dist/api/helpers/typeNameUtils.d.ts +1 -1
- package/dist/api/helpers/typeNameUtils.d.ts.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/nem/NEMGetAddress.d.ts +1 -1
- package/dist/api/nem/NEMGetAddress.d.ts.map +1 -1
- package/dist/api/nem/NEMSignTransaction.d.ts +1 -1
- package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -1
- package/dist/api/solana/SolGetAddress.d.ts +1 -1
- package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
- package/dist/api/solana/SolSignTransaction.d.ts +1 -1
- package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinGetAddress.d.ts +1 -1
- package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +1 -1
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinSignMessage.d.ts +2 -5
- package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts +2 -5
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +2 -4
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -1
- package/dist/api/stellar/StellarGetAddress.d.ts +1 -1
- package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/device/Device.d.ts +1 -1
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +1 -0
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +16 -51
- package/dist/index.js +244 -2
- package/dist/inject.d.ts.map +1 -1
- package/dist/types/api/btcGetAddress.d.ts +1 -1
- package/dist/types/api/btcGetAddress.d.ts.map +1 -1
- package/dist/types/api/btcGetPublicKey.d.ts +1 -1
- package/dist/types/api/btcGetPublicKey.d.ts.map +1 -1
- package/dist/types/api/btcSignMessage.d.ts +1 -1
- package/dist/types/api/btcSignMessage.d.ts.map +1 -1
- package/dist/types/api/btcSignTransaction.d.ts +1 -1
- package/dist/types/api/btcSignTransaction.d.ts.map +1 -1
- package/dist/types/api/btcVerifyMessage.d.ts +1 -1
- package/dist/types/api/btcVerifyMessage.d.ts.map +1 -1
- package/dist/types/api/cipherKeyValue.d.ts +1 -1
- package/dist/types/api/cipherKeyValue.d.ts.map +1 -1
- package/dist/types/api/deviceBackup.d.ts +1 -1
- package/dist/types/api/deviceBackup.d.ts.map +1 -1
- package/dist/types/api/deviceChangePin.d.ts +1 -1
- package/dist/types/api/deviceChangePin.d.ts.map +1 -1
- package/dist/types/api/deviceFlags.d.ts +1 -1
- package/dist/types/api/deviceFlags.d.ts.map +1 -1
- package/dist/types/api/deviceRebootToBootloader.d.ts +1 -1
- package/dist/types/api/deviceRebootToBootloader.d.ts.map +1 -1
- package/dist/types/api/deviceRecovery.d.ts +1 -1
- package/dist/types/api/deviceRecovery.d.ts.map +1 -1
- package/dist/types/api/deviceReset.d.ts +1 -1
- package/dist/types/api/deviceReset.d.ts.map +1 -1
- package/dist/types/api/deviceSettings.d.ts +1 -1
- package/dist/types/api/deviceSettings.d.ts.map +1 -1
- package/dist/types/api/deviceUpdateReboot.d.ts +1 -1
- package/dist/types/api/deviceUpdateReboot.d.ts.map +1 -1
- package/dist/types/api/deviceVerify.d.ts +11 -0
- package/dist/types/api/deviceVerify.d.ts.map +1 -0
- package/dist/types/api/deviceWipe.d.ts +1 -1
- package/dist/types/api/deviceWipe.d.ts.map +1 -1
- package/dist/types/api/evmGetPublicKey.d.ts +1 -1
- package/dist/types/api/evmGetPublicKey.d.ts.map +1 -1
- package/dist/types/api/evmSignMessage.d.ts +1 -1
- package/dist/types/api/evmSignMessage.d.ts.map +1 -1
- package/dist/types/api/evmSignMessageEIP712.d.ts +1 -1
- package/dist/types/api/evmSignMessageEIP712.d.ts.map +1 -1
- package/dist/types/api/evmSignTypedData.d.ts +1 -1
- package/dist/types/api/evmSignTypedData.d.ts.map +1 -1
- package/dist/types/api/evmVerifyMessage.d.ts +1 -1
- package/dist/types/api/evmVerifyMessage.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +1 -0
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +2 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/nemGetAddress.d.ts +1 -1
- package/dist/types/api/nemGetAddress.d.ts.map +1 -1
- package/dist/types/api/nemSignTransaction.d.ts +1 -1
- package/dist/types/api/nemSignTransaction.d.ts.map +1 -1
- package/dist/types/api/solGetAddress.d.ts +1 -1
- package/dist/types/api/solGetAddress.d.ts.map +1 -1
- package/dist/types/api/solSignTransaction.d.ts +1 -1
- package/dist/types/api/solSignTransaction.d.ts.map +1 -1
- package/dist/types/api/starcoinGetAddress.d.ts +1 -1
- package/dist/types/api/starcoinGetAddress.d.ts.map +1 -1
- package/dist/types/api/starcoinGetPublicKey.d.ts +1 -1
- package/dist/types/api/starcoinGetPublicKey.d.ts.map +1 -1
- package/dist/types/api/starcoinSignMessage.d.ts +1 -1
- package/dist/types/api/starcoinSignMessage.d.ts.map +1 -1
- package/dist/types/api/starcoinSignTransaction.d.ts +1 -1
- package/dist/types/api/starcoinSignTransaction.d.ts.map +1 -1
- package/dist/types/api/starcoinVerifyMessage.d.ts +1 -1
- package/dist/types/api/starcoinVerifyMessage.d.ts.map +1 -1
- package/dist/types/api/stellarGetAddress.d.ts +1 -1
- package/dist/types/api/stellarGetAddress.d.ts.map +1 -1
- package/dist/types/api/stellarSignTransaction.d.ts +1 -1
- package/dist/types/api/stellarSignTransaction.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts +3 -94
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/CipherKeyValue.ts +1 -1
- package/src/api/btc/BTCGetAddress.ts +1 -1
- package/src/api/btc/BTCGetPublicKey.ts +1 -1
- package/src/api/btc/BTCSignMessage.ts +1 -1
- package/src/api/btc/BTCSignTransaction.ts +1 -1
- package/src/api/btc/BTCVerifyMessage.ts +1 -1
- package/src/api/btc/helpers/signtx.ts +1 -1
- package/src/api/btc/helpers/signtxLegacy.ts +1 -1
- package/src/api/device/DeviceBackup.ts +1 -1
- package/src/api/device/DeviceChangePin.ts +1 -1
- package/src/api/device/DeviceFlags.ts +1 -1
- package/src/api/device/DeviceRebootToBootloader.ts +1 -1
- package/src/api/device/DeviceRecovery.ts +1 -1
- package/src/api/device/DeviceReset.ts +1 -1
- package/src/api/device/DeviceSettings.ts +1 -1
- package/src/api/device/DeviceUpdateReboot.ts +1 -1
- package/src/api/device/DeviceVerify.ts +55 -0
- package/src/api/device/DeviceWipe.ts +1 -1
- package/src/api/evm/EVMGetAddress.ts +1 -1
- package/src/api/evm/EVMGetPublicKey.ts +1 -1
- package/src/api/evm/EVMSignMessage.ts +1 -1
- package/src/api/evm/EVMSignMessageEIP712.ts +1 -1
- package/src/api/evm/EVMSignTransaction.ts +1 -5
- package/src/api/evm/EVMSignTypedData.ts +119 -124
- package/src/api/evm/EVMVerifyMessage.ts +1 -1
- package/src/api/helpers/pathUtils.ts +1 -1
- package/src/api/helpers/typeNameUtils.ts +1 -1
- package/src/api/index.ts +1 -0
- package/src/api/nem/NEMGetAddress.ts +1 -1
- package/src/api/nem/NEMSignTransaction.ts +1 -1
- package/src/api/solana/SolGetAddress.ts +3 -1
- package/src/api/solana/SolSignTransaction.ts +3 -1
- package/src/api/starcoin/StarcoinGetAddress.ts +1 -1
- package/src/api/starcoin/StarcoinGetPublicKey.ts +1 -1
- package/src/api/starcoin/StarcoinSignMessage.ts +1 -1
- package/src/api/starcoin/StarcoinSignTransaction.ts +1 -1
- package/src/api/starcoin/StarcoinVerifyMessage.ts +1 -1
- package/src/api/stellar/StellarGetAddress.ts +1 -1
- package/src/api/stellar/StellarSignTransaction.ts +1 -1
- package/src/core/index.ts +5 -0
- package/src/device/Device.ts +4 -1
- package/src/events/ui-request.ts +2 -0
- package/src/inject.ts +1 -0
- package/src/types/api/btcGetAddress.ts +1 -1
- package/src/types/api/btcGetPublicKey.ts +1 -1
- package/src/types/api/btcSignMessage.ts +1 -1
- package/src/types/api/btcSignTransaction.ts +1 -1
- package/src/types/api/btcVerifyMessage.ts +1 -1
- package/src/types/api/cipherKeyValue.ts +1 -1
- package/src/types/api/deviceBackup.ts +1 -1
- package/src/types/api/deviceChangePin.ts +1 -1
- package/src/types/api/deviceFlags.ts +1 -1
- package/src/types/api/deviceRebootToBootloader.ts +1 -1
- package/src/types/api/deviceRecovery.ts +1 -1
- package/src/types/api/deviceReset.ts +1 -1
- package/src/types/api/deviceSettings.ts +1 -1
- package/src/types/api/deviceUpdateReboot.ts +1 -1
- package/src/types/api/deviceVerify.ts +15 -0
- package/src/types/api/deviceWipe.ts +1 -1
- package/src/types/api/evmGetPublicKey.ts +1 -1
- package/src/types/api/evmSignMessage.ts +1 -1
- package/src/types/api/evmSignMessageEIP712.ts +1 -1
- package/src/types/api/evmSignTypedData.ts +1 -1
- package/src/types/api/evmVerifyMessage.ts +1 -1
- package/src/types/api/export.ts +1 -0
- package/src/types/api/index.ts +2 -0
- package/src/types/api/nemGetAddress.ts +1 -1
- package/src/types/api/nemSignTransaction.ts +1 -1
- package/src/types/api/solGetAddress.ts +1 -1
- package/src/types/api/solSignTransaction.ts +1 -1
- package/src/types/api/starcoinGetAddress.ts +1 -1
- package/src/types/api/starcoinGetPublicKey.ts +1 -1
- package/src/types/api/starcoinSignMessage.ts +1 -1
- package/src/types/api/starcoinSignTransaction.ts +1 -1
- package/src/types/api/starcoinVerifyMessage.ts +1 -1
- package/src/types/api/stellarGetAddress.ts +1 -1
- package/src/types/api/stellarSignTransaction.ts +1 -1
- package/src/utils/deviceFeaturesUtils.ts +11 -0
package/dist/index.js
CHANGED
|
@@ -44,6 +44,7 @@ const inject = ({ call, cancel, dispose, eventEmitter, init, uiResponse, }) => {
|
|
|
44
44
|
deviceReset: (connectId, params) => call(Object.assign(Object.assign({}, params), { connectId, method: 'deviceReset' })),
|
|
45
45
|
deviceSettings: (connectId, params) => call(Object.assign(Object.assign({}, params), { connectId, method: 'deviceSettings' })),
|
|
46
46
|
deviceUpdateReboot: connectId => call({ connectId, method: 'deviceUpdateReboot' }),
|
|
47
|
+
deviceVerify: (connectId, params) => call(Object.assign(Object.assign({}, params), { connectId, method: 'deviceVerify' })),
|
|
47
48
|
deviceWipe: connectId => call({ connectId, method: 'deviceWipe' }),
|
|
48
49
|
evmGetAddress: (connectId, params) => call(Object.assign(Object.assign({}, params), { connectId, method: 'evmGetAddress' })),
|
|
49
50
|
evmGetPublicKey: (connectId, params) => call(Object.assign(Object.assign({}, params), { connectId, method: 'evmGetPublicKey' })),
|
|
@@ -784,6 +785,15 @@ const getDeviceType = (features) => {
|
|
|
784
785
|
return 'touch';
|
|
785
786
|
return 'classic';
|
|
786
787
|
};
|
|
788
|
+
const getDeviceTypeOnBootloader = (features) => {
|
|
789
|
+
if (!features || typeof features !== 'object') {
|
|
790
|
+
return 'classic';
|
|
791
|
+
}
|
|
792
|
+
if (features.model === 'T') {
|
|
793
|
+
return 'touch';
|
|
794
|
+
}
|
|
795
|
+
return getDeviceType(features);
|
|
796
|
+
};
|
|
787
797
|
const getDeviceTypeByBleName = (name) => {
|
|
788
798
|
if (!name)
|
|
789
799
|
return 'classic';
|
|
@@ -9935,6 +9945,7 @@ const UI_REQUEST$1 = {
|
|
|
9935
9945
|
BLUETOOTH_PERMISSION: 'ui-bluetooth_permission',
|
|
9936
9946
|
LOCATION_PERMISSION: 'ui-location_permission',
|
|
9937
9947
|
FIRMWARE_PROGRESS: 'ui-firmware-progress',
|
|
9948
|
+
NOT_IN_BOOTLOADER: 'ui-device_not_in_bootloader_mode',
|
|
9938
9949
|
};
|
|
9939
9950
|
const createUiMessage = (type, payload) => ({
|
|
9940
9951
|
event: UI_EVENT,
|
|
@@ -10260,7 +10271,9 @@ class Device extends events.exports {
|
|
|
10260
10271
|
return {
|
|
10261
10272
|
connectId: env === 'react-native' ? this.mainId || null : getDeviceUUID(this.features),
|
|
10262
10273
|
uuid: getDeviceUUID(this.features),
|
|
10263
|
-
deviceType:
|
|
10274
|
+
deviceType: this.features.bootloader_mode
|
|
10275
|
+
? getDeviceTypeOnBootloader(this.features)
|
|
10276
|
+
: getDeviceType(this.features),
|
|
10264
10277
|
deviceId: this.features.device_id || null,
|
|
10265
10278
|
path: this.originalDescriptor.path,
|
|
10266
10279
|
name: this.features.ble_name ||
|
|
@@ -11786,6 +11799,38 @@ class DeviceUpdateReboot extends BaseMethod {
|
|
|
11786
11799
|
}
|
|
11787
11800
|
}
|
|
11788
11801
|
|
|
11802
|
+
class DeviceVerify extends BaseMethod {
|
|
11803
|
+
init() {
|
|
11804
|
+
validateParams(this.payload, [{ name: 'dataHex', type: 'hexString' }]);
|
|
11805
|
+
this.params = {
|
|
11806
|
+
data: formatAnyHex(this.payload.dataHex),
|
|
11807
|
+
};
|
|
11808
|
+
}
|
|
11809
|
+
run() {
|
|
11810
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11811
|
+
const deviceType = getDeviceType(this.device.features);
|
|
11812
|
+
let response;
|
|
11813
|
+
if (deviceType === 'classic') {
|
|
11814
|
+
const res = yield this.device.commands.typedCall('BixinVerifyDeviceRequest', 'BixinVerifyDeviceAck', Object.assign({}, this.params));
|
|
11815
|
+
response = res.message;
|
|
11816
|
+
}
|
|
11817
|
+
else if (deviceType === 'mini') {
|
|
11818
|
+
const signatureRes = yield this.device.commands.typedCall('SESignMessage', 'SEMessageSignature', {
|
|
11819
|
+
message: this.params.data,
|
|
11820
|
+
});
|
|
11821
|
+
const certRes = yield this.device.commands.typedCall('ReadSEPublicCert', 'SEPublicCert');
|
|
11822
|
+
response = {
|
|
11823
|
+
cert: certRes.message.public_cert,
|
|
11824
|
+
signature: signatureRes.message.signature,
|
|
11825
|
+
};
|
|
11826
|
+
}
|
|
11827
|
+
if (response)
|
|
11828
|
+
return Promise.resolve(response);
|
|
11829
|
+
return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, 'Device not support verify'));
|
|
11830
|
+
});
|
|
11831
|
+
}
|
|
11832
|
+
}
|
|
11833
|
+
|
|
11789
11834
|
class DeviceWipe extends BaseMethod {
|
|
11790
11835
|
init() { }
|
|
11791
11836
|
run() {
|
|
@@ -12068,6 +12113,117 @@ class EVMSignTransaction extends BaseMethod {
|
|
|
12068
12113
|
}
|
|
12069
12114
|
}
|
|
12070
12115
|
|
|
12116
|
+
const twosComplement = (number, bytes) => {
|
|
12117
|
+
if (bytes < 1 || bytes > 32) {
|
|
12118
|
+
throw hdShared.ERRORS.TypedError('Runtime', 'Int byte size must be between 1 and 32 (8 and 256 bits)');
|
|
12119
|
+
}
|
|
12120
|
+
const minValue = new BigNumber__default["default"](2).exponentiatedBy(bytes * 8 - 1).negated();
|
|
12121
|
+
const maxValue = minValue.negated().minus(1);
|
|
12122
|
+
const bigNumber = new BigNumber__default["default"](number);
|
|
12123
|
+
if (bigNumber.isGreaterThan(maxValue) || bigNumber.isLessThan(minValue)) {
|
|
12124
|
+
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, `Overflow when trying to convert number ${number.toString()} into ${bytes} bytes`);
|
|
12125
|
+
}
|
|
12126
|
+
if (bigNumber.isPositive()) {
|
|
12127
|
+
return bigNumber;
|
|
12128
|
+
}
|
|
12129
|
+
return bigNumber.minus(minValue).minus(minValue);
|
|
12130
|
+
};
|
|
12131
|
+
const intToHex = (number, bytes, signed) => {
|
|
12132
|
+
let bigNumber = new BigNumber__default["default"](number);
|
|
12133
|
+
if (signed) {
|
|
12134
|
+
bigNumber = twosComplement(bigNumber, bytes);
|
|
12135
|
+
}
|
|
12136
|
+
if (bigNumber.isNegative()) {
|
|
12137
|
+
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, `Cannot convert negative number to unsigned interger: ${number.toString()}`);
|
|
12138
|
+
}
|
|
12139
|
+
const hex = bigNumber.toString(16);
|
|
12140
|
+
const hexChars = bytes * 2;
|
|
12141
|
+
if (hex.length > hexChars) {
|
|
12142
|
+
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, `Overflow when trying to convert number ${number.toString()} into ${bytes} bytes`);
|
|
12143
|
+
}
|
|
12144
|
+
return hex.padStart(bytes * 2, '0');
|
|
12145
|
+
};
|
|
12146
|
+
|
|
12147
|
+
const paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/);
|
|
12148
|
+
const paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);
|
|
12149
|
+
const paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);
|
|
12150
|
+
const parseArrayType = (arrayTypeName) => {
|
|
12151
|
+
const arrayMatch = paramTypeArray.exec(arrayTypeName);
|
|
12152
|
+
if (arrayMatch === null) {
|
|
12153
|
+
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, `typename ${arrayTypeName} could not be parsed as an EIP-712 array`);
|
|
12154
|
+
}
|
|
12155
|
+
const [_, entryTypeName, arraySize] = arrayMatch;
|
|
12156
|
+
return {
|
|
12157
|
+
entryTypeName,
|
|
12158
|
+
arraySize: parseInt(arraySize, 10) || null,
|
|
12159
|
+
};
|
|
12160
|
+
};
|
|
12161
|
+
const encodeData = (typeName, data) => {
|
|
12162
|
+
if (paramTypeBytes.test(typeName) || typeName === 'address') {
|
|
12163
|
+
return formatAnyHex(data);
|
|
12164
|
+
}
|
|
12165
|
+
if (typeName === 'string') {
|
|
12166
|
+
return Buffer.from(data, 'utf-8').toString('hex');
|
|
12167
|
+
}
|
|
12168
|
+
const numberMatch = paramTypeNumber.exec(typeName);
|
|
12169
|
+
if (numberMatch) {
|
|
12170
|
+
const [_, intType, bits] = numberMatch;
|
|
12171
|
+
const bytes = Math.ceil(parseInt(bits, 10) / 8);
|
|
12172
|
+
return intToHex(data, bytes, intType === 'int');
|
|
12173
|
+
}
|
|
12174
|
+
if (typeName === 'bool') {
|
|
12175
|
+
return data ? '01' : '00';
|
|
12176
|
+
}
|
|
12177
|
+
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, `Unsupported data type for direct field encoding: ${typeName}`);
|
|
12178
|
+
};
|
|
12179
|
+
const paramTypesMap = {
|
|
12180
|
+
string: hdTransport.EthereumDataType.STRING,
|
|
12181
|
+
bool: hdTransport.EthereumDataType.BOOL,
|
|
12182
|
+
address: hdTransport.EthereumDataType.ADDRESS,
|
|
12183
|
+
};
|
|
12184
|
+
const getFieldType = (typeName, types) => {
|
|
12185
|
+
const arrayMatch = paramTypeArray.exec(typeName);
|
|
12186
|
+
if (arrayMatch) {
|
|
12187
|
+
const [_, arrayItemTypeName, arraySize] = arrayMatch;
|
|
12188
|
+
const entryType = getFieldType(arrayItemTypeName, types);
|
|
12189
|
+
return {
|
|
12190
|
+
data_type: hdTransport.EthereumDataType.ARRAY,
|
|
12191
|
+
size: parseInt(arraySize, 10) || undefined,
|
|
12192
|
+
entry_type: entryType,
|
|
12193
|
+
};
|
|
12194
|
+
}
|
|
12195
|
+
const numberMatch = paramTypeNumber.exec(typeName);
|
|
12196
|
+
if (numberMatch) {
|
|
12197
|
+
const [_, type, bits] = numberMatch;
|
|
12198
|
+
return {
|
|
12199
|
+
data_type: type === 'uint' ? hdTransport.EthereumDataType.UINT : hdTransport.EthereumDataType.INT,
|
|
12200
|
+
size: Math.floor(parseInt(bits, 10) / 8),
|
|
12201
|
+
};
|
|
12202
|
+
}
|
|
12203
|
+
const bytesMatch = paramTypeBytes.exec(typeName);
|
|
12204
|
+
if (bytesMatch) {
|
|
12205
|
+
const [_, size] = bytesMatch;
|
|
12206
|
+
return {
|
|
12207
|
+
data_type: hdTransport.EthereumDataType.BYTES,
|
|
12208
|
+
size: parseInt(size, 10) || undefined,
|
|
12209
|
+
};
|
|
12210
|
+
}
|
|
12211
|
+
const fixedSizeTypeMatch = paramTypesMap[typeName];
|
|
12212
|
+
if (fixedSizeTypeMatch) {
|
|
12213
|
+
return {
|
|
12214
|
+
data_type: fixedSizeTypeMatch,
|
|
12215
|
+
};
|
|
12216
|
+
}
|
|
12217
|
+
if (typeName in types) {
|
|
12218
|
+
return {
|
|
12219
|
+
data_type: hdTransport.EthereumDataType.STRUCT,
|
|
12220
|
+
size: types[typeName].length,
|
|
12221
|
+
struct_name: typeName,
|
|
12222
|
+
};
|
|
12223
|
+
}
|
|
12224
|
+
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, `No type definition specified: ${typeName}`);
|
|
12225
|
+
};
|
|
12226
|
+
|
|
12071
12227
|
class EVMSignTypedData extends BaseMethod {
|
|
12072
12228
|
init() {
|
|
12073
12229
|
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
@@ -12095,6 +12251,88 @@ class EVMSignTypedData extends BaseMethod {
|
|
|
12095
12251
|
}
|
|
12096
12252
|
}
|
|
12097
12253
|
}
|
|
12254
|
+
signTypedData() {
|
|
12255
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12256
|
+
const { commands } = this.device;
|
|
12257
|
+
const { addressN, data, metamaskV4Compat } = this.params;
|
|
12258
|
+
const { types, primaryType, domain, message, } = data;
|
|
12259
|
+
let response = yield commands.typedCall('EthereumSignTypedData', [
|
|
12260
|
+
'EthereumTypedDataStructRequest',
|
|
12261
|
+
'EthereumTypedDataValueRequest',
|
|
12262
|
+
'EthereumTypedDataSignature',
|
|
12263
|
+
], {
|
|
12264
|
+
address_n: addressN,
|
|
12265
|
+
primary_type: primaryType,
|
|
12266
|
+
metamask_v4_compat: metamaskV4Compat,
|
|
12267
|
+
});
|
|
12268
|
+
while (response.type === 'EthereumTypedDataStructRequest') {
|
|
12269
|
+
const { name: typeDefinitionName } = response.message;
|
|
12270
|
+
const typeDefinition = types[typeDefinitionName];
|
|
12271
|
+
if (typeDefinition === undefined) {
|
|
12272
|
+
throw hdShared.ERRORS.TypedError('Runtime', `Type ${typeDefinitionName} was not defined in types object`);
|
|
12273
|
+
}
|
|
12274
|
+
const dataStruckAck = {
|
|
12275
|
+
members: typeDefinition.map(({ name, type: typeName }) => ({
|
|
12276
|
+
name,
|
|
12277
|
+
type: getFieldType(typeName, types),
|
|
12278
|
+
})),
|
|
12279
|
+
};
|
|
12280
|
+
response = yield commands.typedCall('EthereumTypedDataStructAck', [
|
|
12281
|
+
'EthereumTypedDataStructRequest',
|
|
12282
|
+
'EthereumTypedDataValueRequest',
|
|
12283
|
+
'EthereumTypedDataSignature',
|
|
12284
|
+
], dataStruckAck);
|
|
12285
|
+
}
|
|
12286
|
+
while (response.type === 'EthereumTypedDataValueRequest') {
|
|
12287
|
+
const { member_path } = response.message;
|
|
12288
|
+
let memberData;
|
|
12289
|
+
let memberTypeName;
|
|
12290
|
+
const [rootIndex, ...nestedMemberPath] = member_path;
|
|
12291
|
+
switch (rootIndex) {
|
|
12292
|
+
case 0:
|
|
12293
|
+
memberData = domain;
|
|
12294
|
+
memberTypeName = 'EIP712Domain';
|
|
12295
|
+
break;
|
|
12296
|
+
case 1:
|
|
12297
|
+
memberData = message;
|
|
12298
|
+
memberTypeName = primaryType;
|
|
12299
|
+
break;
|
|
12300
|
+
default:
|
|
12301
|
+
throw hdShared.ERRORS.TypedError('Runtime', 'Root index can only be 0 or 1');
|
|
12302
|
+
}
|
|
12303
|
+
for (const index of nestedMemberPath) {
|
|
12304
|
+
if (Array.isArray(memberData)) {
|
|
12305
|
+
memberTypeName = parseArrayType(memberTypeName).entryTypeName;
|
|
12306
|
+
memberData = memberData[index];
|
|
12307
|
+
}
|
|
12308
|
+
else if (typeof memberData === 'object' && memberData !== null) {
|
|
12309
|
+
const memberTypeDefinition = types[memberTypeName][index];
|
|
12310
|
+
memberTypeName = memberTypeDefinition.type;
|
|
12311
|
+
memberData = memberData[memberTypeDefinition.name];
|
|
12312
|
+
}
|
|
12313
|
+
else ;
|
|
12314
|
+
}
|
|
12315
|
+
let encodedData;
|
|
12316
|
+
if (Array.isArray(memberData)) {
|
|
12317
|
+
encodedData = encodeData('uint16', memberData.length);
|
|
12318
|
+
}
|
|
12319
|
+
else {
|
|
12320
|
+
encodedData = encodeData(memberTypeName, memberData);
|
|
12321
|
+
}
|
|
12322
|
+
response = yield commands.typedCall('EthereumTypedDataValueAck', ['EthereumTypedDataValueRequest', 'EthereumTypedDataSignature'], {
|
|
12323
|
+
value: encodedData,
|
|
12324
|
+
});
|
|
12325
|
+
}
|
|
12326
|
+
if (response.type !== 'EthereumTypedDataSignature') {
|
|
12327
|
+
throw hdShared.ERRORS.TypedError('Runtime', 'Unexpected response type');
|
|
12328
|
+
}
|
|
12329
|
+
const { address, signature } = response.message;
|
|
12330
|
+
return {
|
|
12331
|
+
address,
|
|
12332
|
+
signature,
|
|
12333
|
+
};
|
|
12334
|
+
});
|
|
12335
|
+
}
|
|
12098
12336
|
getVersionRange() {
|
|
12099
12337
|
return {
|
|
12100
12338
|
model_mini: {
|
|
@@ -12143,7 +12381,7 @@ class EVMSignTypedData extends BaseMethod {
|
|
|
12143
12381
|
}
|
|
12144
12382
|
return Promise.resolve(response.message);
|
|
12145
12383
|
}
|
|
12146
|
-
return
|
|
12384
|
+
return this.signTypedData();
|
|
12147
12385
|
});
|
|
12148
12386
|
}
|
|
12149
12387
|
}
|
|
@@ -12996,6 +13234,7 @@ var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
|
12996
13234
|
deviceReset: DeviceReset,
|
|
12997
13235
|
deviceSettings: DeviceSettings,
|
|
12998
13236
|
deviceUpdateReboot: DeviceUpdateReboot,
|
|
13237
|
+
deviceVerify: DeviceVerify,
|
|
12999
13238
|
deviceWipe: DeviceWipe,
|
|
13000
13239
|
evmGetAddress: EvmGetAddress,
|
|
13001
13240
|
evmGetPublicKey: EVMGetPublicKey,
|
|
@@ -13259,6 +13498,9 @@ const callAPI = (message) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
13259
13498
|
}
|
|
13260
13499
|
const unexpectedMode = device.hasUnexpectedMode(method.allowDeviceMode, method.requireDeviceMode);
|
|
13261
13500
|
if (unexpectedMode) {
|
|
13501
|
+
if (unexpectedMode === UI_REQUEST$1.NOT_IN_BOOTLOADER) {
|
|
13502
|
+
return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceUnexpectedBootloaderMode));
|
|
13503
|
+
}
|
|
13262
13504
|
return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceUnexpectedMode, unexpectedMode));
|
|
13263
13505
|
}
|
|
13264
13506
|
if (_deviceList) {
|
package/dist/inject.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,+DAOhB,SAAS,KAAG,
|
|
1
|
+
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,+DAOhB,SAAS,KAAG,OA+Gd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Address, InputScriptType, MultisigRedeemScriptType } from '@onekeyfe/hd-transport
|
|
1
|
+
import { Address, InputScriptType, MultisigRedeemScriptType } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
export declare type BTCAddress = {
|
|
4
4
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"btcGetAddress.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,eAAe,EACf,wBAAwB,EACzB,MAAM,
|
|
1
|
+
{"version":3,"file":"btcGetAddress.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,eAAe,EACf,wBAAwB,EACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC;AAEZ,oBAAY,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,mBAAmB,GACzC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAExB,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG;IAAE,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAAE,GACxD,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputScriptType, PublicKey } from '@onekeyfe/hd-transport
|
|
1
|
+
import { InputScriptType, PublicKey } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
export declare type BTCPublicKey = {
|
|
4
4
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"btcGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcGetPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"btcGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcGetPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,SAAS,CAAC;AAEd,oBAAY,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,qBAAqB,GAC3C,QAAQ,CAAC,YAAY,CAAC,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG;IAAE,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAA;CAAE,GAC1D,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"btcSignMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"btcSignMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,oBAAoB,GAC1C,QAAQ,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TxInput as OrigTxInput, PrevInput, TxOutputBinType, TxOutputType, TxInputType } from '@onekeyfe/hd-transport
|
|
1
|
+
import { TxInput as OrigTxInput, PrevInput, TxOutputBinType, TxOutputType, TxInputType } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
export declare type SignedTransaction = {
|
|
4
4
|
signatures: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"btcSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,SAAS,EACT,eAAe,EACf,YAAY,EACZ,WAAW,EACZ,MAAM,
|
|
1
|
+
{"version":3,"file":"btcSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcSignTransaction.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"btcVerifyMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcVerifyMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"btcVerifyMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/btcVerifyMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,sBAAsB,GAC5C,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CipheredKeyValue as HardwareCipheredKeyValue } from '@onekeyfe/hd-transport
|
|
1
|
+
import { CipheredKeyValue as HardwareCipheredKeyValue } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
export declare type CipheredKeyValue = {
|
|
4
4
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cipherKeyValue.d.ts","sourceRoot":"","sources":["../../../src/types/api/cipherKeyValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cipherKeyValue.d.ts","sourceRoot":"","sources":["../../../src/types/api/cipherKeyValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,wBAAwB,CAAC;AAE7B,oBAAY,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,sBAAsB,GAC5C,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAE9B,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG;IAAE,MAAM,CAAC,EAAE,sBAAsB,EAAE,CAAA;CAAE,GAC3D,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Success } from '@onekeyfe/hd-transport
|
|
1
|
+
import { Success } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { Response } from '../params';
|
|
3
3
|
export declare function deviceBackup(connectId: string): Response<Success>;
|
|
4
4
|
//# sourceMappingURL=deviceBackup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceBackup.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceBackup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deviceBackup.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceBackup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceChangePin.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceChangePin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deviceChangePin.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceChangePin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,qBAAqB,GAC3C,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceFlags.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deviceFlags.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,iBAAiB,GACvC,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Success } from '@onekeyfe/hd-transport
|
|
1
|
+
import { Success } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { Response } from '../params';
|
|
3
3
|
export declare function deviceRebootToBootloader(connectId: string): Response<Success>;
|
|
4
4
|
//# sourceMappingURL=deviceRebootToBootloader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceRebootToBootloader.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceRebootToBootloader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deviceRebootToBootloader.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceRebootToBootloader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RecoveryDeviceType, Success } from '@onekeyfe/hd-transport
|
|
1
|
+
import { RecoveryDeviceType, Success } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
export declare type DeviceRecoveryParams = {
|
|
4
4
|
wordCount?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceRecovery.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceRecovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deviceRecovery.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceRecovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,oBAAoB,GAC1C,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceReset.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceReset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deviceReset.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceReset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,iBAAiB,GAAG;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,iBAAiB,GACvC,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SafetyCheckLevel, Success } from '@onekeyfe/hd-transport
|
|
1
|
+
import { SafetyCheckLevel, Success } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
export declare type DeviceSettingsParams = {
|
|
4
4
|
language?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceSettings.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deviceSettings.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,oBAAoB,GAC1C,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Success } from '@onekeyfe/hd-transport
|
|
1
|
+
import { Success } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { Response } from '../params';
|
|
3
3
|
export declare function deviceUpdateReboot(connectId: string): Response<Success>;
|
|
4
4
|
//# sourceMappingURL=deviceUpdateReboot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceUpdateReboot.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceUpdateReboot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deviceUpdateReboot.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceUpdateReboot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
export declare type DeviceVerifyParams = {
|
|
4
|
+
dataHex: string;
|
|
5
|
+
};
|
|
6
|
+
export declare type DeviceVerifySignature = {
|
|
7
|
+
cert: Buffer;
|
|
8
|
+
signature: Buffer;
|
|
9
|
+
};
|
|
10
|
+
export declare function deviceVerify(connectId: string, params: CommonParams & DeviceVerifyParams): Response<DeviceVerifySignature>;
|
|
11
|
+
//# sourceMappingURL=deviceVerify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceVerify.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceVerify.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,kBAAkB,GACxC,QAAQ,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Success } from '@onekeyfe/hd-transport
|
|
1
|
+
import { Success } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { Response } from '../params';
|
|
3
3
|
export declare function deviceWipe(connectId: string): Response<Success>;
|
|
4
4
|
//# sourceMappingURL=deviceWipe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceWipe.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceWipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deviceWipe.d.ts","sourceRoot":"","sources":["../../../src/types/api/deviceWipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evmGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/types/api/evmGetPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"evmGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/types/api/evmGetPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,iBAAiB,CAAC;AAEtB,oBAAY,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,qBAAqB,GAC3C,QAAQ,CAAC,YAAY,CAAC,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG;IAAE,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAA;CAAE,GAC1D,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EthereumMessageSignature } from '@onekeyfe/hd-transport
|
|
1
|
+
import { EthereumMessageSignature } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
export declare type EVMSignMessageParams = {
|
|
4
4
|
path: string | number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evmSignMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/evmSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"evmSignMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/evmSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,oBAAoB,GAC1C,QAAQ,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EthereumMessageSignature } from '@onekeyfe/hd-transport
|
|
1
|
+
import { EthereumMessageSignature } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
export declare type EVMSignMessageEIP712Params = {
|
|
4
4
|
path: string | number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evmSignMessageEIP712.d.ts","sourceRoot":"","sources":["../../../src/types/api/evmSignMessageEIP712.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"evmSignMessageEIP712.d.ts","sourceRoot":"","sources":["../../../src/types/api/evmSignMessageEIP712.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,0BAA0B,GAChD,QAAQ,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EthereumMessageSignature } from '@onekeyfe/hd-transport
|
|
1
|
+
import { EthereumMessageSignature } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
export declare type EthereumSignTypedDataTypeProperty = {
|
|
4
4
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evmSignTypedData.d.ts","sourceRoot":"","sources":["../../../src/types/api/evmSignTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"evmSignTypedData.d.ts","sourceRoot":"","sources":["../../../src/types/api/evmSignTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,iCAAiC,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAGF,oBAAY,0BAA0B,GAAG;IACvC,YAAY,EAAE,iCAAiC,EAAE,CAAC;IAClD,CAAC,oBAAoB,EAAE,MAAM,GAAG,iCAAiC,EAAE,CAAC;CACrE,CAAC;AAGF,oBAAY,4BAA4B,CAAC,CAAC,SAAS,0BAA0B,IAAI;IAC/E,KAAK,EAAE,CAAC,CAAC;IACT,WAAW,EAAE,MAAM,CAAC,CAAC;IACrB,MAAM,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,IAAI,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;IACF,OAAO,EAAE;QAAE,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACvC,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,4BAA4B,CAAC,0BAA0B,CAAC,CAAC;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,sBAAsB,GAC5C,QAAQ,CAAC,wBAAwB,CAAC,CAAC"}
|