@onekeyfe/hd-core 0.0.2 → 0.0.5
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/{BTCGetAddress.d.ts → btc/BTCGetAddress.d.ts} +2 -2
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -0
- package/dist/api/{BTCGetPublicKey.d.ts → btc/BTCGetPublicKey.d.ts} +2 -2
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -0
- package/dist/api/{BTCSignMessage.d.ts → btc/BTCSignMessage.d.ts} +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -0
- package/dist/api/{BTCSignTransaction.d.ts → btc/BTCSignTransaction.d.ts} +3 -3
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -0
- package/dist/api/{BTCVerifyMessage.d.ts → btc/BTCVerifyMessage.d.ts} +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -0
- package/dist/api/{helpers → btc/helpers}/btcParamsUtils.d.ts +0 -0
- package/dist/api/btc/helpers/btcParamsUtils.d.ts.map +1 -0
- package/dist/api/{helpers/btc → btc/helpers}/signtx.d.ts +0 -0
- package/dist/api/{helpers/btc → btc/helpers}/signtx.d.ts.map +1 -1
- package/dist/api/{helpers/btc → btc/helpers}/signtxLegacy.d.ts +0 -0
- package/dist/api/{helpers/btc → btc/helpers}/signtxLegacy.d.ts.map +1 -1
- package/dist/api/{DeviceBackup.d.ts → device/DeviceBackup.d.ts} +1 -1
- package/dist/api/device/DeviceBackup.d.ts.map +1 -0
- package/dist/api/{DeviceChangePin.d.ts → device/DeviceChangePin.d.ts} +1 -1
- package/dist/api/device/DeviceChangePin.d.ts.map +1 -0
- package/dist/api/{DeviceFlags.d.ts → device/DeviceFlags.d.ts} +1 -1
- package/dist/api/device/DeviceFlags.d.ts.map +1 -0
- package/dist/api/{DeviceRebootToBootloader.d.ts → device/DeviceRebootToBootloader.d.ts} +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -0
- package/dist/api/{DeviceRecovery.d.ts → device/DeviceRecovery.d.ts} +1 -1
- package/dist/api/device/DeviceRecovery.d.ts.map +1 -0
- package/dist/api/{DeviceReset.d.ts → device/DeviceReset.d.ts} +1 -1
- package/dist/api/device/DeviceReset.d.ts.map +1 -0
- package/dist/api/{DeviceSettings.d.ts → device/DeviceSettings.d.ts} +1 -1
- package/dist/api/device/DeviceSettings.d.ts.map +1 -0
- package/dist/api/{DeviceUpdateReboot.d.ts → device/DeviceUpdateReboot.d.ts} +1 -1
- package/dist/api/device/DeviceUpdateReboot.d.ts.map +1 -0
- package/dist/api/{DeviceWipe.d.ts → device/DeviceWipe.d.ts} +1 -1
- package/dist/api/device/DeviceWipe.d.ts.map +1 -0
- package/dist/api/{EVMGetAddress.d.ts → evm/EVMGetAddress.d.ts} +2 -2
- package/dist/api/evm/EVMGetAddress.d.ts.map +1 -0
- package/dist/api/{EVMGetPublicKey.d.ts → evm/EVMGetPublicKey.d.ts} +2 -2
- package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -0
- package/dist/api/{EVMSignMessage.d.ts → evm/EVMSignMessage.d.ts} +1 -1
- package/dist/api/evm/EVMSignMessage.d.ts.map +1 -0
- package/dist/api/{EVMSignMessageEIP712.d.ts → evm/EVMSignMessageEIP712.d.ts} +1 -1
- package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -0
- package/dist/api/{EVMSignTransaction.d.ts → evm/EVMSignTransaction.d.ts} +2 -2
- package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -0
- package/dist/api/{EVMSignTypedData.d.ts → evm/EVMSignTypedData.d.ts} +3 -3
- package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -0
- package/dist/api/{EVMVerifyMessage.d.ts → evm/EVMVerifyMessage.d.ts} +1 -1
- package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -0
- package/dist/api/helpers/pathUtils.d.ts +0 -1
- package/dist/api/helpers/pathUtils.d.ts.map +1 -1
- package/dist/api/index.d.ts +26 -21
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinGetAddress.d.ts +9 -0
- package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -0
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +9 -0
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -0
- package/dist/api/starcoin/StarcoinSignMessage.d.ts +10 -0
- package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -0
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts +10 -0
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -0
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +9 -0
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/events/core.d.ts +2 -1
- package/dist/events/core.d.ts.map +1 -1
- package/dist/events/device.d.ts +15 -0
- package/dist/events/device.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +13 -1
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +167 -28
- package/dist/index.js +335 -148
- package/dist/inject.d.ts.map +1 -1
- package/dist/types/api/btcSignTransaction.d.ts +2 -2
- package/dist/types/api/btcSignTransaction.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +23 -0
- package/dist/types/api/export.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +11 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/init.d.ts +1 -1
- package/dist/types/api/init.d.ts.map +1 -1
- package/dist/types/api/starcoinGetAddress.d.ts +14 -0
- package/dist/types/api/starcoinGetAddress.d.ts.map +1 -0
- package/dist/types/api/starcoinGetPublicKey.d.ts +14 -0
- package/dist/types/api/starcoinGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/starcoinSignMessage.d.ts +8 -0
- package/dist/types/api/starcoinSignMessage.d.ts.map +1 -0
- package/dist/types/api/starcoinSignTransaction.d.ts +8 -0
- package/dist/types/api/starcoinSignTransaction.d.ts.map +1 -0
- package/dist/types/api/starcoinVerifyMessage.d.ts +9 -0
- package/dist/types/api/starcoinVerifyMessage.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/api/{BTCGetAddress.ts → btc/BTCGetAddress.ts} +5 -5
- package/src/api/{BTCGetPublicKey.ts → btc/BTCGetPublicKey.ts} +8 -8
- package/src/api/{BTCSignMessage.ts → btc/BTCSignMessage.ts} +5 -5
- package/src/api/{BTCSignTransaction.ts → btc/BTCSignTransaction.ts} +8 -8
- package/src/api/{BTCVerifyMessage.ts → btc/BTCVerifyMessage.ts} +4 -4
- package/src/api/{helpers → btc/helpers}/btcParamsUtils.ts +3 -3
- package/src/api/{helpers/btc → btc/helpers}/signtx.ts +0 -0
- package/src/api/{helpers/btc → btc/helpers}/signtxLegacy.ts +0 -0
- package/src/api/{DeviceBackup.ts → device/DeviceBackup.ts} +1 -1
- package/src/api/{DeviceChangePin.ts → device/DeviceChangePin.ts} +2 -2
- package/src/api/{DeviceFlags.ts → device/DeviceFlags.ts} +2 -2
- package/src/api/{DeviceRebootToBootloader.ts → device/DeviceRebootToBootloader.ts} +1 -1
- package/src/api/{DeviceRecovery.ts → device/DeviceRecovery.ts} +2 -2
- package/src/api/{DeviceReset.ts → device/DeviceReset.ts} +2 -2
- package/src/api/{DeviceSettings.ts → device/DeviceSettings.ts} +2 -2
- package/src/api/{DeviceUpdateReboot.ts → device/DeviceUpdateReboot.ts} +1 -1
- package/src/api/{DeviceWipe.ts → device/DeviceWipe.ts} +1 -1
- package/src/api/{EVMGetAddress.ts → evm/EVMGetAddress.ts} +5 -5
- package/src/api/{EVMGetPublicKey.ts → evm/EVMGetPublicKey.ts} +5 -5
- package/src/api/{EVMSignMessage.ts → evm/EVMSignMessage.ts} +5 -5
- package/src/api/{EVMSignMessageEIP712.ts → evm/EVMSignMessageEIP712.ts} +5 -5
- package/src/api/{EVMSignTransaction.ts → evm/EVMSignTransaction.ts} +9 -9
- package/src/api/{EVMSignTypedData.ts → evm/EVMSignTypedData.ts} +8 -8
- package/src/api/{EVMVerifyMessage.ts → evm/EVMVerifyMessage.ts} +4 -4
- package/src/api/helpers/pathUtils.ts +1 -1
- package/src/api/index.ts +26 -21
- package/src/api/starcoin/StarcoinGetAddress.ts +57 -0
- package/src/api/starcoin/StarcoinGetPublicKey.ts +64 -0
- package/src/api/starcoin/StarcoinSignMessage.ts +40 -0
- package/src/api/starcoin/StarcoinSignTransaction.ts +36 -0
- package/src/api/starcoin/StarcoinVerifyMessage.ts +33 -0
- package/src/core/index.ts +25 -0
- package/src/events/core.ts +8 -1
- package/src/events/device.ts +27 -0
- package/src/events/ui-request.ts +16 -1
- package/src/inject.ts +12 -1
- package/src/types/api/btcSignTransaction.ts +1 -2
- package/src/types/api/export.ts +43 -0
- package/src/types/api/index.ts +13 -0
- package/src/types/api/init.ts +1 -1
- package/src/types/api/starcoinGetAddress.ts +21 -0
- package/src/types/api/starcoinGetPublicKey.ts +21 -0
- package/src/types/api/starcoinSignMessage.ts +12 -0
- package/src/types/api/starcoinSignTransaction.ts +12 -0
- package/src/types/api/starcoinVerifyMessage.ts +13 -0
- package/src/utils/index.ts +2 -0
- package/dist/api/BTCGetAddress.d.ts.map +0 -1
- package/dist/api/BTCGetPublicKey.d.ts.map +0 -1
- package/dist/api/BTCSignMessage.d.ts.map +0 -1
- package/dist/api/BTCSignTransaction.d.ts.map +0 -1
- package/dist/api/BTCVerifyMessage.d.ts.map +0 -1
- package/dist/api/DeviceBackup.d.ts.map +0 -1
- package/dist/api/DeviceChangePin.d.ts.map +0 -1
- package/dist/api/DeviceFlags.d.ts.map +0 -1
- package/dist/api/DeviceRebootToBootloader.d.ts.map +0 -1
- package/dist/api/DeviceRecovery.d.ts.map +0 -1
- package/dist/api/DeviceReset.d.ts.map +0 -1
- package/dist/api/DeviceSettings.d.ts.map +0 -1
- package/dist/api/DeviceUpdateReboot.d.ts.map +0 -1
- package/dist/api/DeviceWipe.d.ts.map +0 -1
- package/dist/api/EVMGetAddress.d.ts.map +0 -1
- package/dist/api/EVMGetPublicKey.d.ts.map +0 -1
- package/dist/api/EVMSignMessage.d.ts.map +0 -1
- package/dist/api/EVMSignMessageEIP712.d.ts.map +0 -1
- package/dist/api/EVMSignTransaction.d.ts.map +0 -1
- package/dist/api/EVMSignTypedData.d.ts.map +0 -1
- package/dist/api/EVMVerifyMessage.d.ts.map +0 -1
- package/dist/api/helpers/btcParamsUtils.d.ts.map +0 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { StarcoinGetAddress as HardwareStarcoinGetAddress } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
import { validatePath, serializedPath } from '../helpers/pathUtils';
|
|
4
|
+
import { BaseMethod } from '../BaseMethod';
|
|
5
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
6
|
+
import { StarcoinAddress, StarcoinGetAddressParams } from '../../types/api/starcoinGetAddress';
|
|
7
|
+
|
|
8
|
+
export default class StarcoinGetAddress extends BaseMethod<HardwareStarcoinGetAddress[]> {
|
|
9
|
+
hasBundle = false;
|
|
10
|
+
|
|
11
|
+
init() {
|
|
12
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
13
|
+
|
|
14
|
+
this.hasBundle = !!this.payload?.bundle;
|
|
15
|
+
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
16
|
+
|
|
17
|
+
// check payload
|
|
18
|
+
validateParams(payload, [{ name: 'bundle', type: 'array' }]);
|
|
19
|
+
|
|
20
|
+
// init params
|
|
21
|
+
this.params = [];
|
|
22
|
+
payload.bundle.forEach((batch: StarcoinGetAddressParams) => {
|
|
23
|
+
const addressN = validatePath(batch.path, 3);
|
|
24
|
+
|
|
25
|
+
validateParams(batch, [
|
|
26
|
+
{ name: 'path', required: true },
|
|
27
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
28
|
+
]);
|
|
29
|
+
|
|
30
|
+
const showOnOneKey = batch.showOnOneKey ?? true;
|
|
31
|
+
|
|
32
|
+
this.params.push({
|
|
33
|
+
address_n: addressN,
|
|
34
|
+
show_display: showOnOneKey,
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async run() {
|
|
40
|
+
const responses: StarcoinAddress[] = [];
|
|
41
|
+
|
|
42
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
43
|
+
const param = this.params[i];
|
|
44
|
+
|
|
45
|
+
const res = await this.device.commands.typedCall('StarcoinGetAddress', 'StarcoinAddress', {
|
|
46
|
+
...param,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
responses.push({
|
|
50
|
+
path: serializedPath(param.address_n),
|
|
51
|
+
...res.message,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return Promise.resolve(this.hasBundle ? responses : responses[0]);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { StarcoinGetPublicKey as HardwareStarcoinGetPublicKey } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
import { validatePath, serializedPath } from '../helpers/pathUtils';
|
|
4
|
+
import { BaseMethod } from '../BaseMethod';
|
|
5
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
6
|
+
import {
|
|
7
|
+
StarcoinPublicKey,
|
|
8
|
+
StarcoinGetPublicKeyParams,
|
|
9
|
+
} from '../../types/api/starcoinGetPublicKey';
|
|
10
|
+
|
|
11
|
+
export default class StarcoinGetPublicKey extends BaseMethod<HardwareStarcoinGetPublicKey[]> {
|
|
12
|
+
hasBundle = false;
|
|
13
|
+
|
|
14
|
+
init() {
|
|
15
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
16
|
+
|
|
17
|
+
this.hasBundle = !!this.payload?.bundle;
|
|
18
|
+
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
19
|
+
|
|
20
|
+
// check payload
|
|
21
|
+
validateParams(payload, [{ name: 'bundle', type: 'array' }]);
|
|
22
|
+
|
|
23
|
+
// init params
|
|
24
|
+
this.params = [];
|
|
25
|
+
payload.bundle.forEach((batch: StarcoinGetPublicKeyParams) => {
|
|
26
|
+
const addressN = validatePath(batch.path, 3);
|
|
27
|
+
|
|
28
|
+
validateParams(batch, [
|
|
29
|
+
{ name: 'path', required: true },
|
|
30
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
const showOnOneKey = batch.showOnOneKey ?? true;
|
|
34
|
+
|
|
35
|
+
this.params.push({
|
|
36
|
+
address_n: addressN,
|
|
37
|
+
show_display: showOnOneKey,
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async run() {
|
|
43
|
+
const responses: StarcoinPublicKey[] = [];
|
|
44
|
+
|
|
45
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
46
|
+
const param = this.params[i];
|
|
47
|
+
|
|
48
|
+
const res = await this.device.commands.typedCall(
|
|
49
|
+
'StarcoinGetPublicKey',
|
|
50
|
+
'StarcoinPublicKey',
|
|
51
|
+
{
|
|
52
|
+
...param,
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
responses.push({
|
|
57
|
+
path: serializedPath(param.address_n),
|
|
58
|
+
...res.message,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return Promise.resolve(this.hasBundle ? responses : responses[0]);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StarcoinSignMessage as HardwareStarcoinSignMessage } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
import { validatePath } from '../helpers/pathUtils';
|
|
4
|
+
import { BaseMethod } from '../BaseMethod';
|
|
5
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
6
|
+
import { formatAnyHex } from '../helpers/hexUtils';
|
|
7
|
+
|
|
8
|
+
export default class StarcoinSignMessage extends BaseMethod<HardwareStarcoinSignMessage> {
|
|
9
|
+
init() {
|
|
10
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
11
|
+
|
|
12
|
+
// check payload
|
|
13
|
+
validateParams(this.payload, [
|
|
14
|
+
{ name: 'path', required: true },
|
|
15
|
+
{ name: 'messageHex', type: 'hexString', required: true },
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
const { path, messageHex } = this.payload;
|
|
19
|
+
|
|
20
|
+
const addressN = validatePath(path, 3);
|
|
21
|
+
|
|
22
|
+
// init params
|
|
23
|
+
this.params = {
|
|
24
|
+
address_n: addressN,
|
|
25
|
+
message: formatAnyHex(messageHex),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async run() {
|
|
30
|
+
const res = await this.device.commands.typedCall(
|
|
31
|
+
'StarcoinSignMessage',
|
|
32
|
+
'StarcoinMessageSignature',
|
|
33
|
+
{
|
|
34
|
+
...this.params,
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
return Promise.resolve(res.message);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StarcoinSignTx } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
import { validatePath } from '../helpers/pathUtils';
|
|
4
|
+
import { BaseMethod } from '../BaseMethod';
|
|
5
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
6
|
+
import { formatAnyHex } from '../helpers/hexUtils';
|
|
7
|
+
|
|
8
|
+
export default class StarcoinSignTransaction extends BaseMethod<StarcoinSignTx> {
|
|
9
|
+
init() {
|
|
10
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
11
|
+
|
|
12
|
+
// check payload
|
|
13
|
+
validateParams(this.payload, [
|
|
14
|
+
{ name: 'path', required: true },
|
|
15
|
+
{ name: 'rawTx', type: 'hexString', required: true },
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
const { path, rawTx } = this.payload;
|
|
19
|
+
|
|
20
|
+
const addressN = validatePath(path, 3);
|
|
21
|
+
|
|
22
|
+
// init params
|
|
23
|
+
this.params = {
|
|
24
|
+
address_n: addressN,
|
|
25
|
+
raw_tx: formatAnyHex(rawTx),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async run() {
|
|
30
|
+
const res = await this.device.commands.typedCall('StarcoinSignTx', 'StarcoinSignedTx', {
|
|
31
|
+
...this.params,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return Promise.resolve(res.message);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { StarcoinVerifyMessage as HardwareStarcoinVerifyMessage } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
import { BaseMethod } from '../BaseMethod';
|
|
4
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
5
|
+
import { formatAnyHex } from '../helpers/hexUtils';
|
|
6
|
+
|
|
7
|
+
export default class EVMSignMessage extends BaseMethod<HardwareStarcoinVerifyMessage> {
|
|
8
|
+
init() {
|
|
9
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
10
|
+
|
|
11
|
+
validateParams(this.payload, [
|
|
12
|
+
{ name: 'publicKey', type: 'string', required: true },
|
|
13
|
+
{ name: 'messageHex', type: 'hexString', required: true },
|
|
14
|
+
{ name: 'signature', type: 'hexString', required: true },
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
const { publicKey, messageHex, signature } = formatAnyHex(this.payload);
|
|
18
|
+
|
|
19
|
+
this.params = {
|
|
20
|
+
public_key: publicKey,
|
|
21
|
+
message: messageHex,
|
|
22
|
+
signature,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async run() {
|
|
27
|
+
const res = await this.device.commands.typedCall('StarcoinVerifyMessage', 'Success', {
|
|
28
|
+
...this.params,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return Promise.resolve(res.message);
|
|
32
|
+
}
|
|
33
|
+
}
|
package/src/core/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
UiPromise,
|
|
20
20
|
UiPromiseResponse,
|
|
21
21
|
createUiMessage,
|
|
22
|
+
createDeviceMessage,
|
|
22
23
|
} from '../events';
|
|
23
24
|
import type { BaseMethod } from '../api/BaseMethod';
|
|
24
25
|
import type { ConnectSettings, KnownDevice } from '../types';
|
|
@@ -90,6 +91,9 @@ export const callAPI = async (message: CoreMessage) => {
|
|
|
90
91
|
method.setDevice?.(device);
|
|
91
92
|
|
|
92
93
|
device.on(DEVICE.PIN, onDevicePinHandler);
|
|
94
|
+
device.on(DEVICE.BUTTON, (d, code) => {
|
|
95
|
+
onDeviceButtonHandler(d, code);
|
|
96
|
+
});
|
|
93
97
|
|
|
94
98
|
try {
|
|
95
99
|
const inner = async (): Promise<void> => {
|
|
@@ -144,6 +148,10 @@ export const callAPI = async (message: CoreMessage) => {
|
|
|
144
148
|
method.dispose();
|
|
145
149
|
}
|
|
146
150
|
}
|
|
151
|
+
|
|
152
|
+
closePopup();
|
|
153
|
+
|
|
154
|
+
cleanup();
|
|
147
155
|
// TODO: 方法执行后,检查队列内是否有等待调用的 API,依次调用
|
|
148
156
|
}
|
|
149
157
|
};
|
|
@@ -203,6 +211,18 @@ function initDeviceForBle(method: BaseMethod) {
|
|
|
203
211
|
return device;
|
|
204
212
|
}
|
|
205
213
|
|
|
214
|
+
const cleanup = () => {
|
|
215
|
+
_uiPromises = [];
|
|
216
|
+
Log.debug('Cleanup...');
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Force close popup
|
|
221
|
+
*/
|
|
222
|
+
const closePopup = () => {
|
|
223
|
+
postMessage(createUiMessage(UI_REQUEST.CLOSE_UI_WINDOW));
|
|
224
|
+
};
|
|
225
|
+
|
|
206
226
|
const onDevicePinHandler = async (...[device, type, callback]: DeviceEvents['pin']) => {
|
|
207
227
|
console.log('onDevicePinHandler');
|
|
208
228
|
// create ui promise
|
|
@@ -220,6 +240,11 @@ const onDevicePinHandler = async (...[device, type, callback]: DeviceEvents['pin
|
|
|
220
240
|
callback(null, uiResp.payload);
|
|
221
241
|
};
|
|
222
242
|
|
|
243
|
+
const onDeviceButtonHandler = (...[device, request]: [...DeviceEvents['button']]) => {
|
|
244
|
+
postMessage(createDeviceMessage(DEVICE.BUTTON, { ...request, device: device.toMessageObject() }));
|
|
245
|
+
postMessage(createUiMessage(UI_REQUEST.REQUEST_BUTTON, { device: device.toMessageObject() }));
|
|
246
|
+
};
|
|
247
|
+
|
|
223
248
|
/**
|
|
224
249
|
* Emit message to listener (parent).
|
|
225
250
|
* Clear method reference from _callMethods
|
package/src/events/core.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Unsuccessful } from '../types/params';
|
|
2
2
|
import { IFrameCallMessage } from './call';
|
|
3
|
+
import { DeviceEventMessage } from './device';
|
|
3
4
|
import { IFrameEventMessage } from './iframe';
|
|
4
5
|
import { UiEventMessage } from './ui-request';
|
|
5
6
|
import { UiResponseMessage } from './ui-response';
|
|
@@ -9,7 +10,13 @@ export const CORE_EVENT = 'CORE_EVENT';
|
|
|
9
10
|
export type CoreMessage = {
|
|
10
11
|
id?: string;
|
|
11
12
|
success?: true | false;
|
|
12
|
-
} & (
|
|
13
|
+
} & (
|
|
14
|
+
| IFrameEventMessage
|
|
15
|
+
| IFrameCallMessage
|
|
16
|
+
| UiResponseMessage
|
|
17
|
+
| UiEventMessage
|
|
18
|
+
| DeviceEventMessage
|
|
19
|
+
);
|
|
13
20
|
|
|
14
21
|
export type PostMessageEvent = MessageEvent<any>;
|
|
15
22
|
|
package/src/events/device.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { PROTO } from '../constants';
|
|
2
|
+
import type { KnownDevice as Device } from '../types/device';
|
|
3
|
+
import { MessageFactoryFn } from './utils';
|
|
2
4
|
|
|
5
|
+
export const DEVICE_EVENT = 'DEVICE_EVENT';
|
|
3
6
|
export const DEVICE = {
|
|
4
7
|
// device list events
|
|
5
8
|
CONNECT: 'device-connect',
|
|
@@ -26,3 +29,27 @@ export const DEVICE = {
|
|
|
26
29
|
export interface DeviceButtonRequestPayload extends Omit<PROTO.ButtonRequest, 'code'> {
|
|
27
30
|
code?: PROTO.ButtonRequest['code'] | 'ButtonRequest_FirmwareUpdate';
|
|
28
31
|
}
|
|
32
|
+
|
|
33
|
+
export interface DeviceButtonRequest {
|
|
34
|
+
type: typeof DEVICE.BUTTON;
|
|
35
|
+
payload: DeviceButtonRequestPayload & { device: Device | null };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type DeviceEvent = DeviceButtonRequest;
|
|
39
|
+
|
|
40
|
+
export type DeviceEventMessage = DeviceEvent & { event: typeof DEVICE_EVENT };
|
|
41
|
+
|
|
42
|
+
export type DeviceEventListenerFn = (
|
|
43
|
+
type: typeof DEVICE_EVENT,
|
|
44
|
+
cb: (event: DeviceEventMessage) => void
|
|
45
|
+
) => void;
|
|
46
|
+
|
|
47
|
+
export const createDeviceMessage: MessageFactoryFn<typeof DEVICE_EVENT, DeviceEvent> = (
|
|
48
|
+
type,
|
|
49
|
+
payload
|
|
50
|
+
) =>
|
|
51
|
+
({
|
|
52
|
+
event: DEVICE_EVENT,
|
|
53
|
+
type,
|
|
54
|
+
payload,
|
|
55
|
+
} as any);
|
package/src/events/ui-request.ts
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import type { PROTO } from '../constants';
|
|
2
2
|
import type { Device } from '../types';
|
|
3
|
+
import type { DeviceButtonRequest } from './device';
|
|
3
4
|
import type { MessageFactoryFn } from './utils';
|
|
4
5
|
|
|
5
6
|
export const UI_EVENT = 'UI_EVENT';
|
|
6
7
|
|
|
7
8
|
export const UI_REQUEST = {
|
|
8
9
|
REQUEST_PIN: 'ui-request_pin',
|
|
10
|
+
INVALID_PIN: 'ui-invalid_pin',
|
|
11
|
+
REQUEST_BUTTON: 'ui-button',
|
|
12
|
+
|
|
13
|
+
CLOSE_UI_WINDOW: 'ui-close_window',
|
|
9
14
|
} as const;
|
|
10
15
|
|
|
16
|
+
export interface UiRequestWithoutPayload {
|
|
17
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
|
|
18
|
+
payload?: typeof undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
export type UiRequestDeviceAction = {
|
|
12
22
|
type: typeof UI_REQUEST.REQUEST_PIN;
|
|
13
23
|
payload: {
|
|
@@ -16,7 +26,12 @@ export type UiRequestDeviceAction = {
|
|
|
16
26
|
};
|
|
17
27
|
};
|
|
18
28
|
|
|
19
|
-
export
|
|
29
|
+
export interface UiRequestButton {
|
|
30
|
+
type: typeof UI_REQUEST.REQUEST_BUTTON;
|
|
31
|
+
payload: DeviceButtonRequest['payload'];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton;
|
|
20
35
|
|
|
21
36
|
export type UiEventMessage = UiEvent & { event: typeof UI_EVENT };
|
|
22
37
|
|
package/src/inject.ts
CHANGED
|
@@ -73,7 +73,7 @@ export const inject = ({
|
|
|
73
73
|
deviceRebootToBootloader: connectId => call({ connectId, method: 'deviceRebootToBootloader' }),
|
|
74
74
|
deviceRecovery: (connectId, params) => call({ ...params, connectId, method: 'deviceRecovery' }),
|
|
75
75
|
deviceReset: (connectId, params) => call({ ...params, connectId, method: 'deviceReset' }),
|
|
76
|
-
deviceSettings: connectId => call({ connectId, method: 'deviceSettings' }),
|
|
76
|
+
deviceSettings: (connectId, params) => call({ ...params, connectId, method: 'deviceSettings' }),
|
|
77
77
|
deviceUpdateReboot: connectId => call({ connectId, method: 'deviceUpdateReboot' }),
|
|
78
78
|
deviceWipe: connectId => call({ connectId, method: 'deviceWipe' }),
|
|
79
79
|
|
|
@@ -98,6 +98,17 @@ export const inject = ({
|
|
|
98
98
|
call({ ...params, connectId, method: 'btcSignTransaction' }),
|
|
99
99
|
btcVerifyMessage: (connectId, params) =>
|
|
100
100
|
call({ ...params, connectId, method: 'btcVerifyMessage' }),
|
|
101
|
+
|
|
102
|
+
starcoinGetAddress: (connectId, params) =>
|
|
103
|
+
call({ ...params, connectId, method: 'starcoinGetAddress' }),
|
|
104
|
+
starcoinGetPublicKey: (connectId, params) =>
|
|
105
|
+
call({ ...params, connectId, method: 'starcoinGetPublicKey' }),
|
|
106
|
+
starcoinSignMessage: (connectId, params) =>
|
|
107
|
+
call({ ...params, connectId, method: 'starcoinSignMessage' }),
|
|
108
|
+
starcoinSignTransaction: (connectId, params) =>
|
|
109
|
+
call({ ...params, connectId, method: 'starcoinSignTransaction' }),
|
|
110
|
+
starcoinVerifyMessage: (connectId, params) =>
|
|
111
|
+
call({ ...params, connectId, method: 'starcoinVerifyMessage' }),
|
|
101
112
|
};
|
|
102
113
|
return api;
|
|
103
114
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TxInput as OrigTxInput,
|
|
3
3
|
PrevInput,
|
|
4
|
-
Success,
|
|
5
4
|
TxOutputBinType,
|
|
6
5
|
TxOutputType,
|
|
7
6
|
TxInputType,
|
|
@@ -95,4 +94,4 @@ export type BTCSignTransactionParams = {
|
|
|
95
94
|
export declare function btcSignTransaction(
|
|
96
95
|
connectId: string,
|
|
97
96
|
params: CommonParams & BTCSignTransactionParams
|
|
98
|
-
): Response<
|
|
97
|
+
): Response<SignedTransaction>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type { BTCAddress, BTCGetAddressParams } from './btcGetAddress';
|
|
2
|
+
export type { BTCPublicKey, BTCGetPublicKeyParams } from './btcGetPublicKey';
|
|
3
|
+
export type { BTCSignMessageParams } from './btcSignMessage';
|
|
4
|
+
export type { BTCVerifyMessageParams } from './btcVerifyMessage';
|
|
5
|
+
export type {
|
|
6
|
+
RefTransaction,
|
|
7
|
+
AccountAddress,
|
|
8
|
+
AccountAddresses,
|
|
9
|
+
BTCSignTransactionParams,
|
|
10
|
+
SignedTransaction,
|
|
11
|
+
TransactionOptions,
|
|
12
|
+
} from './btcSignTransaction';
|
|
13
|
+
|
|
14
|
+
export type { DeviceChangePinParams } from './deviceChangePin';
|
|
15
|
+
export type { DeviceFlagsParams } from './deviceFlags';
|
|
16
|
+
export type { DeviceRecoveryParams } from './deviceRecovery';
|
|
17
|
+
export type { DeviceResetParams } from './deviceReset';
|
|
18
|
+
export type { DeviceSettingsParams } from './deviceSettings';
|
|
19
|
+
|
|
20
|
+
export type { EVMAddress, EVMGetAddressParams } from './evmGetAddress';
|
|
21
|
+
export type { EVMPublicKey, EVMGetPublicKeyParams } from './evmGetPublicKey';
|
|
22
|
+
export type { EVMSignMessageParams } from './evmSignMessage';
|
|
23
|
+
export type { EVMSignMessageEIP712Params } from './evmSignMessageEIP712';
|
|
24
|
+
export type {
|
|
25
|
+
EVMTransaction,
|
|
26
|
+
EVMTransactionEIP1559,
|
|
27
|
+
EVMSignedTx,
|
|
28
|
+
EVMSignTransactionParams,
|
|
29
|
+
EVMAccessList,
|
|
30
|
+
} from './evmSignTransaction';
|
|
31
|
+
export type {
|
|
32
|
+
EthereumSignTypedDataTypes,
|
|
33
|
+
EthereumSignTypedDataTypeProperty,
|
|
34
|
+
EthereumSignTypedDataMessage,
|
|
35
|
+
EVMSignTypedDataParams,
|
|
36
|
+
} from './evmSignTypedData';
|
|
37
|
+
export type { EVMVerifyMessageParams } from './evmVerifyMessage';
|
|
38
|
+
|
|
39
|
+
export type { StarcoinAddress, StarcoinGetAddressParams } from './starcoinGetAddress';
|
|
40
|
+
export type { StarcoinPublicKey, StarcoinGetPublicKeyParams } from './starcoinGetPublicKey';
|
|
41
|
+
export type { StarcoinSignMessageParams } from './starcoinSignMessage';
|
|
42
|
+
export type { StarcoinSignTransactionParams } from './starcoinSignTransaction';
|
|
43
|
+
export type { StarcoinVerifyMessageParams } from './starcoinVerifyMessage';
|
package/src/types/api/index.ts
CHANGED
|
@@ -27,6 +27,13 @@ import { deviceChangePin } from './deviceChangePin';
|
|
|
27
27
|
import { deviceSettings } from './deviceSettings';
|
|
28
28
|
import { deviceFlags } from './deviceFlags';
|
|
29
29
|
import { deviceUpdateReboot } from './deviceUpdateReboot';
|
|
30
|
+
import { starcoinGetAddress } from './starcoinGetAddress';
|
|
31
|
+
import { starcoinGetPublicKey } from './starcoinGetPublicKey';
|
|
32
|
+
import { starcoinSignMessage } from './starcoinSignMessage';
|
|
33
|
+
import { starcoinSignTransaction } from './starcoinSignTransaction';
|
|
34
|
+
import { starcoinVerifyMessage } from './starcoinVerifyMessage';
|
|
35
|
+
|
|
36
|
+
export * from './export';
|
|
30
37
|
|
|
31
38
|
export type CoreApi = {
|
|
32
39
|
/**
|
|
@@ -77,4 +84,10 @@ export type CoreApi = {
|
|
|
77
84
|
btcSignMessage: typeof btcSignMessage;
|
|
78
85
|
btcSignTransaction: typeof btcSignTransaction;
|
|
79
86
|
btcVerifyMessage: typeof btcVerifyMessage;
|
|
87
|
+
|
|
88
|
+
starcoinGetAddress: typeof starcoinGetAddress;
|
|
89
|
+
starcoinGetPublicKey: typeof starcoinGetPublicKey;
|
|
90
|
+
starcoinSignMessage: typeof starcoinSignMessage;
|
|
91
|
+
starcoinSignTransaction: typeof starcoinSignTransaction;
|
|
92
|
+
starcoinVerifyMessage: typeof starcoinVerifyMessage;
|
|
80
93
|
};
|
package/src/types/api/init.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StarcoinAddress as HardwareStarcoinAddress } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type StarcoinAddress = {
|
|
5
|
+
path: string;
|
|
6
|
+
} & HardwareStarcoinAddress;
|
|
7
|
+
|
|
8
|
+
export type StarcoinGetAddressParams = {
|
|
9
|
+
path: string | number[];
|
|
10
|
+
showOnOneKey?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export declare function starcoinGetAddress(
|
|
14
|
+
connectId: string,
|
|
15
|
+
params: CommonParams & StarcoinGetAddressParams
|
|
16
|
+
): Response<StarcoinAddress>;
|
|
17
|
+
|
|
18
|
+
export declare function starcoinGetAddress(
|
|
19
|
+
connectId: string,
|
|
20
|
+
params: CommonParams & { bundle?: StarcoinGetAddressParams[] }
|
|
21
|
+
): Response<Array<StarcoinAddress>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StarcoinPublicKey as HardwareStarcoinPublicKey } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type StarcoinPublicKey = {
|
|
5
|
+
path: string;
|
|
6
|
+
} & HardwareStarcoinPublicKey;
|
|
7
|
+
|
|
8
|
+
export type StarcoinGetPublicKeyParams = {
|
|
9
|
+
path: string | number[];
|
|
10
|
+
showOnOneKey?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export declare function starcoinGetPublicKey(
|
|
14
|
+
connectId: string,
|
|
15
|
+
params: CommonParams & StarcoinGetPublicKeyParams
|
|
16
|
+
): Response<StarcoinPublicKey>;
|
|
17
|
+
|
|
18
|
+
export declare function starcoinGetPublicKey(
|
|
19
|
+
connectId: string,
|
|
20
|
+
params: CommonParams & { bundle?: StarcoinGetPublicKeyParams[] }
|
|
21
|
+
): Response<Array<StarcoinPublicKey>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StarcoinMessageSignature } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type StarcoinSignMessageParams = {
|
|
5
|
+
path: string | number[];
|
|
6
|
+
messageHex: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare function starcoinSignMessage(
|
|
10
|
+
connectId: string,
|
|
11
|
+
params: CommonParams & StarcoinSignMessageParams
|
|
12
|
+
): Response<StarcoinMessageSignature>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StarcoinSignedTx } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type StarcoinSignTransactionParams = {
|
|
5
|
+
path: string | number[];
|
|
6
|
+
rawTx: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export declare function starcoinSignTransaction(
|
|
10
|
+
connectId: string,
|
|
11
|
+
params: CommonParams & StarcoinSignTransactionParams
|
|
12
|
+
): Response<StarcoinSignedTx>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Success } from '@onekeyfe/hd-transport/src/types/messages';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type StarcoinVerifyMessageParams = {
|
|
5
|
+
publicKey: string;
|
|
6
|
+
messageHex: string;
|
|
7
|
+
signature: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export declare function starcoinVerifyMessage(
|
|
11
|
+
connectId: string,
|
|
12
|
+
params: CommonParams & StarcoinVerifyMessageParams
|
|
13
|
+
): Response<Success>;
|
package/src/utils/index.ts
CHANGED
|
@@ -3,5 +3,7 @@ import { initLog, enableLog } from './logger';
|
|
|
3
3
|
export * from './assets';
|
|
4
4
|
export * from './versionUtils';
|
|
5
5
|
export * from './deferred';
|
|
6
|
+
export { getDeviceType, getDeviceUUID, getDeviceLabel } from './deviceFeaturesUtils';
|
|
7
|
+
export { getHDPath, getScriptType } from '../api/helpers/pathUtils';
|
|
6
8
|
|
|
7
9
|
export { initLog, enableLog };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BTCGetAddress.d.ts","sourceRoot":"","sources":["../../src/api/BTCGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAGvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAuB,MAAM,4BAA4B,CAAC;AAG7E,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU,CAAC,UAAU,EAAE,CAAC;IACjE,SAAS,UAAS;IAElB,IAAI;IA4CE,GAAG;CAkBV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BTCGetPublicKey.d.ts","sourceRoot":"","sources":["../../src/api/BTCGetPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAGzE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,YAAY,EAAE,CAAC;IACrE,SAAS,UAAS;IAElB,IAAI;IA2CE,GAAG;CAkBV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BTCSignMessage.d.ts","sourceRoot":"","sources":["../../src/api/BTCSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAGxE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU,CAAC,WAAW,CAAC;IACjE,IAAI;IAuBE,GAAG;;;;CAOV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BTCSignTransaction.d.ts","sourceRoot":"","sources":["../../src/api/BTCSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAItF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EACL,gBAAgB,EAEhB,cAAc,EACd,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AAMzC,aAAK,MAAM,GAAG;IACZ,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,MAAM,CAAC;IAChE,IAAI;IA+FE,GAAG;CAmBV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BTCVerifyMessage.d.ts","sourceRoot":"","sources":["../../src/api/BTCVerifyMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,aAAa,CAAC;IACrE,IAAI;IAuBE,GAAG;;;CAOV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceBackup.d.ts","sourceRoot":"","sources":["../../src/api/DeviceBackup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,UAAU,CAAC,YAAY,CAAC;IAChE,IAAI;IAEE,GAAG;;;CAKV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceChangePin.d.ts","sourceRoot":"","sources":["../../src/api/DeviceChangePin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,SAAS,CAAC;IAChE,IAAI;IASE,GAAG;;;CAOV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceFlags.d.ts","sourceRoot":"","sources":["../../src/api/DeviceFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU,CAAC,UAAU,CAAC;IAC7D,IAAI;IAUE,GAAG;;;CAOV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceRebootToBootloader.d.ts","sourceRoot":"","sources":["../../src/api/DeviceRebootToBootloader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,UAAU,CAAC,kBAAkB,CAAC;IAClF,IAAI;IAEE,GAAG;;;CAKV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceRecovery.d.ts","sourceRoot":"","sources":["../../src/api/DeviceRecovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU,CAAC,cAAc,CAAC;IACpE,IAAI;IA4BE,GAAG;;;CAOV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceReset.d.ts","sourceRoot":"","sources":["../../src/api/DeviceReset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU,CAAC,WAAW,CAAC;IAC9D,IAAI;IA8BE,GAAG;;;CAOV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceSettings.d.ts","sourceRoot":"","sources":["../../src/api/DeviceSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU,CAAC,aAAa,CAAC;IACnE,IAAI;IAgCE,GAAG;;;CAOV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceUpdateReboot.d.ts","sourceRoot":"","sources":["../../src/api/DeviceUpdateReboot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,WAAW,CAAC;IACrE,IAAI;IAEE,GAAG;;;CAKV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceWipe.d.ts","sourceRoot":"","sources":["../../src/api/DeviceWipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,UAAU,CAAC,UAAU,CAAC;IAC5D,IAAI;IAEE,GAAG;;;CAKV"}
|