containsParameter('uuid') && $rpcRequest->getParameter('uuid') !== null) { return $rpcRequest->produceError(StandardError::RPC_INVALID_ARGUMENTS, "Missing 'uuid' parameter"); } try { $key = SigningKeysManager::getSigningKey($request->getPeer()->getUuid(), $rpcRequest->getParameter('uuid')); } catch (DatabaseOperationException $e) { throw new StandardRpcException('Failed to get the signing keys', StandardError::INTERNAL_SERVER_ERROR, $e); } if($key === null) { return $rpcRequest->produceError(StandardError::NOT_FOUND, 'The signing key does not exist'); } // Return the signing key return $rpcRequest->produceResponse($key->toStandard()); } }