mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 03:55:19 +00:00
82f637649c
* R4R: BEP3 module (#370) * bep3 module scaffold from cosmos/scaffold * Populated types, keeper with HTLT msgs, module params, and scaffolding for keys, and genesis * added KavaHTLT struct, UpdateHTLT struct, resolved compilation errors * refactored kavaHTLT struct <-> msgs * Implemented params, refactored UpdateKavaHTLT to UpdateKHTLT interface * Updated keeper with byTimeIndex methods * HTLT creation flow * adjustments in prep for repo config updates * App moudle updated for bep3, MsgCreateHTLT tested, HTLT keeper methods tested * Updated bep3 params to match spec * tests for MsgRefundHTLT, MsgDepositHTLT, MsgClaimHTLT * AddHtlt cli cmd, queryHtlts cmd, added conversion funcs for binance -> cosmos types, refactored MsgCreateHTLT from binance.AccAddress to sdk.AccAddress * working edits related to bep3-deputy compatibility * removed binance-chain go sdk dependency * updated msg ValidateBasic() return to sdk.Error type * implement MsgCalculateSwapID * added MsgCalculateSwapID test, updated randomNumberHash type to []byte * removed binance type conversions * msg codec registration * clean /types directory * CLI cmds:create htlt, query htlt * update keeper logic * handle MsgCreateHTLT * implement htlt type, msg types * implement global chain types * update querier * added go-ethereum to go mod * refactor QuerySwap to QueryHTLT * update HTLTMsg to MsgCreateHTLT * implemented htlt deposit * add token transfer to MsgCreateHTLT * implement refund, claim client txs * add refund/claim cmds to tx cmd * commiting go.sum for build * implemented keeper claim logic * add RandomNumberHash to create-htlt event * implement refund keeper logic * AddHTLT updated to CreateHTLT * added params keeper * updated params to single chain, added sample genesis file * implemented htlt keeper param checks * removed go-ethereum dependency * updated go.sum * housekeeping on keeper tests * updated cli tx cmds * ran go.tidy * remove links from module readme * updated coin construction in tests * added expectedIncome checks in ValidateBasic() * made ValidateAsset() more robust * update param format for tests * added basic HTLTByTime index * implement abci, fix expectedIncome validation * byTime index updated to blocks, added swap ID & expiration block to htlt * added not-expired check to HTLT claims * cross-chain mint/burn logic, htlt string type refactored to []byte * fix bnb_deputy_address param * remove abci panic * cmn.HexBytes, byTime index iteration update, claim-mint logic update * update genesis example * general codebase cleaning * renamed HTLT to AtomicSwap * staging for PR * updated naming conventions * refactor + revisions * removed code related to deposits & swap block index * added timestamp validation comment * post-refactor housekeeping * post refactor housekeeping (keeper) * remove GenesisAtomicSwap type * refactor asset supply logic * BeginBlocker expires swaps automatically * param asset.limit type updated to sdk.Int * remove claimed swaps from block index * fix DefaultDeputyAddress * removed BaseSwap * revisions * total genesis coins * updated tx examples * Automatically update fees for risky cdps (#381) * wip: sketch implementation * adding initial function to calcuate risky fees for cdps * adding todo comment to fix the function arguments * changing the function arguments * adding multiplication, print error, change types * get the number of periods, add comments and questios for code review * adding specification notes * removing old comment * replace collateral with collateral denom * remove todo and clarify comment * Update x/cdp/keeper/fees.go Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * Update x/cdp/keeper/fees.go Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * Update go.sum Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * Update x/cdp/keeper/fees.go Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * Update x/cdp/keeper/fees.go Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * Update x/cdp/keeper/fees.go Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * Update x/cdp/abci.go Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * updating fees * error handling and propogation * fix collat denom variable * fix build issues, error, variable names, parameter type * Update x/cdp/abci.go Use `err` as name instead of `e` Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * Update x/cdp/keeper/fees.go Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * fixing error variable name * changing call to method to compute risky cdps fees * changing the calcualation to select risky cdps to be based on normalized ratio * adding skeleton for test methods, adding skeleton helper function for creating cdps for use in tests * fixing function call to helper method * fix assignment, calling function that returns two variables instead of one * adding comment and fixing call to create cdps * adding create cdps function and updating / fixing the test. one of the expected tests is failing, need to figure out why that is. added a todo question to note it * logging the cdp object before and after updating. it seems that the fees are not set / written before or after * adding interim changed * updated * fixing normalized ratio * code cleanup * changing print of accumulated fees * removing debug code * remove completed todo * remove old variable * remove spewing print statement * remove dead todo * adding note about prices for future * remove dead code * try to fix test * fix types * fix types * fix context in call * changing back as new version breaks a test * fix * cleanup, removing logging and old code * remove dead code * removing changes to cdp test * Update x/cdp/keeper/fees.go Remove old comment as suggested Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * Update x/cdp/spec/04_begin_block.md Fix typo as suggested Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> Co-authored-by: Kevin Davis <karzak@users.noreply.github.com> * Add Savings Rate (#365) * fix: ensure cdp module accounts created at gensis * feat: add savings rate * chore: update alias * fix: update default test param values * chore: update spec for savings rate * fix: add distribution time to genesis state * fix: iterate over accounts using callback function * feat: use seprate mod account for savings rate * fix: remove mod account coins from total supply * address review comments * fix: genesis function initialization * fix: update alias * add comment about maintaining module account list * feat: add genesis example * R4R: bep3 module upgrades (#388) * bep3 module scaffold from cosmos/scaffold * Populated types, keeper with HTLT msgs, module params, and scaffolding for keys, and genesis * added KavaHTLT struct, UpdateHTLT struct, resolved compilation errors * refactored kavaHTLT struct <-> msgs * Implemented params, refactored UpdateKavaHTLT to UpdateKHTLT interface * Updated keeper with byTimeIndex methods * HTLT creation flow * adjustments in prep for repo config updates * App moudle updated for bep3, MsgCreateHTLT tested, HTLT keeper methods tested * Updated bep3 params to match spec * tests for MsgRefundHTLT, MsgDepositHTLT, MsgClaimHTLT * AddHtlt cli cmd, queryHtlts cmd, added conversion funcs for binance -> cosmos types, refactored MsgCreateHTLT from binance.AccAddress to sdk.AccAddress * working edits related to bep3-deputy compatibility * removed binance-chain go sdk dependency * updated msg ValidateBasic() return to sdk.Error type * implement MsgCalculateSwapID * added MsgCalculateSwapID test, updated randomNumberHash type to []byte * removed binance type conversions * msg codec registration * clean /types directory * CLI cmds:create htlt, query htlt * update keeper logic * handle MsgCreateHTLT * implement htlt type, msg types * implement global chain types * update querier * added go-ethereum to go mod * refactor QuerySwap to QueryHTLT * update HTLTMsg to MsgCreateHTLT * implemented htlt deposit * add token transfer to MsgCreateHTLT * implement refund, claim client txs * add refund/claim cmds to tx cmd * commiting go.sum for build * implemented keeper claim logic * add RandomNumberHash to create-htlt event * implement refund keeper logic * AddHTLT updated to CreateHTLT * added params keeper * updated params to single chain, added sample genesis file * implemented htlt keeper param checks * removed go-ethereum dependency * updated go.sum * housekeeping on keeper tests * updated cli tx cmds * ran go.tidy * remove links from module readme * updated coin construction in tests * added expectedIncome checks in ValidateBasic() * made ValidateAsset() more robust * update param format for tests * added basic HTLTByTime index * implement abci, fix expectedIncome validation * byTime index updated to blocks, added swap ID & expiration block to htlt * added not-expired check to HTLT claims * cross-chain mint/burn logic, htlt string type refactored to []byte * fix bnb_deputy_address param * remove abci panic * cmn.HexBytes, byTime index iteration update, claim-mint logic update * update genesis example * general codebase cleaning * renamed HTLT to AtomicSwap * staging for PR * updated naming conventions * refactor + revisions * removed code related to deposits & swap block index * added timestamp validation comment * post-refactor housekeeping * post refactor housekeeping (keeper) * remove GenesisAtomicSwap type * refactor asset supply logic * BeginBlocker expires swaps automatically * param asset.limit type updated to sdk.Int * remove claimed swaps from block index * fix DefaultDeputyAddress * removed BaseSwap * revisions * total genesis coins * updated tx examples * timestamp to unix * add past timestamp limit * update random number byte encoding * add recipient_other_chain to AtomicSwap * add TODO for timestamp arg parsing * generate secure random numbers * update tx cli * keeper tests * add bnb token * bep3 params test set up, test CreateAtomicSwap * swap table tests * Revert "bep3 params test set up, test CreateAtomicSwap" This reverts commits containing tests. * use tmtime.Now() * Kava distribution module (#387) * wip: kavadist module structure * feat: implement minting logic * wip: sketch module * wip: module level code * wip: bug fixes * wip: add tests * wip: resolve todos and tidy * fix: remove unused file * address review comments * fix: update genesis for guide (#394) * add kava_dist to sample genesis file (#396) * R4R: BEP3 module test suite (#395) * refactor secure rng * refactor common tests, implement keeper tests * implement asset tests * implement params, querier tests * implement keeper swap tests * refactor import naming conventions * implement core types tests * improve keeper swap tests * implement genesis types test * implement params test + revisions * implement duplicate swap test * implement duplicate swap ID test * R4R: BEP3 additional features + module test suite (#397) * update and reorder errors * implement swap deletion block delay * add swap deletion block delay, set up tests * add secure random number gen * implement AtomicSwapLongtermStorage index * fix syntax error * abci test updates * implement handler test * implement core genesis tests * update asset supply logic * implement functional asset supply * pretty print atomic swaps * requested revisions * fix test suite post merge * implement and integrate asset supply tests * update import genesis, add storage duration param * implement swap deletion ABCI test * go mod tidy * remove duplicated interface assertion * add new bep3 param to contrib genesis file * remove btc from supported assets * revisions: LongtermStorageDuration param * revisions: suite ctx, fix genesis, update contrib * implement AssetSupply type, store key, keeper * integrate supply and swaps; genesis, tests * remove legacy comments * requested revisions * update alias * Swagger Rest Automating Testing With Dredd (#390) * swagger testing and mods * fixed a test * fixed withdraw address * adding script to start the chain * fixed val rewards test * fix outstanding rewards test * fixed rewards * hooks skeleton * adding test file and hooks * updates on the hooks working * now creates a transaction and sends to the chain via rest api successfully * small fix - now works * 34 tests now passing successfully * fix print statement error * instructions on how to run the tests * changing function names when to run the hooks * adding instructions on how to setup and run the dredd tests * removing large error output file * removing binary file * removing more output logging files * creating a vote on a proposal to send to the blockchain * adding instructions on how to setup chain * adding function to get account number and sequence number * adding send msg to blockchain method * posting vote tx to blockchain - successfully prepares and sends vote to endpoint but endpoint returns 'inactive proposal with id' * successfully depositing 600 stake to a proposal * successfully depositing onto a proposal and then voting on it * got another governance test working now after submitting a vote to the blockchain * updating instructions on how to run * fixed another voting test * fixed deposits test * fixed another gov test * fix print line * fix circle ci build issue with println * improving instructions on how to build and run the hooks and dredd tests * improving instructions on how to build and run the hooks and dredd tests * finally fixed param change governance proposal test * trying to unskip tests wip * fixed gov/proposals test * fixed another test * fixed a slashing test * fixed another redelegation test * fixed another unbonding delegation test * fixed more staking tests * fixed another staking test * fixed another test * fixed more tests. 50 now passing, 15 failing * fixed mislabeled variable * managed to fix unjail test * fixed bank acct transfers test * change certain types from number to string to match the output, typo fix * another typo fix * fixed delegation test * finally figured out and fixed the latest blocks types mismatch - fixed the test * fixed staking delegators validators test * removed and noted unimplemented tests from yaml file. fixed blocks height test * fixed transcations test * adding functionality to send transfer of coins to blockchain, and to send delegations * updating the yaml to line up with a valid message format * added delegation method * adding test results showing 57 are now passing and only 5 failing * remove test yaml file from pull req * testing file updates * adding test memo * added undelegation hook method - fixed unbonding delegation test * fixed the get tx from hash test * adding not if you encounter validator set is different errors how to fix. 59 tests now passsing, 3 failing * adding test results showing 59 passing, 3 failing * finally fixed encode test - 60 tests now passing only 2 failing * adding test results 60 passing 1 failing * more test updates * finally fixed decode test - 61 tests now passing only 1 failing * test results 61 tests passing 1 failing * remove dead code * all 62 tests are now passingga swagger.yaml 0 failing * used for testing and generating transactions and testing hooks * updating run instructions * more instructions updates * updating the test file * adding note on reading from a file * refactoring code and cleanup * refactoring getting the keybase * code cleanup for address, keyname methods, remove unused code * more code cleanup around addresses * updating the instructions on how to run the dredd tests * adding comment * adding additional requirements to the go.mod dependency file * remove hardcoded home directory, read using os golang library * increase timeout in example run script * remove hardcoded home directory * reordering commands to get rid of errors if key directory is deleted * changing to use temporary directory * updating dredd timeout time * finally managed to get the script wroking using a temporary directory instead of the default * adding notes and comments * changing to use a temp directory instead of default directory * remove un-needed file * rename debugging tools folder * adding instructions to install dredd and npm * Update swagger-ui/startchain.sh Send output to dev null not to console Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * Update swagger-ui/startchain.sh Send output to dev null not to console Co-Authored-By: Kevin Davis <karzak@users.noreply.github.com> * adding new version of test.go to setup the chain * adding todo to update instructions for new workflow * updating script to start and setup the chain * updating the transaction hash test * update the start chain script to setup the chain correctly * add the script to stop the chain and the rest server * updated the instructions for the new workflow so that all the tests pass the first time * updated the instructions on how to run the tests * update instructions for printing logs or not * updating the startchain script to add messages when starting the rest server and preparing transactions * adding print messages when stop chain is completed * updating test results to just include test output and not the debug log statements * cleaning up the messages that are printed to the user * moving files to their own directory * build go test file and remove previous binary * move instructions * updating instructions now that test file is auto built * building, running dredd tests, propagating error code, shut down blockchain all in one script * fix object type to array type for block latests * cleaning up the script * rename script as it now does all the setup, test running, shutdown, and cleanup * update instructions for new workflow * adding a shell script to call from the makefile * adding a make command to build and run all the dredd tests * update instructions to run using make * updated code review comment * minor update to instructions * update remove file command so doesn't print an error if the file has already been deleted * renaming folder and test * adjust code comment * removing example test results * updating instructions to remove reference to the test results * remove old hooks file * remove obsolete code comment * remove swagger file, will change references to the other one * remove shell script, will now use the one called from make instead * renaming as underscore messes up go build * clean up script, fix return code issues * cleanup output file * fix object to array issue * add comments to explain functionality * use variables for kvd home and kvcli home, check for errors * change the kvcli home directory. need to take this from command line * take kvcli from command line parameter to golang file * take kvcli directory from command line parameter Co-authored-by: John Maheswaran <john@kava.io> Co-authored-by: Kevin Davis <karzak@users.noreply.github.com> * R4R: Update BEP3 rest endpoints + format example requests (#402) * update and reorder errors * implement swap deletion block delay * add swap deletion block delay, set up tests * add secure random number gen * implement AtomicSwapLongtermStorage index * fix syntax error * abci test updates * implement handler test * implement core genesis tests * update asset supply logic * implement functional asset supply * pretty print atomic swaps * requested revisions * fix test suite post merge * implement and integrate asset supply tests * update import genesis, add storage duration param * implement swap deletion ABCI test * go mod tidy * remove duplicated interface assertion * add new bep3 param to contrib genesis file * remove btc from supported assets * revisions: LongtermStorageDuration param * revisions: suite ctx, fix genesis, update contrib * implement AssetSupply type, store key, keeper * integrate supply and swaps; genesis, tests * remove legacy comments * requested revisions * update alias * rest queries * implement BEP3 REST txs * draft rest server readme + example json files * tested all swap rest examples * implement query swaps rest endpoint * feat: update genesis examples * fix: use post instead of put (#405) Co-authored-by: Denali Marsh <denali@kava.io> Co-authored-by: John Maheswaran <jmaheswaran@users.noreply.github.com> Co-authored-by: John Maheswaran <john@kava.io>
2758 lines
79 KiB
YAML
2758 lines
79 KiB
YAML
---
|
|
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: Transactions
|
|
description: Search, encode, or broadcast transactions.
|
|
- name: Tendermint RPC
|
|
description: Tendermint APIs, such as query blocks, transactions and validatorset
|
|
- name: Auth
|
|
description: Authenticate accounts
|
|
- name: Bank
|
|
description: Create and broadcast transactions
|
|
- name: Staking
|
|
description: Stake module APIs
|
|
- name: Governance
|
|
description: Governance module APIs
|
|
- name: Slashing
|
|
description: Slashing module APIs
|
|
- name: Distribution
|
|
description: Fee distribution module APIs
|
|
- name: Supply
|
|
description: Supply module APIs
|
|
- name: version
|
|
- name: Mint
|
|
description: Minting module APIs
|
|
- name: Misc
|
|
description: Query app version
|
|
schemes:
|
|
- https
|
|
host: data.kava.io
|
|
securityDefinitions:
|
|
kms:
|
|
type: basic
|
|
paths:
|
|
/node_info:
|
|
get:
|
|
description: Information about the connected node
|
|
summary: The properties of the connected node
|
|
tags:
|
|
- Tendermint RPC
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: Node status
|
|
schema:
|
|
type: object
|
|
properties:
|
|
application_version:
|
|
properties:
|
|
build_tags:
|
|
type: string
|
|
client_name:
|
|
type: string
|
|
commit:
|
|
type: string
|
|
go:
|
|
type: string
|
|
name:
|
|
type: string
|
|
server_name:
|
|
type: string
|
|
version:
|
|
type: string
|
|
node_info:
|
|
properties:
|
|
id:
|
|
type: string
|
|
moniker:
|
|
type: string
|
|
example: validator-name
|
|
protocol_version:
|
|
properties:
|
|
p2p:
|
|
type: string
|
|
example: 7
|
|
block:
|
|
type: string
|
|
example: 10
|
|
app:
|
|
type: string
|
|
example: 0
|
|
network:
|
|
type: string
|
|
example: kava-2
|
|
channels:
|
|
type: string
|
|
listen_addr:
|
|
type: string
|
|
example: 192.168.56.1:26656
|
|
version:
|
|
description: Tendermint version
|
|
type: string
|
|
example: 0.15.0
|
|
other:
|
|
description: more information on versions
|
|
type: object
|
|
properties:
|
|
tx_index:
|
|
type: string
|
|
example: on
|
|
rpc_address:
|
|
type: string
|
|
example: tcp://0.0.0.0:26657
|
|
500:
|
|
description: Failed to query node status
|
|
/syncing:
|
|
get:
|
|
summary: Syncing state of node
|
|
tags:
|
|
- Tendermint RPC
|
|
description: Get the syncing status of the node
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: Node syncing status
|
|
schema:
|
|
type: object
|
|
properties:
|
|
syncing:
|
|
type: boolean
|
|
500:
|
|
description: Server internal error
|
|
/blocks/latest:
|
|
get:
|
|
summary: Get the latest block
|
|
tags:
|
|
- Tendermint RPC
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: The latest block
|
|
schema:
|
|
$ref: "#/definitions/BlockQuery"
|
|
500:
|
|
description: Server internal error
|
|
/blocks/{height}:
|
|
get:
|
|
summary: Get a block at a certain height
|
|
tags:
|
|
- Tendermint RPC
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: path
|
|
name: height
|
|
description: Block height
|
|
required: true
|
|
type: number
|
|
x-example: 2
|
|
responses:
|
|
200:
|
|
description: The block at a specific height
|
|
schema:
|
|
$ref: "#/definitions/BlockQuery"
|
|
404:
|
|
description: Request block height doesn't
|
|
400:
|
|
description: Invalid height
|
|
500:
|
|
description: Server internal error
|
|
/validatorsets/latest:
|
|
get:
|
|
summary: Get the latest validator set
|
|
tags:
|
|
- Tendermint RPC
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: The validator set at the latest block height
|
|
schema:
|
|
type: object
|
|
properties:
|
|
block_height:
|
|
type: string
|
|
validators:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/TendermintValidator"
|
|
500:
|
|
description: Server internal error
|
|
/validatorsets/{height}:
|
|
get:
|
|
summary: Get a validator set a certain height
|
|
tags:
|
|
- Tendermint RPC
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: path
|
|
name: height
|
|
description: Block height
|
|
required: true
|
|
type: number
|
|
x-example: 1
|
|
responses:
|
|
200:
|
|
description: The validator set at a specific block height
|
|
schema:
|
|
type: object
|
|
properties:
|
|
block_height:
|
|
type: string
|
|
validators:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/TendermintValidator"
|
|
404:
|
|
description: Block at height not available
|
|
400:
|
|
description: Invalid height
|
|
500:
|
|
description: Server internal error
|
|
/txs/{hash}:
|
|
get:
|
|
summary: Get a Tx by hash
|
|
tags:
|
|
- Transactions
|
|
description: Retrieve a transaction using its hash.
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: path
|
|
name: hash
|
|
description: Tx hash
|
|
required: true
|
|
type: string
|
|
x-example: B901DB8552BC5F5F82E5709EC37AAD8C0F8005CDB3608E5580055CC4D0D9B275
|
|
responses:
|
|
200:
|
|
description: Tx with the provided hash
|
|
schema:
|
|
$ref: "#/definitions/TxQuery"
|
|
500:
|
|
description: Internal Server Error
|
|
/txs:
|
|
get:
|
|
tags:
|
|
- Transactions
|
|
summary: Search transactions
|
|
description: Search transactions by events.
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: query
|
|
name: message.action
|
|
type: string
|
|
description: "transaction events such as 'message.action=send' which results in the following endpoint: 'GET /txs?message.action=send'. note that each module documents its own events. look for xx_events.md in the corresponding cosmos-sdk/docs/spec directory"
|
|
x-example: "send"
|
|
- in: query
|
|
name: message.sender
|
|
type: string
|
|
description: "transaction tags with sender: 'GET /txs?message.action=send&message.sender=kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9'"
|
|
x-example: "kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9"
|
|
- in: query
|
|
name: page
|
|
description: Page number
|
|
type: integer
|
|
x-example: 1
|
|
- in: query
|
|
name: limit
|
|
description: Maximum number of items per page
|
|
type: integer
|
|
x-example: 1
|
|
- in: query
|
|
name: txheight # this should actually be tx.height but dredd doesn't handle periods in get parameter names so no period allows the test to pass
|
|
description: Transaction height
|
|
type: integer
|
|
x-example: 1
|
|
responses:
|
|
200:
|
|
description: All txs matching the provided events
|
|
schema:
|
|
$ref: "#/definitions/PaginatedQueryTxs"
|
|
400:
|
|
description: Invalid search events
|
|
500:
|
|
description: Internal Server Error
|
|
post:
|
|
tags:
|
|
- Transactions
|
|
summary: Broadcast a signed tx
|
|
description: Broadcast a signed tx to a full node
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: body
|
|
name: txBroadcast
|
|
description: The tx must be a signed StdTx. The supported broadcast modes include `"block"`(return after tx commit), `"sync"`(return afer CheckTx) and `"async"`(return right away).
|
|
required: true
|
|
schema:
|
|
type: object
|
|
properties:
|
|
tx:
|
|
$ref: "#/definitions/PostStdTx"
|
|
mode:
|
|
type: string
|
|
example: block
|
|
responses:
|
|
200:
|
|
description: Tx broadcasting result
|
|
schema:
|
|
$ref: "#/definitions/BroadcastTxCommitResult"
|
|
500:
|
|
description: Internal Server Error
|
|
/txs/encode:
|
|
post:
|
|
tags:
|
|
- Transactions
|
|
summary: Encode a transaction to the Amino wire format
|
|
description: Encode a transaction (signed or not) from JSON to base64-encoded Amino serialized bytes
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- description: ""
|
|
name: EncodeBody
|
|
in: body
|
|
required: true
|
|
schema:
|
|
type: object
|
|
$ref: "#/definitions/EncodeTx"
|
|
responses:
|
|
200:
|
|
description: The tx was successfully decoded and re-encoded
|
|
schema:
|
|
type: object
|
|
properties:
|
|
tx:
|
|
type: string
|
|
example: The base64-encoded Amino-serialized bytes for the tx
|
|
400:
|
|
description: The tx was malformatted
|
|
500:
|
|
description: Server internal error
|
|
/txs/decode:
|
|
post:
|
|
tags:
|
|
- Transactions
|
|
summary: Decode a transaction from the Amino wire format
|
|
description: Decode a transaction (signed or not) from base64-encoded Amino serialized bytes to JSON
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: body
|
|
name: tx
|
|
description: The tx to decode
|
|
required: true
|
|
schema:
|
|
type: object
|
|
properties:
|
|
tx:
|
|
type: string
|
|
example: ogEoKBapCjyoo2GaChRKWendsRagTF1ACC1nxzjVxW3xJBIU/A6hCReBn5NYI6K2dl10kCEeTfgaCgoFc3Rha2USATESEAoKCgVzdGFrZRIBMRDAmgwaQhJAdlC1HbNw+ux6lRrK3mNdmaH62NE3ThD8SswlDcnhFex7pKSNhaxE4m6TgDhosoK6EyU0LnOZKutXKECNSvO+WCIIdGVzdG1lbW8=
|
|
responses:
|
|
200:
|
|
description: The tx was successfully decoded
|
|
schema:
|
|
$ref: "#/definitions/StdTx"
|
|
400:
|
|
description: The tx was malformated
|
|
500:
|
|
description: Server internal error
|
|
/bank/balances/{address}:
|
|
get:
|
|
summary: Get the account balances
|
|
tags:
|
|
- Bank
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: path
|
|
name: address
|
|
description: Account address in bech32 format
|
|
required: true
|
|
type: string
|
|
x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
responses:
|
|
200:
|
|
description: Account balances
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
500:
|
|
description: Server internal error
|
|
/bank/accounts/{address}/transfers:
|
|
post:
|
|
summary: Send coins from one account to another
|
|
tags:
|
|
- Bank
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: path
|
|
name: address
|
|
description: Account address in bech32 format
|
|
required: true
|
|
type: string
|
|
x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9
|
|
- in: body
|
|
name: account
|
|
description: The sender and tx information
|
|
required: true
|
|
schema:
|
|
type: object
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
amount:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
responses:
|
|
200:
|
|
description: Tx was successfully generated
|
|
schema:
|
|
$ref: "#/definitions/StdTx"
|
|
400:
|
|
description: Invalid request
|
|
500:
|
|
description: Server internal error
|
|
/auth/accounts/{address}:
|
|
get:
|
|
summary: Get the account information on blockchain
|
|
tags:
|
|
- Auth
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: path
|
|
name: address
|
|
description: Account address
|
|
required: true
|
|
type: string
|
|
x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9
|
|
responses:
|
|
200:
|
|
description: Account information on the blockchain
|
|
schema:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
value:
|
|
type: object
|
|
properties:
|
|
account_number:
|
|
type: string
|
|
address:
|
|
type: string
|
|
coins:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
public_key:
|
|
$ref: "#/definitions/PublicKey"
|
|
sequence:
|
|
type: string
|
|
500:
|
|
description: Server internel error
|
|
/staking/delegators/{delegatorAddr}/delegations:
|
|
parameters:
|
|
- in: path
|
|
name: delegatorAddr
|
|
description: Bech32 AccAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9
|
|
get:
|
|
summary: Get all delegations from a delegator
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
items:
|
|
$ref: "#/definitions/Delegation"
|
|
400:
|
|
description: Invalid delegator address
|
|
500:
|
|
description: Internal Server Error
|
|
|
|
# THE BELOW ENDPOINT IS NOT IMPLEMENTED IN COSMOS, SEE:
|
|
# https://github.com/cosmos/cosmos-sdk/blob/18de630d0ae1887113e266982b51c2bf1f662edb/x/staking/client/rest/query.go
|
|
|
|
# post:
|
|
# summary: Submit delegation
|
|
# parameters:
|
|
# - in: body
|
|
# name: delegation
|
|
# description: The password of the account to remove from the KMS
|
|
# schema:
|
|
# type: object
|
|
# properties:
|
|
# base_req:
|
|
# $ref: "#/definitions/BaseReq"
|
|
# delegator_address:
|
|
# $ref: "#/definitions/Address"
|
|
# validator_address:
|
|
# $ref: "#/definitions/ValidatorAddress"
|
|
# delegation:
|
|
# $ref: "#/definitions/Coin"
|
|
# tags:
|
|
# - Staking
|
|
# consumes:
|
|
# - application/json
|
|
# produces:
|
|
# - application/json
|
|
# responses:
|
|
# 200:
|
|
# description: OK
|
|
# schema:
|
|
# $ref: "#/definitions/BroadcastTxCommitResult"
|
|
# 400:
|
|
# description: Invalid delegator address or delegation request body
|
|
# 401:
|
|
# description: Key password is wrong
|
|
# 500:
|
|
# description: Internal Server Error
|
|
/staking/delegators/{delegatorAddr}/delegations/{validatorAddr}:
|
|
parameters:
|
|
- in: path
|
|
name: delegatorAddr
|
|
description: Bech32 AccAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 OperatorAddress of validator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0
|
|
get:
|
|
summary: Query the current delegation between a delegator and a validator
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/Delegation"
|
|
400:
|
|
description: Invalid delegator address or validator address
|
|
500:
|
|
description: Internal Server Error
|
|
/staking/delegators/{delegatorAddr}/unbonding_delegations:
|
|
parameters:
|
|
- in: path
|
|
name: delegatorAddr
|
|
description: Bech32 AccAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9
|
|
get:
|
|
summary: Get all unbonding delegations from a delegator
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
items:
|
|
$ref: "#/definitions/UnbondingDelegation"
|
|
|
|
400:
|
|
description: Invalid delegator address
|
|
500:
|
|
description: Internal Server Error
|
|
|
|
# THE BELOW ENDPOINT IS NOT IMPLEMENTED IN COSMOS, SEE:
|
|
# https://github.com/cosmos/cosmos-sdk/blob/18de630d0ae1887113e266982b51c2bf1f662edb/x/staking/client/rest/query.go
|
|
|
|
# post:
|
|
# summary: Submit an unbonding delegation
|
|
# parameters:
|
|
# - in: body
|
|
# name: delegation
|
|
# description: The password of the account to remove from the KMS
|
|
# schema:
|
|
# type: object
|
|
# properties:
|
|
# base_req:
|
|
# $ref: "#/definitions/BaseReq"
|
|
# delegator_address:
|
|
# $ref: "#/definitions/Address"
|
|
# validator_address:
|
|
# $ref: "#/definitions/ValidatorAddress"
|
|
# shares:
|
|
# type: string
|
|
# example: "100"
|
|
# tags:
|
|
# - Staking
|
|
# consumes:
|
|
# - application/json
|
|
# produces:
|
|
# - application/json
|
|
# responses:
|
|
# 200:
|
|
# description: OK
|
|
# schema:
|
|
# $ref: "#/definitions/BroadcastTxCommitResult"
|
|
# 400:
|
|
# description: Invalid delegator address or unbonding delegation request body
|
|
# 401:
|
|
# description: Key password is wrong
|
|
# 500:
|
|
# description: Internal Server Error
|
|
/staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}:
|
|
parameters:
|
|
- in: path
|
|
name: delegatorAddr
|
|
description: Bech32 AccAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 OperatorAddress of validator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0
|
|
get:
|
|
summary: Query all unbonding delegations between a delegator and a validator
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/UnbondingDelegationPair"
|
|
400:
|
|
description: Invalid delegator address or validator address
|
|
500:
|
|
description: Internal Server Error
|
|
/staking/redelegations:
|
|
parameters:
|
|
- in: query
|
|
name: delegator
|
|
description: Bech32 AccAddress of Delegator
|
|
required: false
|
|
type: string
|
|
- in: query
|
|
name: validator_from
|
|
description: Bech32 ValAddress of SrcValidator
|
|
required: false
|
|
type: string
|
|
- in: query
|
|
name: validator_to
|
|
description: Bech32 ValAddress of DstValidator
|
|
required: false
|
|
type: string
|
|
get:
|
|
summary: Get all redelegations (filter by query params)
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
items:
|
|
$ref: "#/definitions/Redelegation"
|
|
500:
|
|
description: Internal Server Error
|
|
|
|
# THE BELOW ENDPOINT IS NOT IMPLEMENTED IN COSMOS, SEE:
|
|
# https://github.com/cosmos/cosmos-sdk/blob/18de630d0ae1887113e266982b51c2bf1f662edb/x/staking/client/rest/query.go
|
|
|
|
# /staking/delegators/{delegatorAddr}/redelegations:
|
|
# parameters:
|
|
# - in: path
|
|
# name: delegatorAddr
|
|
# description: Bech32 AccAddress of Delegator
|
|
# required: true
|
|
# type: string
|
|
# x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
# post:
|
|
# summary: Submit a redelegation
|
|
# parameters:
|
|
# - in: body
|
|
# name: delegation
|
|
# description: The sender and tx information
|
|
# schema:
|
|
# type: object
|
|
# properties:
|
|
# base_req:
|
|
# $ref: "#/definitions/BaseReq"
|
|
# delegator_address:
|
|
# $ref: "#/definitions/Address"
|
|
# validator_src_addresses:
|
|
# $ref: "#/definitions/ValidatorAddress"
|
|
# validator_dst_address:
|
|
# $ref: "#/definitions/ValidatorAddress"
|
|
# shares:
|
|
# type: string
|
|
# example: "100"
|
|
# tags:
|
|
# - Staking
|
|
# consumes:
|
|
# - application/json
|
|
# produces:
|
|
# - application/json
|
|
# responses:
|
|
# 200:
|
|
# description: Tx was successfully generated
|
|
# schema:
|
|
# $ref: "#/definitions/StdTx"
|
|
# 400:
|
|
# description: Invalid delegator address or redelegation request body
|
|
# 500:
|
|
# description: Internal Server Error
|
|
/staking/delegators/{delegatorAddr}/validators:
|
|
parameters:
|
|
- in: path
|
|
name: delegatorAddr
|
|
description: Bech32 AccAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9
|
|
get:
|
|
summary: Query all validators that a delegator is bonded to
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
items:
|
|
$ref: "#/definitions/Validator"
|
|
400:
|
|
description: Invalid delegator address
|
|
500:
|
|
description: Internal Server Error
|
|
/staking/delegators/{delegatorAddr}/validators/{validatorAddr}:
|
|
parameters:
|
|
- in: path
|
|
name: delegatorAddr
|
|
description: Bech32 AccAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 ValAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0
|
|
get:
|
|
summary: Query a validator that a delegator is bonded to
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/Validator"
|
|
400:
|
|
description: Invalid delegator address or validator address
|
|
500:
|
|
description: Internal Server Error
|
|
/staking/validators:
|
|
get:
|
|
summary: Get all validator candidates. By default it returns only the bonded validators.
|
|
parameters:
|
|
- in: query
|
|
name: status
|
|
type: string
|
|
description: The validator bond status. Must be either 'bonded', 'unbonded', or 'unbonding'.
|
|
x-example: bonded
|
|
- in: query
|
|
name: page
|
|
description: The page number.
|
|
type: integer
|
|
x-example: 1
|
|
- in: query
|
|
name: limit
|
|
description: The maximum number of items per page.
|
|
type: integer
|
|
x-example: 1
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
items:
|
|
$ref: "#/definitions/Validator"
|
|
500:
|
|
description: Internal Server Error
|
|
/staking/validators/{validatorAddr}:
|
|
parameters:
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 OperatorAddress of validator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0
|
|
get:
|
|
summary: Query the information from a single validator
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
# type: array // TODO what if there are multiple validators? should it be an array?
|
|
items:
|
|
$ref: "#/definitions/Validator"
|
|
400:
|
|
description: Invalid validator address
|
|
500:
|
|
description: Internal Server Error
|
|
/staking/validators/{validatorAddr}/delegations:
|
|
parameters:
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 OperatorAddress of validator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1q53rwutgpzx7szcrgzqguxyccjpzt9j44jzrtj
|
|
get:
|
|
summary: Get all delegations from a validator
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
items:
|
|
$ref: "#/definitions/Delegation"
|
|
400:
|
|
description: Invalid validator address
|
|
500:
|
|
description: Internal Server Error
|
|
/staking/validators/{validatorAddr}/unbonding_delegations:
|
|
parameters:
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 OperatorAddress of validator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1q53rwutgpzx7szcrgzqguxyccjpzt9j44jzrtj
|
|
get:
|
|
summary: Get all unbonding delegations from a validator
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
items:
|
|
$ref: "#/definitions/UnbondingDelegation"
|
|
400:
|
|
description: Invalid validator address
|
|
500:
|
|
description: Internal Server Error
|
|
/staking/pool:
|
|
get:
|
|
summary: Get the current state of the staking pool
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
loose_tokens:
|
|
type: string
|
|
bonded_tokens:
|
|
type: string
|
|
inflation_last_time:
|
|
type: string
|
|
inflation:
|
|
type: string
|
|
date_last_commission_reset:
|
|
type: string
|
|
prev_bonded_shares:
|
|
type: string
|
|
500:
|
|
description: Internal Server Error
|
|
/staking/parameters:
|
|
get:
|
|
summary: Get the current staking parameter values
|
|
tags:
|
|
- Staking
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
inflation_rate_change:
|
|
type: string
|
|
inflation_max:
|
|
type: string
|
|
inflation_min:
|
|
type: string
|
|
goal_bonded:
|
|
type: string
|
|
unbonding_time:
|
|
type: string
|
|
max_validators:
|
|
type: integer
|
|
bond_denom:
|
|
type: string
|
|
500:
|
|
description: Internal Server Error
|
|
# TODO: We need to either fix this route when the validator is not found or add a slashed validator in the contract tests
|
|
# /slashing/validators/{validatorPubKey}/signing_info:
|
|
# get:
|
|
# summary: Get sign info of given validator
|
|
# description: Get sign info of given validator
|
|
# produces:
|
|
# - application/json
|
|
# tags:
|
|
# - Slashing
|
|
# parameters:
|
|
# - type: string
|
|
# description: Bech32 validator public key
|
|
# name: validatorPubKey
|
|
# required: true
|
|
# in: path
|
|
# x-example: kavavalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf
|
|
# responses:
|
|
# 200:
|
|
# description: OK
|
|
# schema:
|
|
# $ref: "#/definitions/SigningInfo"
|
|
# 400:
|
|
# description: Invalid validator public key
|
|
# 500:
|
|
# description: Internal Server Error
|
|
/slashing/signing_infos:
|
|
get:
|
|
summary: Get sign info of given all validators
|
|
description: Get sign info of all validators
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Slashing
|
|
parameters:
|
|
- in: query
|
|
name: page
|
|
description: Page number
|
|
type: integer
|
|
required: true
|
|
x-example: 1
|
|
- in: query
|
|
name: limit
|
|
description: Maximum number of items per page
|
|
type: integer
|
|
required: true
|
|
x-example: 5
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
items:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
items:
|
|
$ref: "#/definitions/SigningInfo"
|
|
400:
|
|
description: Invalid validator public key for one of the validators
|
|
500:
|
|
description: Internal Server Error
|
|
/slashing/validators/{validatorAddr}/unjail:
|
|
post:
|
|
summary: Unjail a jailed validator
|
|
description: Send transaction to unjail a jailed validator
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Slashing
|
|
parameters:
|
|
- type: string
|
|
description: Bech32 validator address
|
|
name: validatorAddr
|
|
required: true
|
|
in: path
|
|
x-example: kavavaloper1q53rwutgpzx7szcrgzqguxyccjpzt9j44jzrtj
|
|
- description: ""
|
|
name: UnjailBody
|
|
in: body
|
|
required: true
|
|
schema:
|
|
type: object
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
responses:
|
|
200:
|
|
description: Tx was successfully generated
|
|
schema:
|
|
$ref: "#/definitions/BroadcastTxCommitResult"
|
|
400:
|
|
description: Invalid validator address or base_req
|
|
500:
|
|
description: Internal Server Error
|
|
/slashing/parameters:
|
|
get:
|
|
summary: Get the current slashing parameters
|
|
tags:
|
|
- Slashing
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
max_evidence_age:
|
|
type: string
|
|
signed_blocks_window:
|
|
type: string
|
|
min_signed_per_window:
|
|
type: string
|
|
double_sign_unbond_duration:
|
|
type: string
|
|
downtime_unbond_duration:
|
|
type: string
|
|
slash_fraction_double_sign:
|
|
type: string
|
|
slash_fraction_downtime:
|
|
type: string
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/proposals:
|
|
post:
|
|
summary: Submit a proposal
|
|
description: Send transaction to submit a proposal
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- description: valid value of `"proposal_type"` can be `"text"`, `"parameter_change"`, `"software_upgrade"`
|
|
name: post_proposal_body
|
|
in: body
|
|
required: true
|
|
schema:
|
|
type: object
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
title:
|
|
type: string
|
|
example: Test_title
|
|
description:
|
|
type: string
|
|
example: my_test_description
|
|
proposal_type:
|
|
type: string
|
|
example: "text"
|
|
proposer:
|
|
$ref: "#/definitions/Address"
|
|
initial_deposit:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
responses:
|
|
200:
|
|
description: Tx was successfully generated
|
|
schema:
|
|
$ref: "#/definitions/StdTx"
|
|
400:
|
|
description: Invalid proposal body
|
|
500:
|
|
description: Internal Server Error
|
|
get:
|
|
summary: Query proposals
|
|
description: Query proposals information with parameters
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- in: query
|
|
name: voter
|
|
description: voter address
|
|
required: false
|
|
type: string
|
|
- in: query
|
|
name: depositor
|
|
description: depositor address
|
|
required: false
|
|
type: string
|
|
- in: query
|
|
name: status
|
|
description: proposal status, valid values can be `"deposit_period"`, `"voting_period"`, `"passed"`, `"rejected"`
|
|
required: false
|
|
type: string
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/TextProposal"
|
|
400:
|
|
description: Invalid query parameters
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/proposals/param_change:
|
|
post:
|
|
summary: Generate a parameter change proposal transaction
|
|
description: Generate a parameter change proposal transaction
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- description: The parameter change proposal body that contains all parameter changes
|
|
name: post_proposal_body
|
|
in: body
|
|
required: true
|
|
schema:
|
|
type: object
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
title:
|
|
type: string
|
|
example: Param_Change
|
|
description:
|
|
type: string
|
|
example: Update_max_validators
|
|
proposer:
|
|
$ref: "#/definitions/Address"
|
|
deposit:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
changes:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/ParamChange"
|
|
responses:
|
|
200:
|
|
description: The transaction was successfully generated
|
|
schema:
|
|
$ref: "#/definitions/StdTx"
|
|
400:
|
|
description: Invalid proposal body
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/proposals/{proposalId}:
|
|
get:
|
|
summary: Query a proposal
|
|
description: Query a proposal by id
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- type: string
|
|
name: proposalId
|
|
required: true
|
|
in: path
|
|
x-example: "2"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/TextProposal"
|
|
400:
|
|
description: Invalid proposal id
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/proposals/{proposalId}/proposer:
|
|
get:
|
|
summary: Query proposer
|
|
description: Query for the proposer for a proposal
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- type: string
|
|
name: proposalId
|
|
required: true
|
|
in: path
|
|
x-example: "2"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/Proposer"
|
|
400:
|
|
description: Invalid proposal ID
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/proposals/{proposalId}/deposits:
|
|
get:
|
|
summary: Query deposits
|
|
description: Query deposits by proposalId
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- type: string
|
|
name: proposalId
|
|
required: true
|
|
in: path
|
|
x-example: "2"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Deposit"
|
|
400:
|
|
description: Invalid proposal id
|
|
500:
|
|
description: Internal Server Error
|
|
post:
|
|
summary: Deposit tokens to a proposal
|
|
description: Send transaction to deposit tokens to a proposal
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- type: string
|
|
description: proposal id
|
|
name: proposalId
|
|
required: true
|
|
in: path
|
|
x-example: "2"
|
|
- description: ""
|
|
name: post_deposit_body
|
|
in: body
|
|
required: true
|
|
schema:
|
|
type: object
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
depositor:
|
|
$ref: "#/definitions/Address"
|
|
amount:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/BroadcastTxCommitResult"
|
|
400:
|
|
description: Invalid proposal id or deposit body
|
|
401:
|
|
description: Key password is wrong
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/proposals/{proposalId}/deposits/{depositor}:
|
|
get:
|
|
summary: Query deposit
|
|
description: Query deposit by proposalId and depositor address
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- type: string
|
|
description: proposal id
|
|
name: proposalId
|
|
required: true
|
|
in: path
|
|
x-example: "2"
|
|
- type: string
|
|
description: Bech32 depositor address
|
|
name: depositor
|
|
required: true
|
|
in: path
|
|
x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/Deposit"
|
|
400:
|
|
description: Invalid proposal id or depositor address
|
|
404:
|
|
description: Found no deposit
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/proposals/{proposalId}/votes:
|
|
get:
|
|
summary: Query voters
|
|
description: Query voters information by proposalId
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- type: string
|
|
description: proposal id
|
|
name: proposalId
|
|
required: true
|
|
in: path
|
|
x-example: "2"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Vote"
|
|
400:
|
|
description: Invalid proposal id
|
|
500:
|
|
description: Internal Server Error
|
|
post:
|
|
summary: Vote a proposal
|
|
description: Send transaction to vote a proposal
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- type: string
|
|
description: proposal id
|
|
name: proposalId
|
|
required: true
|
|
in: path
|
|
x-example: "2"
|
|
- description: valid value of `"option"` field can be `"yes"`, `"no"`, `"no_with_veto"` and `"abstain"`
|
|
name: post_vote_body
|
|
in: body
|
|
required: true
|
|
schema:
|
|
type: object
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
voter:
|
|
$ref: "#/definitions/Address"
|
|
option:
|
|
type: string
|
|
example: "yes"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/BroadcastTxCommitResult"
|
|
400:
|
|
description: Invalid proposal id or vote body
|
|
401:
|
|
description: Key password is wrong
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/proposals/{proposalId}/votes/{voter}:
|
|
get:
|
|
summary: Query vote
|
|
description: Query vote information by proposal Id and voter address
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- type: string
|
|
description: proposal id
|
|
name: proposalId
|
|
required: true
|
|
in: path
|
|
x-example: "2"
|
|
- type: string
|
|
description: Bech32 voter address
|
|
name: voter
|
|
required: true
|
|
in: path
|
|
x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/Vote"
|
|
400:
|
|
description: Invalid proposal id or voter address
|
|
404:
|
|
description: Found no vote
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/proposals/{proposalId}/tally:
|
|
get:
|
|
summary: Get a proposal's tally result at the current time
|
|
description: Gets a proposal's tally result at the current time. If the proposal is pending deposits (i.e status 'DepositPeriod') it returns an empty tally result.
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
parameters:
|
|
- type: string
|
|
description: proposal id
|
|
name: proposalId
|
|
required: true
|
|
in: path
|
|
x-example: "2"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/TallyResult"
|
|
400:
|
|
description: Invalid proposal id
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/parameters/deposit:
|
|
get:
|
|
summary: Query governance deposit parameters
|
|
description: Query governance deposit parameters. The max_deposit_period units are in nanoseconds.
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
min_deposit:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
max_deposit_period:
|
|
type: string
|
|
example: "86400000000000"
|
|
400:
|
|
description: <other_path> is not a valid query request path
|
|
404:
|
|
description: Found no deposit parameters
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/parameters/tallying:
|
|
get:
|
|
summary: Query governance tally parameters
|
|
description: Query governance tally parameters
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
properties:
|
|
threshold:
|
|
type: string
|
|
example: "0.5000000000"
|
|
veto:
|
|
type: string
|
|
example: "0.3340000000"
|
|
governance_penalty:
|
|
type: string
|
|
example: "0.0100000000"
|
|
400:
|
|
description: <other_path> is not a valid query request path
|
|
404:
|
|
description: Found no tally parameters
|
|
500:
|
|
description: Internal Server Error
|
|
/gov/parameters/voting:
|
|
get:
|
|
summary: Query governance voting parameters
|
|
description: Query governance voting parameters. The voting_period units are in nanoseconds.
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Governance
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
properties:
|
|
voting_period:
|
|
type: string
|
|
example: "86400000000000"
|
|
400:
|
|
description: <other_path> is not a valid query request path
|
|
404:
|
|
description: Found no voting parameters
|
|
500:
|
|
description: Internal Server Error
|
|
/distribution/delegators/{delegatorAddr}/rewards:
|
|
parameters:
|
|
- in: path
|
|
name: delegatorAddr
|
|
description: Bech32 AccAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
get:
|
|
summary: Get the total rewards balance from all delegations
|
|
description: Get the sum of all the rewards earned by delegations by a single delegator
|
|
produces:
|
|
- application/json
|
|
tags:
|
|
- Distribution
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/DelegatorTotalRewards"
|
|
400:
|
|
description: Invalid delegator address
|
|
500:
|
|
description: Internal Server Error
|
|
post:
|
|
summary: Withdraw all the delegator's delegation rewards
|
|
description: Withdraw all the delegator's delegation rewards
|
|
tags:
|
|
- Distribution
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: body
|
|
name: Withdraw request body
|
|
schema:
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/BroadcastTxCommitResult"
|
|
400:
|
|
description: Invalid delegator address
|
|
401:
|
|
description: Key password is wrong
|
|
500:
|
|
description: Internal Server Error
|
|
/distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}:
|
|
parameters:
|
|
- in: path
|
|
name: delegatorAddr
|
|
description: Bech32 AccAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 OperatorAddress of validator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0
|
|
get:
|
|
summary: Query a delegation reward
|
|
description: Query a single delegation reward by a delegator
|
|
tags:
|
|
- Distribution
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
400:
|
|
description: Invalid delegator address
|
|
500:
|
|
description: Internal Server Error
|
|
post:
|
|
summary: Withdraw a delegation reward
|
|
description: Withdraw a delegator's delegation reward from a single validator
|
|
tags:
|
|
- Distribution
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: body
|
|
name: Withdraw request body
|
|
schema:
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/BroadcastTxCommitResult"
|
|
400:
|
|
description: Invalid delegator address or delegation body
|
|
401:
|
|
description: Key password is wrong
|
|
500:
|
|
description: Internal Server Error
|
|
/distribution/delegators/{delegatorAddr}/withdraw_address:
|
|
parameters:
|
|
- in: path
|
|
name: delegatorAddr
|
|
description: Bech32 AccAddress of Delegator
|
|
required: true
|
|
type: string
|
|
x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9
|
|
get:
|
|
summary: Get the rewards withdrawal address
|
|
description: Get the delegations' rewards withdrawal address. This is the address in which the user will receive the reward funds
|
|
tags:
|
|
- Distribution
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
$ref: "#/definitions/Address"
|
|
|
|
400:
|
|
description: Invalid delegator address
|
|
500:
|
|
description: Internal Server Error
|
|
post:
|
|
summary: Replace the rewards withdrawal address
|
|
description: Replace the delegations' rewards withdrawal address for a new one.
|
|
tags:
|
|
- Distribution
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: body
|
|
name: Withdraw request body
|
|
schema:
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
withdraw_address:
|
|
$ref: "#/definitions/Address"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/BroadcastTxCommitResult"
|
|
400:
|
|
description: Invalid delegator or withdraw address
|
|
401:
|
|
description: Key password is wrong
|
|
500:
|
|
description: Internal Server Error
|
|
/distribution/validators/{validatorAddr}:
|
|
parameters:
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 OperatorAddress of validator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0
|
|
get:
|
|
summary: Validator distribution information
|
|
description: Query the distribution information of a single validator
|
|
tags:
|
|
- Distribution
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/ValidatorDistInfo"
|
|
400:
|
|
description: Invalid validator address
|
|
500:
|
|
description: Internal Server Error
|
|
/distribution/validators/{validatorAddr}/outstanding_rewards:
|
|
parameters:
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 OperatorAddress of validator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0
|
|
get:
|
|
summary: Fee distribution outstanding rewards of a single validator
|
|
tags:
|
|
- Distribution
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
500:
|
|
description: Internal Server Error
|
|
/distribution/validators/{validatorAddr}/rewards:
|
|
parameters:
|
|
- in: path
|
|
name: validatorAddr
|
|
description: Bech32 OperatorAddress of validator
|
|
required: true
|
|
type: string
|
|
x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0
|
|
get:
|
|
summary: Commission and self-delegation rewards of a single validator
|
|
description: Query the commission and self-delegation rewards of validator.
|
|
tags:
|
|
- Distribution
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
400:
|
|
description: Invalid validator address
|
|
500:
|
|
description: Internal Server Error
|
|
post:
|
|
summary: Withdraw the validator's rewards
|
|
description: Withdraw the validator's self-delegation and commissions rewards
|
|
tags:
|
|
- Distribution
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
parameters:
|
|
- in: body
|
|
name: Withdraw request body
|
|
schema:
|
|
properties:
|
|
base_req:
|
|
$ref: "#/definitions/BaseReq"
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/BroadcastTxCommitResult"
|
|
400:
|
|
description: Invalid validator address
|
|
401:
|
|
description: Key password is wrong
|
|
500:
|
|
description: Internal Server Error
|
|
/distribution/community_pool:
|
|
get:
|
|
summary: Community pool parameters
|
|
tags:
|
|
- Distribution
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
500:
|
|
description: Internal Server Error
|
|
/distribution/parameters:
|
|
get:
|
|
summary: Fee distribution parameters
|
|
tags:
|
|
- Distribution
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
properties:
|
|
base_proposer_reward:
|
|
type: string
|
|
bonus_proposer_reward:
|
|
type: string
|
|
community_tax:
|
|
type: string
|
|
500:
|
|
description: Internal Server Error
|
|
/minting/parameters:
|
|
get:
|
|
summary: Minting module parameters
|
|
tags:
|
|
- Mint
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
properties:
|
|
mint_denom:
|
|
type: string
|
|
inflation_rate_change:
|
|
type: string
|
|
inflation_max:
|
|
type: string
|
|
inflation_min:
|
|
type: string
|
|
goal_bonded:
|
|
type: string
|
|
blocks_per_year:
|
|
type: string
|
|
500:
|
|
description: Internal Server Error
|
|
/minting/inflation:
|
|
get:
|
|
summary: Current minting inflation value
|
|
tags:
|
|
- Mint
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/StandardResponse"
|
|
500:
|
|
description: Internal Server Error
|
|
/minting/annual-provisions:
|
|
get:
|
|
summary: Current minting annual provisions value
|
|
tags:
|
|
- Mint
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/StandardResponse"
|
|
500:
|
|
description: Internal Server Error
|
|
/supply/total:
|
|
get:
|
|
summary: Total supply of coins in the chain
|
|
tags:
|
|
- Supply
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/Supply"
|
|
500:
|
|
description: Internal Server Error
|
|
/supply/total/{denomination}:
|
|
parameters:
|
|
- in: path
|
|
name: denomination
|
|
description: Coin denomination
|
|
required: true
|
|
type: string
|
|
x-example: uatom
|
|
get:
|
|
summary: Total supply of a single coin denomination
|
|
tags:
|
|
- Supply
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
200:
|
|
description: OK
|
|
schema:
|
|
$ref: "#/definitions/StandardResponse"
|
|
400:
|
|
description: Invalid coin denomination
|
|
500:
|
|
description: Internal Server Error
|
|
definitions:
|
|
CheckTxResult:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: integer
|
|
data:
|
|
type: string
|
|
gas_used:
|
|
type: integer
|
|
gas_wanted:
|
|
type: integer
|
|
info:
|
|
type: string
|
|
log:
|
|
type: string
|
|
tags:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/KVPair"
|
|
example:
|
|
code: 0
|
|
data: data
|
|
log: log
|
|
gas_used: 5000
|
|
gas_wanted: 10000
|
|
info: info
|
|
tags:
|
|
- ""
|
|
- ""
|
|
DeliverTxResult:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: integer
|
|
data:
|
|
type: string
|
|
gas_used:
|
|
type: integer
|
|
gas_wanted:
|
|
type: integer
|
|
info:
|
|
type: string
|
|
log:
|
|
type: string
|
|
tags:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/KVPair"
|
|
example:
|
|
code: 5
|
|
data: data
|
|
log: log
|
|
gas_used: 5000
|
|
gas_wanted: 10000
|
|
info: info
|
|
tags:
|
|
- ""
|
|
- ""
|
|
BroadcastTxCommitResult:
|
|
type: object
|
|
properties:
|
|
check_tx:
|
|
$ref: "#/definitions/CheckTxResult"
|
|
deliver_tx:
|
|
$ref: "#/definitions/DeliverTxResult"
|
|
hash:
|
|
$ref: "#/definitions/Hash"
|
|
height:
|
|
type: string
|
|
KVPair:
|
|
type: object
|
|
properties:
|
|
key:
|
|
type: string
|
|
value:
|
|
type: string
|
|
Msg:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
example: "cosmos-sdk/MsgSend"
|
|
value:
|
|
type: object
|
|
properties:
|
|
from_address:
|
|
type: string
|
|
example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
to_address:
|
|
type: string
|
|
example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz
|
|
amount:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
PostMsg:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
example: "cosmos-sdk/MsgSend"
|
|
value:
|
|
type: object
|
|
properties:
|
|
from_address:
|
|
type: string
|
|
example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
to_address:
|
|
type: string
|
|
example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz
|
|
amount:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/PostCoin1"
|
|
|
|
|
|
Address:
|
|
type: string
|
|
description: bech32 encoded address
|
|
example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c
|
|
ValidatorAddress:
|
|
type: string
|
|
description: bech32 encoded address
|
|
example: kavavaloper1q53rwutgpzx7szcrgzqguxyccjpzt9j44jzrtj
|
|
Coin:
|
|
type: object
|
|
properties:
|
|
denom:
|
|
type: string
|
|
example: stake
|
|
amount:
|
|
type: string
|
|
example: "1"
|
|
PostCoin1:
|
|
type: object
|
|
properties:
|
|
denom:
|
|
type: string
|
|
example: stake
|
|
amount:
|
|
type: string
|
|
example: "2000000"
|
|
PostCoin2:
|
|
type: object
|
|
properties:
|
|
denom:
|
|
type: string
|
|
example: stake
|
|
amount:
|
|
type: string
|
|
example: "2000"
|
|
Hash:
|
|
type: string
|
|
example: EE5F3404034C524501629B56E0DDC38FAD651F04
|
|
Signature:
|
|
type: object
|
|
properties:
|
|
signature:
|
|
type: string
|
|
example: "dlC1HbNw+ux6lRrK3mNdmaH62NE3ThD8SswlDcnhFex7pKSNhaxE4m6TgDhosoK6EyU0LnOZKutXKECNSvO+WA=="
|
|
pubkey:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
example: "tendermint/PubKeySecp256k1"
|
|
value:
|
|
type: string
|
|
example: "AmWAim83Qp+kIcj3RT7i327b3l0EHwzCrGVGXusb70B7"
|
|
|
|
PostSignature:
|
|
type: object
|
|
properties:
|
|
signature:
|
|
type: string
|
|
example: "KzBeQp/2+47oiqc16BImnOYidSAesZ3kgR3S8Fy+baFlvDlDv7goU/+rm4c7+woudNte3uZAG0CuUeHsF+Ld8Q=="
|
|
pubkey:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
example: "tendermint/PubKeySecp256k1"
|
|
value:
|
|
type: string
|
|
example: "AmWAim83Qp+kIcj3RT7i327b3l0EHwzCrGVGXusb70B7"
|
|
|
|
TxQuery:
|
|
type: object
|
|
properties:
|
|
hash:
|
|
type: string
|
|
example: "D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656"
|
|
height:
|
|
type: string
|
|
example: "368"
|
|
tx:
|
|
$ref: "#/definitions/StdTx"
|
|
result:
|
|
type: object
|
|
properties:
|
|
log:
|
|
type: string
|
|
gas_wanted:
|
|
type: string
|
|
example: "200000"
|
|
gas_used:
|
|
type: string
|
|
example: "26354"
|
|
tags:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/KVPair"
|
|
PaginatedQueryTxs:
|
|
type: object
|
|
properties:
|
|
total_count:
|
|
type: string
|
|
example: "1"
|
|
count:
|
|
type: string
|
|
example: "1"
|
|
page_number:
|
|
type: string
|
|
example: "1"
|
|
page_total:
|
|
type: string
|
|
example: "1"
|
|
limit:
|
|
type: string
|
|
example: "30"
|
|
txs:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/TxQuery"
|
|
StdTx:
|
|
type: object
|
|
properties:
|
|
msg:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Msg"
|
|
fee:
|
|
type: object
|
|
properties:
|
|
gas:
|
|
type: string
|
|
example: "200000"
|
|
amount:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
memo:
|
|
type: string
|
|
example: "testmemo"
|
|
signatures:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Signature"
|
|
|
|
PostStdTx:
|
|
type: object
|
|
properties:
|
|
msg:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/PostMsg"
|
|
fee:
|
|
type: object
|
|
properties:
|
|
gas:
|
|
type: string
|
|
example: "200000"
|
|
amount:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/PostCoin2"
|
|
memo:
|
|
type: string
|
|
example: ""
|
|
signatures:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/PostSignature"
|
|
|
|
EncodeTx:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
example: "cosmos-sdk/StdTx"
|
|
value:
|
|
type: object
|
|
$ref: "#/definitions/StdTx"
|
|
BlockID:
|
|
type: object
|
|
properties:
|
|
hash:
|
|
$ref: "#/definitions/Hash"
|
|
parts:
|
|
type: object
|
|
properties:
|
|
total:
|
|
type: string
|
|
example: "0"
|
|
hash:
|
|
$ref: "#/definitions/Hash"
|
|
BlockHeader:
|
|
type: object
|
|
properties:
|
|
chain_id:
|
|
type: string
|
|
example: kavahub-2
|
|
height:
|
|
type: string
|
|
example: "1"
|
|
time:
|
|
type: string
|
|
example: "2017-12-30T05:53:09.287+01:00"
|
|
num_txs:
|
|
type: string
|
|
example: "0"
|
|
last_block_id:
|
|
$ref: "#/definitions/BlockID"
|
|
total_txs:
|
|
type: string
|
|
example: "35"
|
|
last_commit_hash:
|
|
$ref: "#/definitions/Hash"
|
|
data_hash:
|
|
$ref: "#/definitions/Hash"
|
|
validators_hash:
|
|
$ref: "#/definitions/Hash"
|
|
next_validators_hash:
|
|
$ref: "#/definitions/Hash"
|
|
consensus_hash:
|
|
$ref: "#/definitions/Hash"
|
|
app_hash:
|
|
$ref: "#/definitions/Hash"
|
|
last_results_hash:
|
|
$ref: "#/definitions/Hash"
|
|
evidence_hash:
|
|
$ref: "#/definitions/Hash"
|
|
proposer_address:
|
|
$ref: "#/definitions/Address"
|
|
version:
|
|
type: object
|
|
properties:
|
|
block:
|
|
type: string
|
|
example: 10
|
|
app:
|
|
type: string
|
|
example: 0
|
|
Block:
|
|
type: object
|
|
properties:
|
|
header:
|
|
$ref: "#/definitions/BlockHeader"
|
|
data:
|
|
type: object
|
|
properties:
|
|
txs:
|
|
type: array
|
|
x-nullable: true
|
|
evidence:
|
|
type: object
|
|
properties:
|
|
evidence:
|
|
type: object
|
|
x-nullable: true
|
|
last_commit:
|
|
type: object
|
|
properties:
|
|
block_id:
|
|
$ref: "#/definitions/BlockID"
|
|
precommits:
|
|
# have to use an 'object' type for precommits as it is nullable
|
|
$ref: '#/definitions/Precommits'
|
|
Precommits:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
validator_address:
|
|
type: string
|
|
validator_index:
|
|
type: string
|
|
example: "0"
|
|
height:
|
|
type: string
|
|
example: "2"
|
|
round:
|
|
type: string
|
|
example: "0"
|
|
timestamp:
|
|
type: string
|
|
example: "2017-12-30T05:53:09.287+01:00"
|
|
type:
|
|
type: number
|
|
example: 2
|
|
block_id:
|
|
$ref: "#/definitions/BlockID"
|
|
signature:
|
|
type: string
|
|
example: "7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ=="
|
|
|
|
BlockQuery:
|
|
type: object
|
|
properties:
|
|
block_meta:
|
|
type: object
|
|
properties:
|
|
header:
|
|
$ref: "#/definitions/BlockHeader"
|
|
block_id:
|
|
$ref: "#/definitions/BlockID"
|
|
block:
|
|
$ref: "#/definitions/Block"
|
|
DelegationDelegatorReward:
|
|
type: object
|
|
properties:
|
|
validator_address:
|
|
$ref: "#/definitions/ValidatorAddress"
|
|
reward:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
DelegatorTotalRewards:
|
|
type: object
|
|
properties:
|
|
rewards:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/DelegationDelegatorReward"
|
|
total:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
BaseReq:
|
|
type: object
|
|
properties:
|
|
from:
|
|
type: string
|
|
example: "kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9"
|
|
description: Sender address or Keybase name to generate a transaction
|
|
memo:
|
|
type: string
|
|
example: Sent_via_Kava
|
|
chain_id:
|
|
type: string
|
|
example: "Cosmos-Hub"
|
|
account_number:
|
|
type: string
|
|
example: "0"
|
|
sequence:
|
|
type: string
|
|
example: "1"
|
|
gas:
|
|
type: string
|
|
example: "200000"
|
|
gas_adjustment:
|
|
type: string
|
|
example: "1.2"
|
|
fees:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
simulate:
|
|
type: boolean
|
|
example: false
|
|
description: Estimate gas for a transaction (cannot be used in conjunction with generate_only)
|
|
TendermintValidator:
|
|
type: object
|
|
properties:
|
|
address:
|
|
$ref: "#/definitions/ValidatorAddress"
|
|
pub_key:
|
|
type: string
|
|
example: kavavalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf
|
|
voting_power:
|
|
type: string
|
|
example: "1000"
|
|
proposer_priority:
|
|
type: string
|
|
example: "1000"
|
|
TextProposal:
|
|
type: object
|
|
properties:
|
|
proposal_id:
|
|
type: integer
|
|
title:
|
|
type: string
|
|
description:
|
|
type: string
|
|
proposal_type:
|
|
type: string
|
|
proposal_status:
|
|
type: string
|
|
final_tally_result:
|
|
$ref: "#/definitions/TallyResult"
|
|
submit_time:
|
|
type: string
|
|
total_deposit:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
voting_start_time:
|
|
type: string
|
|
Proposer:
|
|
type: object
|
|
properties:
|
|
proposal_id:
|
|
type: string
|
|
proposer:
|
|
type: string
|
|
Deposit:
|
|
type: object
|
|
properties:
|
|
amount:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
proposal_id:
|
|
type: string
|
|
depositor:
|
|
$ref: "#/definitions/Address"
|
|
TallyResult:
|
|
type: object
|
|
properties:
|
|
yes:
|
|
type: string
|
|
example: "0.0000000000"
|
|
abstain:
|
|
type: string
|
|
example: "0.0000000000"
|
|
no:
|
|
type: string
|
|
example: "0.0000000000"
|
|
no_with_veto:
|
|
type: string
|
|
example: "0.0000000000"
|
|
Vote:
|
|
type: object
|
|
properties:
|
|
voter:
|
|
type: string
|
|
proposal_id:
|
|
type: string
|
|
option:
|
|
type: string
|
|
Validator:
|
|
type: object
|
|
properties:
|
|
operator_address:
|
|
$ref: "#/definitions/ValidatorAddress"
|
|
consensus_pubkey:
|
|
type: string
|
|
example: kavavalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf
|
|
jailed:
|
|
type: boolean
|
|
status:
|
|
type: integer
|
|
tokens:
|
|
type: string
|
|
delegator_shares:
|
|
type: string
|
|
description:
|
|
type: object
|
|
properties:
|
|
moniker:
|
|
type: string
|
|
identity:
|
|
type: string
|
|
website:
|
|
type: string
|
|
security_contact:
|
|
type: string
|
|
details:
|
|
type: string
|
|
bond_height:
|
|
type: string
|
|
example: "0"
|
|
bond_intra_tx_counter:
|
|
type: integer
|
|
example: 0
|
|
unbonding_height:
|
|
type: string
|
|
example: "0"
|
|
unbonding_time:
|
|
type: string
|
|
example: "1970-01-01T00:00:00Z"
|
|
commission:
|
|
type: object
|
|
properties:
|
|
rate:
|
|
type: string
|
|
example: "0"
|
|
max_rate:
|
|
type: string
|
|
example: "0"
|
|
max_change_rate:
|
|
type: string
|
|
example: "0"
|
|
update_time:
|
|
type: string
|
|
example: "1970-01-01T00:00:00Z"
|
|
Delegation:
|
|
type: object
|
|
properties:
|
|
delegator_address:
|
|
type: string
|
|
validator_address:
|
|
type: string
|
|
shares:
|
|
type: string
|
|
balance:
|
|
$ref: "#/definitions/Coin"
|
|
UnbondingDelegationPair:
|
|
type: object
|
|
properties:
|
|
delegator_address:
|
|
type: string
|
|
validator_address:
|
|
type: string
|
|
entries:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/UnbondingEntries"
|
|
UnbondingEntries:
|
|
type: object
|
|
properties:
|
|
initial_balance:
|
|
type: string
|
|
balance:
|
|
type: string
|
|
creation_height:
|
|
type: string
|
|
min_time:
|
|
type: string
|
|
UnbondingDelegation:
|
|
type: object
|
|
properties:
|
|
delegator_address:
|
|
type: string
|
|
validator_address:
|
|
type: string
|
|
initial_balance:
|
|
type: string
|
|
balance:
|
|
type: string
|
|
creation_height:
|
|
type: integer
|
|
min_time:
|
|
type: integer
|
|
Redelegation:
|
|
type: object
|
|
properties:
|
|
delegator_address:
|
|
type: string
|
|
validator_src_address:
|
|
type: string
|
|
validator_dst_address:
|
|
type: string
|
|
entries:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Redelegation"
|
|
RedelegationEntry:
|
|
type: object
|
|
properties:
|
|
creation_height:
|
|
type: integer
|
|
completion_time:
|
|
type: integer
|
|
initial_balance:
|
|
type: string
|
|
balance:
|
|
type: string
|
|
shares_dst:
|
|
type: string
|
|
ValidatorDistInfo:
|
|
type: object
|
|
properties:
|
|
operator_address:
|
|
$ref: "#/definitions/ValidatorAddress"
|
|
self_bond_rewards:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
val_commission:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
PublicKey:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
value:
|
|
type: string
|
|
SigningInfo:
|
|
type: object
|
|
properties:
|
|
start_height:
|
|
type: string
|
|
index_offset:
|
|
type: string
|
|
jailed_until:
|
|
type: string
|
|
missed_blocks_counter:
|
|
type: string
|
|
ParamChange:
|
|
type: object
|
|
properties:
|
|
subspace:
|
|
type: string
|
|
example: "staking"
|
|
key:
|
|
type: string
|
|
example: "MaxValidators"
|
|
subkey:
|
|
type: string
|
|
example: ""
|
|
value:
|
|
type: object
|
|
Supply:
|
|
type: object
|
|
properties:
|
|
total:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/Coin"
|
|
StandardResponse:
|
|
type: object
|
|
properties:
|
|
height:
|
|
type: string
|
|
result:
|
|
type: string |