Skip to content

Commit cf44dae

Browse files
authored
add eoa execution options type (#7428)
1 parent c26be2d commit cf44dae

File tree

2 files changed

+35
-6
lines changed

2 files changed

+35
-6
lines changed

packages/engine/src/client/types.gen.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,28 @@ export type AaZksyncExecutionOptions = {
9292
chainId: string;
9393
};
9494

95+
/**
96+
* Uses EOA for execution. Only supported for signing currently.
97+
*/
98+
export type EoaExecutionOptions = {
99+
type: "eoa";
100+
101+
/**
102+
* The EOA address
103+
*/
104+
address: string;
105+
106+
/**
107+
* The chain id of the transaction
108+
*/
109+
chainId: string;
110+
111+
/**
112+
* The idempotency key of the transaction. Transaction requests sent with the same idempotency key will be de-duplicated. If not provided, a randomUUID will be generated. This is also used as the ID of a queued/stored transaction.
113+
*/
114+
idempotencyKey?: string;
115+
};
116+
95117
export type ListAccountsData = {
96118
body?: never;
97119
path?: never;
@@ -164,7 +186,8 @@ export type WriteContractData = {
164186
executionOptions:
165187
| AutoExecutionOptions
166188
| AaExecutionOptions
167-
| AaZksyncExecutionOptions;
189+
| AaZksyncExecutionOptions
190+
| EoaExecutionOptions;
168191
params: Array<{
169192
/**
170193
* The function to call on the contract
@@ -303,7 +326,8 @@ export type SendTransactionData = {
303326
executionOptions:
304327
| AutoExecutionOptions
305328
| AaExecutionOptions
306-
| AaZksyncExecutionOptions;
329+
| AaZksyncExecutionOptions
330+
| EoaExecutionOptions;
307331
params: Array<{
308332
/**
309333
* The address of the contract to send the transaction to
@@ -434,7 +458,8 @@ export type SignTransactionData = {
434458
executionOptions:
435459
| AutoExecutionOptions
436460
| AaExecutionOptions
437-
| AaZksyncExecutionOptions;
461+
| AaZksyncExecutionOptions
462+
| EoaExecutionOptions;
438463
params: Array<{
439464
/**
440465
* The recipient address
@@ -585,7 +610,8 @@ export type SignMessageData = {
585610
executionOptions:
586611
| AutoExecutionOptions
587612
| AaExecutionOptions
588-
| AaZksyncExecutionOptions;
613+
| AaZksyncExecutionOptions
614+
| EoaExecutionOptions;
589615
params: Array<{
590616
/**
591617
* The message to sign
@@ -661,7 +687,8 @@ export type SignTypedDataData = {
661687
executionOptions:
662688
| AutoExecutionOptions
663689
| AaExecutionOptions
664-
| AaZksyncExecutionOptions;
690+
| AaZksyncExecutionOptions
691+
| EoaExecutionOptions;
665692
params: Array<{
666693
domain: {
667694
chainId?: number | number;

packages/thirdweb/src/engine/server-wallet.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
type AaExecutionOptions,
33
type AaZksyncExecutionOptions,
4+
type EoaExecutionOptions,
45
sendTransaction,
56
signMessage,
67
signTypedData,
@@ -46,7 +47,8 @@ export type ServerWalletOptions = {
4647
*/
4748
executionOptions?:
4849
| Omit<AaExecutionOptions, "chainId">
49-
| Omit<AaZksyncExecutionOptions, "chainId">;
50+
| Omit<AaZksyncExecutionOptions, "chainId">
51+
| Omit<EoaExecutionOptions, "chainId">;
5052
};
5153

5254
export type ServerWallet = Account & {

0 commit comments

Comments
 (0)