@etherspot/remote-signer
Version:
Etherspot Permissioned Signer SDK - signs the UserOp with SessionKey and sends it to the Bundler
1 lines • 1.69 kB
Source Map (JSON)
{"version":3,"sources":["../../src/sdk/base/UserOpHandler.ts"],"sourcesContent":["import { UserOperation } from \"../common\";\n\nexport function validateUserOp(userOp: UserOperation): boolean {\n\tconst errors: string[] = [];\n\n\tif (!userOp.sender) {\n\t\terrors.push(\"Sender is required\");\n\t}\n\tif (!userOp.nonce) {\n\t\terrors.push(\"Nonce is required\");\n\t}\n\tif (!userOp.callData) {\n\t\terrors.push(\"CallData is required\");\n\t}\n\tif (!userOp.callGasLimit) {\n\t\terrors.push(\"CallGasLimit is required\");\n\t}\n\tif (!userOp.verificationGasLimit) {\n\t\terrors.push(\"VerificationGasLimit is required\");\n\t}\n\tif (!userOp.preVerificationGas) {\n\t\terrors.push(\"PreVerificationGas is required\");\n\t}\n\tif (!userOp.maxFeePerGas) {\n\t\terrors.push(\"MaxFeePerGas is required\");\n\t}\n\tif (!userOp.maxPriorityFeePerGas) {\n\t\terrors.push(\"MaxPriorityFeePerGas is required\");\n\t}\n\n\tif (errors.length > 0) {\n\t\tthrow new Error(`Validation failed: ${errors.join(\", \")}`);\n\t}\n\n\treturn true;\n}\n\n\n"],"mappings":";AAEO,SAAS,eAAe,QAAgC;AAC9D,QAAM,SAAmB,CAAC;AAE1B,MAAI,CAAC,OAAO,QAAQ;AACnB,WAAO,KAAK,oBAAoB;AAAA,EACjC;AACA,MAAI,CAAC,OAAO,OAAO;AAClB,WAAO,KAAK,mBAAmB;AAAA,EAChC;AACA,MAAI,CAAC,OAAO,UAAU;AACrB,WAAO,KAAK,sBAAsB;AAAA,EACnC;AACA,MAAI,CAAC,OAAO,cAAc;AACzB,WAAO,KAAK,0BAA0B;AAAA,EACvC;AACA,MAAI,CAAC,OAAO,sBAAsB;AACjC,WAAO,KAAK,kCAAkC;AAAA,EAC/C;AACA,MAAI,CAAC,OAAO,oBAAoB;AAC/B,WAAO,KAAK,gCAAgC;AAAA,EAC7C;AACA,MAAI,CAAC,OAAO,cAAc;AACzB,WAAO,KAAK,0BAA0B;AAAA,EACvC;AACA,MAAI,CAAC,OAAO,sBAAsB;AACjC,WAAO,KAAK,kCAAkC;AAAA,EAC/C;AAEA,MAAI,OAAO,SAAS,GAAG;AACtB,UAAM,IAAI,MAAM,sBAAsB,OAAO,KAAK,IAAI,CAAC,EAAE;AAAA,EAC1D;AAEA,SAAO;AACR;","names":[]}