diff --git a/README.md b/README.md index 4fc13f33..d481e32b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ -Reference implementation of Kava, a blockchain for cross-chain DeFi. Built using the [comsos-sdk](https://github.com/cosmos/cosmos-sdk). +Reference implementation of Kava, a blockchain for cross-chain DeFi. Built using the [cosmos-sdk](https://github.com/cosmos/cosmos-sdk). ## Mainnet diff --git a/contrib/testnet-4000/README.md b/contrib/testnet-4000/README.md index ce377e67..b1e45544 100644 --- a/contrib/testnet-4000/README.md +++ b/contrib/testnet-4000/README.md @@ -60,3 +60,11 @@ Congratulations, you've just posted a current market price on Kava using the res ## Governance proposals Example governance proposals are located in `/proposal_examples`. + +## Dredd automated REST API testing + +To run the dredd tests to hit the endpoints and test the api run the following command from the `kava` folder: + +```bash + make test_dredd +``` \ No newline at end of file diff --git a/rest_test/run_all_tests_from_make.sh b/rest_test/run_all_tests_from_make.sh index 1b0ca862..d1e01f50 100755 --- a/rest_test/run_all_tests_from_make.sh +++ b/rest_test/run_all_tests_from_make.sh @@ -1,40 +1,37 @@ #! /bin/bash + +# kill kava if it is already running +pgrep kvd | xargs kill +pgrep kvcli | xargs kill + # TODO import from development environment in envkey password="password" validatorMnemonic="equip town gesture square tomorrow volume nephew minute witness beef rich gadget actress egg sing secret pole winter alarm law today check violin uncover" - # address: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c # address: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 - faucet="chief access utility giant burger winner jar false naive mobile often perfect advice village love enroll embark bacon under flock harbor render father since" - # address: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz # address: kavavaloper1ls82zzghsx0exkpr52m8vht5jqs3un0c5j2c04 - # variables for home directories for kvd and kvcli kvdHome=/tmp/kvdHome kvcliHome=/tmp/kvcliHome - +genesis=$kvdHome/config/genesis.json +swaggerFile=swagger-ui/testnet-4000/swagger-testnet-4000.yaml # Remove any existing data directory rm -rf $kvdHome rm -rf $kvcliHome - # make the directories mkdir /tmp/kvdHome mkdir /tmp/kvcliHome - # create validator key printf "$password\n$validatorMnemonic\n" | kvcli keys add vlad --recover --home $kvcliHome # create faucet key printf "$password\n$faucet\n" | kvcli --home $kvcliHome keys add faucet --recover --home $kvcliHome - # function used to show that it is still loading showLoading() { mypid=$! loadingText=$1 - echo -ne "$loadingText\r" - while kill -0 $mypid 2>/dev/null; do echo -ne "$loadingText.\r" sleep 0.5 @@ -46,32 +43,33 @@ showLoading() { echo -ne "$loadingText\r" sleep 0.5 done - echo "$loadingText...finished" } - # Create new data directory { kvd --home $kvdHome init --chain-id=testing vlad # doesn't need to be the same as the validator } > /dev/null 2>&1 kvcli --home $kvcliHome config chain-id testing # or set trust-node true - # add validator account to genesis -kvd --home $kvdHome add-genesis-account $(kvcli --home $kvcliHome keys show vlad -a) 10000000000000stake +kvd --home $kvdHome add-genesis-account $(kvcli --home $kvcliHome keys show vlad -a) 10000000000000stake,1000000000000xrp,100000000000btc # add faucet account to genesis kvd --home $kvdHome add-genesis-account $(kvcli --home $kvcliHome keys show faucet -a) 10000000000000stake,1000000000000xrp,100000000000btc - # Create a delegation tx for the validator and add to genesis printf "$password\n" | kvd --home $kvdHome gentx --name vlad --home-client $kvcliHome { kvd --home $kvdHome collect-gentxs } > /dev/null 2>&1 - +# set blocktime to ~1s +jq '.app_state.mint.params.blocks_per_year = "31540000"' $genesis > $genesis.tmp && mv $genesis.tmp $genesis +# update pricefeed information +jq '.app_state.pricefeed.params.markets += [{"active": true, "base_asset": "xrp", "market_id": "xrp:usd", "oracles": ["kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c"], "quote_asset": "usd"}, {"active": true, "base_asset": "btc", "market_id": "btc:usd", "oracles": ["kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c"], "quote_asset": "usd"}]' $genesis > $genesis.tmp && mv $genesis.tmp $genesis +jq '.app_state.pricefeed.posted_prices += [{"expiry": "2050-01-01T00:00:00Z", "market_id": "btc:usd", "oracle_address": "kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c", "price": "8700.0"}, {"expiry": "2050-01-01T00:00:00Z", "market_id": "xrp:usd", "oracle_address": "kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c", "price": "0.25"}]' $genesis > $genesis.tmp && mv $genesis.tmp $genesis +# now update cdp params +jq '.app_state.cdp.params = { "circuit_breaker": false, "collateral_params": [ { "auction_size": "10000000000", "conversion_factor": "8", "debt_limit": [ { "amount": "1000000000", "denom": "usdx" } ], "denom": "btc", "liquidation_penalty": "0.05", "liquidation_ratio": "1.5", "market_id": "btc:usd", "prefix": 0, "stability_fee": "1.0000000007829977" }, { "auction_size": "100000000", "conversion_factor": "6", "debt_limit": [ { "amount": "10000000", "denom": "usdx" } ], "denom": "xrp", "liquidation_penalty": "0.1", "liquidation_ratio": "2.0", "market_id": "xrp:usd", "prefix": 1, "stability_fee": "1.0000000007829977"} ], "debt_auction_threshold": "9000000", "debt_params": [ { "conversion_factor": "6", "debt_floor": "10000000", "debt_limit": [ { "amount": "2000000000000", "denom": "usdx" } ], "denom": "usdx", "reference_asset": "usd", "savings_rate": "0.95" } ], "global_debt_limit": [ { "amount": "2000000000000", "denom": "usdx" } ], "surplus_auction_threshold": "9000000", "savings_distribution_frequency": "120000000000" }' $genesis > $genesis.tmp && mv $genesis.tmp $genesis # start the blockchain in the background, wait until it starts making blocks { kvd start --home $kvdHome & kvdPid="$!" } > /dev/null 2>&1 - printf "\n" sleep 10 & showLoading "Starting rest server, please wait" # start the rest server. Use ./stopchain.sh to stop both rest server and the blockchain @@ -81,30 +79,24 @@ kvcli rest-server --laddr tcp://127.0.0.1:1317 --chain-id=testing --home $kvcliH printf "\n" sleep 10 & showLoading "Preparing blockchain setup transactions, please wait" printf "\n" - # build the go setup test file rm -f rest_test/setuptest go build rest_test/setup/setuptest.go & showLoading "Building go test file, please wait" - # run the go code to send transactions to the chain and set it up correctly ./setuptest $kvcliHome & showLoading "Sending messages to blockchain" printf "\n" printf "Blockchain setup completed" printf "\n\n" - ############################ # Now run the dredd tests ############################ - -dredd swagger-ui/swagger.yaml localhost:1317 2>&1 | tee output & showLoading "Running dredd tests" - +dredd $swaggerFile localhost:1317 2>&1 | tee output & showLoading "Running dredd tests" ######################################################## -# Now run the check the return code from the dredd command. +# Now run the check the return code from the dredd command. # If 0 then all test passed OK, otherwise some failed and propagate the error ######################################################## - # check that the error code was zero -if [ $? -eq 0 ] +if [ $? -eq 0 ] then # check that all the tests passed (ie zero failing) if [[ $(cat output | grep "0 failing") ]] @@ -122,7 +114,6 @@ then fi fi fi - # otherwise return an error code and redirect stderr to stdout so user sees the error output echo "Failure" >&2 rm setuptest & showLoading "Cleaning up go binary" diff --git a/rest_test/setup/setuptest.go b/rest_test/setup/setuptest.go index 9d66f390..dc52be9f 100644 --- a/rest_test/setup/setuptest.go +++ b/rest_test/setup/setuptest.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "net/http" "os" + "time" "github.com/cosmos/cosmos-sdk/client/keys" crkeys "github.com/cosmos/cosmos-sdk/crypto/keys" @@ -20,7 +21,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/staking" "github.com/kava-labs/kava/app" + "github.com/kava-labs/kava/x/cdp" + "github.com/kava-labs/kava/x/pricefeed" "github.com/tendermint/go-amino" + tmtime "github.com/tendermint/tendermint/types/time" ) func init() { @@ -31,6 +35,14 @@ func init() { } func main() { + if len(os.Args) < 2 { + fmt.Printf("Please include the kvcli home directory as a command line argument\n") + fmt.Printf("For example: ./setuptest /tmp/kvcliHome\n") + fmt.Printf("Exiting...goodbye!\n") + return + } + + // setup messages send to blockchain so it is in the correct state for testing sendProposal() sendDeposit() sendVote() @@ -46,6 +58,122 @@ func main() { sendCoins() + // create an XRP cdp and send to blockchain + sendXrpCdp() + + // create a BTC cdp and send to blockchain + sendBtcCdp() + + // reduce the price of BTC to trigger an auction + sendMsgPostPrice() +} + +// lower the price of xrp to trigger an auction +func sendMsgPostPrice() { + // get the address + address := getTestAddress() + // get the keyname and password + keyname, password := getKeynameAndPassword() + + addr, err := sdk.AccAddressFromBech32(address) // validator address + if err != nil { + panic(err) + } + + price, err := sdk.NewDecFromStr("1") + if err != nil { + panic(err) + } + // set the expiry time + expiry := tmtime.Now().Add(time.Second * 100000) + + // create a cdp message to send to the blockchain + // from, assetcode, price, expiry + msg := pricefeed.NewMsgPostPrice( + addr, + "btc:usd", + price, + expiry, + ) + + // helper methods for transactions + cdc := app.MakeCodec() // make codec for the app + + // get the keybase + keybase := getKeybase() + + // cast to the generic msg type + msgToSend := []sdk.Msg{msg} + + // send the message to the blockchain + sendMsgToBlockchain(cdc, address, keyname, password, msgToSend, keybase) + +} + +func sendBtcCdp() { + // get the address + address := getTestAddress() + // get the keyname and password + keyname, password := getKeynameAndPassword() + + addr, err := sdk.AccAddressFromBech32(address) // validator address + if err != nil { + panic(err) + } + + // create a cdp message to send to the blockchain + // sender, collateral, principal + msg := cdp.NewMsgCreateCDP( + addr, + sdk.NewCoins(sdk.NewInt64Coin("btc", 200000000)), + sdk.NewCoins(sdk.NewInt64Coin("usdx", 10000000)), + ) + + // helper methods for transactions + cdc := app.MakeCodec() // make codec for the app + + // get the keybase + keybase := getKeybase() + + // cast to the generic msg type + msgToSend := []sdk.Msg{msg} + + // send the message to the blockchain + sendMsgToBlockchain(cdc, address, keyname, password, msgToSend, keybase) + +} + +func sendXrpCdp() { + // get the address + address := getTestAddress() + // get the keyname and password + keyname, password := getKeynameAndPassword() + + addr, err := sdk.AccAddressFromBech32(address) // validator address + if err != nil { + panic(err) + } + + // create a cdp message to send to the blockchain + // sender, collateral, principal + msg := cdp.NewMsgCreateCDP( + addr, + sdk.NewCoins(sdk.NewInt64Coin("xrp", 200000000)), + sdk.NewCoins(sdk.NewInt64Coin("usdx", 10000000)), + ) + + // helper methods for transactions + cdc := app.MakeCodec() // make codec for the app + + // get the keybase + keybase := getKeybase() + + // cast to the generic msg type + msgToSend := []sdk.Msg{msg} + + // send the message to the blockchain + sendMsgToBlockchain(cdc, address, keyname, password, msgToSend, keybase) + } func sendProposal() { @@ -274,9 +402,9 @@ func sendMsgToBlockchain(cdc *amino.Codec, address string, keyname string, txBldr := auth.NewTxBuilderFromCLI(). WithTxEncoder(authclient.GetTxEncoder(cdc)).WithChainID("testing"). WithKeybase(keybase).WithAccountNumber(accountNumber). - WithSequence(sequenceNumber) + WithSequence(sequenceNumber).WithGas(500000) - // build and sign the transaction + // build and sign the transaction // this is the *Amino* encoded version of the transaction // fmt.Printf("%+v", txBldr.Keybase()) txBytes, err := txBldr.BuildAndSign("vlad", "password", msg) @@ -296,6 +424,9 @@ func sendMsgToBlockchain(cdc *amino.Codec, address string, keyname string, Mode: "block", }, ) + + fmt.Printf("%s", bytes.NewBuffer(jsonBytes)) + if err != nil { panic(err) } diff --git a/swagger-ui/testnet-4000/swagger-testnet-4000.yaml b/swagger-ui/testnet-4000/swagger-testnet-4000.yaml index 78954f36..bf369a13 100644 --- a/swagger-ui/testnet-4000/swagger-testnet-4000.yaml +++ b/swagger-ui/testnet-4000/swagger-testnet-4000.yaml @@ -237,12 +237,12 @@ description: Tx hash required: true type: string - x-example: BCBE20E8D46758B96AE5883B792858296AC06E51435490FBDCAE25A72B3CC76B + x-example: 4B2C3449FF2647BD51B54C32761FE4EBE7AE024BBE2A9898972A69BEB82D97C2 responses: 200: description: Tx with the provided hash schema: - $ref: '#/definitions/TxQuery' + $ref: "#/definitions/TxQuery" 500: description: Internal Server Error /txs: @@ -258,12 +258,12 @@ 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' + x-example: "send" - in: query name: message.sender type: string - description: "transaction tags with sender: 'GET /txs?message.action=send&message.sender=kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv'" - x-example: 'kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv' + description: "transaction tags with sender: 'GET /txs?message.action=send&message.sender=kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9'" + x-example: "kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9" - in: query name: page description: Page number @@ -274,11 +274,16 @@ 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' + $ref: "#/definitions/PaginatedQueryTxs" 400: description: Invalid search events 500: @@ -301,15 +306,15 @@ type: object properties: tx: - $ref: '#/definitions/StdTx' + $ref: "#/definitions/PostStdTx" mode: type: string - example: sync + example: block responses: 200: description: Tx broadcasting result schema: - $ref: '#/definitions/BroadcastTxCommitResult' + $ref: "#/definitions/BroadcastTxCommitResult" 500: description: Internal Server Error /txs/encode: @@ -323,15 +328,13 @@ produces: - application/json parameters: - - in: body - name: tx - description: The tx to encode + - description: "" + name: EncodeBody + in: body required: true schema: type: object - properties: - tx: - $ref: '#/definitions/StdTx' + $ref: "#/definitions/EncodeTx" responses: 200: description: The tx was successfully decoded and re-encoded @@ -342,7 +345,7 @@ type: string example: The base64-encoded Amino-serialized bytes for the tx 400: - description: The tx was malformated + description: The tx was malformatted 500: description: Server internal error /txs/decode: @@ -365,12 +368,12 @@ properties: tx: type: string - example: SvBiXe4KPqijYZoKFFHEzJ8c2HPAfv2EFUcIhx0yPagwEhTy0vPA+GGhCEslKXa4Af0uB+mfShoMCgVzdGFrZRIDMTAwEgQQwJoM + example: ogEoKBapCjyoo2GaChRKWendsRagTF1ACC1nxzjVxW3xJBIU/A6hCReBn5NYI6K2dl10kCEeTfgaCgoFc3Rha2USATESEAoKCgVzdGFrZRIBMRDAmgwaQhJAdlC1HbNw+ux6lRrK3mNdmaH62NE3ThD8SswlDcnhFex7pKSNhaxE4m6TgDhosoK6EyU0LnOZKutXKECNSvO+WCIIdGVzdG1lbW8= responses: 200: description: The tx was successfully decoded schema: - $ref: '#/definitions/StdTx' + $ref: "#/definitions/StdTx" 400: description: The tx was malformated 500: @@ -426,7 +429,7 @@ description: Owner address in bech32 format required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: denom description: Collateral denom @@ -472,7 +475,7 @@ description: Owner address in bech32 format required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: denom description: Collateral denom @@ -518,7 +521,7 @@ description: Owner address in bech32 format required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: denom description: Collateral denom @@ -562,7 +565,7 @@ description: Owner address in bech32 format required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: denom description: Collateral denom @@ -642,7 +645,7 @@ description: Owner address in bech32 format required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: denom description: Collateral denom @@ -674,9 +677,15 @@ 200: description: All CDPs with the input collateral denom schema: - type: array - items: - $ref: '#/definitions/CdpResponse' + type: object + properties: + height: + type: string + result: + type: array + x-nullable: true + items: + $ref: '#/definitions/CdpResponse' 500: description: Server internal error /cdp/cdps/ratio/{denom}/{ratio}: @@ -698,14 +707,20 @@ description: Collateralization ratio required: true type: string - x-example: 2.0 + x-example: "2.0" responses: 200: description: All CDPs with the input collateral denom and collateralization ratio less than the input ratio schema: - type: array - items: - $ref: '#/definitions/CdpResponse' + type: object + properties: + height: + type: string + result: + type: array + x-nullable: true + items: + $ref: '#/definitions/CdpResponse' 500: description: Server internal error /cdp/cdps/cdp/deposits/{owner}/{denom}: @@ -721,7 +736,7 @@ description: Owner address in bech32 format required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: denom description: Collateral denom @@ -732,9 +747,14 @@ 200: description: Deposits associated with the cdp schema: - type: array - items: - $ref: '#/definitions/CdpDepositResponse' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: '#/definitions/CdpDepositResponse' 500: description: Server internal error /auction/auctions/{id}/bids: @@ -752,7 +772,16 @@ description: Auction id required: true type: string - x-example: 1 + x-example: "1" + - in: body + name: Auction bid request body + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + amount: + $ref: '#/definitions/CoinBid' + responses: 200: description: The transaction was successfully generated @@ -788,9 +817,14 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/AuctionResponse' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: '#/definitions/AuctionResponse' 500: description: Internal Server Error /auction/auctions/{id}: @@ -807,7 +841,7 @@ description: Auction id required: true type: string - x-example: 2 + x-example: "1" responses: 200: description: OK @@ -818,7 +852,7 @@ 500: description: Internal Server Error /pricefeed/postprice: - put: + post: summary: Generate post price transaction consumes: - application/json @@ -844,7 +878,7 @@ example: '0.298464000000000007' expiry: type: string - example: '2020-02-12T23:20:00Z' + example: '158551630291' responses: 200: description: The transaction was successfully generated @@ -879,9 +913,14 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Market' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: '#/definitions/Market' 500: description: Internal Server Error /pricefeed/oracles/{market_id}: @@ -902,9 +941,14 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Address' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: '#/definitions/Address' 500: description: Internal Server Error /pricefeed/rawprices/{market_id}: @@ -925,9 +969,15 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/PostedPrice' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: '#/definitions/PostedPrice' + 500: description: Internal Server Error /pricefeed/price/{market_id}: @@ -948,7 +998,7 @@ 200: description: OK schema: - $ref: '#/definitions/Prices' + $ref: '#/definitions/Price' 500: description: Internal Server Error /bank/balances/{address}: @@ -964,16 +1014,21 @@ description: Account address in bech32 format required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c responses: 200: description: Account balances schema: - type: array - items: - $ref: '#/definitions/Coin' + 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 @@ -989,7 +1044,7 @@ description: Account address in bech32 format required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - in: body name: account description: The sender and tx information @@ -998,16 +1053,16 @@ type: object properties: base_req: - $ref: '#/definitions/BaseReq' + $ref: "#/definitions/BaseReq" amount: type: array items: - $ref: '#/definitions/Coin' + $ref: "#/definitions/Coin" responses: - 202: + 200: description: Tx was successfully generated schema: - $ref: '#/definitions/StdTx' + $ref: "#/definitions/StdTx" 400: description: Invalid request 500: @@ -1025,7 +1080,7 @@ description: Account address required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 responses: 200: description: Account information on the blockchain @@ -1044,13 +1099,13 @@ coins: type: array items: - $ref: '#/definitions/Coin' + $ref: "#/definitions/Coin" public_key: - $ref: '#/definitions/PublicKey' + $ref: "#/definitions/PublicKey" sequence: type: string 500: - description: Server internel error + description: Server internal error /staking/delegators/{delegatorAddr}/delegations: parameters: - in: path @@ -1058,7 +1113,7 @@ description: Bech32 AccAddress of Delegator required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 get: summary: Get all delegations from a delegator tags: @@ -1069,47 +1124,55 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Delegation' + type: object + properties: + height: + type: string + result: + items: + $ref: "#/definitions/Delegation" 400: description: Invalid delegator address 500: description: Internal Server Error - 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 + + # 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 @@ -1117,13 +1180,13 @@ description: Bech32 AccAddress of Delegator required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: validatorAddr description: Bech32 OperatorAddress of validator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 get: summary: Query the current delegation between a delegator and a validator tags: @@ -1134,7 +1197,7 @@ 200: description: OK schema: - $ref: '#/definitions/Delegation' + $ref: "#/definitions/Delegation" 400: description: Invalid delegator address or validator address 500: @@ -1146,7 +1209,7 @@ description: Bech32 AccAddress of Delegator required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 get: summary: Get all unbonding delegations from a delegator tags: @@ -1157,48 +1220,57 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/UnbondingDelegation' + type: object + properties: + height: + type: string + result: + items: + $ref: "#/definitions/UnbondingDelegation" + 400: description: Invalid delegator address 500: description: Internal Server Error - 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 + + # 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 @@ -1206,13 +1278,13 @@ description: Bech32 AccAddress of Delegator required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: validatorAddr description: Bech32 OperatorAddress of validator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 get: summary: Query all unbonding delegations between a delegator and a validator tags: @@ -1223,7 +1295,7 @@ 200: description: OK schema: - $ref: '#/definitions/UnbondingDelegationPair' + $ref: "#/definitions/UnbondingDelegationPair" 400: description: Invalid delegator address or validator address 500: @@ -1254,55 +1326,63 @@ responses: 200: description: OK - schema: - type: array - items: - $ref: '#/definitions/Redelegation' - 500: - description: Internal Server Error - /staking/delegators/{delegatorAddr}/redelegations: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - 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_addressess: - $ref: '#/definitions/ValidatorAddress' - validator_dst_address: - $ref: '#/definitions/ValidatorAddress' - shares: + height: 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 + 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 @@ -1310,7 +1390,7 @@ description: Bech32 AccAddress of Delegator required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 get: summary: Query all validators that a delegator is bonded to tags: @@ -1321,9 +1401,13 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Validator' + type: object + properties: + height: + type: string + result: + items: + $ref: "#/definitions/Validator" 400: description: Invalid delegator address 500: @@ -1335,13 +1419,13 @@ description: Bech32 AccAddress of Delegator required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: validatorAddr description: Bech32 ValAddress of Delegator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 get: summary: Query a validator that a delegator is bonded to tags: @@ -1352,7 +1436,7 @@ 200: description: OK schema: - $ref: '#/definitions/Validator' + $ref: "#/definitions/Validator" 400: description: Invalid delegator address or validator address 500: @@ -1384,9 +1468,13 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Validator' + type: object + properties: + height: + type: string + result: + items: + $ref: "#/definitions/Validator" 500: description: Internal Server Error /staking/validators/{validatorAddr}: @@ -1396,7 +1484,7 @@ description: Bech32 OperatorAddress of validator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 get: summary: Query the information from a single validator tags: @@ -1419,7 +1507,7 @@ description: Bech32 OperatorAddress of validator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1q53rwutgpzx7szcrgzqguxyccjpzt9j44jzrtj get: summary: Get all delegations from a validator tags: @@ -1430,9 +1518,13 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Delegation' + type: object + properties: + height: + type: string + result: + items: + $ref: "#/definitions/Delegation" 400: description: Invalid validator address 500: @@ -1444,7 +1536,7 @@ description: Bech32 OperatorAddress of validator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1q53rwutgpzx7szcrgzqguxyccjpzt9j44jzrtj get: summary: Get all unbonding delegations from a validator tags: @@ -1455,9 +1547,13 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/UnbondingDelegation' + type: object + properties: + height: + type: string + result: + items: + $ref: "#/definitions/UnbondingDelegation" 400: description: Invalid validator address 500: @@ -1568,9 +1664,14 @@ 200: description: OK schema: - type: array items: - $ref: '#/definitions/SigningInfo' + type: object + properties: + height: + type: string + result: + items: + $ref: "#/definitions/SigningInfo" 400: description: Invalid validator public key for one of the validators 500: @@ -1591,8 +1692,8 @@ name: validatorAddr required: true in: path - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - - description: '' + x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 + - description: "" name: UnjailBody in: body required: true @@ -1600,12 +1701,12 @@ type: object properties: base_req: - $ref: '#/definitions/StdTx' + $ref: "#/definitions/BaseReq" responses: 200: description: Tx was successfully generated schema: - $ref: '#/definitions/BroadcastTxCommitResult' + $ref: "#/definitions/BroadcastTxCommitResult" 400: description: Invalid validator address or base_req 500: @@ -1658,25 +1759,34 @@ type: object properties: base_req: - $ref: '#/definitions/BaseReq' + $ref: "#/definitions/BaseReq" title: type: string + example: Test_title description: type: string + example: my_test_description proposal_type: type: string - example: 'text' + example: "text" proposer: - $ref: '#/definitions/Address' + $ref: "#/definitions/Address" initial_deposit: type: array items: - $ref: '#/definitions/Coin' + $ref: "#/definitions/Coin" responses: 200: description: Tx was successfully generated schema: - $ref: '#/definitions/StdTx' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: "#/definitions/TextProposal" 400: description: Invalid proposal body 500: @@ -1706,11 +1816,16 @@ type: string responses: 200: - description: OK + description: Tx was successfully generated schema: - type: array - items: - $ref: '#/definitions/TextProposal' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: "#/definitions/TextProposal" 400: description: Invalid query parameters 500: @@ -1734,23 +1849,23 @@ type: object properties: base_req: - $ref: '#/definitions/BaseReq' + $ref: "#/definitions/BaseReq" title: type: string - x-example: 'Param Change' + example: Param_Change description: type: string - x-example: 'Update max validators' + example: Update_max_validators proposer: - $ref: '#/definitions/Address' + $ref: "#/definitions/Address" deposit: type: array items: - $ref: '#/definitions/Coin' + $ref: "#/definitions/Coin" changes: type: array items: - $ref: '#/definitions/ParamChange' + $ref: "#/definitions/ParamChange" responses: 200: description: The transaction was successfully generated @@ -1824,9 +1939,14 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Deposit' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: '#/definitions/Deposit' 400: description: Invalid proposal id 500: @@ -1887,13 +2007,13 @@ name: proposalId required: true in: path - x-example: '2' + x-example: "2" - type: string description: Bech32 depositor address name: depositor required: true in: path - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c responses: 200: description: OK @@ -1924,9 +2044,14 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Vote' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: '#/definitions/Vote' 400: description: Invalid proposal id 500: @@ -1992,7 +2117,7 @@ name: voter required: true in: path - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c responses: 200: description: OK @@ -2112,7 +2237,7 @@ description: Bech32 AccAddress of Delegator required: true type: string - x-example: kava167w96tdvmazakdwkw2u57227eduula2cy572lf + 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 @@ -2124,7 +2249,12 @@ 200: description: OK schema: - $ref: '#/definitions/DelegatorTotalRewards' + type: object + properties: + height: + type: string + result: + $ref: '#/definitions/DelegatorTotalRewards' 400: description: Invalid delegator address 500: @@ -2163,13 +2293,13 @@ description: Bech32 AccAddress of Delegator required: true type: string - x-example: kava16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - in: path name: validatorAddr description: Bech32 OperatorAddress of validator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 get: summary: Query a delegation reward description: Query a single delegation reward by a delegator @@ -2181,9 +2311,14 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Coin' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: "#/definitions/Coin" 400: description: Invalid delegator address 500: @@ -2222,7 +2357,7 @@ description: Bech32 AccAddress of Delegator required: true type: string - x-example: kava167w96tdvmazakdwkw2u57227eduula2cy572lf + 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 @@ -2234,7 +2369,12 @@ 200: description: OK schema: - $ref: '#/definitions/Address' + type: object + properties: + height: + type: string + result: + $ref: "#/definitions/Address" 400: description: Invalid delegator address 500: @@ -2275,7 +2415,7 @@ description: Bech32 OperatorAddress of validator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 get: summary: Validator distribution information description: Query the distribution information of a single validator @@ -2299,7 +2439,7 @@ description: Bech32 OperatorAddress of validator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 get: summary: Fee distribution outstanding rewards of a single validator tags: @@ -2310,9 +2450,14 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Coin' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: '#/definitions/Coin' 500: description: Internal Server Error /distribution/validators/{validatorAddr}/rewards: @@ -2322,7 +2467,7 @@ description: Bech32 OperatorAddress of validator required: true type: string - x-example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + x-example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 get: summary: Commission and self-delegation rewards of a single validator description: Query the commission and self-delegation rewards of validator. @@ -2332,11 +2477,16 @@ - application/json responses: 200: - description: OK + description: OK schema: - type: array - items: - $ref: '#/definitions/Coin' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: '#/definitions/Coin' 400: description: Invalid validator address 500: @@ -2379,9 +2529,14 @@ 200: description: OK schema: - type: array - items: - $ref: '#/definitions/Coin' + type: object + properties: + height: + type: string + result: + type: array + items: + $ref: "#/definitions/Coin" 500: description: Internal Server Error /distribution/parameters: @@ -2441,7 +2596,7 @@ 200: description: OK schema: - type: string + $ref: "#/definitions/StandardResponse" 500: description: Internal Server Error /minting/annual-provisions: @@ -2455,7 +2610,7 @@ 200: description: OK schema: - type: string + $ref: "#/definitions/StandardResponse" 500: description: Internal Server Error /supply/total: @@ -2490,7 +2645,7 @@ 200: description: OK schema: - type: string + $ref: "#/definitions/StandardResponse" 400: description: Invalid coin denomination 500: @@ -2564,7 +2719,7 @@ hash: $ref: '#/definitions/Hash' height: - type: integer + type: string KVPair: type: object properties: @@ -2574,26 +2729,31 @@ type: string Msg: type: object - required: - - from properties: type: type: string - example: 'string' + example: "cosmos-sdk/MsgSend" value: type: object properties: - from: + from_address: type: string - example: kava1mzqz3jfs9nzfp6v7qp647rv0afxlu2csl0txmq + example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c + to_address: + type: string + example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz + amount: + type: array + items: + $ref: "#/definitions/Coin" Address: type: string description: bech32 encoded address - example: kava1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c ValidatorAddress: type: string description: bech32 encoded address - example: kavavaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + example: kavavaloper1ffv7nhd3z6sych2qpqkk03ec6hzkmufyz4scd0 Coin: type: object properties: @@ -2608,7 +2768,7 @@ properties: denom: type: string - example: bnb + example: "xrp" amount: type: string example: '10000000000' @@ -2617,10 +2777,19 @@ properties: denom: type: string - example: usdx + example: "usdx" amount: type: string example: '10000000' + CoinBid: + type: object + properties: + denom: + type: string + example: "usdx" + amount: + type: string + example: '100000000' Hash: type: string example: EE5F3404034C524501629B56E0DDC38FAD651F04 @@ -2646,8 +2815,8 @@ type: string example: 'D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656' height: - type: number - example: 368 + type: string + example: "368" tx: $ref: '#/definitions/StdTx' result: @@ -2669,20 +2838,20 @@ type: object properties: total_count: - type: number - example: 1 + type: string + example: "1" count: - type: number - example: 1 + type: string + example: "1" page_number: - type: number - example: 1 + type: string + example: "1" page_total: - type: number - example: 1 + type: string + example: "1" limit: - type: number - example: 30 + type: string + example: "30" txs: type: array items: @@ -2693,16 +2862,17 @@ msg: type: array items: - $ref: '#/definitions/Msg' + $ref: "#/definitions/Msg" fee: type: object properties: gas: type: string + example: "200000" amount: type: array items: - $ref: '#/definitions/Coin' + $ref: "#/definitions/Coin" memo: type: string signatures: @@ -2718,8 +2888,8 @@ type: object properties: total: - type: number - example: 0 + type: string + example: "0" hash: $ref: '#/definitions/Hash' BlockHeader: @@ -2727,21 +2897,21 @@ properties: chain_id: type: string - example: kavahub-2 + example: testing height: - type: number - example: 1 + type: string + example: "1" time: type: string example: '2017-12-30T05:53:09.287+01:00' num_txs: - type: number - example: 0 + type: string + example: "0" last_block_id: $ref: '#/definitions/BlockID' total_txs: - type: number - example: 35 + type: string + example: "35" last_commit_hash: $ref: '#/definitions/Hash' data_hash: @@ -2779,9 +2949,10 @@ items: type: string evidence: - type: array - items: - type: string + type: object + # type: array + # items: + # type: string last_commit: type: object properties: @@ -2789,6 +2960,7 @@ $ref: '#/definitions/BlockID' precommits: type: array + x-nullable: true items: type: object properties: @@ -2851,20 +3023,20 @@ properties: from: type: string - example: 'kava1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc' + example: 'kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c' description: Sender address or Keybase name to generate a transaction memo: type: string example: 'Sent via Cosmos Voyager 🚀' chain_id: type: string - example: 'kava-1' + example: 'testing' account_number: type: string example: '0' sequence: type: string - example: '1' + example: '5' gas: type: string example: '200000' @@ -2877,7 +3049,7 @@ $ref: '#/definitions/Coin' simulate: type: boolean - example: false + example: true description: Estimate gas for a transaction (cannot be used in conjunction with generate_only) TendermintValidator: type: object @@ -2901,7 +3073,7 @@ example: 1 owner: type: string - example: kava1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 collateral: $ref: '#/definitions/CoinCollateral' principal: @@ -2924,9 +3096,11 @@ example: 1 depositor: type: string - example: kava1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 amount: - $ref: '#/definitions/CoinCollateral' + type: array + items: + $ref: '#/definitions/CoinCollateral' PricefeedParameters: type: object properties: @@ -2957,7 +3131,7 @@ example: '0.298758999999999997' expiry: type: string - example: '2020-02-12T23:10:00Z' + example: '2021-02-12T23:10:00Z' Market: type: object properties: @@ -2972,6 +3146,7 @@ example: 'usd' oracles: type: array + x-nullable: true items: $ref: '#/definitions/Address' active: @@ -3307,3 +3482,96 @@ type: array items: $ref: '#/definitions/Coin' + StandardResponse: + type: object + properties: + height: + type: string + result: + type: string + 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" + + 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" + 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" + 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" + EncodeTx: + type: object + properties: + type: + type: string + example: "cosmos-sdk/StdTx" + value: + type: object + $ref: "#/definitions/StdTx"