@@ -45,6 +45,22 @@ export type BeaconAccessTupleV1 = {
45
45
storage_keys : PrefixedHexString [ ] // Data 32 bytes MAX_ACCESS_LIST_STORAGE_KEYS array
46
46
}
47
47
48
+ export type BeaconAuthorizationPayloadV1 = {
49
+ magic : PrefixedHexString
50
+ chain_id : PrefixedHexString
51
+ address : PrefixedHexString
52
+ nonce : PrefixedHexString
53
+ }
54
+
55
+ export type BeaconExecutionSignatureV1 = {
56
+ secp256k1 : PrefixedHexString | null // DATA 65 bytes or null
57
+ }
58
+
59
+ export type BeaconAuthorizationV1 = {
60
+ payload : BeaconAuthorizationPayloadV1
61
+ signature : BeaconExecutionSignatureV1
62
+ }
63
+
48
64
export type BeaconTransactionPayloadV1 = {
49
65
type : PrefixedHexString | null // Quantity, 1 byte
50
66
chain_id : PrefixedHexString | null // Quantity 8 bytes
@@ -57,16 +73,12 @@ export type BeaconTransactionPayloadV1 = {
57
73
access_list : BeaconAccessTupleV1 [ ] | null
58
74
max_priority_fees_per_gas : BeaconFeesPerGasV1 | null
59
75
blob_versioned_hashes : PrefixedHexString [ ] | null // DATA 32 bytes array
60
- }
61
-
62
- export type BeaconTransactionSignatureV1 = {
63
- from : PrefixedHexString | null // DATA 20 bytes
64
- ecdsa_signature : PrefixedHexString | null // DATA 65 bytes or null
76
+ authorization_list : BeaconAuthorizationV1 [ ] | null
65
77
}
66
78
67
79
type BeaconTransactionV1 = {
68
80
payload : BeaconTransactionPayloadV1
69
- signature : BeaconTransactionSignatureV1
81
+ signature : BeaconExecutionSignatureV1
70
82
}
71
83
72
84
// Payload json that one gets using the beacon apis
@@ -181,10 +193,22 @@ export function executionPayloadFromBeaconPayload(payload: BeaconPayloadJSON): E
181
193
} ) ?? null ,
182
194
maxPriorityFeesPerGas : btxv1 . payload . max_priority_fees_per_gas ,
183
195
blobVersionedHashes : btxv1 . payload . blob_versioned_hashes ,
196
+ authorizationList :
197
+ btxv1 . payload . authorization_list ?. map ( ( bal : BeaconAuthorizationV1 ) => {
198
+ const { payload, signature } = bal
199
+ return {
200
+ payload : {
201
+ magic : payload . magic ,
202
+ chainId : payload . chain_id ,
203
+ address : payload . address ,
204
+ nonce : payload . nonce ,
205
+ } ,
206
+ signature,
207
+ }
208
+ } ) ?? null ,
184
209
} ,
185
210
signature : {
186
- from : btxv1 . signature . from ,
187
- ecdsaSignature : btxv1 . signature . ecdsa_signature ,
211
+ secp256k1 : btxv1 . signature . secp256k1 ,
188
212
} ,
189
213
} as ssz . TransactionV1
190
214
} )
0 commit comments