@@ -116,6 +116,10 @@ export type BatchResultItemEncodeResultSuccessItemEngineError =
116116 message : string ;
117117 type : "VAULT_ERROR" ;
118118 }
119+ | {
120+ error : IawError ;
121+ type : "IAW_ERROR" ;
122+ }
119123 | {
120124 message : string ;
121125 type : "RPC_CONFIG_ERROR" ;
@@ -199,6 +203,10 @@ export type BatchResultItemReadResultSuccessItemEngineError =
199203 message : string ;
200204 type : "VAULT_ERROR" ;
201205 }
206+ | {
207+ error : IawError ;
208+ type : "IAW_ERROR" ;
209+ }
202210 | {
203211 message : string ;
204212 type : "RPC_CONFIG_ERROR" ;
@@ -291,6 +299,10 @@ export type BatchResultItemSignResultDataEngineError =
291299 message : string ;
292300 type : "VAULT_ERROR" ;
293301 }
302+ | {
303+ error : IawError ;
304+ type : "IAW_ERROR" ;
305+ }
294306 | {
295307 message : string ;
296308 type : "RPC_CONFIG_ERROR" ;
@@ -325,6 +337,36 @@ export type BatchResultItemSignResultDataEngineError =
325337 } ;
326338 } ;
327339
340+ /**
341+ * Collection of results from multiple contract encode operations
342+ */
343+ export type BatchResultsEncodeResultSuccessItem = {
344+ /**
345+ * Array of results, one for each input contract call
346+ */
347+ result : Array < BatchResultItemEncodeResultSuccessItemEngineError > ;
348+ } ;
349+
350+ /**
351+ * Collection of results from multiple contract encode operations
352+ */
353+ export type BatchResultsReadResultSuccessItem = {
354+ /**
355+ * Array of results, one for each input contract call
356+ */
357+ result : Array < BatchResultItemReadResultSuccessItemEngineError > ;
358+ } ;
359+
360+ /**
361+ * Collection of results from multiple contract encode operations
362+ */
363+ export type BatchResultsSignResultData = {
364+ /**
365+ * Array of results, one for each input contract call
366+ */
367+ result : Array < BatchResultItemSignResultDataEngineError > ;
368+ } ;
369+
328370/**
329371 * # Bytes
330372 * Used to represent "bytes". This is a 0x prefixed hex string.
@@ -603,6 +645,34 @@ export type Erc4337SigningOptions = EntrypointAndFactoryDetailsDeserHelper & {
603645 */
604646export type ExecutionOptions = BaseExecutionOptions & SpecificExecutionOptions ;
605647
648+ /**
649+ * Error types for IAW operations
650+ */
651+ export type IawError =
652+ | {
653+ type : "API_ERROR" ;
654+ }
655+ | {
656+ message : string ;
657+ type : "SERIALIZATION_ERROR" ;
658+ }
659+ | {
660+ error : SerializableReqwestError ;
661+ type : "NETWORK_ERROR" ;
662+ }
663+ | {
664+ type : "AUTH_ERROR" ;
665+ }
666+ | ( ThirdwebError & {
667+ type : "THIRDWEB_ERROR" ;
668+ } )
669+ | {
670+ type : "UNEXPECTED_ERROR" ;
671+ }
672+ | ( UserOpError & {
673+ type : "USER_OP_ERROR" ;
674+ } ) ;
675+
606676/**
607677 * # InnerTransaction
608678 * This is the actual encoded inner transaction data that will be sent to the blockchain.
@@ -768,6 +838,76 @@ export type SendTransactionRequest = {
768838 webhookOptions ?: Array < WebhookOptions > | null ;
769839} ;
770840
841+ export type SerializableReqwestError =
842+ | {
843+ Builder : {
844+ message : string ;
845+ url ?: string | null ;
846+ } ;
847+ }
848+ | {
849+ Request : {
850+ message : string ;
851+ url ?: string | null ;
852+ } ;
853+ }
854+ | {
855+ Timeout : {
856+ message : string ;
857+ url ?: string | null ;
858+ } ;
859+ }
860+ | {
861+ Connect : {
862+ message : string ;
863+ url ?: string | null ;
864+ } ;
865+ }
866+ | {
867+ Redirect : {
868+ message : string ;
869+ url ?: string | null ;
870+ } ;
871+ }
872+ | {
873+ ClientError : {
874+ status : number ;
875+ message : string ;
876+ url ?: string | null ;
877+ } ;
878+ }
879+ | {
880+ ServerError : {
881+ status : number ;
882+ message : string ;
883+ url ?: string | null ;
884+ } ;
885+ }
886+ | {
887+ Body : {
888+ message : string ;
889+ url ?: string | null ;
890+ } ;
891+ }
892+ | {
893+ Decode : {
894+ message : string ;
895+ url ?: string | null ;
896+ } ;
897+ }
898+ | {
899+ Upgrade : {
900+ message : string ;
901+ url ?: string | null ;
902+ } ;
903+ }
904+ | {
905+ Unknown : {
906+ message : string ;
907+ url ?: string | null ;
908+ } ;
909+ } ;
910+
771911/**
772912 * Request to sign messages
773913 */
@@ -844,45 +984,34 @@ export type SpecificExecutionOptions =
844984 type : "ERC4337" ;
845985 } ) ;
846986
847- export type SuccessResponseBatchResultsEncodeResultSuccessItem = {
848- /**
849- * Collection of results from multiple contract encode operations
850- */
851- result : {
852- /**
853- * Array of results, one for each input contract call
854- */
855- results : Array < BatchResultItemEncodeResultSuccessItemEngineError > ;
856- } ;
857- } ;
858-
859- export type SuccessResponseBatchResultsReadResultSuccessItem = {
860- /**
861- * Collection of results from multiple contract encode operations
862- */
987+ export type SuccessResponseQueuedTransactionsResponse = {
863988 result : {
864- /**
865- * Array of results, one for each input contract call
866- */
867- results : Array < BatchResultItemReadResultSuccessItemEngineError > ;
989+ transactions : Array < QueuedTransaction > ;
868990 } ;
869991} ;
870992
871- export type SuccessResponseBatchResultsSignResultData = {
872- /**
873- * Collection of results from multiple contract encode operations
874- */
875- result : {
876- /**
877- * Array of results, one for each input contract call
878- */
879- results : Array < BatchResultItemSignResultDataEngineError > ;
880- } ;
881- } ;
993+ export type ThirdwebError =
994+ | {
995+ error : ThirdwebSerializationError ;
996+ type : "SERIALIZATION_ERROR" ;
997+ }
998+ | {
999+ value : string ;
1000+ message : string ;
1001+ type : "URL_PARSE_ERROR" ;
1002+ }
1003+ | {
1004+ message : string ;
1005+ type : "HTTP_CLIENT_BACKEND_ERROR" ;
1006+ }
1007+ | {
1008+ error : SerializableReqwestError ;
1009+ type : "HTTP_ERROR" ;
1010+ } ;
8821011
883- export type SuccessResponseQueuedTransactionsResponse = {
884- result : {
885- transactions : Array < QueuedTransaction > ;
1012+ export type ThirdwebSerializationError = {
1013+ HeaderValue : {
1014+ value : string ;
8861015 } ;
8871016} ;
8881017
@@ -934,6 +1063,13 @@ export type TypedDataDomainDef = {
9341063 */
9351064export type U256Def = string ;
9361065
1066+ /**
1067+ * Error type for UserOp operations
1068+ */
1069+ export type UserOpError = {
1070+ type : "UNEXPECTED_ERROR" ;
1071+ } ;
1072+
9371073export type Value = unknown ;
9381074
9391075export type WebhookOptions = {
@@ -1033,7 +1169,7 @@ export type SignMessageResponses = {
10331169 /**
10341170 * Successfully signed messages
10351171 */
1036- 200 : SuccessResponseBatchResultsSignResultData ;
1172+ 200 : BatchResultsSignResultData ;
10371173} ;
10381174
10391175export type SignMessageResponse =
@@ -1059,7 +1195,7 @@ export type SignTypedDataResponses = {
10591195 /**
10601196 * Successfully signed typed data
10611197 */
1062- 200 : SuccessResponseBatchResultsSignResultData ;
1198+ 200 : BatchResultsSignResultData ;
10631199} ;
10641200
10651201export type SignTypedDataResponse =
@@ -1079,7 +1215,7 @@ export type ReadContractResponses = {
10791215 /**
10801216 * Successfully read contract data
10811217 */
1082- 200 : SuccessResponseBatchResultsReadResultSuccessItem ;
1218+ 200 : BatchResultsReadResultSuccessItem ;
10831219} ;
10841220
10851221export type ReadContractResponse =
@@ -1099,7 +1235,7 @@ export type EncodeContractResponses = {
10991235 /**
11001236 * Successfully encoded contract calls
11011237 */
1102- 200 : SuccessResponseBatchResultsEncodeResultSuccessItem ;
1238+ 200 : BatchResultsEncodeResultSuccessItem ;
11031239} ;
11041240
11051241export type EncodeContractResponse =
@@ -1560,5 +1696,5 @@ export type SearchActivityLogsResponse =
15601696 SearchActivityLogsResponses [ keyof SearchActivityLogsResponses ] ;
15611697
15621698export type ClientOptions = {
1563- baseUrl : "https ://engine.thirdweb-dev.com " | ( string & { } ) ;
1699+ baseUrl : "http ://localhost:3001 " | ( string & { } ) ;
15641700} ;
0 commit comments