UNPKG

@etherspot/remote-signer

Version:

Etherspot Permissioned Signer SDK - signs the UserOp with SessionKey and sends it to the Bundler

37 lines (36 loc) 915 B
// src/sdk/base/UserOpHandler.ts function validateUserOp(userOp) { const errors = []; if (!userOp.sender) { errors.push("Sender is required"); } if (!userOp.nonce) { errors.push("Nonce is required"); } if (!userOp.callData) { errors.push("CallData is required"); } if (!userOp.callGasLimit) { errors.push("CallGasLimit is required"); } if (!userOp.verificationGasLimit) { errors.push("VerificationGasLimit is required"); } if (!userOp.preVerificationGas) { errors.push("PreVerificationGas is required"); } if (!userOp.maxFeePerGas) { errors.push("MaxFeePerGas is required"); } if (!userOp.maxPriorityFeePerGas) { errors.push("MaxPriorityFeePerGas is required"); } if (errors.length > 0) { throw new Error(`Validation failed: ${errors.join(", ")}`); } return true; } export { validateUserOp }; //# sourceMappingURL=chunk-UR6MW6F4.mjs.map