Compare commits

...

2 Commits

Author SHA1 Message Date
james-prysm
12bb7808c5 tmp file for demo purposes 2024-01-02 10:53:23 -06:00
james-prysm
9efdf7dfcc poc 2023-12-22 09:10:02 -06:00
3 changed files with 117 additions and 0 deletions

View File

@@ -45,6 +45,25 @@ var (
type handled bool
// swagger:route GET /eth/v1/beacon/blocks/{block_id} beacon GetBlock
//
// # GetBlock
//
// retrieves block details for given block ID.
//
// Consumes:
// - application/json
//
// Produces:
// - application/json
//
// Schemes: http, https
//
// Responses:
// default: genericError
// 200: someResponse
// 422: validationError
//
// GetBlock retrieves block details for given block ID.
//
// DEPRECATED: please use GetBlockV2 instead

75
swagger.json Normal file
View File

@@ -0,0 +1,75 @@
{
"swagger": "2.0",
"paths": {
"/eth/v1/beacon/blocks/{block_id}": {
"get": {
"description": "retrieves block details for given block ID.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http",
"https"
],
"tags": [
"beacon"
],
"summary": "GetBlock",
"operationId": "GetBlock",
"responses": {
"200": {
"$ref": "#/responses/someResponse"
},
"422": {
"$ref": "#/responses/validationError"
},
"default": {
"$ref": "#/responses/genericError"
}
}
}
},
"/eth/v1/keystores": {
"get": {
"security": [
{
"api_key": []
},
{
"oauth": [
"read",
"write"
]
}
],
"description": "List all validating pubkeys known to and decrypted by this keymanager binary",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http",
"https"
],
"summary": "Lists keystores",
"operationId": "keymanagerAPI",
"responses": {
"200": {
"$ref": "#/responses/someResponse"
},
"422": {
"$ref": "#/responses/validationError"
},
"default": {
"$ref": "#/responses/genericError"
}
}
}
}
}
}

View File

@@ -29,6 +29,29 @@ import (
"google.golang.org/protobuf/types/known/emptypb"
)
// swagger:route GET /eth/v1/keystores keymanagerAPI
//
// # Lists keystores
//
// List all validating pubkeys known to and decrypted by this keymanager binary
//
// Consumes:
// - application/json
//
// Produces:
// - application/json
//
// Schemes: http, https
//
// Security:
// api_key:
// oauth: read, write
//
// Responses:
// default: genericError
// 200: someResponse
// 422: validationError
//
// ListKeystores implements the standard validator key management API.
func (s *Server) ListKeystores(w http.ResponseWriter, r *http.Request) {
ctx, span := trace.StartSpan(r.Context(), "validator.keymanagerAPI.ListKeystores")