@onekeyfe/hd-transport 1.2.8-alpha.110 → 1.2.8-alpha.111

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.
@@ -11034,6 +11034,61 @@
11034
11034
  }
11035
11035
  }
11036
11036
  },
11037
+ "ZcashSignPczt": {
11038
+ "fields": {
11039
+ "pczt_length": {
11040
+ "rule": "required",
11041
+ "type": "uint32",
11042
+ "id": 1
11043
+ },
11044
+ "pczt_initial_chunk": {
11045
+ "rule": "required",
11046
+ "type": "bytes",
11047
+ "id": 2
11048
+ }
11049
+ }
11050
+ },
11051
+ "ZcashPcztChunkRequest": {
11052
+ "fields": {
11053
+ "chunk_length": {
11054
+ "rule": "required",
11055
+ "type": "uint32",
11056
+ "id": 1
11057
+ }
11058
+ }
11059
+ },
11060
+ "ZcashPcztChunkAck": {
11061
+ "fields": {
11062
+ "data_chunk": {
11063
+ "rule": "required",
11064
+ "type": "bytes",
11065
+ "id": 1
11066
+ }
11067
+ }
11068
+ },
11069
+ "ZcashSignedPczt": {
11070
+ "fields": {
11071
+ "pczt_length": {
11072
+ "rule": "required",
11073
+ "type": "uint32",
11074
+ "id": 1
11075
+ },
11076
+ "pczt_initial_chunk": {
11077
+ "rule": "required",
11078
+ "type": "bytes",
11079
+ "id": 2
11080
+ }
11081
+ }
11082
+ },
11083
+ "ZcashSignedPcztChunkRequest": {
11084
+ "fields": {
11085
+ "chunk_length": {
11086
+ "rule": "required",
11087
+ "type": "uint32",
11088
+ "id": 1
11089
+ }
11090
+ }
11091
+ },
11037
11092
  "wire_in": {
11038
11093
  "type": "bool",
11039
11094
  "id": 50002,
@@ -11459,6 +11514,11 @@
11459
11514
  "MessageType_NeoAddress": 12302,
11460
11515
  "MessageType_NeoSignTx": 12303,
11461
11516
  "MessageType_NeoSignedTx": 12304,
11517
+ "MessageType_ZcashSignPczt": 12402,
11518
+ "MessageType_ZcashSignedPczt": 12403,
11519
+ "MessageType_ZcashPcztChunkRequest": 12404,
11520
+ "MessageType_ZcashPcztChunkAck": 12405,
11521
+ "MessageType_ZcashSignedPcztChunkRequest": 12406,
11462
11522
  "MessageType_DeviceFactoryInfoSet": 60000,
11463
11523
  "MessageType_DeviceFactoryInfoGet": 60001,
11464
11524
  "MessageType_DeviceFactoryInfo": 60002,
@@ -11511,7 +11571,9 @@
11511
11571
  "MessageType_PortfolioUpdate": 61400,
11512
11572
  "MessageType_NftUpdate": 61500,
11513
11573
  "MessageType_OnboardingStatusGet": 61600,
11514
- "MessageType_OnboardingStatus": 61601
11574
+ "MessageType_OnboardingStatus": 61601,
11575
+ "MessageType_ZcashGetAddress": 12400,
11576
+ "MessageType_ZcashAddress": 12401
11515
11577
  },
11516
11578
  "reserved": [
11517
11579
  [90, 92],
@@ -13730,6 +13792,81 @@
13730
13792
  }
13731
13793
  }
13732
13794
  }
