@onekeyfe/hd-core 1.1.10-alpha.2 → 1.1.10-alpha.3

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.
@@ -341,6 +341,23 @@
341
341
  }
342
342
  }
343
343
  },
344
+ "AptosSignSIWAMessage": {
345
+ "fields": {
346
+ "address_n": {
347
+ "rule": "repeated",
348
+ "type": "uint32",
349
+ "id": 1,
350
+ "options": {
351
+ "packed": false
352
+ }
353
+ },
354
+ "siwa_payload": {
355
+ "rule": "required",
356
+ "type": "string",
357
+ "id": 2
358
+ }
359
+ }
360
+ },
344
361
  "BenfenGetAddress": {
345
362
  "fields": {
346
363
  "address_n": {
@@ -5241,6 +5258,20 @@
5241
5258
  }
5242
5259
  }
5243
5260
  },
5261
+ "EthereumAccessListOneKey": {
5262
+ "fields": {
5263
+ "address": {
5264
+ "rule": "required",
5265
+ "type": "string",
5266
+ "id": 1
5267
+ },
5268
+ "storage_keys": {
5269
+ "rule": "repeated",
5270
+ "type": "bytes",
5271
+ "id": 2
5272
+ }
5273
+ }
5274
+ },
5244
5275
  "EthereumSignTxEIP1559OneKey": {
5245
5276
  "fields": {
5246
5277
  "address_n": {
@@ -5305,19 +5336,124 @@
5305
5336
  "type": "EthereumAccessListOneKey",
5306
5337
  "id": 11
5307
5338
  }
5339
+ }
5340
+ },
5341
+ "EthereumAuthorizationSignature": {
5342
+ "fields": {
5343
+ "y_parity": {
5344
+ "rule": "required",
5345
+ "type": "uint32",
5346
+ "id": 1
5347
+ },
5348
+ "r": {
5349
+ "rule": "required",
5350
+ "type": "bytes",
5351
+ "id": 2
5352
+ },
5353
+ "s": {
5354
+ "rule": "required",
5355
+ "type": "bytes",
5356
+ "id": 3
5357
+ }
5358
+ }
5359
+ },
5360
+ "EthereumSignTxEIP7702OneKey": {
5361
+ "fields": {
5362
+ "address_n": {
5363
+ "rule": "repeated",
5364
+ "type": "uint32",
5365
+ "id": 1,
5366
+ "options": {
5367
+ "packed": false
5368
+ }
5369
+ },
5370
+ "nonce": {
5371
+ "rule": "required",
5372
+ "type": "bytes",
5373
+ "id": 2
5374
+ },
5375
+ "max_gas_fee": {
5376
+ "rule": "required",
5377
+ "type": "bytes",
5378
+ "id": 3
5379
+ },
5380
+ "max_priority_fee": {
5381
+ "rule": "required",
5382
+ "type": "bytes",
5383
+ "id": 4
5384
+ },
5385
+ "gas_limit": {
5386
+ "rule": "required",
5387
+ "type": "bytes",
5388
+ "id": 5
5389
+ },
5390
+ "to": {
5391
+ "rule": "required",
5392
+ "type": "string",
5393
+ "id": 6
5394
+ },
5395
+ "value": {
5396
+ "rule": "required",
5397
+ "type": "bytes",
5398
+ "id": 7
5399
+ },
5400
+ "data_initial_chunk": {
5401
+ "type": "bytes",
5402
+ "id": 8,
5403
+ "options": {
5404
+ "default": ""
5405
+ }
5406
+ },
5407
+ "data_length": {
5408
+ "rule": "required",
5409
+ "type": "uint32",
5410
+ "id": 9
5411
+ },
5412
+ "chain_id": {
5413
+ "rule": "required",
5414
+ "type": "uint64",
5415
+ "id": 10
5416
+ },
5417
+ "access_list": {
5418
+ "rule": "repeated",
5419
+ "type": "EthereumAccessListOneKey",
5420
+ "id": 11
5421
+ },
5422
+ "authorization_list": {
5423
+ "rule": "repeated",
5424
+ "type": "EthereumAuthorizationOneKey",
5425
+ "id": 12
5426
+ }
5308
5427
  },
5309
5428
  "nested": {
5310
- "EthereumAccessListOneKey": {
5429
+ "EthereumAuthorizationOneKey": {
5311
5430
  "fields": {
5431
+ "address_n": {
5432
+ "rule": "repeated",
5433
+ "type": "uint32",
5434
+ "id": 1,
5435
+ "options": {
5436
+ "packed": false
5437
+ }
5438
+ },
5439
+ "chain_id": {
5440
+ "rule": "required",
5441
+ "type": "uint64",
5442
+ "id": 2
5443
+ },
5312
5444
  "address": {
5313
5445
  "rule": "required",
5314
5446
  "type": "string",
5315
- "id": 1
5447
+ "id": 3
5316
5448
  },
5317
- "storage_keys": {
5318
- "rule": "repeated",
5449
+ "nonce": {
5450
+ "rule": "required",
5319
5451
  "type": "bytes",
5320
- "id": 2
5452
+ "id": 4
5453
+ },
5454
+ "signature": {
5455
+ "type": "EthereumAuthorizationSignature",
5456
+ "id": 5
5321
5457
  }
5322
5458
  }
5323
5459
  }
@@ -5340,6 +5476,11 @@
5340
5476
  "signature_s": {
5341
5477
  "type": "bytes",
5342
5478
  "id": 4
5479
+ },
5480
+ "authorization_signatures": {
5481
+ "rule": "repeated",
5482
+ "type": "EthereumAuthorizationSignature",
5483
+ "id": 10
5343
5484
  }
5344
5485
  }
5345
5486
  },
@@ -11581,6 +11722,12 @@
11581
11722
  }
11582
11723
  }
