@onekeyfe/hd-transport 1.2.0-alpha.55 → 1.2.0-alpha.57
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/__tests__/protocol-v2.test.js +3 -1
- package/dist/index.d.ts +225 -1
- package/dist/index.js +11 -7
- package/dist/protocols/v2/session.d.ts +2 -0
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/types/messages.d.ts +165 -0
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/transport.d.ts +1 -0
- package/dist/types/transport.d.ts.map +1 -1
- package/package.json +2 -2
- package/scripts/protobuf-patches/index.js +0 -28
- package/src/protocols/v2/session.ts +5 -0
- package/src/types/messages.ts +217 -0
- package/src/types/transport.ts +2 -0
package/dist/types/messages.d.ts
CHANGED
|
@@ -1052,6 +1052,23 @@ export type ECDHSessionKey = {
|
|
|
1052
1052
|
session_key: string;
|
|
1053
1053
|
public_key?: string;
|
|
1054
1054
|
};
|
|
1055
|
+
export type CosiCommit = {
|
|
1056
|
+
address_n: number[];
|
|
1057
|
+
data?: string;
|
|
1058
|
+
};
|
|
1059
|
+
export type CosiCommitment = {
|
|
1060
|
+
commitment?: string;
|
|
1061
|
+
pubkey?: string;
|
|
1062
|
+
};
|
|
1063
|
+
export type CosiSign = {
|
|
1064
|
+
address_n: number[];
|
|
1065
|
+
data?: string;
|
|
1066
|
+
global_commitment?: string;
|
|
1067
|
+
global_pubkey?: string;
|
|
1068
|
+
};
|
|
1069
|
+
export type CosiSignature = {
|
|
1070
|
+
signature: string;
|
|
1071
|
+
};
|
|
1055
1072
|
export type Path = {
|
|
1056
1073
|
address_n: number[];
|
|
1057
1074
|
};
|
|
@@ -1065,6 +1082,77 @@ export type EcdsaPublicKeys = {
|
|
|
1065
1082
|
hd_nodes: HDNodeType[];
|
|
1066
1083
|
root_fingerprint?: number;
|
|
1067
1084
|
};
|
|
1085
|
+
export declare enum DebugSwipeDirection {
|
|
1086
|
+
UP = 0,
|
|
1087
|
+
DOWN = 1,
|
|
1088
|
+
LEFT = 2,
|
|
1089
|
+
RIGHT = 3
|
|
1090
|
+
}
|
|
1091
|
+
export type DebugLinkDecision = {
|
|
1092
|
+
yes_no?: boolean;
|
|
1093
|
+
swipe?: DebugSwipeDirection;
|
|
1094
|
+
input?: string;
|
|
1095
|
+
x?: number;
|
|
1096
|
+
y?: number;
|
|
1097
|
+
wait?: boolean;
|
|
1098
|
+
hold_ms?: number;
|
|
1099
|
+
};
|
|
1100
|
+
export type DebugLinkLayout = {
|
|
1101
|
+
lines: string[];
|
|
1102
|
+
};
|
|
1103
|
+
export type DebugLinkReseedRandom = {
|
|
1104
|
+
value?: number;
|
|
1105
|
+
};
|
|
1106
|
+
export type DebugLinkRecordScreen = {
|
|
1107
|
+
target_directory?: string;
|
|
1108
|
+
};
|
|
1109
|
+
export type DebugLinkGetState = {
|
|
1110
|
+
wait_word_list?: boolean;
|
|
1111
|
+
wait_word_pos?: boolean;
|
|
1112
|
+
wait_layout?: boolean;
|
|
1113
|
+
};
|
|
1114
|
+
export type DebugLinkState = {
|
|
1115
|
+
layout?: string;
|
|
1116
|
+
pin?: string;
|
|
1117
|
+
matrix?: string;
|
|
1118
|
+
mnemonic_secret?: string;
|
|
1119
|
+
node?: HDNodeType;
|
|
1120
|
+
passphrase_protection?: boolean;
|
|
1121
|
+
reset_word?: string;
|
|
1122
|
+
reset_entropy?: string;
|
|
1123
|
+
recovery_fake_word?: string;
|
|
1124
|
+
recovery_word_pos?: number;
|
|
1125
|
+
reset_word_pos?: number;
|
|
1126
|
+
mnemonic_type?: BackupType;
|
|
1127
|
+
layout_lines: string[];
|
|
1128
|
+
};
|
|
1129
|
+
export type DebugLinkStop = {};
|
|
1130
|
+
export type DebugLinkLog = {
|
|
1131
|
+
level?: number;
|
|
1132
|
+
bucket?: string;
|
|
1133
|
+
text?: string;
|
|
1134
|
+
};
|
|
1135
|
+
export type DebugLinkMemoryRead = {
|
|
1136
|
+
address?: number;
|
|
1137
|
+
length?: number;
|
|
1138
|
+
};
|
|
1139
|
+
export type DebugLinkMemory = {
|
|
1140
|
+
memory?: string;
|
|
1141
|
+
};
|
|
1142
|
+
export type DebugLinkMemoryWrite = {
|
|
1143
|
+
address?: number;
|
|
1144
|
+
memory?: string;
|
|
1145
|
+
flash?: boolean;
|
|
1146
|
+
};
|
|
1147
|
+
export type DebugLinkFlashErase = {
|
|
1148
|
+
sector?: number;
|
|
1149
|
+
};
|
|
1150
|
+
export type DebugLinkEraseSdCard = {
|
|
1151
|
+
format?: boolean;
|
|
1152
|
+
};
|
|
1153
|
+
export type DebugLinkWatchLayout = {
|
|
1154
|
+
watch?: boolean;
|
|
1155
|
+
};
|
|
1068
1156
|
export type DnxGetAddress = {
|
|
1069
1157
|
address_n: number[];
|
|
1070
1158
|
show_display?: boolean;
|
|
@@ -2044,6 +2132,17 @@ export type Entropy = {
|
|
|
2044
2132
|
entropy: string;
|
|
2045
2133
|
};
|
|
2046
2134
|
export type WipeDevice = {};
|
|
2135
|
+
export type LoadDevice = {
|
|
2136
|
+
mnemonics: string[];
|
|
2137
|
+
pin?: string;
|
|
2138
|
+
passphrase_protection?: boolean;
|
|
2139
|
+
language?: string;
|
|
2140
|
+
label?: string;
|
|
2141
|
+
skip_checksum?: boolean;
|
|
2142
|
+
u2f_counter?: number;
|
|
2143
|
+
needs_backup?: boolean;
|
|
2144
|
+
no_backup?: boolean;
|
|
2145
|
+
};
|
|
2047
2146
|
export type ResetDevice = {
|
|
2048
2147
|
display_random?: boolean;
|
|
2049
2148
|
strength?: number;
|
|
@@ -2510,6 +2609,22 @@ export type MoneroLiveRefreshStepAck = {
|
|
|
2510
2609
|
};
|
|
2511
2610
|
export type MoneroLiveRefreshFinalRequest = {};
|
|
2512
2611
|
export type MoneroLiveRefreshFinalAck = {};
|
|
2612
|
+
export type DebugMoneroDiagRequest = {
|
|
2613
|
+
ins?: number;
|
|
2614
|
+
p1?: number;
|
|
2615
|
+
p2?: number;
|
|
2616
|
+
pd: number[];
|
|
2617
|
+
data1?: string;
|
|
2618
|
+
data2?: string;
|
|
2619
|
+
};
|
|
2620
|
+
export type DebugMoneroDiagAck = {
|
|
2621
|
+
ins?: number;
|
|
2622
|
+
p1?: number;
|
|
2623
|
+
p2?: number;
|
|
2624
|
+
pd: number[];
|
|
2625
|
+
data1?: string;
|
|
2626
|
+
data2?: string;
|
|
2627
|
+
};
|
|
2513
2628
|
export type NearGetAddress = {
|
|
2514
2629
|
address_n: number[];
|
|
2515
2630
|
show_display?: boolean;
|
|
@@ -3407,6 +3522,30 @@ export type TronMessageSignature = {
|
|
|
3407
3522
|
address: string;
|
|
3408
3523
|
signature: string;
|
|
3409
3524
|
};
|
|
3525
|
+
export type WebAuthnListResidentCredentials = {};
|
|
3526
|
+
export type WebAuthnAddResidentCredential = {
|
|
3527
|
+
credential_id?: string;
|
|
3528
|
+
};
|
|
3529
|
+
export type WebAuthnRemoveResidentCredential = {
|
|
3530
|
+
index?: number;
|
|
3531
|
+
};
|
|
3532
|
+
export type WebAuthnCredential = {
|
|
3533
|
+
index?: number;
|
|
3534
|
+
id?: string;
|
|
3535
|
+
rp_id?: string;
|
|
3536
|
+
rp_name?: string;
|
|
3537
|
+
user_id?: string;
|
|
3538
|
+
user_name?: string;
|
|
3539
|
+
user_display_name?: string;
|
|
3540
|
+
creation_time?: number;
|
|
3541
|
+
hmac_secret?: boolean;
|
|
3542
|
+
use_sign_count?: boolean;
|
|
3543
|
+
algorithm?: number;
|
|
3544
|
+
curve?: number;
|
|
3545
|
+
};
|
|
3546
|
+
export type WebAuthnCredentials = {
|
|
3547
|
+
credentials: WebAuthnCredential[];
|
|
3548
|
+
};
|
|
3410
3549
|
export type facotry = {};
|
|
3411
3550
|
export declare enum CommandFlags {
|
|
3412
3551
|
Default = 0,
|
|
@@ -4128,9 +4267,27 @@ export type MessageType = {
|
|
|
4128
4267
|
SignedIdentity: SignedIdentity;
|
|
4129
4268
|
GetECDHSessionKey: GetECDHSessionKey;
|
|
4130
4269
|
ECDHSessionKey: ECDHSessionKey;
|
|
4270
|
+
CosiCommit: CosiCommit;
|
|
4271
|
+
CosiCommitment: CosiCommitment;
|
|
4272
|
+
CosiSign: CosiSign;
|
|
4273
|
+
CosiSignature: CosiSignature;
|
|
4131
4274
|
Path: Path;
|
|
4132
4275
|
BatchGetPublickeys: BatchGetPublickeys;
|
|
4133
4276
|
EcdsaPublicKeys: EcdsaPublicKeys;
|
|
4277
|
+
DebugLinkDecision: DebugLinkDecision;
|
|
4278
|
+
DebugLinkLayout: DebugLinkLayout;
|
|
4279
|
+
DebugLinkReseedRandom: DebugLinkReseedRandom;
|
|
4280
|
+
DebugLinkRecordScreen: DebugLinkRecordScreen;
|
|
4281
|
+
DebugLinkGetState: DebugLinkGetState;
|
|
4282
|
+
DebugLinkState: DebugLinkState;
|
|
4283
|
+
DebugLinkStop: DebugLinkStop;
|
|
4284
|
+
DebugLinkLog: DebugLinkLog;
|
|
4285
|
+
DebugLinkMemoryRead: DebugLinkMemoryRead;
|
|
4286
|
+
DebugLinkMemory: DebugLinkMemory;
|
|
4287
|
+
DebugLinkMemoryWrite: DebugLinkMemoryWrite;
|
|
4288
|
+
DebugLinkFlashErase: DebugLinkFlashErase;
|
|
4289
|
+
DebugLinkEraseSdCard: DebugLinkEraseSdCard;
|
|
4290
|
+
DebugLinkWatchLayout: DebugLinkWatchLayout;
|
|
4134
4291
|
DnxGetAddress: DnxGetAddress;
|
|
4135
4292
|
DnxAddress: DnxAddress;
|
|
4136
4293
|
DnxSignTx: DnxSignTx;
|
|
@@ -4268,6 +4425,7 @@ export type MessageType = {
|
|
|
4268
4425
|
GetEntropy: GetEntropy;
|
|
4269
4426
|
Entropy: Entropy;
|
|
4270
4427
|
WipeDevice: WipeDevice;
|
|
4428
|
+
LoadDevice: LoadDevice;
|
|
4271
4429
|
ResetDevice: ResetDevice;
|
|
4272
4430
|
BackupDevice: BackupDevice;
|
|
4273
4431
|
EntropyRequest: EntropyRequest;
|
|
@@ -4375,6 +4533,8 @@ export type MessageType = {
|
|
|
4375
4533
|
MoneroLiveRefreshStepAck: MoneroLiveRefreshStepAck;
|
|
4376
4534
|
MoneroLiveRefreshFinalRequest: MoneroLiveRefreshFinalRequest;
|
|
4377
4535
|
MoneroLiveRefreshFinalAck: MoneroLiveRefreshFinalAck;
|
|
4536
|
+
DebugMoneroDiagRequest: DebugMoneroDiagRequest;
|
|
4537
|
+
DebugMoneroDiagAck: DebugMoneroDiagAck;
|
|
4378
4538
|
NearGetAddress: NearGetAddress;
|
|
4379
4539
|
NearAddress: NearAddress;
|
|
4380
4540
|
NearSignTx: NearSignTx;
|
|
@@ -4529,6 +4689,11 @@ export type MessageType = {
|
|
|
4529
4689
|
TronSignedTx: TronSignedTx;
|
|
4530
4690
|
TronSignMessage: TronSignMessage;
|
|
4531
4691
|
TronMessageSignature: TronMessageSignature;
|
|
4692
|
+
WebAuthnListResidentCredentials: WebAuthnListResidentCredentials;
|
|
4693
|
+
WebAuthnAddResidentCredential: WebAuthnAddResidentCredential;
|
|
4694
|
+
WebAuthnRemoveResidentCredential: WebAuthnRemoveResidentCredential;
|
|
4695
|
+
WebAuthnCredential: WebAuthnCredential;
|
|
4696
|
+
WebAuthnCredentials: WebAuthnCredentials;
|
|
4532
4697
|
facotry: facotry;
|
|
4533
4698
|
experimental_message: experimental_message;
|
|
4534
4699
|
experimental_field: experimental_field;
|