Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: re-add validator-vesting legacy rest endpoints #1542

Merged
merged 3 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

**As of v0.16.2+, changes are documented in [Kava's Github Releases](https://github.com/Kava-Labs/kava/releases/).**
## Deprecated

* (x/validator-vesting) [#1542] Deprecate legacy circulating and total supply
rest endpoints.

## [v0.16.1](https://github.com/Kava-Labs/kava/releases/tag/v0.16.1)

Expand Down Expand Up @@ -151,3 +154,5 @@ Bump tendermint version to 0.32.10 to address [cosmos security advisory Lavender
### Improvements

[\#257](https://github.com/Kava-Labs/kava/pulls/257) Include scripts to run large-scale simulations remotely using aws-batch

[#1542]: https://github.com/Kava-Labs/kava/pulls/1542
4 changes: 4 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ import (
swapkeeper "github.com/kava-labs/kava/x/swap/keeper"
swaptypes "github.com/kava-labs/kava/x/swap/types"
validatorvesting "github.com/kava-labs/kava/x/validator-vesting"
validatorvestingrest "github.com/kava-labs/kava/x/validator-vesting/client/rest"
validatorvestingtypes "github.com/kava-labs/kava/x/validator-vesting/types"
)

Expand Down Expand Up @@ -1056,6 +1057,9 @@ func (app *App) SimulationManager() *module.SimulationManager {
func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
clientCtx := apiSvr.ClientCtx

// Register custom REST routes
validatorvestingrest.RegisterRoutes(clientCtx, apiSvr.Router)

// Register GRPC Gateway routes
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
Expand Down
6 changes: 6 additions & 0 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@
}
]
}
},
{
"url": "./client/docs/legacy-swagger.yml",
"dereference": {
"circular": "ignore"
}
}
]
}
163 changes: 163 additions & 0 deletions client/docs/legacy-swagger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
---
swagger: "2.0"
info:
version: "3.0"
title: Kava Light Client RPC
description: A REST interface for state queries, transaction generation and broadcasting.
tags:
- name: Vesting
description: Validator vesting module APIs
schemes:
- https
host: api.data.kava.io
securityDefinitions:
kms:
type: basic
paths:
/vesting/circulatingsupply:
get:
deprecated: true
summary: Get the current circulating supply of KAVA
tags:
- Vesting
produces:
- application/json
responses:
200:
description: KAVA circulating supply
schema:
properties:
height:
type: string
example: "100"
result:
type: string
example: "81443180"
500:
description: Server internal error
/vesting/totalsupply:
get:
deprecated: true
summary: Get the total supply of KAVA
tags:
- Vesting
produces:
- application/json
responses:
200:
description: KAVA total supply
schema:
properties:
height:
type: string
example: "100"
result:
type: string
example: "120000000"
500:
description: Server internal error
/vesting/circulatingsupplyhard:
get:
deprecated: true
summary: Get the current circulating supply of HARD
tags:
- Vesting
produces:
- application/json
responses:
200:
description: HARD circulating supply
schema:
properties:
height:
type: string
example: "100"
result:
type: string
example: "63750000"
500:
description: Server internal error
/vesting/totalsupplyhard:
get:
deprecated: true
summary: Get the total supply of HARD
tags:
- Vesting
produces:
- application/json
responses:
200:
description: HARD total supply
schema:
properties:
height:
type: string
example: "100"
result:
type: string
example: "200000000"
500:
description: Server internal error
/vesting/circulatingsupplyswp:
get:
deprecated: true
summary: Get the current circulating supply of SWP
tags:
- Vesting
produces:
- application/json
responses:
200:
description: SWP circulating supply
schema:
properties:
height:
type: string
example: "100"
result:
type: string
example: "63750000"
500:
description: Server internal error
/vesting/circulatingsupplyusdx:
get:
deprecated: true
summary: Get the current circulating supply of USDX
tags:
- Vesting
produces:
- application/json
responses:
200:
description: USDX circulating supply
schema:
properties:
height:
type: string
example: "100"
result:
type: string
example: "63750000"
500:
description: Server internal error
/vesting/totalsupplyusdx:
get:
deprecated: true
summary: Get the total supply of USDX
tags:
- Vesting
produces:
- application/json
responses:
200:
description: USDX total supply
schema:
properties:
height:
type: string
example: "100"
result:
type: string
example: "200000000"
500:
description: Server internal error
150 changes: 150 additions & 0 deletions client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57868,6 +57868,153 @@ paths:
format: boolean
tags:
- IBC
/vesting/circulatingsupply:
get:
deprecated: true
summary: Get the current circulating supply of KAVA
tags:
- Vesting
produces:
- application/json
responses:
'200':
description: KAVA circulating supply
schema:
properties:
height:
type: string
example: '100'
result:
type: string
example: '81443180'
'500':
description: Server internal error
/vesting/totalsupply:
get:
deprecated: true
summary: Get the total supply of KAVA
tags:
- Vesting
produces:
- application/json
responses:
'200':
description: KAVA total supply
schema:
properties:
height:
type: string
example: '100'
result:
type: string
example: '120000000'
'500':
description: Server internal error
/vesting/circulatingsupplyhard:
get:
deprecated: true
summary: Get the current circulating supply of HARD
tags:
- Vesting
produces:
- application/json
responses:
'200':
description: HARD circulating supply
schema:
properties:
height:
type: string
example: '100'
result:
type: string
example: '63750000'
'500':
description: Server internal error
/vesting/totalsupplyhard:
get:
deprecated: true
summary: Get the total supply of HARD
tags:
- Vesting
produces:
- application/json
responses:
'200':
description: HARD total supply
schema:
properties:
height:
type: string
example: '100'
result:
type: string
example: '200000000'
'500':
description: Server internal error
/vesting/circulatingsupplyswp:
get:
deprecated: true
summary: Get the current circulating supply of SWP
tags:
- Vesting
produces:
- application/json
responses:
'200':
description: SWP circulating supply
schema:
properties:
height:
type: string
example: '100'
result:
type: string
example: '63750000'
'500':
description: Server internal error
/vesting/circulatingsupplyusdx:
get:
deprecated: true
summary: Get the current circulating supply of USDX
tags:
- Vesting
produces:
- application/json
responses:
'200':
description: USDX circulating supply
schema:
properties:
height:
type: string
example: '100'
result:
type: string
example: '63750000'
'500':
description: Server internal error
/vesting/totalsupplyusdx:
get:
deprecated: true
summary: Get the total supply of USDX
tags:
- Vesting
produces:
- application/json
responses:
'200':
description: USDX total supply
schema:
properties:
height:
type: string
example: '100'
result:
type: string
example: '200000000'
'500':
description: Server internal error
definitions:
cosmos.base.query.v1beta1.PageRequest:
type: object
Expand Down Expand Up @@ -94634,3 +94781,6 @@ definitions:
ready to send and receive packets.
- STATE_CLOSED: A channel has been closed and can no longer be used to send or receive
packets.
securityDefinitions:
kms:
type: basic
Loading