11583
11724
  },
11725
+ "TronMessageType": {
11726
+ "values": {
11727
+ "V1": 1,
11728
+ "V2": 2
11729
+ }
11730
+ },
11584
11731
  "TronSignMessage": {
11585
11732
  "fields": {
11586
11733
  "address_n": {
@@ -11595,6 +11742,13 @@
11595
11742
  "rule": "required",
11596
11743
  "type": "bytes",
11597
11744
  "id": 2
11745
+ },
11746
+ "message_type": {
11747
+ "type": "TronMessageType",
11748
+ "id": 3,
11749
+ "options": {
11750
+ "default": "V1"
11751
+ }
11598
11752
  }
11599
11753
  }
11600
11754
  },
@@ -11914,6 +12068,7 @@
11914
12068
  "MessageType_EthereumSignTypedHashOneKey": 20117,
11915
12069
  "MessageType_EthereumGnosisSafeTxAck": 20118,
11916
12070
  "MessageType_EthereumGnosisSafeTxRequest": 20119,
12071
+ "MessageType_EthereumSignTxEIP7702OneKey": 20120,
11917
12072
  "MessageType_NEMGetAddress": 67,
11918
12073
  "MessageType_NEMAddress": 68,
11919
12074
  "MessageType_NEMSignTx": 69,
@@ -12055,6 +12210,7 @@
12055
12210
  "MessageType_AptosSignedTx": 10603,
12056
12211
  "MessageType_AptosSignMessage": 10604,
12057
12212
  "MessageType_AptosMessageSignature": 10605,
12213
+ "MessageType_AptosSignSIWAMessage": 10606,
12058
12214
  "MessageType_WebAuthnListResidentCredentials": 800,
12059
12215
  "MessageType_WebAuthnCredentials": 801,
12060
12216
  "MessageType_WebAuthnAddResidentCredential": 802,
