wormhole-explorer/api/docs/docs.go

560 lines
19 KiB
Go

// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"termsOfService": "https://wormhole.com/",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/v1/governor/available_notional_by_chain": {
"get": {
"description": "Get available notional by chainID\nSince from the wormhole-explorer point of view it is not a node, but has the information of all nodes,\nin order to build the endpoints it was assumed:\nThere are N number of remainingAvailableNotional values in the GovernorConfig collection. N = number of guardians\nfor a chainID. The smallest remainingAvailableNotional value for a chainID is used for the endpoint response.",
"tags": [
"Guardian"
],
"operationId": "governor-available-notional-by-chain",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/governor.AvailableNotionalResponse"
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/v1/governor/enqueued_vaas": {
"get": {
"description": "Get enqueued vaa's",
"tags": [
"Guardian"
],
"operationId": "guardians-enqueued-vaas",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/governor.EnqueuedVaaResponse"
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/v1/governor/is_vaa_enqueued/{chain_id}/{emitter}/{seq}": {
"get": {
"description": "Check if vaa is enqueued",
"tags": [
"Guardian"
],
"operationId": "guardians-is-vaa-enqueued",
"parameters": [
{
"type": "integer",
"description": "id of the blockchain",
"name": "chain_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "address of the emitter",
"name": "emitter",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "sequence of the vaa",
"name": "seq",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/governor.EnqueuedVaaResponse"
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/v1/governor/token_list": {
"get": {
"description": "Get token list\nSince from the wormhole-explorer point of view it is not a node, but has the information of all nodes,\nin order to build the endpoints it was assumed:\nFor tokens with the same originChainId and originAddress and different price values for each node,\nthe price that has most occurrences in all the nodes for an originChainId and originAddress is returned.",
"tags": [
"Guardian"
],
"operationId": "guardians-token-list",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/governor.TokenList"
}
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/v1/guardianset/current": {
"get": {
"description": "Get current guardian set.",
"tags": [
"Guardian"
],
"operationId": "guardian-set",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/guardian.GuardianSetResponse"
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/v1/heartbeats": {
"get": {
"description": "Get heartbeats for guardians",
"tags": [
"Guardian"
],
"operationId": "guardians-hearbeats",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/heartbeats.HeartbeatsResponse"
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/v1/signed_batch_vaa/{chain_id}/{emitter}/sequence/{seq}": {
"get": {
"description": "get a batch of VAA []byte from a chainID, emitter address and sequence.",
"tags": [
"Guardian"
],
"operationId": "guardians-find-signed-batch-vaa",
"parameters": [
{
"type": "integer",
"description": "id of the blockchain",
"name": "chain_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "address of the emitter",
"name": "emitter",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "sequence of the vaa",
"name": "seq",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
]
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/v1/signed_vaa/{chain_id}/{emitter}/{seq}": {
"get": {
"description": "get a VAA []byte from a chainID, emitter address and sequence.",
"tags": [
"Guardian"
],
"operationId": "guardians-find-signed-vaa",
"parameters": [
{
"type": "integer",
"description": "id of the blockchain",
"name": "chain_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "address of the emitter",
"name": "emitter",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "sequence of the vaa",
"name": "seq",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"type": "object"
},
{
"type": "object",
"properties": {
"vaaBytes": {
"type": "array",
"items": {
"type": "integer"
}
}
}
}
]
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Server Error"
}
}
}
}
},
"definitions": {
"governor.AvailableNotionalItemResponse": {
"type": "object",
"properties": {
"bigTransactionSize": {
"type": "string"
},
"chainId": {
"$ref": "#/definitions/vaa.ChainID"
},
"notionalLimit": {
"type": "string"
},
"remainingAvailableNotional": {
"type": "string"
}
}
},
"governor.AvailableNotionalResponse": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"$ref": "#/definitions/governor.AvailableNotionalItemResponse"
}
}
}
},
"governor.EnqueuedVaaItemResponse": {
"type": "object",
"properties": {
"emitterAddress": {
"type": "string"
},
"emitterChain": {
"$ref": "#/definitions/vaa.ChainID"
},
"notionalValue": {
"type": "string"
},
"releaseTime": {
"type": "integer"
},
"sequence": {
"type": "integer"
},
"txHash": {
"type": "string"
}
}
},
"governor.EnqueuedVaaResponse": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"$ref": "#/definitions/governor.EnqueuedVaaItemResponse"
}
}
}
},
"governor.TokenList": {
"type": "object",
"properties": {
"originAddress": {
"type": "string"
},
"originChainId": {
"$ref": "#/definitions/vaa.ChainID"
},
"price": {
"type": "number"
}
}
},
"guardian.GuardianSet": {
"type": "object",
"properties": {
"addresses": {
"type": "array",
"items": {
"type": "string"
}
},
"index": {
"type": "integer"
}
}
},
"guardian.GuardianSetResponse": {
"type": "object",
"properties": {
"guardianSet": {
"$ref": "#/definitions/guardian.GuardianSet"
}
}
},
"heartbeats.HeartbeatNetworkResponse": {
"type": "object",
"properties": {
"contractAddress": {
"type": "string"
},
"errorCount": {
"type": "string"
},
"height": {
"type": "string"
},
"id": {
"type": "integer"
}
}
},
"heartbeats.HeartbeatResponse": {
"type": "object",
"properties": {
"p2pNodeAddr": {
"type": "string"
},
"rawHeartbeat": {
"$ref": "#/definitions/heartbeats.RawHeartbeat"
},
"verifiedGuardianAddr": {
"type": "string"
}
}
},
"heartbeats.HeartbeatsResponse": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"$ref": "#/definitions/heartbeats.HeartbeatResponse"
}
}
}
},
"heartbeats.RawHeartbeat": {
"type": "object",
"properties": {
"bootTimestamp": {
"type": "string"
},
"counter": {
"type": "integer"
},
"features": {
"type": "array",
"items": {
"type": "string"
}
},
"guardianAddr": {
"type": "string"
},
"networks": {
"type": "array",
"items": {
"$ref": "#/definitions/heartbeats.HeartbeatNetworkResponse"
}
},
"nodeName": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"vaa.ChainID": {
"type": "integer",
"enum": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
26,
10001
],
"x-enum-varnames": [
"ChainIDUnset",
"ChainIDSolana",
"ChainIDEthereum",
"ChainIDTerra",
"ChainIDBSC",
"ChainIDPolygon",
"ChainIDAvalanche",
"ChainIDOasis",
"ChainIDAlgorand",
"ChainIDAurora",
"ChainIDFantom",
"ChainIDKarura",
"ChainIDAcala",
"ChainIDKlaytn",
"ChainIDCelo",
"ChainIDNear",
"ChainIDMoonbeam",
"ChainIDNeon",
"ChainIDTerra2",
"ChainIDInjective",
"ChainIDPythNet",
"ChainIDEthereumRopsten"
]
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "",
BasePath: "/v1",
Schemes: []string{},
Title: "Wormhole Guardian API",
Description: "Wormhole Guardian API\n\nIt is used to provide a way to interact with the Wormhole Network.\nCheck each endpoint documentation for more information.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}