@onekeyfe/hd-core 1.1.9 → 1.1.10-alpha.1
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/evm/EVMSignTransaction.d.ts +5 -2
- package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
- package/dist/api/evm/latest/signTransaction.d.ts +10 -3
- package/dist/api/evm/latest/signTransaction.d.ts.map +1 -1
- package/dist/index.d.ts +29 -3
- package/dist/index.js +205 -6
- package/dist/types/api/evmSignTransaction.d.ts +27 -1
- package/dist/types/api/evmSignTransaction.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +1 -1
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/evm/EVMSignTransaction.ts +54 -5
- package/src/api/evm/latest/signTransaction.ts +101 -7
- package/src/data/messages/messages.json +127 -0
- package/src/types/api/evmSignTransaction.ts +30 -1
- package/src/types/api/export.ts +3 -0
|
@@ -5340,6 +5340,11 @@
|
|
|
5340
5340
|
"signature_s": {
|
|
5341
5341
|
"type": "bytes",
|
|
5342
5342
|
"id": 4
|
|
5343
|
+
},
|
|
5344
|
+
"authorization_signatures": {
|
|
5345
|
+
"rule": "repeated",
|
|
5346
|
+
"type": "EthereumAuthorizationSignature",
|
|
5347
|
+
"id": 10
|
|
5343
5348
|
}
|
|
5344
5349
|
}
|
|
5345
5350
|
},
|
|
@@ -5449,6 +5454,127 @@
|
|
|
5449
5454
|
}
|
|
5450
5455
|
}
|
|
5451
5456
|
},
|
|
5457
|
+
"EthereumSignTxEIP7702OneKey": {
|
|
5458
|
+
"fields": {
|
|
5459
|
+
"address_n": {
|
|
5460
|
+
"rule": "repeated",
|
|
5461
|
+
"type": "uint32",
|
|
5462
|
+
"id": 1,
|
|
5463
|
+
"options": {
|
|
5464
|
+
"packed": false
|
|
5465
|
+
}
|
|
5466
|
+
},
|
|
5467
|
+
"nonce": {
|
|
5468
|
+
"rule": "required",
|
|
5469
|
+
"type": "bytes",
|
|
5470
|
+
"id": 2
|
|
5471
|
+
},
|
|
5472
|
+
"max_gas_fee": {
|
|
5473
|
+
"rule": "required",
|
|
5474
|
+
"type": "bytes",
|
|
5475
|
+
"id": 3
|
|
5476
|
+
},
|
|
5477
|
+
"max_priority_fee": {
|
|
5478
|
+
"rule": "required",
|
|
5479
|
+
"type": "bytes",
|
|
5480
|
+
"id": 4
|
|
5481
|
+
},
|
|
5482
|
+
"gas_limit": {
|
|
5483
|
+
"rule": "required",
|
|
5484
|
+
"type": "bytes",
|
|
5485
|
+
"id": 5
|
|
5486
|
+
},
|
|
5487
|
+
"to": {
|
|
5488
|
+
"rule": "required",
|
|
5489
|
+
"type": "string",
|
|
5490
|
+
"id": 6
|
|
5491
|
+
},
|
|
5492
|
+
"value": {
|
|
5493
|
+
"rule": "required",
|
|
5494
|
+
"type": "bytes",
|
|
5495
|
+
"id": 7
|
|
5496
|
+
},
|
|
5497
|
+
"data_initial_chunk": {
|
|
5498
|
+
"type": "bytes",
|
|
5499
|
+
"id": 8,
|
|
5500
|
+
"options": {
|
|
5501
|
+
"default": ""
|
|
5502
|
+
}
|
|
5503
|
+
},
|
|
5504
|
+
"data_length": {
|
|
5505
|
+
"rule": "required",
|
|
5506
|
+
"type": "uint32",
|
|
5507
|
+
"id": 9
|
|
5508
|
+
},
|
|
5509
|
+
"chain_id": {
|
|
5510
|
+
"rule": "required",
|
|
5511
|
+
"type": "uint64",
|
|
5512
|
+
"id": 10
|
|
5513
|
+
},
|
|
5514
|
+
"access_list": {
|
|
5515
|
+
"rule": "repeated",
|
|
5516
|
+
"type": "EthereumAccessListOneKey",
|
|
5517
|
+
"id": 11
|
|
5518
|
+
},
|
|
5519
|
+
"authorization_list": {
|
|
5520
|
+
"rule": "repeated",
|
|
5521
|
+
"type": "EthereumAuthorizationOneKey",
|
|
5522
|
+
"id": 12
|
|
5523
|
+
}
|
|
5524
|
+
},
|
|
5525
|
+
"nested": {
|
|
5526
|
+
"EthereumAuthorizationOneKey": {
|
|
5527
|
+
"fields": {
|
|
5528
|
+
"address_n": {
|
|
5529
|
+
"rule": "repeated",
|
|
5530
|
+
"type": "uint32",
|
|
5531
|
+
"id": 1,
|
|
5532
|
+
"options": {
|
|
5533
|
+
"packed": false
|
|
5534
|
+
}
|
|
5535
|
+
},
|
|
5536
|
+
"chain_id": {
|
|
5537
|
+
"rule": "required",
|
|
5538
|
+
"type": "uint64",
|
|
5539
|
+
"id": 2
|
|
5540
|
+
},
|
|
5541
|
+
"address": {
|
|
5542
|
+
"rule": "required",
|
|
5543
|
+
"type": "string",
|
|
5544
|
+
"id": 3
|
|
5545
|
+
},
|
|
5546
|
+
"nonce": {
|
|
5547
|
+
"rule": "required",
|
|
5548
|
+
"type": "bytes",
|
|
5549
|
+
"id": 4
|
|
5550
|
+
},
|
|
5551
|
+
"signature": {
|
|
5552
|
+
"type": "EthereumAuthorizationSignature",
|
|
5553
|
+
"id": 5
|
|
5554
|
+
}
|
|
5555
|
+
}
|
|
5556
|
+
}
|
|
5557
|
+
}
|
|
5558
|
+
},
|
|
5559
|
+
"EthereumAuthorizationSignature": {
|
|
5560
|
+
"fields": {
|
|
5561
|
+
"y_parity": {
|
|
5562
|
+
"rule": "required",
|
|
5563
|
+
"type": "uint32",
|
|
5564
|
+
"id": 1
|
|
5565
|
+
},
|
|
5566
|
+
"r": {
|
|
5567
|
+
"rule": "required",
|
|
5568
|
+
"type": "bytes",
|
|
5569
|
+
"id": 2
|
|
5570
|
+
},
|
|
5571
|
+
"s": {
|
|
5572
|
+
"rule": "required",
|
|
5573
|
+
"type": "bytes",
|
|
5574
|
+
"id": 3
|
|
5575
|
+
}
|
|
5576
|
+
}
|
|
5577
|
+
},
|
|
5452
5578
|
"EthereumSignMessageEIP712": {
|
|
5453
5579
|
"fields": {
|
|
5454
5580
|
"address_n": {
|
|
@@ -11900,6 +12026,7 @@
|
|
|
11900
12026
|
"MessageType_EthereumAddressOneKey": 20103,
|
|
11901
12027
|
"MessageType_EthereumSignTxOneKey": 20104,
|
|
11902
12028
|
"MessageType_EthereumSignTxEIP1559OneKey": 20105,
|
|
12029
|
+
"MessageType_EthereumSignTxEIP7702OneKey": 20120,
|
|
11903
12030
|
"MessageType_EthereumTxRequestOneKey": 20106,
|
|
11904
12031
|
"MessageType_EthereumTxAckOneKey": 20107,
|
|
11905
12032
|
"MessageType_EthereumSignMessageOneKey": 20108,
|
|
@@ -4,6 +4,7 @@ export type EVMSignedTx = {
|
|
|
4
4
|
v: string;
|
|
5
5
|
r: string;
|
|
6
6
|
s: string;
|
|
7
|
+
authorizationSignatures?: EVMAuthorizationSignature[];
|
|
7
8
|
};
|
|
8
9
|
|
|
9
10
|
export type EVMTransaction = {
|
|
@@ -37,9 +38,37 @@ export type EVMTransactionEIP1559 = {
|
|
|
37
38
|
accessList?: EVMAccessList[];
|
|
38
39
|
};
|
|
39
40
|
|
|
41
|
+
export type EVMAuthorizationSignature = {
|
|
42
|
+
yParity: number;
|
|
43
|
+
r: string;
|
|
44
|
+
s: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type EVMAuthorization = {
|
|
48
|
+
addressN?: number[];
|
|
49
|
+
chainId: number;
|
|
50
|
+
address: string;
|
|
51
|
+
nonce: string;
|
|
52
|
+
signature?: EVMAuthorizationSignature;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export type EVMTransactionEIP7702 = {
|
|
56
|
+
to: string;
|
|
57
|
+
value: string;
|
|
58
|
+
gasLimit: string;
|
|
59
|
+
gasPrice?: typeof undefined;
|
|
60
|
+
nonce: string;
|
|
61
|
+
data?: string;
|
|
62
|
+
chainId: number;
|
|
63
|
+
maxFeePerGas: string;
|
|
64
|
+
maxPriorityFeePerGas: string;
|
|
65
|
+
accessList?: EVMAccessList[];
|
|
66
|
+
authorizationList: EVMAuthorization[];
|
|
67
|
+
};
|
|
68
|
+
|
|
40
69
|
export type EVMSignTransactionParams = {
|
|
41
70
|
path: string | number[];
|
|
42
|
-
transaction: EVMTransaction | EVMTransactionEIP1559;
|
|
71
|
+
transaction: EVMTransaction | EVMTransactionEIP1559 | EVMTransactionEIP7702;
|
|
43
72
|
};
|
|
44
73
|
|
|
45
74
|
export declare function evmSignTransaction(
|
package/src/types/api/export.ts
CHANGED
|
@@ -36,6 +36,9 @@ export type { EVMSignMessageEIP712Params } from './evmSignMessageEIP712';
|
|
|
36
36
|
export type {
|
|
37
37
|
EVMTransaction,
|
|
38
38
|
EVMTransactionEIP1559,
|
|
39
|
+
EVMTransactionEIP7702,
|
|
40
|
+
EVMAuthorization,
|
|
41
|
+
EVMAuthorizationSignature,
|
|
39
42
|
EVMSignedTx,
|
|
40
43
|
EVMSignTransactionParams,
|
|
41
44
|
EVMAccessList,
|