From 1711daeba09abb64bad264b2f56546b292d0b328 Mon Sep 17 00:00:00 2001 From: HananINouman <110400366+HananINouman@users.noreply.github.com> Date: Tue, 13 Feb 2024 17:06:26 +0300 Subject: [PATCH] Hanan/use swagger file (#312) * temporary fix for swagger docs * update swagger file --- static/api-spec.yaml | 1729 +++++++++++++++++++++++++++++++----------- 1 file changed, 1267 insertions(+), 462 deletions(-) diff --git a/static/api-spec.yaml b/static/api-spec.yaml index 199848ce66..b3a627ac66 100644 --- a/static/api-spec.yaml +++ b/static/api-spec.yaml @@ -1,104 +1,104 @@ { - 'openapi': '3.0.0', - 'paths': + "openapi": "3.0.0", + "paths": { - '/': + "/": { - 'get': + "get": { - 'operationId': 'AppController_redirect', - 'summary': 'Redirect to the API docs', - 'description': 'Hitting the root of the domain redirects to /docs and a swagger deployment.', - 'parameters': [], - 'responses': + "operationId": "AppController_redirect", + "summary": "Redirect to the API docs", + "description": "Hitting the root of the domain redirects to /docs and a swagger deployment.", + "parameters": [], + "responses": { - '200': + "200": { - 'description': '', - 'content': + "description": "", + "content": { - 'application/json': - { 'schema': { 'type': 'object' } }, + "application/json": + { "schema": { "type": "object" } }, }, }, }, - 'tags': ['System'], + "tags": ["System"], }, }, - '/_health': + "/_health": { - 'get': + "get": { - 'operationId': 'HealthController_check', - 'summary': 'Check the API health', - 'description': 'This endpoint reports the API and its dependencies health.', - 'parameters': [], - 'responses': + "operationId": "HealthController_check", + "summary": "Check the API health", + "description": "This endpoint reports the API and its dependencies health.", + "parameters": [], + "responses": { - '200': + "200": { - 'description': 'The Health Check is successful', - 'content': + "description": "The Health Check is successful", + "content": { - 'application/json': + "application/json": { - 'schema': + "schema": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'status': - { 'type': 'string', 'example': 'ok' }, - 'info': + "status": + { "type": "string", "example": "ok" }, + "info": { - 'type': 'object', - 'example': - { 'database': { 'status': 'up' } }, - 'additionalProperties': + "type": "object", + "example": + { "database": { "status": "up" } }, + "additionalProperties": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'status': - { 'type': 'string' }, + "status": + { "type": "string" }, }, - 'additionalProperties': - { 'type': 'string' }, + "additionalProperties": + { "type": "string" }, }, - 'nullable': true, + "nullable": true, }, - 'error': + "error": { - 'type': 'object', - 'example': {}, - 'additionalProperties': + "type": "object", + "example": {}, + "additionalProperties": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'status': - { 'type': 'string' }, + "status": + { "type": "string" }, }, - 'additionalProperties': - { 'type': 'string' }, + "additionalProperties": + { "type": "string" }, }, - 'nullable': true, + "nullable": true, }, - 'details': + "details": { - 'type': 'object', - 'example': - { 'database': { 'status': 'up' } }, - 'additionalProperties': + "type": "object", + "example": + { "database": { "status": "up" } }, + "additionalProperties": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'status': - { 'type': 'string' }, + "status": + { "type": "string" }, }, - 'additionalProperties': - { 'type': 'string' }, + "additionalProperties": + { "type": "string" }, }, }, }, @@ -106,87 +106,87 @@ }, }, }, - '503': + "503": { - 'description': 'The Health Check is not successful', - 'content': + "description": "The Health Check is not successful", + "content": { - 'application/json': + "application/json": { - 'schema': + "schema": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'status': + "status": { - 'type': 'string', - 'example': 'error', + "type": "string", + "example": "error", }, - 'info': + "info": { - 'type': 'object', - 'example': - { 'database': { 'status': 'up' } }, - 'additionalProperties': + "type": "object", + "example": + { "database": { "status": "up" } }, + "additionalProperties": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'status': - { 'type': 'string' }, + "status": + { "type": "string" }, }, - 'additionalProperties': - { 'type': 'string' }, + "additionalProperties": + { "type": "string" }, }, - 'nullable': true, + "nullable": true, }, - 'error': + "error": { - 'type': 'object', - 'example': + "type": "object", + "example": { - 'redis': + "redis": { - 'status': 'down', - 'message': 'Could not connect', + "status": "down", + "message": "Could not connect", }, }, - 'additionalProperties': + "additionalProperties": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'status': - { 'type': 'string' }, + "status": + { "type": "string" }, }, - 'additionalProperties': - { 'type': 'string' }, + "additionalProperties": + { "type": "string" }, }, - 'nullable': true, + "nullable": true, }, - 'details': + "details": { - 'type': 'object', - 'example': + "type": "object", + "example": { - 'database': { 'status': 'up' }, - 'redis': + "database": { "status": "up" }, + "redis": { - 'status': 'down', - 'message': 'Could not connect', + "status": "down", + "message": "Could not connect", }, }, - 'additionalProperties': + "additionalProperties": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'status': - { 'type': 'string' }, + "status": + { "type": "string" }, }, - 'additionalProperties': - { 'type': 'string' }, + "additionalProperties": + { "type": "string" }, }, }, }, @@ -195,560 +195,1365 @@ }, }, }, - 'tags': ['System'], + "tags": ["System"], }, }, - '/dv/{configHash}': + "/metrics": { - 'get': + "get": { - 'operationId': 'DVController_getClusterDefinition', - 'summary': 'Retrieve a Distributed Validator Cluster proposal', - 'description': "This endpoint allows a charon client or launchpad interface to retrieve the terms of a proposed DKG. Once all operators listed in the DKG have signed the terms of the cluster, this object will be ready for a cluster of operators to use as part of a DKG ceremony. If the objects in the `operators` array are not fully populated, these operators need to use the [PUT request](#tag/Distributed-Validators/operation/DVController_updateClusterDefinition) to upload their charon client's public key and a signature from their address to indicate their acceptance of the terms.", - 'parameters': + "operationId": "MetricsController_metrics", + "parameters": [], + "responses": + { + "200": + { + "description": "", + "content": + { + "application/json": + { "schema": { "type": "string" } }, + }, + }, + }, + }, + }, + "/dv/{configHash}": + { + "get": + { + "operationId": "DVController_getClusterDefinition", + "summary": "Retrieve a Distributed Validator Cluster proposal", + "description": "This endpoint allows a charon client or launchpad interface to retrieve the terms of a proposed DKG. Once all operators listed in the DKG have submitted signed approvals to the terms, this object will be ready for a cluster of operators to use as part of a DKG ceremony. If the objects in the `operators` array are not fully populated, these operators need to use the [PUT request](#/Distributed%20Validators/DVController_updateClusterDefinition) to upload their charon client's public key and a signature from their address to indicate their acceptance of the terms.", + "parameters": [ { - 'name': 'configHash', - 'required': true, - 'in': 'path', - 'description': 'The `config_hash` calculated for a cluster definition.', - 'schema': { 'type': 'string' }, + "name": "configHash", + "required": true, + "in": "path", + "description": "The `config_hash` calculated for a cluster definition.", + "schema": { "type": "string" }, }, ], - 'responses': + "responses": { - '200': + "200": { - 'description': 'The cluster object', - 'content': + "description": "The cluster object", + "content": { - 'application/json': + "application/json": { - 'schema': + "schema": { - '$ref': '#/components/schemas/GETClusterDefinitionResponse', + "anyOf": + [ + { + "$ref": "#/components/schemas/ClusterDefinitionResponse", + }, + ], }, }, }, }, + "404": { "description": "Cluster definition not found" }, + "500": { "description": "An unknown error occurred" }, }, - 'tags': ['Distributed Validators'], + "tags": ["Distributed Validators"], }, - 'put': + "put": { - 'operationId': 'DVController_updateClusterDefinition', - 'summary': 'Accept a proposed Distributed Validator Cluster', - 'description': 'This endpoint is used by the operators present in the `operators` array of a cluster definition. These operators must submit a public key (in ENR form) to serve as their identity during the DKG, along with EIP712 signatures indicating their acceptance of the terms of this DKG.', - 'parameters': + "operationId": "DVController_updateClusterDefinition", + "summary": "Accept a proposed Distributed Validator Cluster", + "description": "This endpoint is used by the operators present in the `operators` array of a cluster definition. These operators must submit a public key (in ENR form) to serve as their identity during the DKG, along with EIP712 signatures indicating their acceptance of the terms of this DKG.", + "parameters": [ { - 'name': 'authorization', - 'required': true, - 'in': 'header', - 'description': 'EIP712 operator hash as bearer token', - 'schema': { 'type': 'string' }, + "name": "authorization", + "required": true, + "in": "header", + "description": "EIP712 operator hash as bearer token", + "schema": { "type": "string" }, + }, + { + "name": "configHash", + "required": true, + "in": "path", + "description": "The `config_hash` calculated for a cluster definition.", + "schema": { "type": "string" }, + }, + ], + "requestBody": + { + "required": true, + "content": + { + "application/json": + { + "schema": + { "$ref": "#/components/schemas/OperatorDto" }, + }, + }, + }, + "responses": + { + "200": + { + "description": "The cluster object", + "content": + { + "application/json": + { + "schema": + { + "anyOf": + [ + { + "$ref": "#/components/schemas/ClusterDefinitionResponse", + }, + ], + }, + }, + }, + }, + "400": { "description": "Invalid payload data" }, + "401": + { + "description": "Authorization header is missing or incorrect", + }, + "404": { "description": "Data not found" }, + "409": { "description": "Duplicate entry" }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Distributed Validators"], + "security": [{ "bearer": [] }], + }, + }, + "/dv/operator/{address}": + { + "get": + { + "operationId": "DVController_getClusterDefinitionWithOperator", + "summary": "Retrieve a list of cluster definitions which the address belongs to.", + "description": "This endpoint allows a charon client or launchpad interface to fetch a specific number of cluster definitions which the address is part of for each page.", + "parameters": + [ + { + "name": "address", + "required": true, + "in": "path", + "description": "The operator address", + "schema": { "type": "string" }, + }, + { + "name": "page", + "required": true, + "in": "query", + "schema": { "type": "number" }, + }, + { + "name": "limit", + "required": true, + "in": "query", + "schema": { "type": "number" }, + }, + ], + "responses": + { + "200": + { + "description": "A list of cluster definitions which the operator is part of", + "content": + { + "application/json": + { + "schema": + { "type": "ClusterDefinitionPagedResponse" }, + }, + }, + }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Distributed Validators"], + }, + }, + "/dv": + { + "post": + { + "operationId": "DVController_postClusterDefinition", + "summary": "Propose a new Distributed Validator Cluster", + "description": "This endpoint allows the caller to propose a distributed key generation ceremony. The caller must specify the configuration of a Distributed Validator Cluster; such as the participating operators and the validator exit details. Operators invited to participate in this cluster must submit a public key (in [ENR](https://docs.obol.tech/docs/v0.12.0/int/faq/errors#enrs-keys) form) to serve as their node's identity, along with EIP712 signatures indicating their acceptance of the terms of this cluster.", + "parameters": + [ + { + "name": "authorization", + "required": true, + "in": "header", + "description": "EIP712 cluster definition hash as bearer token", + "schema": { "type": "string" }, + }, + ], + "requestBody": + { + "required": true, + "content": + { + "application/json": + { + "schema": + { "$ref": "#/components/schemas/ClusterDefDto" }, + }, + }, + }, + "responses": + { + "201": + { + "description": "The cluster object", + "content": + { + "application/json": + { + "schema": + { + "anyOf": + [ + { + "$ref": "#/components/schemas/ClusterDefinitionResponse", + }, + ], + }, + }, + }, + }, + "400": { "description": "Invalid definition data" }, + "401": + { + "description": "Authorization header is missing or incorrect", + }, + "409": { "description": "Duplicate entry" }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Distributed Validators"], + "security": [{ "bearer": [] }], + }, + }, + "/lock/{lockHash}": + { + "get": + { + "operationId": "LockController_getClusterLock", + "summary": "Retrieve a Distributed Validator Cluster Lock Object", + "description": "This endpoint is used to retrieve a cluster lock object.", + "parameters": + [ + { + "name": "lockHash", + "required": true, + "in": "path", + "description": "The `lock_hash` calculated for a cluster lock.", + "schema": { "type": "string" }, + }, + ], + "responses": + { + "200": + { + "description": "The cluster lock object", + "content": + { + "application/json": + { + "schema": + { + "anyOf": + [ + { + "$ref": "#/components/schemas/ClusterLockResponse", + }, + ], + }, + }, + }, + }, + "404": { "description": "Cluster not found" }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Cluster Lock"], + }, + }, + "/lock/configHash/{configHash}": + { + "get": + { + "operationId": "LockController_getLockByConfigHash", + "summary": "Retrieve a Distributed Validator Cluster Lock Object", + "description": "This endpoint is used to retrieve a cluster lock object by the hash of the configuration used to create it.", + "parameters": + [ + { + "name": "configHash", + "required": true, + "in": "path", + "description": "The `config_hash` calculated for a cluster configuration.", + "schema": { "type": "string" }, + }, + ], + "responses": + { + "200": + { + "description": "The cluster lock object", + "content": + { + "application/json": + { + "schema": + { + "anyOf": + [ + { + "$ref": "#/components/schemas/ClusterLockResponse", + }, + ], + }, + }, + }, + }, + "404": { "description": "Cluster not found" }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Cluster Lock"], + }, + }, + "/lock/{lockHash}/launchpad": + { + "get": + { + "operationId": "LockController_redirectToClusterStatus", + "summary": "Redirect to the launchpad cluster status page", + "description": "This endpoint is used to redirect users to the created cluster status page after DKG is completed.", + "parameters": + [ + { + "name": "lockHash", + "required": true, + "in": "path", + "description": "The `lock_hash` calculated for a Distributed Validator Cluster.", + "schema": { "type": "string" }, + }, + ], + "responses": + { + "200": { "description": "" }, + "302": + { + "description": "Serves a redirect to the launchpad cluster status page", + }, + "404": { "description": "Cluster lock not found" }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Cluster Lock"], + }, + }, + "/lock/operator/{address}": + { + "get": + { + "operationId": "LockController_getClusterLocksByOperator", + "summary": "Retrieve a list of Distributed Validator Clusters for which this address is an operator", + "description": "This endpoint fetches a number of Distributed Validator Clusters for which the address provided is a node operator.", + "parameters": + [ + { + "name": "address", + "required": true, + "in": "path", + "description": "The operator address.", + "schema": { "type": "string" }, + }, + { + "name": "page", + "required": true, + "in": "query", + "schema": { "type": "number" }, + }, + { + "name": "limit", + "required": true, + "in": "query", + "schema": { "type": "number" }, + }, + ], + "responses": + { + "200": + { + "description": "A list of Distributed Validator Clusters which the operator is a member of.", + "content": + { + "application/json": + { + "schema": { "type": "ClusterLockPagedResponse" }, + }, + }, + }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Cluster Lock"], + }, + }, + "/lock/network/{network}": + { + "get": + { + "operationId": "LockController_getClusterLocksByNetwork", + "summary": "Retrieve a list of Distributed Validator Clusters for a given network", + "description": "This endpoint fetches a number of cluster lock objects for a given network.", + "parameters": + [ + { + "name": "network", + "required": true, + "in": "path", + "description": "The network to retrieve clusters on", + "examples": + { + "mainnet": + { "summary": "Ethereum Mainnet", "value": "mainnet" }, + "holesky": + { + "summary": "Holesky Test Network", + "value": "holesky", + }, + "sepolia": + { + "summary": "Sepolia Test Network", + "value": "sepolia", + }, + "goerli": + { + "summary": "Goerli Test Network", + "value": "goerli", + }, + }, + "schema": { "type": "string" }, + }, + { + "name": "page", + "required": true, + "in": "path", + "description": "The page number to retrieve.", + "schema": { "type": "integer", "default": 0 }, }, { - 'name': 'configHash', - 'required': true, - 'in': 'path', - 'description': 'The `config_hash` calculated for a cluster definition.', - 'schema': { 'type': 'string' }, + "name": "limit", + "required": true, + "in": "path", + "description": "The number of cluster lock objects to return.", + "schema": { "type": "integer", "default": 20 }, }, ], - 'requestBody': + "responses": + { + "200": + { + "description": "A paged list of Distributed Validator Clusters on this network", + "content": + { + "application/json": + { + "schema": { "type": "ClusterLockPagedResponse" }, + }, + }, + }, + "400": { "description": "Network not spported" }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Cluster Lock"], + }, + }, + "/lock": + { + "post": + { + "operationId": "LockController_postClusterLock", + "summary": "Push Distributed Validator Cluster Lock Data", + "description": "This endpoint saves cluster lock objects that describe the created Distributed Validator Cluster.", + "parameters": [], + "requestBody": { - 'required': true, - 'content': + "required": true, + "content": { - 'application/json': + "application/json": { - 'schema': - { '$ref': '#/components/schemas/OperatorDto' }, + "schema": + { "$ref": "#/components/schemas/ClusterLockDto" }, }, }, }, - 'responses': + "responses": { - '200': + "201": { - 'description': 'The cluster object', - 'content': + "description": "The cluster lock object", + "content": { - 'application/json': + "application/json": { - 'schema': + "schema": { - '$ref': '#/components/schemas/PUTClusterDefinitionResponse', + "anyOf": + [ + { + "$ref": "#/components/schemas/ClusterLockResponse", + }, + ], }, }, }, }, + "400": { "description": "Invalid lock data" }, + "404": + { + "description": "The cluster definition corresponding to this lock file was not found", + }, + "409": { "description": "Duplicate cluster lock entry" }, + "500": { "description": "An unknown error occurred" }, }, - 'tags': ['Distributed Validators'], - 'security': [{ 'bearer': [] }], + "tags": ["Cluster Lock"], }, - 'delete': + }, + "/lock/verify": + { + "post": { - 'operationId': 'DVController_deleteClusterDefinition', - 'summary': 'Delete a Distributed Validator Cluster proposal', - 'description': 'This endpoint allows the caller to delete an unwanted DKG ceremony proposal.', - 'parameters': + "operationId": "LockController_verifyClusterLock", + "summary": "Verify Distributed Validator Cluster Lock Data", + "description": "This endpoint verifies cluster lock data including BLS public keys and signatures created during the DKG phase.", + "parameters": [], + "requestBody": + { + "required": true, + "content": + { + "application/json": + { + "schema": + { "$ref": "#/components/schemas/ClusterLockDto" }, + }, + }, + }, + "responses": + { + "200": { "description": "Lock data is valid" }, + "400": { "description": "Invalid lock data" }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Cluster Lock"], + }, + }, + "/state/{lockHash}": + { + "get": + { + "operationId": "StateController_getDistributedValidatorStatesByLockHash", + "summary": "Retrieve the Validator states for a cluster", + "description": "This endpoint is used to retrieve the states of all validators in a DV Cluster", + "parameters": [ { - 'name': 'configHash', - 'required': true, - 'in': 'path', - 'description': 'The `config_hash` calculated for a cluster definition.', - 'schema': { 'type': 'string' }, + "name": "lockHash", + "required": true, + "in": "path", + "description": "The `lock_hash` calculated for a cluster lock.", + "schema": { "type": "string" }, }, ], - 'responses': + "responses": { - '200': + "200": { - 'description': '', - 'content': + "description": "A map of pubkeys to DVState", + "content": { - 'application/json': + "application/json": { - 'schema': + "schema": { - '$ref': '#/components/schemas/ClusterDefinition', + "anyOf": + [ + { + "$ref": "#/components/schemas/DistributedValidatorStateResponse", + }, + ], + "example": + { + "0x000000000000000000000000000000": + { + "index": "0", + "status": "active_ongoing", + "balance": "32", + }, + }, }, }, }, }, + "400": { "description": "Bad request recieved" }, + "404": { "description": "Lock Hash not found" }, + "500": { "description": "An unknown error occurred" }, }, - 'tags': ['Distributed Validators'], - 'security': [{ 'bearer': [] }], + "tags": ["State"], }, }, - '/dv': + "/exp/exit/{lockHash}/{shareIdx}/{validatorPubkey}": { - 'post': + "get": { - 'operationId': 'DVController_postClusterDefinition', - 'summary': 'Propose a new Distributed Validator Cluster', - 'description': "This endpoint allows the caller to propose a distributed key generation ceremony. The caller must specify the configuration of a Distributed Validator Cluster; such as the participating operators and the validator exit details. Operators invited to participate in this cluster must submit a public key (in [ENR](https://docs.obol.tech/docs/v0.12.0/int/faq/errors#enrs-keys) form) to serve as their node's identity, along with EIP712 signatures indicating their acceptance of the terms of this cluster.", - 'parameters': + "operationId": "LidoController_getClusterLidoExit", + "summary": "Retrieve Lido Distributed Validator threshold aggregated signed exit msg", + "description": "This endpoint is used to retrieve lido validator exit message", + "parameters": [ { - 'name': 'authorization', - 'required': true, - 'in': 'header', - 'description': 'EIP712 cluster definition hash as bearer token', - 'schema': { 'type': 'string' }, + "name": "validatorPubkey", + "required": true, + "in": "path", + "description": "The `distributed_public_key` in a cluster lock.", + "schema": { "type": "string" }, }, ], - 'requestBody': + "responses": { - 'required': true, - 'content': + "200": { - 'application/json': + "description": "The DV signed exit message", + "content": { - 'schema': - { '$ref': '#/components/schemas/ClusterDefDto' }, + "application/json": + { + "schema": + { + "anyOf": + [ + { + "$ref": "#/components/schemas/LidoExitBlob", + }, + ], + }, + }, }, }, + "401": + { + "description": "Authorization header is missing or incorrect", + }, + "404": { "description": "Data is not found" }, + "500": { "description": "An unknown error occurred" }, }, - 'responses': + "tags": ["Lido Exit"], + "security": [{ "bearer": [] }], + }, + }, + "/exp/partial_exits/{lockHash}": + { + "post": + { + "operationId": "LidoController_postLidoPartialExit", + "summary": "Push Lido Distributed Validator partial signed exit message", + "description": "This endpoint saves partial signed exit messages.", + "parameters": + [ + { + "name": "lockHash", + "required": true, + "in": "path", + "description": "The `lockHash` of the cluster which the validator belongs to", + "schema": { "type": "string" }, + }, + ], + "requestBody": + { + "required": true, + "content": + { + "application/json": + { + "schema": + { "$ref": "#/components/schemas/LidoExitsDto" }, + }, + }, + }, + "responses": + { + "201": { "description": "success message" }, + "400": { "description": "Bad request recieved" }, + "404": { "description": "Data or validator not found" }, + "409": { "description": "Duplicate entry" }, + "500": { "description": "An unknown error occurred" }, + }, + "tags": ["Lido Exit"], + }, + }, + "/effectiveness/{lockHash}": + { + "get": + { + "operationId": "EffectivenessController_getClusterLock", + "summary": "Retrieve a Distributed Validator Cluster Effectiveness Object", + "description": "This endpoint is used to retrieve the effectiveness of a cluster by pubkey", + "parameters": + [ + { + "name": "lockHash", + "required": true, + "in": "path", + "description": "The `lock_hash` calculated for a cluster lock.", + "schema": { "type": "string" }, + }, + ], + "responses": { - '201': + "200": { - 'description': 'The cluster object', - 'content': + "description": "The cluster lock object", + "content": { - 'application/json': + "application/json": { - 'schema': + "schema": { - '$ref': '#/components/schemas/POSTClusterDefinitionResponse', + "anyOf": + [ + { + "$ref": "#/components/schemas/ClusterEffectivenessResponse", + }, + ], }, }, }, }, + "404": { "description": "Data not found" }, + "500": { "description": "An unknown error occurred" }, }, - 'tags': ['Distributed Validators'], - 'security': [{ 'bearer': [] }], + "tags": ["Cluster Effectiveness"], }, }, }, - 'info': + "info": { - 'title': 'Obol API', - 'description': "## What is this API?\n\nThis API is for creating and managing [Distributed Validators](https://docs.obol.tech/docs/int/key-concepts#distributed-validator). This API works in tandem with Obol's [Distributed Validator Launchpad](https://goerli.launchpad.obol.tech), a dapp designed to allow people to authenticate their counterparties and agree to the terms of a Distributed Validator Cluster. This API will be made more easy for code-only interaction in the coming quarters with the release of the Obol-SDK. \n\nRead more about Obol and how to use the [launchpad](https://goerli.launchpad.obol.tech) on our [docs site](https://docs.obol.tech/).", - 'version': 'v1.2.0', - 'contact': + "title": "Obol API", + "description": "## What is this API?\n\nThis API is for creating and managing [Distributed Validators](https://docs.obol.tech/docs/int/key-concepts#distributed-validator). This API works in tandem with Obol's [Distributed Validator Launchpad](https://goerli.launchpad.obol.tech), a dapp designed to allow people to authenticate their counterparties and agree to the terms of a Distributed Validator Cluster. This API will be made more easy for code-only interaction in the coming quarters with the release of the Obol-SDK. \n\nRead more about Obol and how to use the [launchpad](https://goerli.launchpad.obol.tech) on our [docs site](https://docs.obol.tech/). \n\nFor enquiries:", + "version": "v1.0.0-local", + "contact": { - 'name': 'Obol Labs', - 'url': 'https://obol.tech', - 'email': 'support@obol.tech', + "name": "Obol Labs", + "url": "https://obol.tech", + "email": "support@obol.tech", }, - "x-logo": { - "url": "https://obol.tech/obolnetwork.png", - "backgroundColor": "#182d32", - "altText": "Obol Network Logo" - } }, - 'tags': + "tags": [ { - 'name': 'Distributed Validators', - 'description': 'Configuration for distributed validator key generation ceremonies.', + "name": "Distributed Validators", + "description": "Configuration for distributed validator key generation ceremonies.", }, - { 'name': 'System', 'description': 'System related endpoints.' }, + { "name": "System", "description": "System related endpoints." }, ], - 'servers': + "servers": [ { - 'url': 'https://api.obol.tech/', - 'description': 'Production environment', + "url": "https://api.obol.tech/", + "description": "Production environment", }, { - 'url': 'http://localhost:3000', - 'description': 'Local development server', + "url": "http://localhost:3000", + "description": "Local development server", }, { - 'url': 'https://localhost', - 'description': 'HTTPS Local development server', + "url": "https://localhost", + "description": "HTTPS Local development server", }, ], - 'components': + "components": { - 'securitySchemes': + "securitySchemes": { - 'bearer': - { 'scheme': 'bearer', 'bearerFormat': 'JWT', 'type': 'http' }, + "bearer": + { "scheme": "bearer", "bearerFormat": "JWT", "type": "http" }, }, - 'schemas': + "schemas": { - 'CreatorDto': + "Creator": { "type": "object", "properties": {} }, + "Validator": { "type": "object", "properties": {} }, + "Operator": { "type": "object", "properties": {} }, + "ClusterDefinitionResponse": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'address': + "name": { "type": "string", "example": "My Obol Cluster" }, + "uuid": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "type": "string", + "example": "0194FDC2-FA2F-FCC0-41D3-FF12045B73C8", }, - 'config_signature': + "creator": { "$ref": "#/components/schemas/Creator" }, + "version": { "type": "string", "example": "v1.5.0" }, + "num_validators": { "type": "number", "example": 5 }, + "threshold": { "type": "number", "example": 3 }, + "dkg_algorithm": { "type": "string", "example": "default" }, + "fork_version": { "type": "string", "example": "0x00001020" }, + "config_hash": { - 'type': 'string', - 'example': '0x1199fc4440aa7929905ec171ed1dad82a9f6a89891193b2b4cf45937a8cf9ece4972e02bc7e23d8b8b2e550b6430693ac6bc8c82a0509f65d0abb34d7ae0a8a81c', + "type": "string", + "description": "config_hash is a 32 bytes SSZ hash of cluster config.", + "example": "0x2204ba6c238ed2d6a8ff951d4513db993c8d6f8860468391342649bf735a87d7", + }, + "timestamp": + { + "type": "string", + "example": "2022-07-19T18:19:58+02:00", + }, + "validators": + { + "type": "array", + "items": { "$ref": "#/components/schemas/Validator" }, + }, + "definition_hash": + { + "type": "string", + "description": "definition_hash is a 32 bytes SSZ hash of cluster config.", + "example": "0xb656f5a4a5537b5817d6bcf735d043f17f5aff568b1a7ec9102a9f687bd4510c", + }, + "fee_recipient_address": + { + "type": "string", + "description": "Ethereum address to receive transaction fees.", + "example": "0x000000000000000000000000000000000000dead", + }, + "withdrawal_address": + { + "type": "string", + "description": "Ethereum address to receive staked ether.", + "example": "0x000000000000000000000000000000000000dead", + }, + "operators": + { + "type": "array", + "items": { "$ref": "#/components/schemas/Operator" }, }, }, - 'required': ['address', 'config_signature'], + "required": + [ + "name", + "uuid", + "creator", + "version", + "num_validators", + "threshold", + "dkg_algorithm", + "fork_version", + "config_hash", + "timestamp", + "validators", + "definition_hash", + "fee_recipient_address", + "withdrawal_address", + "operators", + ], }, - 'OperatorDto': + "OperatorDto": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'address': + "address": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "type": "string", + "description": "Ethereum address of Operator.", + "example": "0x000000000000000000000000000000000000dead", }, - 'enr': + "enr": { - 'type': 'string', - 'example': 'enr://5fb90badb37c5821b6d95526a41a9504680b4e7c8b763a1b1d49d4955c848621', + "type": "string", + "example": "enr://5fb90badb37c5821b6d95526a41a9504680b4e7c8b763a1b1d49d4955c848621", }, - 'fork_version': { 'type': 'string', 'example': '0x00001020' }, - 'enr_signature': + "fork_version": { - 'type': 'string', - 'example': '0x1199fc4440aa7929905ec171ed1dad82a9f6a89891193b2b4cf45937a8cf9ece4972e02bc7e23d8b8b2e550b6430693ac6bc8c82a0509f65d0abb34d7ae0a8a81c', + "type": "string", + "enum": + [ + "mainnet", + "0x00000000", + "goerli", + "0x00001020", + "gnosis", + "0x00000064", + "sepolia", + "0x90000069", + "holesky", + "0x01017000", + ], + "example": "0x00001020", }, - 'config_signature': + "version": { "type": "string", "example": "v1.5.0" }, + "enr_signature": { - 'type': 'string', - 'example': '0x1199fc4440aa7929905ec171ed1dad82a9f6a89891193b2b4cf45937a8cf9ece4972e02bc7e23d8b8b2e550b6430693ac6bc8c82a0509f65d0abb34d7ae0a8a81c', + "type": "string", + "example": "0x1199fc4440aa7929905ec171ed1dad82a9f6a89891193b2b4cf45937a8cf9ece4972e02bc7e23d8b8b2e550b6430693ac6bc8c82a0509f65d0abb34d7ae0a8a81c", + }, + "config_signature": + { + "type": "string", + "example": "0x1199fc4440aa7929905ec171ed1dad82a9f6a89891193b2b4cf45937a8cf9ece4972e02bc7e23d8b8b2e550b6430693ac6bc8c82a0509f65d0abb34d7ae0a8a81c", }, }, - 'required': + "required": [ - 'address', - 'enr', - 'fork_version', - 'enr_signature', - 'config_signature', + "address", + "enr", + "fork_version", + "version", + "enr_signature", + "config_signature", ], }, - 'GETClusterDefinitionResponse': + "CreatorDto": + { + "type": "object", + "properties": + { + "address": + { + "type": "string", + "description": "Ethereum address of Creator.", + "example": "0x000000000000000000000000000000000000dead", + }, + "config_signature": + { + "type": "string", + "example": "0x1199fc4440aa7929905ec171ed1dad82a9f6a89891193b2b4cf45937a8cf9ece4972e02bc7e23d8b8b2e550b6430693ac6bc8c82a0509f65d0abb34d7ae0a8a81c", + }, + }, + "required": ["address", "config_signature"], + }, + "ClusterDefValidator": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'name': { 'type': 'string', 'example': 'My Obol Cluster' }, - 'uuid': + "fee_recipient_address": + { + "type": "string", + "description": "Ethereum address to receive transaction fees.", + "example": "0x000000000000000000000000000000000000dead", + }, + "withdrawal_address": + { + "type": "string", + "description": "Ethereum address to receive staked ether.", + "example": "0x000000000000000000000000000000000000dead", + }, + }, + "required": ["fee_recipient_address", "withdrawal_address"], + }, + "ClusterDefDto": + { + "type": "object", + "properties": + { + "name": { "type": "string", "example": "My Obol Cluster" }, + "operators": + { + "description": "operator data.", + "type": "array", + "items": { "$ref": "#/components/schemas/OperatorDto" }, + }, + "creator": + { + "description": "creator data.", + "type": "array", + "items": { "$ref": "#/components/schemas/CreatorDto" }, + }, + "uuid": { - 'type': 'string', - 'example': '0194FDC2-FA2F-FCC0-41D3-FF12045B73C8', + "type": "string", + "example": "0194FDC2-FA2F-FCC0-41D3-FF12045B73C8", }, - 'creator': { '$ref': '#/components/schemas/CreatorDto' }, - 'version': { 'type': 'string', 'example': 'v1.2.0' }, - 'num_validators': { 'type': 'number', 'example': 5 }, - 'threshold': { 'type': 'number', 'example': 3 }, - 'fee_recipient_address': + "version": { "type": "string", "example": "v1.5.0" }, + "num_validators": + { "type": "number", "minimum": 1, "example": 5 }, + "threshold": { "type": "number", "minimum": 1, "example": 3 }, + "dkg_algorithm": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "type": "string", + "enum": ["frost", "keycast", "default"], + "example": "default", }, - 'withdrawal_address': + "fork_version": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "type": "string", + "enum": + [ + "mainnet", + "0x00000000", + "goerli", + "0x00001020", + "gnosis", + "0x00000064", + "sepolia", + "0x90000069", + "holesky", + "0x01017000", + ], + "example": "0x00001020", }, - 'dkg_algorithm': { 'type': 'string', 'example': 'default' }, - 'fork_version': { 'type': 'string', 'example': '0x00001020' }, - 'config_hash': + "timestamp": { - 'type': 'string', - 'example': '0x3940294920aaabbbccccddddeeeffff33224', + "type": "string", + "example": "2022-07-19T18:19:58+02:00", }, - 'timestamp': + "validators": { - 'type': 'string', - 'example': '2022-07-19T18:19:58+02:00', + "description": "validator withdrawal configuration.", + "type": "array", + "items": + { "$ref": "#/components/schemas/ClusterDefValidator" }, }, - 'operators': + "config_hash": { - 'type': 'array', - 'items': { '$ref': '#/components/schemas/OperatorDto' }, + "type": "string", + "example": "0x29b0223beea5f4f74391f445d15afd4294040374f6924b98cbf8713f8d962d7c", }, }, - 'required': + "required": [ - 'name', - 'uuid', - 'creator', - 'version', - 'num_validators', - 'threshold', - 'fee_recipient_address', - 'withdrawal_address', - 'dkg_algorithm', - 'fork_version', - 'config_hash', - 'timestamp', - 'operators', + "name", + "operators", + "creator", + "uuid", + "version", + "num_validators", + "threshold", + "dkg_algorithm", + "fork_version", + "timestamp", + "validators", + "config_hash", ], }, - 'ClusterDefOperator': + "DistributedValidator": { "type": "object", "properties": {} }, + "ClusterLockResponse": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'address': + "cluster_definition": + { + "description": "Cluster definition data that was used in dkg to generate cluster lock.", + "allOf": + [ + { + "$ref": "#/components/schemas/ClusterDefinitionResponse", + }, + ], + }, + "distributed_validators": + { + "type": "array", + "items": + { "$ref": "#/components/schemas/DistributedValidator" }, + }, + "signature_aggregate": + { + "type": "string", + "example": "0x85650c30ec29a3703934bf50a28da102975deda77e758579ea3dfe4136abf752", + }, + "lock_hash": + { + "type": "string", + "example": "0xd2880980169ee4a0000f23feb8fad9a6c70f38312956fe67aa89e118f5b0e048", + }, + "node_signatures": + { "type": "array", "items": { "type": "string" } }, + }, + "required": + [ + "cluster_definition", + "distributed_validators", + "signature_aggregate", + "lock_hash", + "node_signatures", + ], + }, + "DepositDataDto": + { + "type": "object", + "properties": + { + "pubkey": + { + "type": "string", + "example": "0xb51336c31c4f0cc365d6c7b5d8ff1b4b7d4cf7c70163f9fd51a2badc854f5e29823fa11e3d7749d207807867149508d6", + }, + "withdrawal_credentials": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "type": "string", + "example": "0x01000000000000000000000086b8145c98e5bd25ba722645b15ed65f024a87ec", + }, + "amount": { "type": "string", "example": "32000000000" }, + "deposit_data_root": + { + "type": "string", + "example": "5e58a5d8f1e53479343cb6188f061f6b1a46c521c53eef0580b04f485ad62bad", + }, + "signature": + { + "type": "string", + "example": "0x88fe84889608a8b2424bddae2047d2ee4b42f72c4d8201d69e732d7c3bfa1bcb00f930979770b7d00071673fde8f205108dabe8d83ec49aa6de1b7869966b555be80a159e6ad11e273c4e0234038cfa525923044d6a89a4924fdc178f333568b", }, }, - 'required': ['address'], + "required": + [ + "pubkey", + "withdrawal_credentials", + "amount", + "deposit_data_root", + "signature", + ], }, - 'ClusterDefCreator': + "BuilderRegistrationMessageDto": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'address': + "fee_recipient": + { + "type": "string", + "example": "0x86B8145c98e5BD25BA722645b15eD65f024a87EC", + }, + "gas_limit": { "type": "number", "example": 30000000 }, + "timestamp": { "type": "number", "example": 1616508000 }, + "pubkey": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "type": "string", + "example": "0xb51336c31c4f0cc365d6c7b5d8ff1b4b7d4cf7c70163f9fd51a2badc854f5e29823fa11e3d7749d207807867149508d6", }, }, - 'required': ['address'], + "required": ["fee_recipient", "gas_limit", "timestamp", "pubkey"], }, - 'ClusterDefDto': + "BuilderRegistrationDto": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'name': { 'type': 'string', 'example': 'My Obol Cluster' }, - 'operators': + "message": { - 'type': 'array', - 'items': - { '$ref': '#/components/schemas/ClusterDefOperator' }, + "description": "builder registration information.", + "allOf": + [ + { + "$ref": "#/components/schemas/BuilderRegistrationMessageDto", + }, + ], }, - 'creator': - { '$ref': '#/components/schemas/ClusterDefCreator' }, - 'uuid': + "signature": { - 'type': 'string', - 'example': '0194FDC2-FA2F-FCC0-41D3-FF12045B73C8', + "type": "string", + "example": "0x851e4f196b7e7bda6429b94cceb92d480f53fa9753e1d6c830ff2706acb8cd866d81d5533db7dcfac1dc9d00a16e5e4801d33f36bdf1c2a2003e1c586466109e7851c79179b2c46d69c53c4a59e361d2727186a7e72bbd11debad1f2fae6f97d", }, - 'version': { 'type': 'string', 'example': 'v1.2.0' }, - 'num_validators': - { 'type': 'number', 'minimum': 1, 'example': 5 }, - 'threshold': { 'type': 'number', 'minimum': 1, 'example': 3 }, - 'fee_recipient_address': + }, + "required": ["message", "signature"], + }, + "DistributedValidatorDto": + { + "type": "object", + "properties": + { + "distributed_public_key": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "type": "string", + "example": "0xb51336c31c4f0cc365d6c7b5d8ff1b4b7d4cf7c70163f9fd51a2badc854f5e29823fa11e3d7749d207807867149508d6", }, - 'withdrawal_address': + "public_shares": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "description": "array of public shares of the distributed public key.", + "type": "array", + "items": { "type": "string" }, }, - 'dkg_algorithm': { 'type': 'string', 'example': 'default' }, - 'fork_version': { 'type': 'string', 'example': '0x00001020' }, - 'timestamp': + "deposit_data": { - 'type': 'string', - 'example': '2022-07-19T18:19:58+02:00', + "description": "Deposit data for validator activation.", + "allOf": + [{ "$ref": "#/components/schemas/DepositDataDto" }], }, - 'config_hash': + "builder_registration": { - 'type': 'string', - 'example': '0x29b0223beea5f4f74391f445d15afd4294040374f6924b98cbf8713f8d962d7c', + "description": "Pre-generated signed validator builder registration.", + "allOf": + [ + { + "$ref": "#/components/schemas/BuilderRegistrationDto", + }, + ], }, }, - 'required': + "required": [ - 'name', - 'operators', - 'creator', - 'uuid', - 'version', - 'num_validators', - 'threshold', - 'fee_recipient_address', - 'withdrawal_address', - 'dkg_algorithm', - 'fork_version', - 'timestamp', - 'config_hash', + "distributed_public_key", + "public_shares", + "deposit_data", + "builder_registration", ], }, - 'POSTClusterDefinitionResponse': + "ClusterLockDto": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'name': { 'type': 'string', 'example': 'My Obol Cluster' }, - 'uuid': + "cluster_definition": { - 'type': 'string', - 'example': '0194FDC2-FA2F-FCC0-41D3-FF12045B73C8', + "description": "Cluster definition data that was used in dkg to generate cluster lock.", + "allOf": + [ + { + "$ref": "#/components/schemas/ClusterDefinitionResponse", + }, + ], }, - 'creator': { '$ref': '#/components/schemas/CreatorDto' }, - 'version': { 'type': 'string', 'example': 'v1.2.0' }, - 'num_validators': { 'type': 'number', 'example': 5 }, - 'threshold': { 'type': 'number', 'example': 3 }, - 'fee_recipient_address': + "distributed_validators": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', - }, - 'withdrawal_address': - { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "description": "distributed validator keys and deposit data.", + "type": "array", + "items": + { + "$ref": "#/components/schemas/DistributedValidatorDto", + }, }, - 'dkg_algorithm': { 'type': 'string', 'example': 'default' }, - 'fork_version': { 'type': 'string', 'example': '0x00001020' }, - 'config_hash': + "signature_aggregate": { - 'type': 'string', - 'example': '0x3940294920aaabbbccccddddeeeffff33224', + "type": "string", + "example": "0x85650c30ec29a3703934bf50a28da102975deda77e758579ea3dfe4136abf752", }, - 'timestamp': + "lock_hash": { - 'type': 'string', - 'example': '2022-07-19T18:19:58+02:00', + "type": "string", + "example": "0xd2880980169ee4a0000f23feb8fad9a6c70f38312956fe67aa89e118f5b0e048", }, - 'operators': + "node_signatures": { - 'type': 'array', - 'items': - { '$ref': '#/components/schemas/ClusterDefOperator' }, + "example": + [ + "0xe6e531be7bbf6cee37d80ab489ade6491469e10743d3c1496a3e66fe989eb4c100c260eaee4ef1aa08fdb79ea05bb8c12970dec1a296abe627ac25a2515373b301", + ], + "type": "array", + "items": { "type": "string" }, }, }, - 'required': + "required": [ - 'name', - 'uuid', - 'creator', - 'version', - 'num_validators', - 'threshold', - 'fee_recipient_address', - 'withdrawal_address', - 'dkg_algorithm', - 'fork_version', - 'config_hash', - 'timestamp', - 'operators', + "cluster_definition", + "distributed_validators", + "signature_aggregate", + "lock_hash", + "node_signatures", ], }, - 'PUTClusterDefinitionResponse': + "DistributedValidatorStateResponse": + { + "type": "object", + "properties": + { + "index": { "type": "string", "example": "12345" }, + "status": { "type": "string", "example": "active_ongoing" }, + "balance": { "type": "string", "example": "32" }, + }, + "required": ["index", "status", "balance"], + }, + "LidoExitBlob": { "type": "object", "properties": {} }, + "ExitMessageDto": + { + "type": "object", + "properties": + { + "epoch": { "type": "string", "example": "162304" }, + "validator_index": { "type": "string", "example": "42" }, + }, + "required": ["epoch", "validator_index"], + }, + "SignedExitMessageDto": { - 'type': 'object', - 'properties': + "type": "object", + "properties": { - 'name': { 'type': 'string', 'example': 'My Obol Cluster' }, - 'uuid': + "message": { "$ref": "#/components/schemas/ExitMessageDto" }, + "signature": { "type": "string", "example": "" }, + }, + "required": ["message", "signature"], + }, + "LidoExitBlobDto": + { + "type": "object", + "properties": + { + "public_key": { - 'type': 'string', - 'example': '0194FDC2-FA2F-FCC0-41D3-FF12045B73C8', + "type": "string", + "example": "0x8b69c67720c909423d7edc5d3a7554e1d1e50f6d7d5f8d18548d68daf424e536afba8b31fbd15df1970ba4af4a7d944c", }, - 'creator': { '$ref': '#/components/schemas/CreatorDto' }, - 'version': { 'type': 'string', 'example': 'v1.2.0' }, - 'num_validators': { 'type': 'number', 'example': 5 }, - 'threshold': { 'type': 'number', 'example': 3 }, - 'fee_recipient_address': + "signed_exit_message": + { "$ref": "#/components/schemas/SignedExitMessageDto" }, + }, + "required": ["public_key", "signed_exit_message"], + }, + "LidoExitsDto": + { + "type": "object", + "properties": + { + "partial_exits": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "type": "array", + "items": + { "$ref": "#/components/schemas/LidoExitBlobDto" }, }, - 'withdrawal_address': + "share_idx": { "type": "number", "example": 42 }, + "signature": { "type": "string", "example": "" }, + }, + "required": ["partial_exits", "share_idx", "signature"], + }, + "ClusterEffectivenessResponse": + { + "type": "object", + "properties": + { + "oneDay": { - 'type': 'string', - 'example': '0x71cb05ee1b1f506ff321da3dac38f25c0c9ce6e1', + "type": "number", + "description": "Cluster effectiveness for the previous day.", }, - 'dkg_algorithm': { 'type': 'string', 'example': 'default' }, - 'fork_version': { 'type': 'string', 'example': '0x00001020' }, - 'config_hash': + "sevenDay": { - 'type': 'string', - 'example': '0x3940294920aaabbbccccddddeeeffff33224', + "type": "number", + "description": "Cluster effectiveness for the previous 7 days.", }, - 'timestamp': + "thirtyDay": { - 'type': 'string', - 'example': '2022-07-19T18:19:58+02:00', + "type": "number", + "description": "Cluster effectiveness for the previous 30 days.", }, - 'operators': + "all": { - 'type': 'array', - 'items': { '$ref': '#/components/schemas/OperatorDto' }, + "type": "number", + "description": "Cluster effectiveness for alltime.", }, }, - 'required': - [ - 'name', - 'uuid', - 'creator', - 'version', - 'num_validators', - 'threshold', - 'fee_recipient_address', - 'withdrawal_address', - 'dkg_algorithm', - 'fork_version', - 'config_hash', - 'timestamp', - 'operators', - ], + "required": ["oneDay", "sevenDay", "thirtyDay", "all"], }, - 'ClusterDefinition': { 'type': 'object', 'properties': {} }, }, }, }