package/src/inject.ts CHANGED
@@ -288,6 +288,8 @@ export const createCoreApi = (
288
288
  call({ ...params, connectId, deviceId, method: 'aptosGetPublicKey' }),
289
289
  aptosSignMessage: (connectId, deviceId, params) =>
290
290
  call({ ...params, connectId, deviceId, method: 'aptosSignMessage' }),
291
+ aptosSignInMessage: (connectId, deviceId, params) =>
292
+ call({ ...params, connectId, deviceId, method: 'aptosSignInMessage' }),
291
293
  aptosSignTransaction: (connectId, deviceId, params) =>
292
294
  call({ ...params, connectId, deviceId, method: 'aptosSignTransaction' }),
293
295
 
@@ -0,0 +1,17 @@
1
+ import { AptosMessageSignature as HardwareAptosMessageSignature } from '@onekeyfe/hd-transport';
2
+ import type { CommonParams, Response } from '../params';
3
+
4
+ export type AptosSignInMessageSignature = {
5
+ path: string;
6
+ } & HardwareAptosMessageSignature;
7
+
8
+ export type AptosSignInMessageParams = {
9
+ path: string | number[];
10
+ payload: string;
11
+ };
12
+
13
+ export declare function aptosSignInMessage(
14
+ connectId: string,
15
+ deviceId: string,
16
+ params: CommonParams & AptosSignInMessageParams
17
+ ): Response<AptosSignInMessageSignature>;
@@ -115,6 +115,7 @@ export type { NearSignTransactionParams } from './nearSignTransaction';
115
115
  export type { AptosAddress, AptosGetAddressParams } from './aptosGetAddress';
116
116
  export type { AptosPublicKey, AptosGetPublicKeyParams } from './aptosGetPublicKey';
117
117
  export type { AptosMessageSignature, AptosSignMessageParams } from './aptosSignMessage';
118
+ export type { AptosSignInMessageSignature, AptosSignInMessageParams } from './aptosSignInMessage';
118
119
  export type { AptosSignedTx, AptosSignTransactionParams } from './aptosSignTransaction';
119
120
 
120
121
  export type { AlgoAddress, AlgoGetAddressParams } from './algoGetAddress';
@@ -134,6 +135,10 @@ export type {
134
135
  CardanoAddress,
135
136
  CardanoGetAddressParams,
136
137
  } from './cardanoGetAddress';
138
+ export type {
139
+ CardanoSignMessageMethodParams,
140
+ CardanoSignMessageParams,
141
+ } from './cardanoSignMessage';
137
142
  export type { CardanoSignTransaction, CardanoSignedTxData } from './cardano';
138
143
 
139
144
  export type { FilecoinAddress, FilecoinGetAddressParams } from './filecoinGetAddress';
@@ -92,6 +92,7 @@ import { nearSignTransaction } from './nearSignTransaction';
92
92
  import { aptosGetAddress } from './aptosGetAddress';
93
93
  import { aptosGetPublicKey } from './aptosGetPublicKey';
94
94
  import { aptosSignMessage } from './aptosSignMessage';
95
+ import { aptosSignInMessage } from './aptosSignInMessage';
95
96
  import { aptosSignTransaction } from './aptosSignTransaction';
96
97
 
97
98
  import { algoGetAddress } from './algoGetAddress';
@@ -309,6 +310,7 @@ export type CoreApi = {
309
310
  aptosGetAddress: typeof aptosGetAddress;
310
311
  aptosGetPublicKey: typeof aptosGetPublicKey;
311
312
  aptosSignMessage: typeof aptosSignMessage;
313
+ aptosSignInMessage: typeof aptosSignInMessage;
312
314
  aptosSignTransaction: typeof aptosSignTransaction;
313
315
 
314
316
  /**
@@ -4,6 +4,7 @@ import type { CommonParams, Response } from '../params';
4
4
  export type TronSignMessageParams = {
5
5
  path: string | number[];
6
6
  messageHex: string;
7
+ messageType?: 'V1' | 'V2';
7
8
  };
8
9
 
9
10
  export declare function tronSignMessage(