13795
+ },
13796
+ "ZcashAddressType": {
13797
+ "values": {
13798
+ "UNIFIED_ORCHARD_P2PKH": 0,
13799
+ "TRANSPARENT_P2PKH": 1,
13800
+ "UNIFIED_ORCHARD": 2
13801
+ }
13802
+ },
13803
+ "ZcashAddressScope": {
13804
+ "values": {
13805
+ "EXTERNAL": 0,
13806
+ "INTERNAL": 1
13807
+ }
13808
+ },
13809
+ "ZcashGetAddress": {
13810
+ "fields": {
13811
+ "address_n": {
13812
+ "rule": "repeated",
13813
+ "type": "uint32",
13814
+ "id": 1,
13815
+ "options": {
13816
+ "packed": false
13817
+ }
13818
+ },
13819
+ "show_display": {
13820
+ "type": "bool",
13821
+ "id": 2
13822
+ },
13823
+ "include_seed_fingerprint": {
13824
+ "type": "bool",
13825
+ "id": 3
13826
+ },
13827
+ "include_ufvk": {
13828
+ "type": "bool",
13829
+ "id": 4
13830
+ },
13831
+ "diversifier_index": {
13832
+ "type": "uint32",
13833
+ "id": 5,
13834
+ "options": {
13835
+ "default": 0
13836
+ }
13837
+ },
13838
+ "address_type": {
13839
+ "type": "ZcashAddressType",
13840
+ "id": 6,
13841
+ "options": {
13842
+ "default": "UNIFIED_ORCHARD_P2PKH"
13843
+ }
13844
+ },
13845
+ "scope": {
13846
+ "type": "ZcashAddressScope",
13847
+ "id": 7,
13848
+ "options": {
13849
+ "default": "EXTERNAL"
13850
+ }
13851
+ }
13852
+ }
13853
+ },
13854
+ "ZcashAddress": {
13855
+ "fields": {
13856
+ "address": {
13857
+ "rule": "required",
13858
+ "type": "string",
13859
+ "id": 1
13860
+ },
13861
+ "ufvk": {
13862
+ "type": "string",
13863
+ "id": 2
13864
+ },
13865
+ "seed_fingerprint": {
13866
+ "type": "bytes",
13867
+ "id": 3
13868
+ }
13869
+ }
13733
13870
  }
13734
13871
  }
13735
13872
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-transport",
3
- "version": "1.2.8-alpha.110",
3
+ "version": "1.2.8-alpha.111",
4
4
  "description": "Transport layer abstractions and utilities for OneKey hardware SDK.",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -28,5 +28,5 @@
28
28
  "long": "^4.0.0",
29
29
  "protobufjs": "^6.11.2"
30
30
  },
31
- "gitHead": "21cb80c9df5289d5da3ac56d693ed8f3caa2aaf7"
31
+ "gitHead": "d1e821b961d8060f9cb00d60a23e37c7f6d9206c"
32
32
  }
@@ -4680,6 +4680,33 @@ export type UiAnimationRequest = {
4680
4680
  type?: UiAnimationType;
4681
4681
  };
4682
4682
 
4683
+ // ZcashSignPczt
4684
+ export type ZcashSignPczt = {
4685
+ pczt_length: number;
4686
+ pczt_initial_chunk: string;
4687
+ };
4688
+
4689
+ // ZcashPcztChunkRequest
4690
+ export type ZcashPcztChunkRequest = {
4691
+ chunk_length: number;
4692
+ };
4693
+
4694
+ // ZcashPcztChunkAck
4695
+ export type ZcashPcztChunkAck = {
4696
+ data_chunk: string;
4697
+ };
4698
+
4699
+ // ZcashSignedPczt
4700
+ export type ZcashSignedPczt = {
4701
+ pczt_length: number;
4702
+ pczt_initial_chunk: string;
4703
+ };
4704
+
4705
+ // ZcashSignedPcztChunkRequest
4706
+ export type ZcashSignedPcztChunkRequest = {
4707
+ chunk_length: number;
4708
+ };
4709
+
4683
4710
  // experimental_message
4684
4711
  export type experimental_message = {};
4685
4712
 
@@ -5374,6 +5401,35 @@ export type ViewVerifyPage = {
5374
5401
  content?: ViewContentPreview;
5375
5402
  };
5376
5403
 
