-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(eventindexer,relayer,taiko-client): clean up swagger apis for m…
…igration
- Loading branch information
Showing
9 changed files
with
48 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Code generated by swaggo/swag. DO NOT EDIT | ||
// Package docs Code generated by swaggo/swag. DO NOT EDIT | ||
package docs | ||
|
||
import "github.com/swaggo/swag" | ||
|
@@ -16,7 +16,8 @@ const docTemplate = `{ | |
"email": "[email protected]" | ||
}, | ||
"license": { | ||
"name": "MIT" | ||
"name": "MIT", | ||
"url": "https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md" | ||
}, | ||
"version": "{{.Version}}" | ||
}, | ||
|
@@ -167,26 +168,6 @@ const docTemplate = `{ | |
} | ||
} | ||
}, | ||
"/stats": { | ||
"get": { | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"summary": "Get stats", | ||
"operationId": "get-stats", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/eventindexer.Stat" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/uniqueProposers": { | ||
"get": { | ||
"consumes": [ | ||
|
@@ -251,32 +232,6 @@ const docTemplate = `{ | |
} | ||
} | ||
}, | ||
"eventindexer.Stat": { | ||
"type": "object", | ||
"properties": { | ||
"averageProofReward": { | ||
"type": "string" | ||
}, | ||
"averageProofTime": { | ||
"type": "string" | ||
}, | ||
"feeTokenAddress": { | ||
"type": "string" | ||
}, | ||
"id": { | ||
"type": "integer" | ||
}, | ||
"numBlocksAssigned": { | ||
"type": "integer" | ||
}, | ||
"numProofs": { | ||
"type": "integer" | ||
}, | ||
"statType": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"eventindexer.UniqueProposersResponse": { | ||
"type": "object", | ||
"properties": { | ||
|
@@ -369,13 +324,15 @@ const docTemplate = `{ | |
// SwaggerInfo holds exported Swagger Info so clients can modify it | ||
var SwaggerInfo = &swag.Spec{ | ||
Version: "1.0", | ||
Host: "eventindexer.katla.taiko.xyz", | ||
Host: "eventindexer.hekla.taiko.xyz", | ||
BasePath: "", | ||
Schemes: []string{}, | ||
Title: "Taiko Eventindexer API", | ||
Title: "Taiko Event Indexer API", | ||
Description: "", | ||
InfoInstanceName: "swagger", | ||
SwaggerTemplate: docTemplate, | ||
LeftDelim: "{{", | ||
RightDelim: "}}", | ||
} | ||
|
||
func init() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Taiko Eventindexer API", | ||
"title": "Taiko Event Indexer API", | ||
"termsOfService": "http://swagger.io/terms/", | ||
"contact": { | ||
"name": "API Support", | ||
"url": "https://community.taiko.xyz/", | ||
"email": "[email protected]" | ||
}, | ||
"license": { | ||
"name": "MIT" | ||
"name": "MIT", | ||
"url": "https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md" | ||
}, | ||
"version": "1.0" | ||
}, | ||
"host": "eventindexer.katla.taiko.xyz", | ||
"host": "eventindexer.hekla.taiko.xyz", | ||
"paths": { | ||
"/assignedBlocks": { | ||
"get": { | ||
|
@@ -143,22 +144,6 @@ | |
} | ||
} | ||
}, | ||
"/stats": { | ||
"get": { | ||
"consumes": ["application/json"], | ||
"produces": ["application/json"], | ||
"summary": "Get stats", | ||
"operationId": "get-stats", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/eventindexer.Stat" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/uniqueProposers": { | ||
"get": { | ||
"consumes": ["application/json"], | ||
|
@@ -215,32 +200,6 @@ | |
} | ||
} | ||
}, | ||
"eventindexer.Stat": { | ||
"type": "object", | ||
"properties": { | ||
"averageProofReward": { | ||
"type": "string" | ||
}, | ||
"averageProofTime": { | ||
"type": "string" | ||
}, | ||
"feeTokenAddress": { | ||
"type": "string" | ||
}, | ||
"id": { | ||
"type": "integer" | ||
}, | ||
"numBlocksAssigned": { | ||
"type": "integer" | ||
}, | ||
"numProofs": { | ||
"type": "integer" | ||
}, | ||
"statType": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"eventindexer.UniqueProposersResponse": { | ||
"type": "object", | ||
"properties": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,23 +13,6 @@ definitions: | |
$ref: "#/definitions/eventindexer.ChartItem" | ||
type: array | ||
type: object | ||
eventindexer.Stat: | ||
properties: | ||
averageProofReward: | ||
type: string | ||
averageProofTime: | ||
type: string | ||
feeTokenAddress: | ||
type: string | ||
id: | ||
type: integer | ||
numBlocksAssigned: | ||
type: integer | ||
numProofs: | ||
type: integer | ||
statType: | ||
type: string | ||
type: object | ||
eventindexer.UniqueProposersResponse: | ||
properties: | ||
address: | ||
|
@@ -86,16 +69,17 @@ definitions: | |
visible: | ||
type: integer | ||
type: object | ||
host: eventindexer.katla.taiko.xyz | ||
host: eventindexer.hekla.taiko.xyz | ||
info: | ||
contact: | ||
email: [email protected] | ||
name: API Support | ||
url: https://community.taiko.xyz/ | ||
license: | ||
name: MIT | ||
url: https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md | ||
termsOfService: http://swagger.io/terms/ | ||
title: Taiko Eventindexer API | ||
title: Taiko Event Indexer API | ||
version: "1.0" | ||
paths: | ||
/assignedBlocks: | ||
|
@@ -194,19 +178,6 @@ paths: | |
schema: | ||
$ref: "#/definitions/paginate.Page" | ||
summary: Get nft balances by address and chain ID | ||
/stats: | ||
get: | ||
consumes: | ||
- application/json | ||
operationId: get-stats | ||
produces: | ||
- application/json | ||
responses: | ||
"200": | ||
description: OK | ||
schema: | ||
$ref: "#/definitions/eventindexer.Stat" | ||
summary: Get stats | ||
/uniqueProposers: | ||
get: | ||
consumes: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ import ( | |
echo "github.com/labstack/echo/v4" | ||
) | ||
|
||
// @title Taiko Eventindexer API | ||
// @title Taiko Event Indexer API | ||
// @version 1.0 | ||
// @termsOfService http://swagger.io/terms/ | ||
|
||
|
@@ -23,8 +23,9 @@ import ( | |
// @contact.email [email protected] | ||
|
||
// @license.name MIT | ||
// @license.url https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md | ||
|
||
// @host eventindexer.katla.taiko.xyz | ||
// @host eventindexer.hekla.taiko.xyz | ||
// Server represents an eventindexer http server instance. | ||
type Server struct { | ||
echo *echo.Echo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,8 @@ const docTemplate = `{ | |
"email": "[email protected]" | ||
}, | ||
"license": { | ||
"name": "MIT" | ||
"name": "MIT", | ||
"url": "https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md" | ||
}, | ||
"version": "{{.Version}}" | ||
}, | ||
|
@@ -126,6 +127,12 @@ const docTemplate = `{ | |
"paginate.Page": { | ||
"type": "object", | ||
"properties": { | ||
"error": { | ||
"type": "boolean" | ||
}, | ||
"error_message": { | ||
"type": "string" | ||
}, | ||
"first": { | ||
"type": "boolean" | ||
}, | ||
|
@@ -159,10 +166,10 @@ const docTemplate = `{ | |
// SwaggerInfo holds exported Swagger Info so clients can modify it | ||
var SwaggerInfo = &swag.Spec{ | ||
Version: "1.0", | ||
Host: "relayer.katla.taiko.xyz", | ||
Host: "relayer.hekla.taiko.xyz", | ||
BasePath: "", | ||
Schemes: []string{}, | ||
Title: "Taiko Relayer API", | ||
Title: "Taiko Bridge Relayer API", | ||
Description: "", | ||
InfoInstanceName: "swagger", | ||
SwaggerTemplate: docTemplate, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Taiko Relayer API", | ||
"title": "Taiko Bridge Relayer API", | ||
"termsOfService": "http://swagger.io/terms/", | ||
"contact": { | ||
"name": "API Support", | ||
"url": "https://community.taiko.xyz/", | ||
"email": "[email protected]" | ||
}, | ||
"license": { | ||
"name": "MIT" | ||
"name": "MIT", | ||
"url": "https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md" | ||
}, | ||
"version": "1.0" | ||
}, | ||
"host": "relayer.katla.taiko.xyz", | ||
"host": "relayer.hekla.taiko.xyz", | ||
"paths": { | ||
"/blockInfo": { | ||
"get": { | ||
|
@@ -110,6 +111,12 @@ | |
"paginate.Page": { | ||
"type": "object", | ||
"properties": { | ||
"error": { | ||
"type": "boolean" | ||
}, | ||
"error_message": { | ||
"type": "string" | ||
}, | ||
"first": { | ||
"type": "boolean" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,10 @@ definitions: | |
type: object | ||
paginate.Page: | ||
properties: | ||
error: | ||
type: boolean | ||
error_message: | ||
type: string | ||
first: | ||
type: boolean | ||
items: {} | ||
|
@@ -35,16 +39,17 @@ definitions: | |
visible: | ||
type: integer | ||
type: object | ||
host: relayer.katla.taiko.xyz | ||
host: relayer.hekla.taiko.xyz | ||
info: | ||
contact: | ||
email: [email protected] | ||
name: API Support | ||
url: https://community.taiko.xyz/ | ||
license: | ||
name: MIT | ||
url: https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md | ||
termsOfService: http://swagger.io/terms/ | ||
title: Taiko Relayer API | ||
title: Taiko Bridge Relayer API | ||
version: "1.0" | ||
paths: | ||
/blockInfo: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ type ethClient interface { | |
BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) | ||
} | ||
|
||
// @title Taiko Relayer API | ||
// @title Taiko Bridge Relayer API | ||
// @version 1.0 | ||
// @termsOfService http://swagger.io/terms/ | ||
|
||
|
@@ -30,8 +30,9 @@ type ethClient interface { | |
// @contact.email [email protected] | ||
|
||
// @license.name MIT | ||
// @license.url https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md | ||
|
||
// @host relayer.katla.taiko.xyz | ||
// @host relayer.hekla.taiko.xyz | ||
// Server represents an relayer http server instance. | ||
type Server struct { | ||
echo *echo.Echo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,7 @@ import ( | |
// @contact.email [email protected] | ||
|
||
// @license.name MIT | ||
// @license.url https://github.com/taikoxyz/taiko-mono/packages/taiko-client/blob/main/LICENSE.md | ||
|
||
// @license.url https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md | ||
// ProverServer represents a prover server instance. | ||
type ProverServer struct { | ||
echo *echo.Echo | ||
|