@onekeyfe/hd-web-sdk 0.3.17 → 0.3.19

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.
@@ -4161,7 +4161,86 @@
4161
4161
  }
4162
4162
  }
4163
4163
  },
4164
- "EthereumSignTypedData": {
4164
+ "EthereumDefinitionType": {
4165
+ "values": {
4166
+ "NETWORK": 0,
4167
+ "TOKEN": 1
4168
+ }
4169
+ },
4170
+ "EthereumNetworkInfo": {
4171
+ "fields": {
4172
+ "chain_id": {
4173
+ "rule": "required",
4174
+ "type": "uint64",
4175
+ "id": 1
4176
+ },
4177
+ "symbol": {
4178
+ "rule": "required",
4179
+ "type": "string",
4180
+ "id": 2
4181
+ },
4182
+ "slip44": {
4183
+ "rule": "required",
4184
+ "type": "uint32",
4185
+ "id": 3
4186
+ },
4187
+ "name": {
4188
+ "rule": "required",
4189
+ "type": "string",
4190
+ "id": 4
4191
+ },
4192
+ "icon": {
4193
+ "type": "string",
4194
+ "id": 101
4195
+ },
4196
+ "primary_color": {
4197
+ "type": "uint64",
4198
+ "id": 102
4199
+ }
4200
+ }
4201
+ },
4202
+ "EthereumTokenInfo": {
4203
+ "fields": {
4204
+ "address": {
4205
+ "rule": "required",
4206
+ "type": "bytes",
4207
+ "id": 1
4208
+ },
4209
+ "chain_id": {
4210
+ "rule": "required",
4211
+ "type": "uint64",
4212
+ "id": 2
4213
+ },
4214
+ "symbol": {
4215
+ "rule": "required",
4216
+ "type": "string",
4217
+ "id": 3
4218
+ },
4219
+ "decimals": {
4220
+ "rule": "required",
4221
+ "type": "uint32",
4222
+ "id": 4
4223
+ },
4224
+ "name": {
4225
+ "rule": "required",
4226
+ "type": "string",
4227
+ "id": 5
4228
+ }
4229
+ }
4230
+ },
4231
+ "EthereumDefinitions": {
4232
+ "fields": {
4233
+ "encoded_network": {
4234
+ "type": "bytes",
4235
+ "id": 1
4236
+ },
4237
+ "encoded_token": {
4238
+ "type": "bytes",
4239
+ "id": 2
4240
+ }
4241
+ }
4242
+ },
4243
+ "EthereumSignTypedDataOneKey": {
4165
4244
  "fields": {
4166
4245
  "address_n": {
4167
4246
  "rule": "repeated",
@@ -4189,6 +4268,122 @@
4189
4268
  }
4190
4269
  }
4191
4270
  },
4271
+ "EthereumTypedDataStructRequestOneKey": {
4272
+ "fields": {
4273
+ "name": {
4274
+ "rule": "required",
4275
+ "type": "string",
4276
+ "id": 1
4277
+ }
4278
+ }
4279
+ },
4280
+ "EthereumTypedDataStructAckOneKey": {
4281
+ "fields": {
4282
+ "members": {
4283
+ "rule": "repeated",
4284
+ "type": "EthereumStructMemberOneKey",
4285
+ "id": 1
4286
+ }
4287
+ },
4288
+ "nested": {
4289
+ "EthereumStructMemberOneKey": {
4290
+ "fields": {
4291
+ "type": {
4292
+ "rule": "required",
4293
+ "type": "EthereumFieldTypeOneKey",
4294
+ "id": 1
4295
+ },
4296
+ "name": {
4297
+ "rule": "required",
4298
+ "type": "string",
4299
+ "id": 2
4300
+ }
4301
+ }
4302
+ },
4303
+ "EthereumFieldTypeOneKey": {
4304
+ "fields": {
4305
+ "data_type": {
4306
+ "rule": "required",
4307
+ "type": "EthereumDataTypeOneKey",
4308
+ "id": 1
4309
+ },
4310
+ "size": {
4311
+ "type": "uint32",
4312
+ "id": 2
4313
+ },
4314
+ "entry_type": {
4315
+ "type": "EthereumFieldTypeOneKey",
4316
+ "id": 3
4317
+ },
4318
+ "struct_name": {
4319
+ "type": "string",
4320
+ "id": 4
4321
+ }
4322
+ }
4323
+ },
4324
+ "EthereumDataTypeOneKey": {
4325
+ "values": {
4326
+ "UINT": 1,
4327
+ "INT": 2,
4328
+ "BYTES": 3,
4329
+ "STRING": 4,
4330
+ "BOOL": 5,
4331
+ "ADDRESS": 6,
4332
+ "ARRAY": 7,
4333
+ "STRUCT": 8
4334
+ }
4335
+ }
4336
+ }
4337
+ },
4338
+ "EthereumTypedDataValueRequestOneKey": {
4339
+ "fields": {
4340
+ "member_path": {
4341
+ "rule": "repeated",
4342
+ "type": "uint32",
4343
+ "id": 1,
4344
+ "options": {
4345
+ "packed": false
4346
+ }
4347
+ }
4348
+ }
4349
+ },
4350
+ "EthereumTypedDataValueAckOneKey": {
4351
+ "fields": {
4352
+ "value": {
4353
+ "rule": "required",
4354
+ "type": "bytes",
4355
+ "id": 1
4356
+ }
4357
+ }
4358
+ },
4359
+ "EthereumSignTypedData": {
4360
+ "fields": {
4361
+ "address_n": {
4362
+ "rule": "repeated",
4363
+ "type": "uint32",
4364
+ "id": 1,
4365
+ "options": {
4366
+ "packed": false
4367
+ }
4368
+ },
4369
+ "primary_type": {
4370
+ "rule": "required",
4371
+ "type": "string",
4372
+ "id": 2
4373
+ },
4374
+ "metamask_v4_compat": {
4375
+ "type": "bool",
4376
+ "id": 3,
4377
+ "options": {
4378
+ "default": true
4379
+ }
4380
+ },
4381
+ "definitions": {
4382
+ "type": "EthereumDefinitions",
4383
+ "id": 4
4384
+ }
4385
+ }
4386
+ },
4192
4387
  "EthereumTypedDataStructRequest": {
4193
4388
  "fields": {
4194
4389
  "name": {
@@ -4277,7 +4472,7 @@
4277
4472
  }
4278
4473
  }
4279
4474
  },
4280
- "EthereumGetPublicKey": {
4475
+ "EthereumGetPublicKeyOneKey": {
4281
4476
  "fields": {
4282
4477
  "address_n": {
4283
4478
  "rule": "repeated",
@@ -4297,7 +4492,7 @@
4297
4492
  }
4298
4493
  }
4299
4494
  },
4300
- "EthereumPublicKey": {
4495
+ "EthereumPublicKeyOneKey": {
4301
4496
  "fields": {
4302
4497
  "node": {
4303
4498
  "rule": "required",
@@ -4311,7 +4506,7 @@
4311
4506
  }
4312
4507
  }
4313
4508
  },
4314
- "EthereumGetAddress": {
4509
+ "EthereumGetAddressOneKey": {
4315
4510
  "fields": {
4316
4511
  "address_n": {
4317
4512
  "rule": "repeated",
@@ -4331,7 +4526,7 @@
4331
4526
  }
4332
4527
  }
4333
4528
  },
4334
- "EthereumAddress": {
4529
+ "EthereumAddressOneKey": {
4335
4530
  "fields": {
4336
4531
  "_old_address": {
4337
4532
  "type": "bytes",
@@ -4346,7 +4541,7 @@
4346
4541
  }
4347
4542
  }
4348
4543
  },
4349
- "EthereumSignTx": {
4544
+ "EthereumSignTxOneKey": {
4350
4545
  "fields": {
4351
4546
  "address_n": {
4352
4547
  "rule": "repeated",
@@ -4412,7 +4607,7 @@
4412
4607
  }
4413
4608
  }
4414
4609
  },
4415
- "EthereumSignTxEIP1559": {
4610
+ "EthereumSignTxEIP1559OneKey": {
4416
4611
  "fields": {
4417
4612
  "address_n": {
4418
4613
  "rule": "repeated",
@@ -4473,12 +4668,12 @@
4473
4668
  },
4474
4669
  "access_list": {
4475
4670
  "rule": "repeated",
4476
- "type": "EthereumAccessList",
4671
+ "type": "EthereumAccessListOneKey",
4477
4672
  "id": 11
4478
4673
  }
4479
4674
  },
4480
4675
  "nested": {
4481
- "EthereumAccessList": {
4676
+ "EthereumAccessListOneKey": {
4482
4677
  "fields": {
4483
4678
  "address": {
4484
4679
  "rule": "required",
@@ -4494,7 +4689,7 @@
4494
4689
  }
4495
4690
  }
4496
4691
  },
4497
- "EthereumTxRequest": {
4692
+ "EthereumTxRequestOneKey": {
4498
4693
  "fields": {
4499
4694
  "data_length": {
4500
4695
  "type": "uint32",
@@ -4514,7 +4709,7 @@
4514
4709
  }
4515
4710
  }
4516
4711
  },
4517
- "EthereumTxAck": {
4712
+ "EthereumTxAckOneKey": {
4518
4713
  "fields": {
4519
4714
  "data_chunk": {
4520
4715
  "rule": "required",
@@ -4523,7 +4718,7 @@
4523
4718
  }
4524
4719
  }
4525
4720
  },
4526
- "EthereumSignMessage": {
4721
+ "EthereumSignMessageOneKey": {
4527
4722
  "fields": {
4528
4723
  "address_n": {
4529
4724
  "rule": "repeated",
@@ -4544,7 +4739,7 @@
4544
4739
  }
4545
4740
  }
4546
4741
  },
4547
- "EthereumMessageSignature": {
4742
+ "EthereumMessageSignatureOneKey": {
4548
4743
  "fields": {
4549
4744
  "signature": {
4550
4745
  "rule": "required",
@@ -4558,7 +4753,7 @@
4558
4753
  }
4559
4754
  }
4560
4755
  },
4561
- "EthereumVerifyMessage": {
4756
+ "EthereumVerifyMessageOneKey": {
4562
4757
  "fields": {
4563
4758
  "signature": {
4564
4759
  "rule": "required",
@@ -4581,7 +4776,7 @@
4581
4776
  }
4582
4777
  }
4583
4778
  },
4584
- "EthereumSignMessageEIP712": {
4779
+ "EthereumSignTypedHashOneKey": {
4585
4780
  "fields": {
4586
4781
  "address_n": {
4587
4782
  "rule": "repeated",
@@ -4591,17 +4786,36 @@
4591
4786
  "packed": false
4592
4787
  }
4593
4788
  },
4594
- "domain_hash": {
4789
+ "domain_separator_hash": {
4790
+ "rule": "required",
4595
4791
  "type": "bytes",
4596
4792
  "id": 2
4597
4793
  },
4598
4794
  "message_hash": {
4599
4795
  "type": "bytes",
4600
4796
  "id": 3
4797
+ },
4798
+ "chain_id": {
4799
+ "type": "uint64",
4800
+ "id": 4
4601
4801
  }
4602
4802
  }
4603
4803
  },
4604
- "EthereumSignTypedHash": {
4804
+ "EthereumTypedDataSignatureOneKey": {
4805
+ "fields": {
4806
+ "signature": {
4807
+ "rule": "required",
4808
+ "type": "bytes",
4809
+ "id": 1
4810
+ },
4811
+ "address": {
4812
+ "rule": "required",
4813
+ "type": "string",
4814
+ "id": 2
4815
+ }
4816
+ }
4817
+ },
4818
+ "EthereumSignMessageEIP712": {
4605
4819
  "fields": {
4606
4820
  "address_n": {
4607
4821
  "rule": "repeated",
@@ -4611,17 +4825,341 @@
4611
4825
  "packed": false
4612
4826
  }
4613
4827
  },
4614
- "domain_separator_hash": {
4615
- "rule": "required",
4828
+ "domain_hash": {
4616
4829
  "type": "bytes",
4617
4830
  "id": 2
4618
4831
  },
4619
4832
  "message_hash": {
4620
4833
  "type": "bytes",
4621
4834
  "id": 3
4835
+ }
4836
+ }
4837
+ },
4838
+ "EthereumGetPublicKey": {
4839
+ "fields": {
4840
+ "address_n": {
4841
+ "rule": "repeated",
4842
+ "type": "uint32",
4843
+ "id": 1,
4844
+ "options": {
4845
+ "packed": false
4846
+ }
4622
4847
  },
4623
- "chain_id": {
4624
- "type": "uint64",
4848
+ "show_display": {
4849
+ "type": "bool",
4850
+ "id": 2
4851
+ }
4852
+ }
4853
+ },
4854
+ "EthereumPublicKey": {
4855
+ "fields": {
4856
+ "node": {
4857
+ "rule": "required",
4858
+ "type": "HDNodeType",
4859
+ "id": 1
4860
+ },
4861
+ "xpub": {
4862
+ "rule": "required",
4863
+ "type": "string",
4864
+ "id": 2
4865
+ }
4866
+ }
4867
+ },
4868
+ "EthereumGetAddress": {
4869
+ "fields": {
4870
+ "address_n": {
4871
+ "rule": "repeated",
4872
+ "type": "uint32",
4873
+ "id": 1,
4874
+ "options": {
4875
+ "packed": false
4876
+ }
4877
+ },
4878
+ "show_display": {
4879
+ "type": "bool",
4880
+ "id": 2
4881
+ },
4882
+ "encoded_network": {
4883
+ "type": "bytes",
4884
+ "id": 3
4885
+ }
4886
+ }
4887
+ },
4888
+ "EthereumAddress": {
4889
+ "fields": {
4890
+ "_old_address": {
4891
+ "type": "bytes",
4892
+ "id": 1,
4893
+ "options": {
4894
+ "deprecated": true
4895
+ }
4896
+ },
4897
+ "address": {
4898
+ "type": "string",
4899
+ "id": 2
4900
+ }
4901
+ }
4902
+ },
4903
+ "EthereumSignTx": {
4904
+ "fields": {
4905
+ "address_n": {
4906
+ "rule": "repeated",
4907
+ "type": "uint32",
4908
+ "id": 1,
4909
+ "options": {
4910
+ "packed": false
4911
+ }
4912
+ },
4913
+ "nonce": {
4914
+ "type": "bytes",
4915
+ "id": 2,
4916
+ "options": {
4917
+ "default": ""
4918
+ }
4919
+ },
4920
+ "gas_price": {
4921
+ "rule": "required",
4922
+ "type": "bytes",
4923
+ "id": 3
4924
+ },
4925
+ "gas_limit": {
4926
+ "rule": "required",
4927
+ "type": "bytes",
4928
+ "id": 4
4929
+ },
4930
+ "to": {
4931
+ "type": "string",
4932
+ "id": 11,
4933
+ "options": {
4934
+ "default": ""
4935
+ }
4936
+ },
4937
+ "value": {
4938
+ "type": "bytes",
4939
+ "id": 6,
4940
+ "options": {
4941
+ "default": ""
4942
+ }
4943
+ },
4944
+ "data_initial_chunk": {
4945
+ "type": "bytes",
4946
+ "id": 7,
4947
+ "options": {
4948
+ "default": ""
4949
+ }
4950
+ },
4951
+ "data_length": {
4952
+ "type": "uint32",
4953
+ "id": 8,
4954
+ "options": {
4955
+ "default": 0
4956
+ }
4957
+ },
4958
+ "chain_id": {
4959
+ "rule": "required",
4960
+ "type": "uint64",
4961
+ "id": 9
4962
+ },
4963
+ "tx_type": {
4964
+ "type": "uint32",
4965
+ "id": 10
4966
+ },
4967
+ "definitions": {
4968
+ "type": "EthereumDefinitions",
4969
+ "id": 12
4970
+ }
4971
+ }
4972
+ },
4973
+ "EthereumSignTxEIP1559": {
4974
+ "fields": {
4975
+ "address_n": {
4976
+ "rule": "repeated",
4977
+ "type": "uint32",
4978
+ "id": 1,
4979
+ "options": {
4980
+ "packed": false
4981
+ }
4982
+ },
4983
+ "nonce": {
4984
+ "rule": "required",
4985
+ "type": "bytes",
4986
+ "id": 2
4987
+ },
4988
+ "max_gas_fee": {
4989
+ "rule": "required",
4990
+ "type": "bytes",
4991
+ "id": 3
4992
+ },
4993
+ "max_priority_fee": {
4994
+ "rule": "required",
4995
+ "type": "bytes",
4996
+ "id": 4
4997
+ },
4998
+ "gas_limit": {
4999
+ "rule": "required",
5000
+ "type": "bytes",
5001
+ "id": 5
5002
+ },
5003
+ "to": {
5004
+ "type": "string",
5005
+ "id": 6,
5006
+ "options": {
5007
+ "default": ""
5008
+ }
5009
+ },
5010
+ "value": {
5011
+ "rule": "required",
5012
+ "type": "bytes",
5013
+ "id": 7
5014
+ },
5015
+ "data_initial_chunk": {
5016
+ "type": "bytes",
5017
+ "id": 8,
5018
+ "options": {
5019
+ "default": ""
5020
+ }
5021
+ },
5022
+ "data_length": {
5023
+ "rule": "required",
5024
+ "type": "uint32",
5025
+ "id": 9
5026
+ },
5027
+ "chain_id": {
5028
+ "rule": "required",
5029
+ "type": "uint64",
5030
+ "id": 10
5031
+ },
5032
+ "access_list": {
5033
+ "rule": "repeated",
5034
+ "type": "EthereumAccessList",
5035
+ "id": 11
5036
+ },
5037
+ "definitions": {
5038
+ "type": "EthereumDefinitions",
5039
+ "id": 12
5040
+ }
5041
+ },
5042
+ "nested": {
5043
+ "EthereumAccessList": {
5044
+ "fields": {
5045
+ "address": {
5046
+ "rule": "required",
5047
+ "type": "string",
5048
+ "id": 1
5049
+ },
5050
+ "storage_keys": {
5051
+ "rule": "repeated",
5052
+ "type": "bytes",
5053
+ "id": 2
5054
+ }
5055
+ }
5056
+ }
5057
+ }
5058
+ },
5059
+ "EthereumTxRequest": {
5060
+ "fields": {
5061
+ "data_length": {
5062
+ "type": "uint32",
5063
+ "id": 1
5064
+ },
5065
+ "signature_v": {
5066
+ "type": "uint32",
5067
+ "id": 2
5068
+ },
5069
+ "signature_r": {
5070
+ "type": "bytes",
5071
+ "id": 3
5072
+ },
5073
+ "signature_s": {
5074
+ "type": "bytes",
5075
+ "id": 4
5076
+ }
5077
+ }
5078
+ },
5079
+ "EthereumTxAck": {
5080
+ "fields": {
5081
+ "data_chunk": {
5082
+ "rule": "required",
5083
+ "type": "bytes",
5084
+ "id": 1
5085
+ }
5086
+ }
5087
+ },
5088
+ "EthereumSignMessage": {
5089
+ "fields": {
5090
+ "address_n": {
5091
+ "rule": "repeated",
5092
+ "type": "uint32",
5093
+ "id": 1,
5094
+ "options": {
5095
+ "packed": false
5096
+ }
5097
+ },
5098
+ "message": {
5099
+ "rule": "required",
5100
+ "type": "bytes",
5101
+ "id": 2
5102
+ },
5103
+ "encoded_network": {
5104
+ "type": "bytes",
5105
+ "id": 3
5106
+ }
5107
+ }
5108
+ },
5109
+ "EthereumMessageSignature": {
5110
+ "fields": {
5111
+ "signature": {
5112
+ "rule": "required",
5113
+ "type": "bytes",
5114
+ "id": 2
5115
+ },
5116
+ "address": {
5117
+ "rule": "required",
5118
+ "type": "string",
5119
+ "id": 3
5120
+ }
5121
+ }
5122
+ },
5123
+ "EthereumVerifyMessage": {
5124
+ "fields": {
5125
+ "signature": {
5126
+ "rule": "required",
5127
+ "type": "bytes",
5128
+ "id": 2
5129
+ },
5130
+ "message": {
5131
+ "rule": "required",
5132
+ "type": "bytes",
5133
+ "id": 3
5134
+ },
5135
+ "address": {
5136
+ "rule": "required",
5137
+ "type": "string",
5138
+ "id": 4
5139
+ }
5140
+ }
5141
+ },
5142
+ "EthereumSignTypedHash": {
5143
+ "fields": {
5144
+ "address_n": {
5145
+ "rule": "repeated",
5146
+ "type": "uint32",
5147
+ "id": 1,
5148
+ "options": {
5149
+ "packed": false
5150
+ }
5151
+ },
5152
+ "domain_separator_hash": {
5153
+ "rule": "required",
5154
+ "type": "bytes",
5155
+ "id": 2
5156
+ },
5157
+ "message_hash": {
5158
+ "type": "bytes",
5159
+ "id": 3
5160
+ },
5161
+ "encoded_network": {
5162
+ "type": "bytes",
4625
5163
  "id": 4
4626
5164
  }
4627
5165
  }
@@ -9349,6 +9887,24 @@
9349
9887
  "MessageType_EthereumTypedDataValueAck": 468,
9350
9888
  "MessageType_EthereumTypedDataSignature": 469,
9351
9889
  "MessageType_EthereumSignTypedHash": 470,
9890
+ "MessageType_EthereumGetPublicKeyOneKey": 20100,
9891
+ "MessageType_EthereumPublicKeyOneKey": 20101,
9892
+ "MessageType_EthereumGetAddressOneKey": 20102,
9893
+ "MessageType_EthereumAddressOneKey": 20103,
9894
+ "MessageType_EthereumSignTxOneKey": 20104,
9895
+ "MessageType_EthereumSignTxEIP1559OneKey": 20105,
9896
+ "MessageType_EthereumTxRequestOneKey": 20106,
9897
+ "MessageType_EthereumTxAckOneKey": 20107,
9898
+ "MessageType_EthereumSignMessageOneKey": 20108,
9899
+ "MessageType_EthereumVerifyMessageOneKey": 20109,
9900
+ "MessageType_EthereumMessageSignatureOneKey": 20110,
9901
+ "MessageType_EthereumSignTypedDataOneKey": 20111,
9902
+ "MessageType_EthereumTypedDataStructRequestOneKey": 20112,
9903
+ "MessageType_EthereumTypedDataStructAckOneKey": 20113,
9904
+ "MessageType_EthereumTypedDataValueRequestOneKey": 20114,
9905
+ "MessageType_EthereumTypedDataValueAckOneKey": 20115,
9906
+ "MessageType_EthereumTypedDataSignatureOneKey": 20116,
9907
+ "MessageType_EthereumSignTypedHashOneKey": 20117,
9352
9908
  "MessageType_NEMGetAddress": 67,
9353
9909
  "MessageType_NEMAddress": 68,
9354
9910
  "MessageType_NEMSignTx": 69,