5404
+ export enum ZcashAddressType {
5405
+ UNIFIED_ORCHARD_P2PKH = 0,
5406
+ TRANSPARENT_P2PKH = 1,
5407
+ UNIFIED_ORCHARD = 2,
5408
+ }
5409
+
5410
+ export enum ZcashAddressScope {
5411
+ EXTERNAL = 0,
5412
+ INTERNAL = 1,
5413
+ }
5414
+
5415
+ // ZcashGetAddress
5416
+ export type ZcashGetAddress = {
5417
+ address_n: number[];
5418
+ show_display?: boolean;
5419
+ include_seed_fingerprint?: boolean;
5420
+ include_ufvk?: boolean;
5421
+ diversifier_index?: number;
5422
+ address_type?: ZcashAddressType;
5423
+ scope?: ZcashAddressScope;
5424
+ };
5425
+
5426
+ // ZcashAddress
5427
+ export type ZcashAddress = {
5428
+ address: string;
5429
+ ufvk?: string;
5430
+ seed_fingerprint?: string;
5431
+ };
5432
+
5377
5433
  export enum ProtocolV2FailureType {
5378
5434
  Failure_InvalidMessage = 1,
5379
5435
  Failure_UndefinedError = 2,
@@ -5988,6 +6044,11 @@ export type MessageType = {
5988
6044
  UnlockPath: UnlockPath;
5989
6045
  UnlockedPathRequest: UnlockedPathRequest;
5990
6046
  UiAnimationRequest: UiAnimationRequest;
6047
+ ZcashSignPczt: ZcashSignPczt;
6048
+ ZcashPcztChunkRequest: ZcashPcztChunkRequest;
6049
+ ZcashPcztChunkAck: ZcashPcztChunkAck;
6050
+ ZcashSignedPczt: ZcashSignedPczt;
6051
+ ZcashSignedPcztChunkRequest: ZcashSignedPcztChunkRequest;
5991
6052
  experimental_message: experimental_message;
5992
6053
  experimental_field: experimental_field;
5993
6054
  ProtocolInfoRequest: ProtocolInfoRequest;
@@ -6064,6 +6125,8 @@ export type MessageType = {
6064
6125
  ViewSignPage: ViewSignPage;
6065
6126
  ViewWarningPage: ViewWarningPage;
6066
6127
  ViewVerifyPage: ViewVerifyPage;
6128
+ ZcashGetAddress: ZcashGetAddress;
6129
+ ZcashAddress: ZcashAddress;
6067
6130
  };
6068
6131
 
6069
6132
  export type MessageKey = keyof MessageType;
@@ -34,12 +34,6 @@ export type OneKeyDeviceInfoWithSession = OneKeyUsbDeviceInfo & {
34
34
  export type OneKeyMobileDeviceInfo = {
35
35
  id: string;
36
36
  name: string | null;
37
- /**
38
- * Color letter of the serial number ('A'-'Z') from the Pro2 / Neo BLE advertisement,
39
- * possibly seen in an earlier scan. Set by the React Native and Electron BLE
40
- * transports; absent when unknown.
41
- */
42
- bleColorCode?: string;
43
37
  };
44
38
 
45
39
  export type OneKeyDeviceInfoBase = {
@@ -7,6 +7,7 @@ const SENSITIVE_LOG_KEYS = new Set([
7
7
  'address',
8
8
  'apikey',
9
9
  'connectid',
10
+ 'datachunk',
10
11
  'devicestate',
11
12
  'deviceid',
12
13
  'entropy',
@@ -15,16 +16,20 @@ const SENSITIVE_LOG_KEYS = new Set([
15
16
  'passphrase',
16
17
  'passphrasestate',
17
18
  'password',
19
+ 'pczt',
18
20
  'pin',
19
21
  'privatekey',
20
22
  'publickey',
21
23
  'seed',
22
24
  'secret',
25
+ 'seedfingerprint',
23
26
  'serialnumber',
24
27
  'session',
25
28
  'sessionid',
26
29
  'signature',
30
+ 'signedpczt',
27
31
  'token',
32
+ 'ufvk',
28
33
  'uuid',
29
34
  'walletsessionid',
30
35
  'xprv',
@@ -45,7 +50,7 @@ const isSensitiveLogKey = (key: string) => {
45
50
  };
46
51
 
47
52
  const isSigningMessage = (messageName?: string) =>
48
- Boolean(messageName && /(?:sign|txack|transaction)/i.test(messageName));
53
+ Boolean(messageName && /(?:sign|txack|transaction|pczt)/i.test(messageName));
49
54
 
50
55
  const redactLogValue = (value: unknown, seen: WeakSet<object>): unknown => {
51
56
  if (ArrayBuffer.isView(value)) {