From 1c73dee82a0b47fba824da4c4fb761760bcf2f92 Mon Sep 17 00:00:00 2001 From: Nikita Volkov Date: Tue, 6 Apr 2021 21:09:20 +0300 Subject: [PATCH 1/2] disable swagger endpoints --- Makefile | 5 +- cmd/dncli/docs/swagger.go | 147 +- cmd/dncli/docs/swagger.yaml | 4311 +++++++++++++++++++++++++++++++++++ cmd/dncli/main.go | 2 - go.mod | 19 +- go.sum | 55 + 6 files changed, 4422 insertions(+), 117 deletions(-) create mode 100644 cmd/dncli/docs/swagger.yaml diff --git a/Makefile b/Makefile index 7a279fb2..e32744f1 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ cosmos_dir=$(swagger_dir)/cosmos-sdk dnode = ./cmd/dnode dncli =./cmd/dncli -cosmos_version = backport/v0.39.x +cosmos_version=v0.39.0 all: install install: go.sum install-dnode install-dncli @@ -58,7 +58,7 @@ swagger-ui-deps: git -C $(swagger_dir) clone --branch $(cosmos_version) https://github.com/cosmos/cosmos-sdk.git @echo "-> Fetching Golang libraries: swag, statik" - go get -u github.com/swaggo/swag/cmd/swag + go get -u github.com/swaggo/swag/cmd/swag@v1.6.7 go get github.com/g3co/go-swagger-merger swagger-ui-build: @@ -75,7 +75,6 @@ swagger-ui-build: echo "package docs\n\nconst Swagger = \`" >> ./cmd/dncli/docs/swagger.go cat ./cmd/dncli/docs/swagger.yaml | sed "s/\`/'/g" >> ./cmd/dncli/docs/swagger.go echo "\`" >> ./cmd/dncli/docs/swagger.go - rm ./cmd/dncli/docs/swagger.yaml ## binaries builds (xgo required: https://github.com/karalabe/xgo) binaries: go.sum diff --git a/cmd/dncli/docs/swagger.go b/cmd/dncli/docs/swagger.go index f0cc6454..674eb735 100644 --- a/cmd/dncli/docs/swagger.go +++ b/cmd/dncli/docs/swagger.go @@ -38,7 +38,8 @@ definitions: example: "1" type: string simulate: - description: Estimate gas for a transaction (cannot be used in conjunction with generate_only) + description: Estimate gas for a transaction (cannot be used in conjunction + with generate_only) example: false type: boolean type: object @@ -627,8 +628,6 @@ definitions: $ref: '#/definitions/types.Currencies' ccstorage.Currency: $ref: '#/definitions/types.Currency' - crypto.PubKey: - type: object markets.MarketExtended: $ref: '#/definitions/types.MarketExtended' msmodule.MsMsg: @@ -760,7 +759,8 @@ definitions: format: bech32/hex type: string move_path: - description: Move formatted path (ModuleName::StructName, where ::StructName is optional) + description: Move formatted path (ModuleName::StructName, where ::StructName + is optional) example: Block::BlockMetadata type: string view_request: @@ -921,7 +921,8 @@ definitions: example: "100" type: string quantity: - description: BaseAsset quantity with decimals (1.0 BTC with 8 decimals -> 100000000) + description: BaseAsset quantity with decimals (1.0 BTC with 8 decimals -> + 100000000) example: "10" type: string ttl_in_sec: @@ -939,7 +940,6 @@ definitions: $ref: '#/definitions/rest.BaseReq' type: object price: - description: Price in big.Int format example: "100" type: string received_at: @@ -1162,24 +1162,6 @@ definitions: items: $ref: '#/definitions/types.Coin' type: array - types.Commission: - properties: - max_change_rate: - $ref: '#/definitions/types.Dec' - description: maximum daily increase of the validator commission, as a fraction - type: object - max_rate: - $ref: '#/definitions/types.Dec' - description: maximum commission rate which validator can ever charge, as a fraction - type: object - rate: - $ref: '#/definitions/types.Dec' - description: the commission rate charged to delegators, as a fraction - type: object - update_time: - description: the last time the commission rate was changed - type: string - type: object types.Currencies: items: $ref: '#/definitions/types.Currency' @@ -1235,24 +1217,6 @@ definitions: items: $ref: '#/definitions/types.DecCoin' type: array - types.Description: - properties: - details: - description: optional details - type: string - identity: - description: optional identity signature (ex. UPort or Keybase) - type: string - moniker: - description: name - type: string - security_contact: - description: optional security contact info - type: string - website: - description: optional website link - type: string - type: object types.ID: $ref: '#/definitions/sdk.Uint' types.Int: @@ -1477,53 +1441,6 @@ definitions: items: $ref: '#/definitions/types.VMStatus' type: array - types.ValAddress: - items: - type: integer - type: array - types.Validator: - properties: - commission: - $ref: '#/definitions/types.Commission' - description: commission parameters - type: object - consensus_pubkey: - $ref: '#/definitions/crypto.PubKey' - description: the consensus public key of the validator; bech encoded in JSON - type: object - delegator_shares: - $ref: '#/definitions/types.Dec' - description: total shares issued to a validator's delegators - type: object - description: - $ref: '#/definitions/types.Description' - description: description terms for the validator - type: object - jailed: - description: has the validator been jailed from bonded status? - type: boolean - min_self_delegation: - $ref: '#/definitions/types.Int' - description: validator's self declared minimum self delegation - type: object - operator_address: - $ref: '#/definitions/types.ValAddress' - description: address of the validator's operator; bech encoded in JSON - type: object - status: - description: validator status (bonded/unbonding/unbonded) - type: string - tokens: - $ref: '#/definitions/types.Int' - description: delegated tokens (incl. self-delegation) - type: object - unbonding_height: - description: if unbonding, height at which this validator has begun unbonding - type: integer - unbonding_time: - description: if unbonding, min time for the validator to complete unbonding - type: string - type: object types.Validators: items: $ref: '#/definitions/types.Validator' @@ -1950,7 +1867,8 @@ paths: - Distribution /distribution/delegators/{delegatorAddr}/rewards: get: - description: Get the sum of all the rewards earned by delegations by a single delegator + description: Get the sum of all the rewards earned by delegations by a single + delegator produces: - application/json responses: @@ -2060,7 +1978,8 @@ paths: - Distribution /distribution/delegators/{delegatorAddr}/withdraw_address: get: - description: Get the delegations' rewards withdrawal address. This is the address in which the user will receive the reward funds + description: Get the delegations' rewards withdrawal address. This is the address + in which the user will receive the reward funds produces: - application/json responses: @@ -2233,7 +2152,8 @@ paths: - Distribution /gov/parameters/deposit: get: - description: Query governance deposit parameters. The max_deposit_period units are in nanoseconds. + description: Query governance deposit parameters. The max_deposit_period units + are in nanoseconds. produces: - application/json responses: @@ -2288,7 +2208,8 @@ paths: - Governance /gov/parameters/voting: get: - description: Query governance voting parameters. The voting_period units are in nanoseconds. + description: Query governance voting parameters. The voting_period units are + in nanoseconds. produces: - application/json responses: @@ -2322,7 +2243,8 @@ paths: name: depositor required: false type: string - - description: proposal status, valid values can be '"deposit_period"', '"voting_period"', '"passed"', '"rejected"' + - description: proposal status, valid values can be '"deposit_period"', '"voting_period"', + '"passed"', '"rejected"' in: query name: status required: false @@ -2348,7 +2270,8 @@ paths: - application/json description: Send transaction to submit a proposal parameters: - - description: valid value of '"proposal_type"' can be '"text"', '"parameter_change"', '"software_upgrade"' + - description: valid value of '"proposal_type"' can be '"text"', '"parameter_change"', + '"software_upgrade"' in: body name: post_proposal_body required: true @@ -2531,7 +2454,9 @@ paths: - Governance /gov/proposals/{proposalId}/tally: get: - 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. + 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. parameters: - description: proposal id in: path @@ -2590,7 +2515,8 @@ paths: required: true type: string x-example: "2" - - description: valid value of '"option"' field can be '"yes"', '"no"', '"no_with_veto"' and '"abstain"' + - description: valid value of '"option"' field can be '"yes"', '"no"', '"no_with_veto"' + and '"abstain"' in: body name: post_vote_body required: true @@ -2658,7 +2584,8 @@ paths: - application/json description: Generate a parameter change proposal transaction parameters: - - description: The parameter change proposal body that contains all parameter changes + - description: The parameter change proposal body that contains all parameter + changes in: body name: post_proposal_body required: true @@ -3782,7 +3709,8 @@ paths: /staking/validators: get: parameters: - - description: The validator bond status. Must be either 'bonded', 'unbonded', or 'unbonding'. + - description: The validator bond status. Must be either 'bonded', 'unbonded', + or 'unbonding'. in: query name: status type: string @@ -3808,7 +3736,8 @@ paths: type: array "500": description: Internal Server Error - summary: Get all validator candidates. By default it returns only the bonded validators. + summary: Get all validator candidates. By default it returns only the bonded + validators. tags: - Staking /staking/validators/{validatorAddr}: @@ -3943,7 +3872,10 @@ paths: get: description: Search transactions by events. parameters: - - 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' + - 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' in: query name: message.action type: string @@ -3992,7 +3924,9 @@ paths: - application/json description: Broadcast a signed tx to a full node parameters: - - 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). + - 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). in: body name: txBroadcast required: true @@ -4042,7 +3976,8 @@ paths: post: consumes: - application/json - description: Decode a transaction (signed or not) from base64-encoded Amino serialized bytes to JSON + description: Decode a transaction (signed or not) from base64-encoded Amino + serialized bytes to JSON parameters: - description: The tx to decode in: body @@ -4072,7 +4007,8 @@ paths: post: consumes: - application/json - description: Encode a transaction (signed or not) from JSON to base64-encoded Amino serialized bytes + description: Encode a transaction (signed or not) from JSON to base64-encoded + Amino serialized bytes parameters: - description: The tx to encode in: body @@ -4320,7 +4256,8 @@ paths: get: consumes: - application/json - description: Get writeSet data LCS string view for {address}::{moduleName}::{structName} Move path" + description: Get writeSet data LCS string view for {address}::{moduleName}::{structName} + Move path" operationId: vmGetData parameters: - description: View request diff --git a/cmd/dncli/docs/swagger.yaml b/cmd/dncli/docs/swagger.yaml new file mode 100644 index 00000000..04d508a5 --- /dev/null +++ b/cmd/dncli/docs/swagger.yaml @@ -0,0 +1,4311 @@ +basePath: / +definitions: + Address: + description: bech32 encoded address + example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 + type: string + BaseReq: + properties: + account_number: + example: "0" + type: string + chain_id: + example: Cosmos-Hub + type: string + fees: + items: + $ref: '#/definitions/Coin' + type: array + from: + description: Sender address or Keybase name to generate a transaction + example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc + type: string + gas: + example: "200000" + type: string + gas_adjustment: + example: "1.2" + type: string + memo: + example: "Sent via Cosmos Voyager \U0001F680" + type: string + sequence: + example: "1" + type: string + simulate: + description: Estimate gas for a transaction (cannot be used in conjunction + with generate_only) + example: false + type: boolean + type: object + Block: + properties: + evidence: + items: + type: string + type: array + header: + $ref: '#/definitions/BlockHeader' + last_commit: + properties: + block_id: + $ref: '#/definitions/BlockID' + precommits: + items: + properties: + block_id: + $ref: '#/definitions/BlockID' + height: + example: "0" + type: string + round: + example: "0" + type: string + signature: + example: 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== + type: string + timestamp: + example: "2017-12-30T05:53:09.287+01:00" + type: string + type: + example: 2 + type: number + validator_address: + type: string + validator_index: + example: "0" + type: string + type: object + type: array + type: object + txs: + items: + type: string + type: array + type: object + BlockHeader: + properties: + app_hash: + $ref: '#/definitions/Hash' + chain_id: + example: cosmoshub-2 + type: string + consensus_hash: + $ref: '#/definitions/Hash' + data_hash: + $ref: '#/definitions/Hash' + evidence_hash: + $ref: '#/definitions/Hash' + height: + example: 1 + type: number + last_block_id: + $ref: '#/definitions/BlockID' + last_commit_hash: + $ref: '#/definitions/Hash' + last_results_hash: + $ref: '#/definitions/Hash' + next_validators_hash: + $ref: '#/definitions/Hash' + num_txs: + example: 0 + type: number + proposer_address: + $ref: '#/definitions/Address' + time: + example: "2017-12-30T05:53:09.287+01:00" + type: string + total_txs: + example: 35 + type: number + validators_hash: + $ref: '#/definitions/Hash' + version: + properties: + app: + example: 0 + type: string + block: + example: 10 + type: string + type: object + type: object + BlockID: + properties: + hash: + $ref: '#/definitions/Hash' + parts: + properties: + hash: + $ref: '#/definitions/Hash' + total: + example: 0 + type: number + type: object + type: object + BlockQuery: + properties: + block: + $ref: '#/definitions/Block' + block_meta: + properties: + block_id: + $ref: '#/definitions/BlockID' + header: + $ref: '#/definitions/BlockHeader' + type: object + type: object + BroadcastTxCommitResult: + properties: + check_tx: + $ref: '#/definitions/CheckTxResult' + deliver_tx: + $ref: '#/definitions/DeliverTxResult' + hash: + $ref: '#/definitions/Hash' + height: + type: integer + type: object + CheckTxResult: + example: + code: 0 + data: data + gas_used: 5000 + gas_wanted: 10000 + info: info + log: log + tags: + - "" + - "" + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + items: + $ref: '#/definitions/KVPair' + type: array + type: object + Coin: + properties: + amount: + example: "50" + type: string + denom: + example: stake + type: string + type: object + Delegation: + properties: + balance: + $ref: '#/definitions/Coin' + delegator_address: + type: string + shares: + type: string + validator_address: + type: string + type: object + DelegationDelegatorReward: + properties: + reward: + items: + $ref: '#/definitions/Coin' + type: array + validator_address: + $ref: '#/definitions/ValidatorAddress' + type: object + DelegatorTotalRewards: + properties: + rewards: + items: + $ref: '#/definitions/DelegationDelegatorReward' + type: array + total: + items: + $ref: '#/definitions/Coin' + type: array + type: object + DeliverTxResult: + example: + code: 5 + data: data + gas_used: 5000 + gas_wanted: 10000 + info: info + log: log + tags: + - "" + - "" + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + items: + $ref: '#/definitions/KVPair' + type: array + type: object + Deposit: + properties: + amount: + items: + $ref: '#/definitions/Coin' + type: array + depositor: + $ref: '#/definitions/Address' + proposal_id: + type: string + type: object + Hash: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + type: string + KVPair: + properties: + key: + type: string + value: + type: string + type: object + Msg: + type: string + PaginatedQueryTxs: + properties: + count: + example: 1 + type: number + limit: + example: 30 + type: number + page_number: + example: 1 + type: number + page_total: + example: 1 + type: number + total_count: + example: 1 + type: number + txs: + items: + $ref: '#/definitions/TxQuery' + type: array + type: object + ParamChange: + properties: + key: + example: MaxValidators + type: string + subkey: + example: "" + type: string + subspace: + example: staking + type: string + value: + type: object + type: object + Proposer: + properties: + proposal_id: + type: string + proposer: + type: string + type: object + PublicKey: + properties: + type: + type: string + value: + type: string + type: object + Redelegation: + properties: + delegator_address: + type: string + entries: + items: + $ref: '#/definitions/Redelegation' + type: array + validator_dst_address: + type: string + validator_src_address: + type: string + type: object + RedelegationEntry: + properties: + balance: + type: string + completion_time: + type: integer + creation_height: + type: integer + initial_balance: + type: string + shares_dst: + type: string + type: object + SigningInfo: + properties: + index_offset: + type: string + jailed_until: + type: string + missed_blocks_counter: + type: string + start_height: + type: string + type: object + StdTx: + properties: + fee: + properties: + amount: + items: + $ref: '#/definitions/Coin' + type: array + gas: + type: string + type: object + memo: + type: string + msg: + items: + $ref: '#/definitions/Msg' + type: array + signature: + properties: + account_number: + example: "0" + type: string + pub_key: + properties: + type: + example: tendermint/PubKeySecp256k1 + type: string + value: + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + type: string + type: object + sequence: + example: "0" + type: string + signature: + example: MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + type: string + type: object + type: object + Supply: + properties: + total: + items: + $ref: '#/definitions/Coin' + type: array + type: object + TallyResult: + properties: + abstain: + example: "0.0000000000" + type: string + "false": + example: "0.0000000000" + type: string + no_with_veto: + example: "0.0000000000" + type: string + "true": + example: "0.0000000000" + type: string + type: object + TendermintValidator: + properties: + address: + $ref: '#/definitions/ValidatorAddress' + proposer_priority: + example: "1000" + type: string + pub_key: + example: cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + type: string + voting_power: + example: "1000" + type: string + type: object + TextProposal: + properties: + description: + type: string + final_tally_result: + $ref: '#/definitions/TallyResult' + proposal_id: + type: integer + proposal_status: + type: string + proposal_type: + type: string + submit_time: + type: string + title: + type: string + total_deposit: + items: + $ref: '#/definitions/Coin' + type: array + voting_start_time: + type: string + type: object + TxQuery: + properties: + hash: + example: D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656 + type: string + height: + example: 368 + type: number + result: + properties: + gas_used: + example: "26354" + type: string + gas_wanted: + example: "200000" + type: string + log: + type: string + tags: + items: + $ref: '#/definitions/KVPair' + type: array + type: object + tx: + $ref: '#/definitions/StdTx' + type: object + UnbondingDelegation: + properties: + balance: + type: string + creation_height: + type: integer + delegator_address: + type: string + initial_balance: + type: string + min_time: + type: integer + validator_address: + type: string + type: object + UnbondingDelegationPair: + properties: + delegator_address: + type: string + entries: + items: + $ref: '#/definitions/UnbondingEntries' + type: array + validator_address: + type: string + type: object + UnbondingEntries: + properties: + balance: + type: string + creation_height: + type: string + initial_balance: + type: string + min_time: + type: string + type: object + Validator: + properties: + bond_height: + example: "0" + type: string + bond_intra_tx_counter: + example: 0 + type: integer + commission: + properties: + max_change_rate: + example: "0" + type: string + max_rate: + example: "0" + type: string + rate: + example: "0" + type: string + update_time: + example: "1970-01-01T00:00:00Z" + type: string + type: object + consensus_pubkey: + example: cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf + type: string + delegator_shares: + type: string + description: + properties: + details: + type: string + identity: + type: string + moniker: + type: string + security_contact: + type: string + website: + type: string + type: object + jailed: + type: boolean + operator_address: + $ref: '#/definitions/ValidatorAddress' + status: + type: integer + tokens: + type: string + unbonding_height: + example: "0" + type: string + unbonding_time: + example: "1970-01-01T00:00:00Z" + type: string + type: object + ValidatorAddress: + description: bech32 encoded address + example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + type: string + ValidatorDistInfo: + properties: + operator_address: + $ref: '#/definitions/ValidatorAddress' + self_bond_rewards: + items: + $ref: '#/definitions/Coin' + type: array + val_commission: + items: + $ref: '#/definitions/Coin' + type: array + type: object + Vote: + properties: + option: + type: string + proposal_id: + type: string + voter: + type: string + type: object + auth.StdTx: + $ref: '#/definitions/types.StdTx' + ccstorage.Currencies: + $ref: '#/definitions/types.Currencies' + ccstorage.Currency: + $ref: '#/definitions/types.Currency' + markets.MarketExtended: + $ref: '#/definitions/types.MarketExtended' + msmodule.MsMsg: + type: object + rest.BaseReq: + properties: + account_number: + type: integer + chain_id: + type: string + fees: + $ref: '#/definitions/types.Coins' + type: object + from: + type: string + gas: + type: string + gas_adjustment: + type: string + gas_prices: + $ref: '#/definitions/types.DecCoins' + type: object + memo: + type: string + sequence: + type: integer + simulate: + type: boolean + type: object + rest.CCRespGetCurrencies: + properties: + height: + type: integer + result: + $ref: '#/definitions/ccstorage.Currencies' + type: object + type: object + rest.CCRespGetCurrency: + properties: + height: + type: integer + result: + $ref: '#/definitions/ccstorage.Currency' + type: object + type: object + rest.CCRespGetIssue: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.Issue' + type: object + type: object + rest.CCRespGetWithdraw: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.Withdraw' + type: object + type: object + rest.CCRespGetWithdraws: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.Withdraws' + type: object + type: object + rest.CCRespStdTx: + properties: + height: + type: integer + result: + $ref: '#/definitions/auth.StdTx' + type: object + type: object + rest.CompileReq: + properties: + address: + description: Account address + example: wallet13jyjuz3kkdvqw8u4qfkwd94emdl3vx394kn07h + format: bech32/hex + type: string + code: + description: Script source code + type: string + type: object + rest.ConfirmReq: + properties: + base_req: + $ref: '#/definitions/rest.BaseReq' + type: object + call_id: + description: Confirming CallID + example: "0" + format: string representation for big.Uint + type: string + type: object + rest.ErrorResponse: + properties: + code: + type: integer + error: + type: string + type: object + rest.ExecuteScriptReq: + properties: + base_req: + $ref: '#/definitions/rest.BaseReq' + type: object + move_args: + description: Script arguments + example: + - "true" + items: + type: string + type: array + move_code: + description: Compiled Move code + format: HEX encoded byte code + type: string + type: object + rest.LcsViewReq: + properties: + address: + description: Resource address + example: "0x0000000000000000000000000000000000000001" + format: bech32/hex + type: string + move_path: + description: Move formatted path (ModuleName::StructName, where ::StructName + is optional) + example: Block::BlockMetadata + type: string + view_request: + description: LCS view JSON formatted request (refer to docs for specs) + example: '[ { "name": "height", "type": "U64" } ]' + type: string + type: object + rest.LcsViewResp: + properties: + value: + format: JSON + type: string + type: object + rest.MSRespGetCall: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.CallResp' + type: object + type: object + rest.MSRespGetCalls: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.CallsResp' + type: object + type: object + rest.MarketsRespGetMarket: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.Market' + type: object + type: object + rest.MarketsRespGetMarkets: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.Markets' + type: object + type: object + rest.OracleRespGetAssets: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.Assets' + type: object + type: object + rest.OracleRespGetPrice: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.CurrentPrice' + type: object + type: object + rest.OracleRespGetRawPrices: + properties: + height: + type: integer + result: + items: + $ref: '#/definitions/types.PostedPrice' + type: array + type: object + rest.OrdersRespGetOrder: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.Order' + type: object + type: object + rest.OrdersRespGetOrders: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.Orders' + type: object + type: object + rest.OrdersRespPostOrder: + properties: + type: + type: string + value: + properties: + fee: + $ref: '#/definitions/types.StdFee' + type: object + memo: + type: string + msg: + $ref: '#/definitions/rest.PostOrderMsg' + type: object + signatures: + items: + $ref: '#/definitions/types.StdSignature' + type: array + type: object + type: object + rest.OrdersRespRevokeOrder: + properties: + type: + type: string + value: + properties: + fee: + $ref: '#/definitions/types.StdFee' + type: object + memo: + type: string + msg: + $ref: '#/definitions/rest.RevokeOrderMsg' + type: object + signatures: + items: + $ref: '#/definitions/types.StdSignature' + type: array + type: object + type: object + rest.PoaRespGetValidators: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.ValidatorsConfirmationsResp' + type: object + type: object + rest.PostOrderMsg: + properties: + type: + type: string + value: + $ref: '#/definitions/types.MsgPostOrder' + type: object + type: object + rest.PostOrderReq: + properties: + asset_code: + description: 'Market assetCode in the following format: {base_denomination_symbol}_{quote_denomination_symbol}' + example: btc_dfi + type: string + base_req: + $ref: '#/definitions/rest.BaseReq' + type: object + direction: + description: Order type (ask/bid) + example: ask + type: string + price: + description: QuoteAsset price with decimals (1.0 DFI with 18 decimals -> 1000000000000000000) + example: "100" + type: string + quantity: + description: BaseAsset quantity with decimals (1.0 BTC with 8 decimals -> + 100000000) + example: "10" + type: string + ttl_in_sec: + description: Order TTL [s] + example: "3" + type: string + type: object + rest.PostPriceReq: + properties: + asset_code: + description: AssetCode + example: btc_dfi + type: string + base_req: + $ref: '#/definitions/rest.BaseReq' + type: object + price: + example: "100" + type: string + received_at: + description: Timestamp price createdAt + example: "2020-03-27T13:45:15.293426Z" + format: RFC 3339 + type: string + type: object + rest.PublishModuleReq: + properties: + base_req: + $ref: '#/definitions/rest.BaseReq' + type: object + move_code: + description: Compiled Move code + format: HEX encoded byte code + type: string + type: object + rest.RevokeOrderMsg: + properties: + type: + type: string + value: + $ref: '#/definitions/types.MsgRevokeOrder' + type: object + type: object + rest.RevokeOrderReq: + properties: + base_req: + $ref: '#/definitions/rest.BaseReq' + type: object + order_id: + example: "100" + type: string + type: object + rest.RevokeReq: + properties: + base_req: + $ref: '#/definitions/rest.BaseReq' + type: object + call_id: + description: Confirming CallID + example: "0" + format: string representation for big.Uint + type: string + type: object + rest.SubmitIssueReq: + properties: + base_req: + $ref: '#/definitions/rest.BaseReq' + type: object + coin: + $ref: '#/definitions/types.Coin' + description: Target currency issue coin + type: object + id: + description: Issue unique ID (could be txHash of transaction in another blockchain) + type: string + payee: + description: Payee account (whose balance is increased) + example: wallet13jyjuz3kkdvqw8u4qfkwd94emdl3vx394kn07h + format: bech32/hex + type: string + type: object + rest.VmData: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.ValueResp' + type: object + type: object + rest.VmRespCompile: + properties: + height: + type: integer + result: + $ref: '#/definitions/vm_client.MoveFile' + type: object + type: object + rest.VmRespLcsView: + properties: + height: + type: integer + result: + $ref: '#/definitions/rest.LcsViewResp' + type: object + type: object + rest.VmRespStdTx: + properties: + height: + type: integer + result: + $ref: '#/definitions/auth.StdTx' + type: object + type: object + rest.VmTxStatus: + properties: + height: + type: integer + result: + $ref: '#/definitions/types.TxVMStatus' + type: object + type: object + rest.WithdrawReq: + properties: + base_req: + $ref: '#/definitions/rest.BaseReq' + type: object + coin: + $ref: '#/definitions/types.Coin' + description: Target currency withdraw coin + type: object + pegzone_chain_id: + description: 'Second blockchain: ID' + type: string + pegzone_payee: + description: 'Second blockchain: payee account (whose balance is increased)' + type: string + type: object + types.AccAddress: + items: + type: integer + type: array + types.Asset: + properties: + active: + description: Not used ATM + type: boolean + asset_code: + description: Asset code + example: btc_dfi + type: string + oracles: + $ref: '#/definitions/types.Oracles' + description: List of registered RawPrice sources + type: object + type: object + types.Assets: + items: + $ref: '#/definitions/types.Asset' + type: array + types.Call: + properties: + approved: + description: 'Call state: approved to execute' + type: boolean + creator: + description: Call creator address + example: wallet13jyjuz3kkdvqw8u4qfkwd94emdl3vx394kn07h + format: bech32 + type: string + error: + description: Call fail reason + type: string + executed: + description: 'Call state: executed' + type: boolean + failed: + description: 'Call state: execution failed' + type: boolean + height: + description: BlockHeight when call was submitted + example: 1 + type: integer + id: + description: Call ID + example: "0" + format: string representation for big.Uint + type: string + msg_data: + $ref: '#/definitions/msmodule.MsMsg' + description: 'Message: data' + type: object + msg_route: + description: 'Message: route' + example: oracle + type: string + msg_type: + description: 'Message: type' + example: add_asset + type: string + rejected: + description: 'Call state: rejected' + type: boolean + unique_id: + description: Call unique ID (ID and UniqueID both identifies call) + example: issue1 + type: string + type: object + types.CallResp: + properties: + call: + $ref: '#/definitions/types.Call' + description: Call info + type: object + votes: + description: Voted accounts addresses + items: + type: string + type: array + type: object + types.CallsResp: + items: + $ref: '#/definitions/types.CallResp' + type: array + types.Coin: + properties: + amount: + $ref: '#/definitions/types.Int' + description: |- + To allow the use of unsigned integers (see: #1273) a larger refactor will + need to be made. So we use signed integers for now with safety measures in + place preventing negative values being used. + type: object + denom: + type: string + type: object + types.Coins: + items: + $ref: '#/definitions/types.Coin' + type: array + types.Currencies: + items: + $ref: '#/definitions/types.Currency' + type: array + types.Currency: + properties: + balance_path_hex: + description: Path used to store account balance for currency denom (0x1::Dfinance::T) + type: string + decimals: + description: Number of currency decimals + example: 0 + type: integer + denom: + description: Currency denom (symbol) + example: dfi + type: string + info_path_hex: + description: Path used to store CurrencyInfo for currency denom (0x1::Dfinance::Info) + type: string + supply: + description: Total amount of currency coins in Bank + example: "100" + type: string + type: object + types.CurrentPrice: + properties: + asset_code: + description: Asset code + example: btc_dfi + type: string + price: + description: Price + example: "1000" + type: string + received_at: + description: UNIX Timestamp price createdAt [sec] + example: "2020-03-27T13:45:15.293426Z" + format: RFC 3339 + type: string + type: object + types.Dec: + type: object + types.DecCoin: + properties: + amount: + $ref: '#/definitions/types.Dec' + type: object + denom: + type: string + type: object + types.DecCoins: + items: + $ref: '#/definitions/types.DecCoin' + type: array + types.ID: + $ref: '#/definitions/sdk.Uint' + types.Int: + type: object + types.Issue: + properties: + coin: + description: Issuing coin + example: 100dfi + type: string + payee: + description: Target account for increasing coin balance + example: wallet13jyjuz3kkdvqw8u4qfkwd94emdl3vx394kn07h + format: bech32 + type: string + type: object + types.Market: + properties: + base_asset_denom: + description: Base asset denomination (for ex. btc) + example: btc + type: string + id: + description: Market unique ID + example: "0" + format: string representation for big.Uint + type: string + quote_asset_denom: + description: Quote asset denomination (for ex. dfi) + example: dfi + type: string + type: object + types.MarketExtended: + properties: + base_currency: + $ref: '#/definitions/ccstorage.Currency' + description: Base asset currency (for ex. btc) + type: object + id: + description: Market unique ID + example: "0" + format: string representation for big.Uint + type: string + quote_currency: + $ref: '#/definitions/ccstorage.Currency' + description: Quote asset currency (for ex. dfi) + type: object + type: object + types.Markets: + items: + $ref: '#/definitions/types.Market' + type: array + types.Msg: + type: object + types.MsgPostOrder: + properties: + asset_code: + type: string + direction: + type: string + owner: + $ref: '#/definitions/types.AccAddress' + type: object + price: + $ref: '#/definitions/types.Uint' + type: object + quantity: + $ref: '#/definitions/types.Uint' + type: object + ttl_in_sec: + type: integer + type: object + types.MsgRevokeOrder: + properties: + order_id: + example: "0" + format: string representation for big.Uint + type: string + owner: + $ref: '#/definitions/types.AccAddress' + type: object + type: object + types.Oracle: + properties: + address: + description: Address + example: wallet13jyjuz3kkdvqw8u4qfkwd94emdl3vx394kn07h + format: bech32 + type: string + type: object + types.Oracles: + items: + $ref: '#/definitions/types.Oracle' + type: array + types.Order: + properties: + created_at: + description: Created timestamp + example: "2020-03-27T13:45:15.293426Z" + format: RFC 3339 + type: string + direction: + description: Order type (bid/ask) + example: bid + type: string + id: + description: Order unique ID + example: "0" + format: string representation for big.Uint + type: string + market: + $ref: '#/definitions/markets.MarketExtended' + description: Market order belong to + type: object + owner: + description: Order owner account address + example: wallet13jyjuz3kkdvqw8u4qfkwd94emdl3vx394kn07h + format: bech32 + type: string + price: + description: Order target price (in quote asset denom) + example: "100" + type: string + quantity: + description: Order target quantity + example: "50" + type: string + ttl_dur: + description: TimeToLive order auto-cancel period + example: 60 + type: integer + updated_at: + description: Updated timestamp + example: "2020-03-27T13:45:15.293426Z" + format: RFC 3339 + type: string + type: object + types.Orders: + items: + $ref: '#/definitions/types.Order' + type: array + types.PostedPrice: + properties: + asset_code: + description: Asset code + example: btc_dfi + type: string + oracle_address: + description: Source oracle address + example: wallet13jyjuz3kkdvqw8u4qfkwd94emdl3vx394kn07h + type: string + price: + description: Price + example: "1000" + type: string + received_at: + description: UNIX Timestamp price receivedAt [sec] + example: "2020-03-27T13:45:15.293426Z" + format: RFC 3339 + type: string + type: object + types.StdFee: + properties: + amount: + $ref: '#/definitions/types.Coins' + type: object + gas: + type: integer + type: object + types.StdSignature: + properties: + signature: + items: + type: integer + type: array + type: object + types.StdTx: + properties: + fee: + $ref: '#/definitions/types.StdFee' + type: object + memo: + type: string + msg: + items: + $ref: '#/definitions/types.Msg' + type: array + signatures: + items: + $ref: '#/definitions/types.StdSignature' + type: array + type: object + types.TxVMStatus: + properties: + hash: + type: string + vm_status: + $ref: '#/definitions/types.VMStatuses' + type: object + type: object + types.Uint: + type: object + types.VMStatus: + properties: + major_code: + description: Major code + type: string + message: + description: Message + type: string + status: + description: 'Status of error: error/discard' + type: string + str_code: + description: Detailed explanation of code + type: string + sub_code: + description: Sub code + type: string + type: object + types.VMStatuses: + items: + $ref: '#/definitions/types.VMStatus' + type: array + types.Validators: + items: + $ref: '#/definitions/types.Validator' + type: array + types.ValidatorsConfirmationsResp: + properties: + confirmations: + description: Minimum number of confirmations needed to approve Call + example: 3 + type: integer + validators: + $ref: '#/definitions/types.Validators' + description: Registered validators list + type: object + type: object + types.ValueResp: + properties: + value: + format: HEX string + type: string + type: object + types.Withdraw: + properties: + coin: + description: Target currency coin + example: 100dfi + type: string + id: + description: Withdraw unique ID + example: "0" + format: string representation for big.Uint + type: string + pegzone_chain_id: + description: 'Second blockchain: ID' + example: testnet + type: string + pegzone_spender: + description: 'Second blockchain: spender account' + example: wallet13jyjuz3kkdvqw8u4qfkwd94emdl3vx394kn07h + format: bech32 + type: string + spender: + description: Target account for reducing coin balance + example: wallet13jyjuz3kkdvqw8u4qfkwd94emdl3vx394kn07h + format: bech32 + type: string + timestamp: + description: Tx UNIX time [s] + example: 1585295757 + format: seconds + type: integer + tx_hash: + description: Tx hash + example: fd82ce32835dfd7042808eaf6ff09cece952b9da20460fa462420a93607fa96f + type: string + type: object + types.Withdraws: + items: + $ref: '#/definitions/types.Withdraw' + type: array + vm_client.MoveFile: + properties: + code: + type: string + type: object +host: stargate.cosmos.network +info: + contact: {} + description: A REST interface for state queries, transaction generation and broadcasting. + license: {} + title: Gaia-Lite for Cosmos + version: "3.0" +paths: + /auth/accounts/{address}: + get: + parameters: + - description: Account address + in: path + name: address + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + produces: + - application/json + responses: + "200": + description: Account information on the blockchain + schema: + properties: + type: + type: string + value: + properties: + account_number: + type: string + address: + type: string + coins: + items: + $ref: '#/definitions/Coin' + type: array + public_key: + $ref: '#/definitions/PublicKey' + sequence: + type: string + type: object + type: object + "500": + description: Server internel error + summary: Get the account information on blockchain + tags: + - Auth + /bank/accounts/{address}/transfers: + post: + consumes: + - application/json + parameters: + - description: Account address in bech32 format + in: path + name: address + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - description: The sender and tx information + in: body + name: account + required: true + schema: + properties: + amount: + items: + $ref: '#/definitions/Coin' + type: array + base_req: + $ref: '#/definitions/BaseReq' + type: object + produces: + - application/json + responses: + "202": + description: Tx was succesfully generated + schema: + $ref: '#/definitions/StdTx' + "400": + description: Invalid request + "500": + description: Server internal error + summary: Send coins from one account to another + tags: + - Bank + /bank/balances/{address}: + get: + parameters: + - description: Account address in bech32 format + in: path + name: address + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + produces: + - application/json + responses: + "200": + description: Account balances + schema: + items: + $ref: '#/definitions/Coin' + type: array + "500": + description: Server internal error + summary: Get the account balances + tags: + - Bank + /blocks/{height}: + get: + parameters: + - description: Block height + in: path + name: height + required: true + type: number + x-example: 1 + produces: + - application/json + responses: + "200": + description: The block at a specific height + schema: + $ref: '#/definitions/BlockQuery' + "400": + description: Invalid height + "404": + description: Request block height doesn't + "500": + description: Server internal error + summary: Get a block at a certain height + tags: + - Tendermint RPC + /blocks/latest: + get: + produces: + - application/json + responses: + "200": + description: The latest block + schema: + $ref: '#/definitions/BlockQuery' + "500": + description: Server internal error + summary: Get the latest block + tags: + - Tendermint RPC + /currencies: + get: + consumes: + - application/json + operationId: currenciesGetCurrencies + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.CCRespGetCurrencies' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get all registered currencies + tags: + - Currencies + /currencies/currency/{denom}: + get: + consumes: + - application/json + description: Get currency by denom + operationId: currenciesGetCurrency + parameters: + - description: currency denomination symbol + in: path + name: denom + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.CCRespGetCurrency' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get currency + tags: + - Currencies + /currencies/issue: + put: + consumes: + - application/json + description: Get submit new issue multi signature message stdTx object + operationId: currenciesSubmitIssue + parameters: + - description: Submit issue request + in: body + name: request + required: true + schema: + $ref: '#/definitions/rest.SubmitIssueReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.CCRespStdTx' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Submit issue + tags: + - Currencies + /currencies/issue/{issueID}: + get: + consumes: + - application/json + description: Get currency issue by issueID + operationId: currenciesGetIssue + parameters: + - description: issueID + in: path + name: issueID + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.CCRespGetIssue' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get currency issue + tags: + - Currencies + /currencies/withdraw: + put: + consumes: + - application/json + description: Get withdraw currency coins from account balance stdTx object + operationId: currenciesWithdraw + parameters: + - description: Withdraw request + in: body + name: request + required: true + schema: + $ref: '#/definitions/rest.WithdrawReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.CCRespStdTx' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Withdraw currency + tags: + - Currencies + /currencies/withdraw/{withdrawID}: + get: + consumes: + - application/json + description: Get currency withdraw by withdrawID + operationId: currenciesGetWithdraw + parameters: + - description: withdrawID + in: path + name: withdrawID + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.CCRespGetWithdraw' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get currency withdraw + tags: + - Currencies + /currencies/withdraws: + get: + consumes: + - application/json + description: Get array of Withdraw objects with pagination + operationId: currenciesGetWithdraws + parameters: + - description: 'page number (first page: 1)' + in: query + name: page + type: integer + - description: 'items per page (default: 100)' + in: query + name: limit + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.CCRespGetWithdraws' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get currency withdraws + tags: + - Currencies + /distribution/community_pool: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Coin' + type: array + "500": + description: Internal Server Error + summary: Community pool parameters + tags: + - Distribution + /distribution/delegators/{delegatorAddr}/rewards: + get: + description: Get the sum of all the rewards earned by delegations by a single + delegator + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/DelegatorTotalRewards' + "400": + description: Invalid delegator address + "500": + description: Internal Server Error + summary: Get the total rewards balance from all delegations + tags: + - Distribution + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf + post: + consumes: + - application/json + description: Withdraw all the delegator's delegation rewards + parameters: + - in: body + name: Withdraw request body + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/BroadcastTxCommitResult' + "400": + description: Invalid delegator address + "401": + description: Key password is wrong + "500": + description: Internal Server Error + summary: Withdraw all the delegator's delegation rewards + tags: + - Distribution + /distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}: + get: + description: Query a single delegation reward by a delegator + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Coin' + type: array + "400": + description: Invalid delegator address + "500": + description: Internal Server Error + summary: Query a delegation reward + tags: + - Distribution + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - description: Bech32 OperatorAddress of validator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + post: + consumes: + - application/json + description: Withdraw a delegator's delegation reward from a single validator + parameters: + - in: body + name: Withdraw request body + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + produces: + - application/json + 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 + summary: Withdraw a delegation reward + tags: + - Distribution + /distribution/delegators/{delegatorAddr}/withdraw_address: + get: + description: Get the delegations' rewards withdrawal address. This is the address + in which the user will receive the reward funds + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Address' + "400": + description: Invalid delegator address + "500": + description: Internal Server Error + summary: Get the rewards withdrawal address + tags: + - Distribution + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf + post: + consumes: + - application/json + description: Replace the delegations' rewards withdrawal address for a new one. + parameters: + - in: body + name: Withdraw request body + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + withdraw_address: + $ref: '#/definitions/Address' + produces: + - application/json + 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 + summary: Replace the rewards withdrawal address + tags: + - Distribution + /distribution/parameters: + get: + 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 + summary: Fee distribution parameters + tags: + - Distribution + /distribution/validators/{validatorAddr}: + get: + description: Query the distribution information of a single validator + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/ValidatorDistInfo' + "400": + description: Invalid validator address + "500": + description: Internal Server Error + summary: Validator distribution information + tags: + - Distribution + parameters: + - description: Bech32 OperatorAddress of validator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + /distribution/validators/{validatorAddr}/outstanding_rewards: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Coin' + type: array + "500": + description: Internal Server Error + summary: Fee distribution outstanding rewards of a single validator + tags: + - Distribution + parameters: + - description: Bech32 OperatorAddress of validator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + /distribution/validators/{validatorAddr}/rewards: + get: + description: Query the commission and self-delegation rewards of validator. + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Coin' + type: array + "400": + description: Invalid validator address + "500": + description: Internal Server Error + summary: Commission and self-delegation rewards of a single validator + tags: + - Distribution + parameters: + - description: Bech32 OperatorAddress of validator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + post: + consumes: + - application/json + description: Withdraw the validator's self-delegation and commissions rewards + parameters: + - in: body + name: Withdraw request body + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/BroadcastTxCommitResult' + "400": + description: Invalid validator address + "401": + description: Key password is wrong + "500": + description: Internal Server Error + summary: Withdraw the validator's rewards + tags: + - Distribution + /gov/parameters/deposit: + get: + description: Query governance deposit parameters. The max_deposit_period units + are in nanoseconds. + produces: + - application/json + responses: + "200": + description: OK + schema: + properties: + max_deposit_period: + example: "86400000000000" + type: string + min_deposit: + items: + $ref: '#/definitions/Coin' + type: array + type: object + "400": + description: is not a valid query request path + "404": + description: Found no deposit parameters + "500": + description: Internal Server Error + summary: Query governance deposit parameters + tags: + - Governance + /gov/parameters/tallying: + get: + description: Query governance tally parameters + produces: + - application/json + responses: + "200": + description: OK + schema: + properties: + governance_penalty: + example: "0.0100000000" + type: string + threshold: + example: "0.5000000000" + type: string + veto: + example: "0.3340000000" + type: string + "400": + description: is not a valid query request path + "404": + description: Found no tally parameters + "500": + description: Internal Server Error + summary: Query governance tally parameters + tags: + - Governance + /gov/parameters/voting: + get: + description: Query governance voting parameters. The voting_period units are + in nanoseconds. + produces: + - application/json + responses: + "200": + description: OK + schema: + properties: + voting_period: + example: "86400000000000" + type: string + "400": + description: is not a valid query request path + "404": + description: Found no voting parameters + "500": + description: Internal Server Error + summary: Query governance voting parameters + tags: + - Governance + /gov/proposals: + get: + description: Query proposals information with parameters + parameters: + - description: voter address + in: query + name: voter + required: false + type: string + - description: depositor address + in: query + name: depositor + required: false + type: string + - description: proposal status, valid values can be `"deposit_period"`, `"voting_period"`, + `"passed"`, `"rejected"` + in: query + name: status + required: false + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/TextProposal' + type: array + "400": + description: Invalid query parameters + "500": + description: Internal Server Error + summary: Query proposals + tags: + - Governance + post: + consumes: + - application/json + description: Send transaction to submit a proposal + parameters: + - description: valid value of `"proposal_type"` can be `"text"`, `"parameter_change"`, + `"software_upgrade"` + in: body + name: post_proposal_body + required: true + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + description: + type: string + initial_deposit: + items: + $ref: '#/definitions/Coin' + type: array + proposal_type: + example: text + type: string + proposer: + $ref: '#/definitions/Address' + title: + type: string + type: object + produces: + - application/json + responses: + "200": + description: Tx was succesfully generated + schema: + $ref: '#/definitions/StdTx' + "400": + description: Invalid proposal body + "500": + description: Internal Server Error + summary: Submit a proposal + tags: + - Governance + /gov/proposals/{proposalId}: + get: + description: Query a proposal by id + parameters: + - in: path + name: proposalId + required: true + type: string + x-example: "2" + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/TextProposal' + "400": + description: Invalid proposal id + "500": + description: Internal Server Error + summary: Query a proposal + tags: + - Governance + /gov/proposals/{proposalId}/deposits: + get: + description: Query deposits by proposalId + parameters: + - in: path + name: proposalId + required: true + type: string + x-example: "2" + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Deposit' + type: array + "400": + description: Invalid proposal id + "500": + description: Internal Server Error + summary: Query deposits + tags: + - Governance + post: + consumes: + - application/json + description: Send transaction to deposit tokens to a proposal + parameters: + - description: proposal id + in: path + name: proposalId + required: true + type: string + x-example: "2" + - description: "" + in: body + name: post_deposit_body + required: true + schema: + properties: + amount: + items: + $ref: '#/definitions/Coin' + type: array + base_req: + $ref: '#/definitions/BaseReq' + depositor: + $ref: '#/definitions/Address' + type: object + produces: + - application/json + 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 + summary: Deposit tokens to a proposal + tags: + - Governance + /gov/proposals/{proposalId}/deposits/{depositor}: + get: + description: Query deposit by proposalId and depositor address + parameters: + - description: proposal id + in: path + name: proposalId + required: true + type: string + x-example: "2" + - description: Bech32 depositor address + in: path + name: depositor + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + produces: + - application/json + 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 + summary: Query deposit + tags: + - Governance + /gov/proposals/{proposalId}/proposer: + get: + description: Query for the proposer for a proposal + parameters: + - in: path + name: proposalId + required: true + type: string + x-example: "2" + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Proposer' + "400": + description: Invalid proposal ID + "500": + description: Internal Server Error + summary: Query proposer + tags: + - Governance + /gov/proposals/{proposalId}/tally: + get: + 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. + parameters: + - description: proposal id + in: path + name: proposalId + required: true + type: string + x-example: "2" + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/TallyResult' + "400": + description: Invalid proposal id + "500": + description: Internal Server Error + summary: Get a proposal's tally result at the current time + tags: + - Governance + /gov/proposals/{proposalId}/votes: + get: + description: Query voters information by proposalId + parameters: + - description: proposal id + in: path + name: proposalId + required: true + type: string + x-example: "2" + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Vote' + type: array + "400": + description: Invalid proposal id + "500": + description: Internal Server Error + summary: Query voters + tags: + - Governance + post: + consumes: + - application/json + description: Send transaction to vote a proposal + parameters: + - description: proposal id + in: path + name: proposalId + required: true + type: string + x-example: "2" + - description: valid value of `"option"` field can be `"yes"`, `"no"`, `"no_with_veto"` + and `"abstain"` + in: body + name: post_vote_body + required: true + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + option: + example: "yes" + type: string + voter: + $ref: '#/definitions/Address' + type: object + produces: + - application/json + 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 + summary: Vote a proposal + tags: + - Governance + /gov/proposals/{proposalId}/votes/{voter}: + get: + description: Query vote information by proposal Id and voter address + parameters: + - description: proposal id + in: path + name: proposalId + required: true + type: string + x-example: "2" + - description: Bech32 voter address + in: path + name: voter + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + produces: + - application/json + 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 + summary: Query vote + tags: + - Governance + /gov/proposals/param_change: + post: + consumes: + - application/json + description: Generate a parameter change proposal transaction + parameters: + - description: The parameter change proposal body that contains all parameter + changes + in: body + name: post_proposal_body + required: true + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + changes: + items: + $ref: '#/definitions/ParamChange' + type: array + deposit: + items: + $ref: '#/definitions/Coin' + type: array + description: + type: string + x-example: Update max validators + proposer: + $ref: '#/definitions/Address' + title: + type: string + x-example: Param Change + type: object + produces: + - application/json + responses: + "200": + description: The transaction was succesfully generated + schema: + $ref: '#/definitions/StdTx' + "400": + description: Invalid proposal body + "500": + description: Internal Server Error + summary: Generate a parameter change proposal transaction + tags: + - Governance + /markets: + get: + consumes: + - application/json + description: Get array of Market objects with pagination and filters + operationId: marketsGetMarketsWithParams + parameters: + - description: 'page number (first page: 1)' + in: query + name: page + type: integer + - description: 'items per page (default: 100)' + in: query + name: limit + type: integer + - description: BaseAsset denom filter + in: query + name: baseAssetDenom + type: string + - description: QuoteAsset denom filter + in: query + name: quoteAssetDenom + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.MarketsRespGetMarkets' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get markets + tags: + - Markets + /markets/{marketID}: + get: + consumes: + - application/json + description: Get Market object by marketID + operationId: marketsGetMarket + parameters: + - description: marketID + in: path + name: marketID + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.MarketsRespGetMarket' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get market + tags: + - Markets + /minting/annual-provisions: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + type: string + "500": + description: Internal Server Error + summary: Current minting annual provisions value + tags: + - Mint + /minting/inflation: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + type: string + "500": + description: Internal Server Error + summary: Current minting inflation value + tags: + - Mint + /minting/parameters: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + properties: + blocks_per_year: + type: string + goal_bonded: + type: string + inflation_max: + type: string + inflation_min: + type: string + inflation_rate_change: + type: string + mint_denom: + type: string + "500": + description: Internal Server Error + summary: Minting module parameters + tags: + - Mint + /multisig/call/{callID}: + get: + consumes: + - application/json + description: Get call object by it's ID + operationId: multisigGetCall + parameters: + - description: callID + in: path + name: callID + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.MSRespGetCall' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get call + tags: + - Multisig + /multisig/calls: + get: + consumes: + - application/json + description: Get active call objects + operationId: multisigGetCalls + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.MSRespGetCalls' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get active calls + tags: + - Multisig + /multisig/confirm: + put: + consumes: + - application/json + description: Get confirm multi signature call by PoA validator stdTx object + operationId: multisigConfirm + parameters: + - description: Confirm request + in: body + name: request + required: true + schema: + $ref: '#/definitions/rest.ConfirmReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.CCRespStdTx' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Confirm call + tags: + - Multisig + /multisig/revoke: + put: + consumes: + - application/json + description: Get revoke multi signature call vote by PoA validator stdTx object + operationId: multisigRevoke + parameters: + - description: Revoke request + in: body + name: request + required: true + schema: + $ref: '#/definitions/rest.RevokeReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.CCRespStdTx' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Revoke call + tags: + - Multisig + /multisig/unique/{uniqueID}: + get: + consumes: + - application/json + description: Get call object by it's uniqueID + operationId: multisigGetUniqueCall + parameters: + - description: call uniqueID + in: path + name: uniqueID + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.MSRespGetCall' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get call + tags: + - Multisig + /node_info: + get: + description: Information about the connected node + produces: + - application/json + responses: + "200": + description: Node status + schema: + 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: + channels: + type: string + id: + type: string + listen_addr: + example: 192.168.56.1:26656 + type: string + moniker: + example: validator-name + type: string + network: + example: gaia-2 + type: string + other: + description: more information on versions + properties: + rpc_address: + example: tcp://0.0.0.0:26657 + type: string + tx_index: + example: true + type: string + type: object + protocol_version: + properties: + app: + example: 0 + type: string + block: + example: 10 + type: string + p2p: + example: 7 + type: string + version: + description: Tendermint version + example: 0.15.0 + type: string + type: object + "500": + description: Failed to query node status + summary: The properties of the connected node + tags: + - Tendermint RPC + /oracle/assets: + get: + consumes: + - application/json + description: Get asset objects + operationId: oracleGetAssets + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.OracleRespGetAssets' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "404": + description: Returned if requested data wasn't found + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get assets + tags: + - Oracle + /oracle/currentprice/{assetCode}: + get: + consumes: + - application/json + description: Get current Price by assetCode + operationId: oracleGetCurrentPrice + parameters: + - description: asset code + in: path + name: assetCode + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.OracleRespGetPrice' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "404": + description: Returned if requested data wasn't found + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get current Price + tags: + - Oracle + /oracle/rawprices: + put: + consumes: + - application/json + description: Send asset rawPrice signed Tx + operationId: oraclePostPrice + parameters: + - description: PostPrice request with signed transaction + in: body + name: postRequest + required: true + schema: + $ref: '#/definitions/rest.PostPriceReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.OracleRespGetAssets' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Post asset rawPrice + tags: + - Oracle + /oracle/rawprices/{assetCode}/{blockHeight}: + get: + consumes: + - application/json + description: Get rawPrice objects by assetCode and blockHeight + operationId: oracleGetRawPrices + parameters: + - description: asset code + in: path + name: assetCode + required: true + type: string + - description: block height rawPrices relates to + in: path + name: blockHeight + required: true + type: integer + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.OracleRespGetRawPrices' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "404": + description: Returned if requested data wasn't found + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get rawPrices + tags: + - Oracle + /orders: + get: + consumes: + - application/json + description: Get array of Order objects with pagination and filters + operationId: ordersGetOrdersWithParams + parameters: + - description: 'page number (first page: 1)' + in: query + name: page + type: integer + - description: 'items per page (default: 100)' + in: query + name: limit + type: integer + - description: owner filter + in: query + name: owner + type: string + - description: direction filter (bid/ask) + in: query + name: direction + type: string + - description: marketID filter (bid/ask) + in: query + name: marketID + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.OrdersRespGetOrders' + "400": + description: Returned if the request doesn't have valid query/path params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get orders + tags: + - Orders + /orders/{orderID}: + get: + consumes: + - application/json + description: Get Order object by orderID + operationId: ordersGetOrder + parameters: + - description: orderID + in: path + name: orderID + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.OrdersRespGetOrder' + "400": + description: Returned if the request doesn't have valid query/path params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get order + tags: + - Orders + /orders/post: + put: + consumes: + - application/json + description: Post new order + operationId: ordersPostOrder + parameters: + - description: PostOrder request with signed transaction + in: body + name: postRequest + required: true + schema: + $ref: '#/definitions/rest.PostOrderReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.OrdersRespPostOrder' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Post new order + tags: + - Orders + /orders/revoke: + put: + consumes: + - application/json + description: Revoke order + operationId: ordersRevokeOrder + parameters: + - description: RevokeOrder request with signed transaction + in: body + name: postRequest + required: true + schema: + $ref: '#/definitions/rest.RevokeOrderReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.OrdersRespRevokeOrder' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Revoke order + tags: + - Orders + /poa/validators: + get: + consumes: + - application/json + description: Get validator objects and required confirmations count + operationId: poaValidators + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.PoaRespGetValidators' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get validators + tags: + - PoA + /slashing/parameters: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + properties: + double_sign_unbond_duration: + type: string + downtime_unbond_duration: + type: string + max_evidence_age: + type: string + min_signed_per_window: + type: string + signed_blocks_window: + type: string + slash_fraction_double_sign: + type: string + slash_fraction_downtime: + type: string + type: object + "500": + description: Internal Server Error + summary: Get the current slashing parameters + tags: + - Slashing + /slashing/signing_infos: + get: + description: Get sign info of all validators + parameters: + - description: Page number + in: query + name: page + required: true + type: integer + x-example: 1 + - description: Maximum number of items per page + in: query + name: limit + required: true + type: integer + x-example: 5 + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/SigningInfo' + type: array + "400": + description: Invalid validator public key for one of the validators + "500": + description: Internal Server Error + summary: Get sign info of given all validators + tags: + - Slashing + /slashing/validators/{validatorAddr}/unjail: + post: + consumes: + - application/json + description: Send transaction to unjail a jailed validator + parameters: + - description: Bech32 validator address + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + - description: "" + in: body + name: UnjailBody + required: true + schema: + properties: + base_req: + $ref: '#/definitions/StdTx' + type: object + produces: + - application/json + responses: + "200": + description: Tx was succesfully generated + schema: + $ref: '#/definitions/BroadcastTxCommitResult' + "400": + description: Invalid validator address or base_req + "500": + description: Internal Server Error + summary: Unjail a jailed validator + tags: + - Slashing + /staking/delegators/{delegatorAddr}/delegations: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Delegation' + type: array + "400": + description: Invalid delegator address + "500": + description: Internal Server Error + summary: Get all delegations from a delegator + tags: + - Staking + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + post: + consumes: + - application/json + parameters: + - description: The password of the account to remove from the KMS + in: body + name: delegation + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + delegation: + $ref: '#/definitions/Coin' + delegator_address: + $ref: '#/definitions/Address' + validator_address: + $ref: '#/definitions/ValidatorAddress' + type: object + 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 + summary: Submit delegation + tags: + - Staking + /staking/delegators/{delegatorAddr}/delegations/{validatorAddr}: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Delegation' + "400": + description: Invalid delegator address or validator address + "500": + description: Internal Server Error + summary: Query the current delegation between a delegator and a validator + tags: + - Staking + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - description: Bech32 OperatorAddress of validator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + /staking/delegators/{delegatorAddr}/redelegations: + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + post: + consumes: + - application/json + parameters: + - description: The sender and tx information + in: body + name: delegation + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + delegator_address: + $ref: '#/definitions/Address' + shares: + example: "100" + type: string + validator_dst_address: + $ref: '#/definitions/ValidatorAddress' + validator_src_addressess: + $ref: '#/definitions/ValidatorAddress' + type: object + produces: + - application/json + responses: + "200": + description: Tx was succesfully generated + schema: + $ref: '#/definitions/StdTx' + "400": + description: Invalid delegator address or redelegation request body + "500": + description: Internal Server Error + summary: Submit a redelegation + tags: + - Staking + /staking/delegators/{delegatorAddr}/unbonding_delegations: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/UnbondingDelegation' + type: array + "400": + description: Invalid delegator address + "500": + description: Internal Server Error + summary: Get all unbonding delegations from a delegator + tags: + - Staking + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + post: + consumes: + - application/json + parameters: + - description: The password of the account to remove from the KMS + in: body + name: delegation + schema: + properties: + base_req: + $ref: '#/definitions/BaseReq' + delegator_address: + $ref: '#/definitions/Address' + shares: + example: "100" + type: string + validator_address: + $ref: '#/definitions/ValidatorAddress' + type: object + 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 + summary: Submit an unbonding delegation + tags: + - Staking + /staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/UnbondingDelegationPair' + "400": + description: Invalid delegator address or validator address + "500": + description: Internal Server Error + summary: Query all unbonding delegations between a delegator and a validator + tags: + - Staking + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - description: Bech32 OperatorAddress of validator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + /staking/delegators/{delegatorAddr}/validators: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Validator' + type: array + "400": + description: Invalid delegator address + "500": + description: Internal Server Error + summary: Query all validators that a delegator is bonded to + tags: + - Staking + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + /staking/delegators/{delegatorAddr}/validators/{validatorAddr}: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Validator' + "400": + description: Invalid delegator address or validator address + "500": + description: Internal Server Error + summary: Query a validator that a delegator is bonded to + tags: + - Staking + parameters: + - description: Bech32 AccAddress of Delegator + in: path + name: delegatorAddr + required: true + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - description: Bech32 ValAddress of Delegator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + /staking/parameters: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + properties: + bond_denom: + type: string + goal_bonded: + type: string + inflation_max: + type: string + inflation_min: + type: string + inflation_rate_change: + type: string + max_validators: + type: integer + unbonding_time: + type: string + type: object + "500": + description: Internal Server Error + summary: Get the current staking parameter values + tags: + - Staking + /staking/pool: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + properties: + bonded_tokens: + type: string + date_last_commission_reset: + type: string + inflation: + type: string + inflation_last_time: + type: string + loose_tokens: + type: string + prev_bonded_shares: + type: string + type: object + "500": + description: Internal Server Error + summary: Get the current state of the staking pool + tags: + - Staking + /staking/redelegations: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Redelegation' + type: array + "500": + description: Internal Server Error + summary: Get all redelegations (filter by query params) + tags: + - Staking + parameters: + - description: Bech32 AccAddress of Delegator + in: query + name: delegator + required: false + type: string + - description: Bech32 ValAddress of SrcValidator + in: query + name: validator_from + required: false + type: string + - description: Bech32 ValAddress of DstValidator + in: query + name: validator_to + required: false + type: string + /staking/validators: + get: + parameters: + - description: The validator bond status. Must be either 'bonded', 'unbonded', + or 'unbonding'. + in: query + name: status + type: string + x-example: bonded + - description: The page number. + in: query + name: page + type: integer + x-example: 1 + - description: The maximum number of items per page. + in: query + name: limit + type: integer + x-example: 1 + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Validator' + type: array + "500": + description: Internal Server Error + summary: Get all validator candidates. By default it returns only the bonded + validators. + tags: + - Staking + /staking/validators/{validatorAddr}: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Validator' + "400": + description: Invalid validator address + "500": + description: Internal Server Error + summary: Query the information from a single validator + tags: + - Staking + parameters: + - description: Bech32 OperatorAddress of validator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + /staking/validators/{validatorAddr}/delegations: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/Delegation' + type: array + "400": + description: Invalid validator address + "500": + description: Internal Server Error + summary: Get all delegations from a validator + tags: + - Staking + parameters: + - description: Bech32 OperatorAddress of validator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + /staking/validators/{validatorAddr}/unbonding_delegations: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/UnbondingDelegation' + type: array + "400": + description: Invalid validator address + "500": + description: Internal Server Error + summary: Get all unbonding delegations from a validator + tags: + - Staking + parameters: + - description: Bech32 OperatorAddress of validator + in: path + name: validatorAddr + required: true + type: string + x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l + /supply/total: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/Supply' + "500": + description: Internal Server Error + summary: Total supply of coins in the chain + tags: + - Supply + /supply/total/{denomination}: + get: + produces: + - application/json + responses: + "200": + description: OK + schema: + type: string + "400": + description: Invalid coin denomination + "500": + description: Internal Server Error + summary: Total supply of a single coin denomination + tags: + - Supply + parameters: + - description: Coin denomination + in: path + name: denomination + required: true + type: string + x-example: uatom + /syncing: + get: + description: Get if the node is currently syning with other nodes + produces: + - application/json + responses: + "200": + description: Node syncing status + schema: + properties: + syncing: + type: boolean + type: object + "500": + description: Server internal error + summary: Syncing state of node + tags: + - Tendermint RPC + /txs: + get: + description: Search transactions by events. + parameters: + - 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' + in: query + name: message.action + type: string + x-example: send + - description: 'transaction tags with sender: ''GET /txs?message.action=send&message.sender=cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv''' + in: query + name: message.sender + type: string + x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv + - description: Page number + in: query + name: page + type: integer + x-example: 1 + - description: Maximum number of items per page + in: query + name: limit + type: integer + x-example: 1 + - description: transactions on blocks with height greater or equal this value + in: query + name: tx.minheight + type: integer + x-example: 25 + - description: transactions on blocks with height less than or equal this value + in: query + name: tx.maxheight + type: integer + x-example: 800000 + produces: + - application/json + responses: + "200": + description: All txs matching the provided events + schema: + $ref: '#/definitions/PaginatedQueryTxs' + "400": + description: Invalid search events + "500": + description: Internal Server Error + summary: Search transactions + tags: + - Transactions + post: + consumes: + - application/json + description: Broadcast a signed tx to a full node + parameters: + - 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). + in: body + name: txBroadcast + required: true + schema: + properties: + mode: + example: block + type: string + tx: + $ref: '#/definitions/StdTx' + type: object + produces: + - application/json + responses: + "200": + description: Tx broadcasting result + schema: + $ref: '#/definitions/BroadcastTxCommitResult' + "500": + description: Internal Server Error + summary: Broadcast a signed tx + tags: + - Transactions + /txs/{hash}: + get: + description: Retrieve a transaction using its hash. + parameters: + - description: Tx hash + in: path + name: hash + required: true + type: string + x-example: BCBE20E8D46758B96AE5883B792858296AC06E51435490FBDCAE25A72B3CC76B + produces: + - application/json + responses: + "200": + description: Tx with the provided hash + schema: + $ref: '#/definitions/TxQuery' + "500": + description: Internal Server Error + summary: Get a Tx by hash + tags: + - Transactions + /txs/decode: + post: + consumes: + - application/json + description: Decode a transaction (signed or not) from base64-encoded Amino + serialized bytes to JSON + parameters: + - description: The tx to decode + in: body + name: tx + required: true + schema: + properties: + tx: + example: SvBiXe4KPqijYZoKFFHEzJ8c2HPAfv2EFUcIhx0yPagwEhTy0vPA+GGhCEslKXa4Af0uB+mfShoMCgVzdGFrZRIDMTAwEgQQwJoM + type: string + type: object + produces: + - application/json + responses: + "200": + description: The tx was successfully decoded + schema: + $ref: '#/definitions/StdTx' + "400": + description: The tx was malformated + "500": + description: Server internal error + summary: Decode a transaction from the Amino wire format + tags: + - Transactions + /txs/encode: + post: + consumes: + - application/json + description: Encode a transaction (signed or not) from JSON to base64-encoded + Amino serialized bytes + parameters: + - description: The tx to encode + in: body + name: tx + required: true + schema: + properties: + tx: + $ref: '#/definitions/StdTx' + type: object + produces: + - application/json + responses: + "200": + description: The tx was successfully decoded and re-encoded + schema: + properties: + tx: + example: The base64-encoded Amino-serialized bytes for the tx + type: string + type: object + "400": + description: The tx was malformated + "500": + description: Server internal error + summary: Encode a transaction to the Amino wire format + tags: + - Transactions + /validatorsets/{height}: + get: + parameters: + - description: Block height + in: path + name: height + required: true + type: number + x-example: 1 + produces: + - application/json + responses: + "200": + description: The validator set at a specific block height + schema: + properties: + block_height: + type: string + validators: + items: + $ref: '#/definitions/TendermintValidator' + type: array + type: object + "400": + description: Invalid height + "404": + description: Block at height not available + "500": + description: Server internal error + summary: Get a validator set a certain height + tags: + - Tendermint RPC + /validatorsets/latest: + get: + produces: + - application/json + responses: + "200": + description: The validator set at the latest block height + schema: + properties: + block_height: + type: string + validators: + items: + $ref: '#/definitions/TendermintValidator' + type: array + type: object + "500": + description: Server internal error + summary: Get the latest validator set + tags: + - Tendermint RPC + /vm/compile: + get: + consumes: + - application/json + description: Compile script / module code using VM and return byteCode + operationId: vmCompile + parameters: + - description: Code with metadata + in: body + name: getRequest + required: true + schema: + $ref: '#/definitions/rest.CompileReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.VmRespCompile' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get compiled byteCode + tags: + - VM + /vm/data/{accountAddr}/{vmPath}: + get: + consumes: + - application/json + description: Get writeSet data from VM by accountAddr and path + operationId: vmGetData + parameters: + - description: account address (Libra HEX Bech32) + in: path + name: accountAddr + required: true + type: string + - description: VM path (HEX string) + in: path + name: vmPath + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.VmData' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get writeSet data from VM + tags: + - VM + /vm/execute: + put: + consumes: + - application/json + description: Get execute Move script stdTx object + operationId: vmExecuteScript + parameters: + - description: Execute request + in: body + name: request + required: true + schema: + $ref: '#/definitions/rest.ExecuteScriptReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.VmRespStdTx' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Execute Move script + tags: + - VM + /vm/publish: + put: + consumes: + - application/json + description: Get publish Move module stdTx object + operationId: vmDeployModule + parameters: + - description: Publish request + in: body + name: request + required: true + schema: + $ref: '#/definitions/rest.PublishModuleReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.VmRespStdTx' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Publish Move module + tags: + - VM + /vm/tx/{txHash}: + get: + consumes: + - application/json + description: Get TX VM execution status by hash + operationId: vmTxStatus + parameters: + - description: transaction hash + in: path + name: txHash + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.VmTxStatus' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "404": + description: Returned if the requested data wasn't found + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get TX VM execution status + tags: + - VM + /vm/view: + get: + consumes: + - application/json + description: Get writeSet data LCS string view for {address}::{moduleName}::{structName} + Move path" + operationId: vmGetData + parameters: + - description: View request + in: body + name: request + required: true + schema: + $ref: '#/definitions/rest.LcsViewReq' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/rest.VmRespLcsView' + "400": + description: Returned if the request doesn't have valid query params + schema: + $ref: '#/definitions/rest.ErrorResponse' + "500": + description: Returned on server error + schema: + $ref: '#/definitions/rest.ErrorResponse' + summary: Get writeSet data from VM LCS string view + tags: + - VM +schemes: +- https +securityDefinitions: + kms: + type: basic +swagger: "2.0" +tags: +- description: Search, encode, or broadcast transactions. + name: Transactions +- description: Tendermint APIs, such as query blocks, transactions and validatorset + name: Tendermint RPC +- description: Authenticate accounts + name: Auth +- description: Create and broadcast transactions + name: Bank +- description: Stake module APIs + name: Staking +- description: Governance module APIs + name: Governance +- description: Slashing module APIs + name: Slashing +- description: Fee distribution module APIs + name: Distribution +- description: Supply module APIs + name: Supply +- name: version +- description: Minting module APIs + name: Mint +- description: Query app version + name: Misc diff --git a/cmd/dncli/main.go b/cmd/dncli/main.go index 71a87982..3392151e 100644 --- a/cmd/dncli/main.go +++ b/cmd/dncli/main.go @@ -24,7 +24,6 @@ import ( "github.com/dfinance/dnode/app" dnConfig "github.com/dfinance/dnode/cmd/config" "github.com/dfinance/dnode/helpers/logger" - "github.com/dfinance/dnode/helpers/swagger" vmauthCli "github.com/dfinance/dnode/x/vmauth/client/cli" ) @@ -90,7 +89,6 @@ func registerRoutes(rs *lcd.RestServer) { client.RegisterRoutes(rs.CliCtx, rs.Mux) authrest.RegisterTxRoutes(rs.CliCtx, rs.Mux) app.ModuleBasics.RegisterRESTRoutes(rs.CliCtx, rs.Mux) - swagger.RegisterRESTRoute(rs.Mux) } // Add query subcommands to CLI. diff --git a/go.mod b/go.mod index c97446cd..d3d080a0 100644 --- a/go.mod +++ b/go.mod @@ -14,21 +14,24 @@ require ( github.com/dfinance/glav v0.0.0-20200731202515-8e21f58877c8 github.com/dfinance/lcs v0.1.7-big github.com/fsouza/go-dockerclient v1.6.3 - github.com/g3co/go-swagger-merger v0.0.0-20200729134821-4edc8debe55f // indirect + github.com/g3co/go-swagger-merger v0.0.0-20200916115803-70f050d0cb09 // indirect github.com/getsentry/sentry-go v0.5.1 github.com/ghodss/yaml v1.0.0 - github.com/go-openapi/spec v0.19.9 // indirect - github.com/go-openapi/swag v0.19.9 // indirect + github.com/go-openapi/spec v0.20.3 // indirect + github.com/go-openapi/swag v0.19.15 // indirect github.com/gogo/protobuf v1.3.1 github.com/gorilla/handlers v1.4.2 github.com/gorilla/mux v1.7.4 github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect - github.com/mailru/easyjson v0.7.2 // indirect + github.com/kr/pty v1.1.5 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/olekukonko/tablewriter v0.0.4 github.com/pelletier/go-toml v1.6.0 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/satori/go.uuid v1.2.0 // indirect github.com/spf13/afero v1.2.2 // indirect github.com/spf13/cobra v1.0.0 github.com/spf13/pflag v1.0.5 @@ -39,9 +42,11 @@ require ( github.com/tendermint/go-amino v0.15.1 github.com/tendermint/tendermint v0.33.6 github.com/tendermint/tm-db v0.5.1 - github.com/urfave/cli/v2 v2.2.0 // indirect - golang.org/x/net v0.0.0-20200707034311-ab3426394381 // indirect - golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d // indirect + github.com/urfave/cli/v2 v2.3.0 // indirect + golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect + golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/tools v0.1.0 // indirect google.golang.org/grpc v1.30.0 google.golang.org/protobuf v1.24.0 // indirect k8s.io/apimachinery v0.18.6 // indirect diff --git a/go.sum b/go.sum index b8754917..95ca78be 100644 --- a/go.sum +++ b/go.sum @@ -142,6 +142,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -206,6 +207,8 @@ github.com/fsouza/go-dockerclient v1.6.3 h1:VS/I3mxieZVIeaWXd57JKvSjheELafUJYtbl github.com/fsouza/go-dockerclient v1.6.3/go.mod h1:OiSy/IhZIF+zheikZkXK7LVpGzxWchJPJKGWhBqOK4M= github.com/g3co/go-swagger-merger v0.0.0-20200729134821-4edc8debe55f h1:k5O6l2MEnI8MBFwK5SBGyC9OGVlPCbEf+HJwOHxGhQE= github.com/g3co/go-swagger-merger v0.0.0-20200729134821-4edc8debe55f/go.mod h1:jvC3b+YoOx9/SJYqqo1pN1vJ31StlOCugGCyO3EW9XA= +github.com/g3co/go-swagger-merger v0.0.0-20200916115803-70f050d0cb09 h1:hivvvYOTeYy+Dm9nLesXatmELP5Q/4v8vyPrkZfjQs8= +github.com/g3co/go-swagger-merger v0.0.0-20200916115803-70f050d0cb09/go.mod h1:jvC3b+YoOx9/SJYqqo1pN1vJ31StlOCugGCyO3EW9XA= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/getsentry/sentry-go v0.4.0/go.mod h1:xkGcb82SipKQloDNa5b7hTV4VdEyc2bhwd1/UczP52k= @@ -244,6 +247,8 @@ github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwds github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk= @@ -253,12 +258,17 @@ github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+j github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.0 h1:A4SZ6IWh3lnjH0rG0Z5lkxazMGBECtrZcbyYQi+64k4= github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.9 h1:9z9cbFuZJ7AcvOHKIY+f6Aevb4vObNDkTEyoMfO7rAc= github.com/go-openapi/spec v0.19.9/go.mod h1:vqK/dIdLGCosfvYsQV3WfC7N3TiZSnGY2RZKoFK7X28= +github.com/go-openapi/spec v0.19.14/go.mod h1:gwrgJS15eCUgjLpMjBJmbZezCsw88LmgeEip0M63doA= +github.com/go-openapi/spec v0.20.3 h1:uH9RQ6vdyPSs2pSy9fL8QPspDF2AMIMPtmK5coSSjtQ= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0 h1:iqrgMg7Q7SvtbWLlltPrkMs0UBJI6oTSs79JFRUi880= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= @@ -266,6 +276,10 @@ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -447,6 +461,7 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= @@ -465,6 +480,9 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.2 h1:V9ecaZWDYm7v9uJ15RZD6DajMu5sE0hdep0aoDwT9g4= github.com/mailru/easyjson v0.7.2/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -523,6 +541,7 @@ github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7 github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -637,6 +656,8 @@ github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNue github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -716,6 +737,8 @@ github.com/swaggo/swag v1.6.3 h1:N+uVPGP4H2hXoss2pt5dctoSUPKKRInr6qcTMOm0usI= github.com/swaggo/swag v1.6.3/go.mod h1:wcc83tB4Mb2aNiL/HP4MFeQdpHUrca+Rp/DRNgWAUio= github.com/swaggo/swag v1.6.7 h1:e8GC2xDllJZr3omJkm9YfmK0Y56+rMO3cg0JBKNz09s= github.com/swaggo/swag v1.6.7/go.mod h1:xDhTyuFIujYiN3DKWC/H/83xcfHp+UE/IzWWampG7Zc= +github.com/swaggo/swag v1.7.0 h1:5bCA/MTLQoIqDXXyHfOpMeDvL9j68OY/udlK4pQoo4E= +github.com/swaggo/swag v1.7.0/go.mod h1:BdPIL73gvS9NBsdi7M1JOxLvlbfvNRaBP8m6WT6Aajo= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= @@ -753,6 +776,8 @@ github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= @@ -771,6 +796,7 @@ github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FB github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -851,6 +877,11 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -863,6 +894,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -895,6 +928,14 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44 h1:Bli41pIlzTzf3KEY06n+xnzK/BESIg2ze4Pgfh/aI8c= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -902,6 +943,10 @@ golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -933,10 +978,14 @@ golang.org/x/tools v0.0.0-20200729041821-df70183b1872 h1:/U95VAvB4ZsR91rpZX2MwiK golang.org/x/tools v0.0.0-20200729041821-df70183b1872/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d h1:szSOL78iTCl0LF1AMjhSWJj8tIM0KixlUUnBtYXsmd8= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20201120155355-20be4ac4bd6e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -987,6 +1036,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= @@ -1007,6 +1057,7 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1014,8 +1065,12 @@ gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 25d52aa52ffd02744cdbc4ebdc969efa44b8bd31 Mon Sep 17 00:00:00 2001 From: Nikita Volkov Date: Wed, 7 Apr 2021 07:31:33 +0300 Subject: [PATCH 2/2] cosmetic - fmt --- app/integ_gov_test.go | 2 +- helpers/grpc_conn.go | 4 ++-- helpers/input_parsers.go | 2 +- helpers/logger/logger.go | 1 - helpers/perms/module.go | 2 +- helpers/tests/binary/binary.go | 10 +++++----- helpers/tests/module_accs.go | 2 +- helpers/tests/sb-trading-app/bot/bot_logic.go | 4 ++-- helpers/tests/sb-trading-app/bot/bot_utils.go | 4 ++-- .../sb-trading-app/watcher/watcher_logic.go | 2 +- x/ccstorage/internal/types/genesis_test.go | 14 +++++++------- x/ccstorage/internal/types/res_balance_test.go | 4 ++-- x/core/ante.go | 16 ++++++++-------- x/core/msmodule/manager.go | 2 +- x/currencies/client/cli/queries.go | 6 +++--- x/currencies/internal/types/mint.go | 2 +- x/genaccounts/internal/types/genesis_account.go | 2 +- x/multisig/client/cli/tx.go | 12 ++++++------ x/oracle/internal/types/asset.go | 2 +- x/oracle/internal/types/msg_add_asset.go | 2 +- x/oracle/internal/types/msg_add_oracle.go | 2 +- x/oracle/internal/types/msg_set_asset.go | 2 +- x/oracle/internal/types/msg_set_oracles.go | 2 +- x/oracle/internal/types/oracle.go | 2 +- x/orderbook/internal/keeper/history_test.go | 2 +- x/orderbook/internal/keeper/order_sorter.go | 1 - x/orders/client/rest/rest.go | 10 +++++----- x/orders/internal/keeper/order.go | 1 - x/orders/internal/types/keys.go | 2 +- x/orders/internal/types/querier.go | 2 +- x/poa/internal/types/validator.go | 2 +- x/vm/client/rest/rest.go | 2 +- 32 files changed, 61 insertions(+), 64 deletions(-) diff --git a/app/integ_gov_test.go b/app/integ_gov_test.go index 6a9d38e9..f86c6753 100644 --- a/app/integ_gov_test.go +++ b/app/integ_gov_test.go @@ -213,7 +213,7 @@ func TestIntegGov_RegisterCurrency(t *testing.T) { crDenom := "tst" crDecimals := uint8(8) crBalancePathHex := "A1A2A3A4A5A6A7A8A9ABACADAEAFB1B2B3B4B5B6B7B8B9BABBBCBDBEBFC1C2C3C4" - crInfoPathHex := "0102030405060708090A0B0C0D0E0FA1A2A3A4A5A6A7A8A9AAABACADAEAFB1B2B3" + crInfoPathHex := "0102030405060708090A0B0C0D0E0FA1A2A3A4A5A6A7A8A9AAABACADAEAFB1B2B3" // Check invalid arguments for AddCurrencyProposal Tx { diff --git a/helpers/grpc_conn.go b/helpers/grpc_conn.go index cf309484..b17bbb2d 100644 --- a/helpers/grpc_conn.go +++ b/helpers/grpc_conn.go @@ -76,14 +76,14 @@ func GetGRpcClientConnection(addr string, keepAlivePeriod time.Duration) (*grpc. kpParams := keepalive.ClientParameters{ Time: keepAlivePeriod, // send pings every 1 second if there is no activity Timeout: keepAlivePeriod, // wait 1 second for ping ack before considering the connection dead - PermitWithoutStream: true, // send pings even without active streams + PermitWithoutStream: true, // send pings even without active streams } dialOptions = append(dialOptions, grpc.WithKeepaliveParams(kpParams)) } // Bypass Rust h2 library UDS limitations: uri validation failure causing PROTOCOL_ERROR gRPC error - dialAddress := address + dialAddress := address if schema == "unix" { dialAddress = "127.0.0.1" // faking filePath with valid URL } diff --git a/helpers/input_parsers.go b/helpers/input_parsers.go index 0b12eb9f..3626065e 100644 --- a/helpers/input_parsers.go +++ b/helpers/input_parsers.go @@ -227,7 +227,7 @@ func ParseHexStringParam(argName, argValue string, paramType ParamType) (string, argValueNorm := strings.TrimPrefix(argValue, "0x") argValueBytes, err := hex.DecodeString(argValueNorm) if err != nil { - return "", nil, fmt.Errorf("%s %s %q: %v", argName, paramType, argValue, err) + return "", nil, fmt.Errorf("%s %s %q: %v", argName, paramType, argValue, err) } return argValueNorm, argValueBytes, nil diff --git a/helpers/logger/logger.go b/helpers/logger/logger.go index 7984aaa6..f3eea4ea 100644 --- a/helpers/logger/logger.go +++ b/helpers/logger/logger.go @@ -23,7 +23,6 @@ func (l *DNLogger) Error(msg string, keyvals ...interface{}) { sentryCaptureMessage(msg, keyvals...) } - // Method overwrite func (l *DNLogger) With(keyvals ...interface{}) log.Logger { return &DNLogger{ diff --git a/helpers/perms/module.go b/helpers/perms/module.go index d91a5754..29c641d8 100644 --- a/helpers/perms/module.go +++ b/helpers/perms/module.go @@ -97,7 +97,7 @@ func (m *ModulePermissions) AutoCheck(expectedPerm Permission) { return } - if err := m.Check(caller.Module, expectedPerm); err != nil { + if err := m.Check(caller.Module, expectedPerm); err != nil { panic(err) } } diff --git a/helpers/tests/binary/binary.go b/helpers/tests/binary/binary.go index f7eaaeaf..3792701d 100644 --- a/helpers/tests/binary/binary.go +++ b/helpers/tests/binary/binary.go @@ -20,10 +20,10 @@ const ( type BinaryCmdOption func(*BinaryCmd) error type BinaryCmd struct { - cmd string - proc *tests.Process - args []string - printLogs bool + cmd string + proc *tests.Process + args []string + printLogs bool } func (c *BinaryCmd) String() string { @@ -32,7 +32,7 @@ func (c *BinaryCmd) String() string { func NewBinaryCmd(cmd string, options ...BinaryCmdOption) (*BinaryCmd, error) { c := &BinaryCmd{ - cmd: cmd, + cmd: cmd, } for _, option := range options { diff --git a/helpers/tests/module_accs.go b/helpers/tests/module_accs.go index d5221109..9f6590ba 100644 --- a/helpers/tests/module_accs.go +++ b/helpers/tests/module_accs.go @@ -9,7 +9,7 @@ var ( // Module account permissions MAccPerms map[string][]string = map[string][]string{ auth.FeeCollectorName: nil, - "orders": {supply.Burner}, + "orders": {supply.Burner}, } ) diff --git a/helpers/tests/sb-trading-app/bot/bot_logic.go b/helpers/tests/sb-trading-app/bot/bot_logic.go index a84d40dd..923c588b 100644 --- a/helpers/tests/sb-trading-app/bot/bot_logic.go +++ b/helpers/tests/sb-trading-app/bot/bot_logic.go @@ -59,11 +59,11 @@ func (b *Bot) onMarketPriceChangeMarketMaking() { if sellOrdersCount == 0 && buyOrdersCount == 0 { b.logger.Info(fmt.Sprintf("market making on %q: [%s:%s]: skipped", lowerPriceDec, upperPriceDec, "marketPrice change")) } else { - b.logger.Info(fmt.Sprintf("market making on %q: [%s:%s]: Sells / Buys: %d / %d", "marketPrice change", lowerPriceDec, upperPriceDec, sellOrdersCount, buyOrdersCount)) + b.logger.Info(fmt.Sprintf("market making on %q: [%s:%s]: Sells / Buys: %d / %d", "marketPrice change", lowerPriceDec, upperPriceDec, sellOrdersCount, buyOrdersCount)) } } -func (b *Bot) newBalanceBasedOrder() (posted bool, retDirection string){ +func (b *Bot) newBalanceBasedOrder() (posted bool, retDirection string) { var direction orders.Direction defer func() { diff --git a/helpers/tests/sb-trading-app/bot/bot_utils.go b/helpers/tests/sb-trading-app/bot/bot_utils.go index 76faa960..24ad9cd6 100644 --- a/helpers/tests/sb-trading-app/bot/bot_utils.go +++ b/helpers/tests/sb-trading-app/bot/bot_utils.go @@ -22,8 +22,8 @@ func (b *Bot) dampPriceDown(price, randomBase sdk.Uint) sdk.Uint { return price.Sub(b.percentOfPrice(randomBase, b.randomDampingPercent())) } -func(b *Bot) dampPriceRandom(price, randomBase sdk.Uint) sdk.Uint { - if rand.Uint64() % 2 == 0 { +func (b *Bot) dampPriceRandom(price, randomBase sdk.Uint) sdk.Uint { + if rand.Uint64()%2 == 0 { return b.dampPriceUp(price, randomBase) } diff --git a/helpers/tests/sb-trading-app/watcher/watcher_logic.go b/helpers/tests/sb-trading-app/watcher/watcher_logic.go index a449cc0d..0e62a36f 100644 --- a/helpers/tests/sb-trading-app/watcher/watcher_logic.go +++ b/helpers/tests/sb-trading-app/watcher/watcher_logic.go @@ -40,7 +40,7 @@ func (w *Watcher) Work() { w.history.ResetCurItem() case <-botAddTicker.C: if botsDiff := w.cfg.MaxBots - w.curBots; botsDiff > 0 { - w.logger.Info(fmt.Sprintf("adding client: %d left", botsDiff - 1)) + w.logger.Info(fmt.Sprintf("adding client: %d left", botsDiff-1)) for _, m := range w.marketStates { w.wg.Add(1) go m.bots[w.curBots].Start(w.wg, w.stopCh) diff --git a/x/ccstorage/internal/types/genesis_test.go b/x/ccstorage/internal/types/genesis_test.go index a95cd023..4f22bd13 100644 --- a/x/ccstorage/internal/types/genesis_test.go +++ b/x/ccstorage/internal/types/genesis_test.go @@ -14,31 +14,31 @@ func TestCCS_GenesisParams_Validate(t *testing.T) { // ok { - param := CurrencyParams{"dfi",0, "0102", "AABB"} + param := CurrencyParams{"dfi", 0, "0102", "AABB"} require.NoError(t, param.Validate()) } // fail: invalid denom { - param1 := CurrencyParams{"dfi1",0, "0102", "AABB"} + param1 := CurrencyParams{"dfi1", 0, "0102", "AABB"} require.Error(t, param1.Validate()) } // fail: empty path { - param1 := CurrencyParams{"dfi",0, "", "AABB"} + param1 := CurrencyParams{"dfi", 0, "", "AABB"} require.Error(t, param1.Validate()) - param2 := CurrencyParams{"dfi",0, "0102", ""} + param2 := CurrencyParams{"dfi", 0, "0102", ""} require.Error(t, param2.Validate()) } // fail: invalid hex path { - param1 := CurrencyParams{"dfi",0, "z", "AABB"} + param1 := CurrencyParams{"dfi", 0, "z", "AABB"} require.Error(t, param1.Validate()) - param2 := CurrencyParams{"dfi",0, "0102", "z"} + param2 := CurrencyParams{"dfi", 0, "0102", "z"} require.Error(t, param2.Validate()) } } @@ -86,4 +86,4 @@ func TestCCS_Genesis_Validate(t *testing.T) { }) require.Error(t, state.Validate()) } -} \ No newline at end of file +} diff --git a/x/ccstorage/internal/types/res_balance_test.go b/x/ccstorage/internal/types/res_balance_test.go index 347390fc..cda63e67 100644 --- a/x/ccstorage/internal/types/res_balance_test.go +++ b/x/ccstorage/internal/types/res_balance_test.go @@ -79,12 +79,12 @@ func TestCCS_Balances(t *testing.T) { Balance{ Denom: "testa", AccessPath: nil, - Resource: ResBalance{ Value: sdk.NewIntFromUint64(1).BigInt()}, + Resource: ResBalance{Value: sdk.NewIntFromUint64(1).BigInt()}, }, Balance{ Denom: "testb", AccessPath: nil, - Resource: ResBalance{ Value: sdk.NewIntFromUint64(2).BigInt()}, + Resource: ResBalance{Value: sdk.NewIntFromUint64(2).BigInt()}, }, } diff --git a/x/core/ante.go b/x/core/ante.go index 55282590..61f91c67 100644 --- a/x/core/ante.go +++ b/x/core/ante.go @@ -18,13 +18,13 @@ func NewAnteHandler(ak vmauth.Keeper, supplyKeeper types.SupplyKeeper, sigGasCon ante.NewSetUpContextDecorator(), ante.NewMempoolFeeDecorator(), ante.NewValidateBasicDecorator(), - ante.NewValidateMemoDecorator(ak.AccountKeeper), // as is: only uses ak.GetParams() - NewConsumeGasForTxSizeDecorator(ak), // copy: uses ak.GetAccount() - NewSetPubKeyDecorator(ak), // copy: uses ak.GetAccount() - ante.NewValidateSigCountDecorator(ak.AccountKeeper), // as is: only uses ak.GetParams() - NewDeductFeeDecorator(ak, supplyKeeper), // copy: uses ak.GetAccount() - NewSigGasConsumeDecorator(ak, sigGasConsumer), // copy: uses ak.GetAccount() - NewSigVerificationDecorator(ak), // copy: uses ak.GetAccount() - NewIncrementSequenceDecorator(ak), // copy: uses ak.GetAccount(), ak.SetAccount() + ante.NewValidateMemoDecorator(ak.AccountKeeper), // as is: only uses ak.GetParams() + NewConsumeGasForTxSizeDecorator(ak), // copy: uses ak.GetAccount() + NewSetPubKeyDecorator(ak), // copy: uses ak.GetAccount() + ante.NewValidateSigCountDecorator(ak.AccountKeeper), // as is: only uses ak.GetParams() + NewDeductFeeDecorator(ak, supplyKeeper), // copy: uses ak.GetAccount() + NewSigGasConsumeDecorator(ak, sigGasConsumer), // copy: uses ak.GetAccount() + NewSigVerificationDecorator(ak), // copy: uses ak.GetAccount() + NewIncrementSequenceDecorator(ak), // copy: uses ak.GetAccount(), ak.SetAccount() ) } diff --git a/x/core/msmodule/manager.go b/x/core/msmodule/manager.go index 691ef054..730d975c 100644 --- a/x/core/msmodule/manager.go +++ b/x/core/msmodule/manager.go @@ -58,7 +58,7 @@ func (m *MsManager) RegisterMsRoutes(router MsRouter) { // RegisterInvariants registers all module routes and module querier routes. // {blackList} allows to skip invariants register for specific module names. -func (m *MsManager) RegisterInvariants(ir sdk.InvariantRegistry, blackList... string) { +func (m *MsManager) RegisterInvariants(ir sdk.InvariantRegistry, blackList ...string) { for _, module := range m.Modules { blackListed := false for _, disabledModuleName := range blackList { diff --git a/x/currencies/client/cli/queries.go b/x/currencies/client/cli/queries.go index 8a817676..5a2875e2 100644 --- a/x/currencies/client/cli/queries.go +++ b/x/currencies/client/cli/queries.go @@ -79,10 +79,10 @@ func GetCurrencies(queryRoute string, cdc *codec.Codec) *cobra.Command { // GetIssue returns query command that returns issue by id. func GetIssue(queryRoute string, cdc *codec.Codec) *cobra.Command { cmd := &cobra.Command{ - Use: "issue [issueID]", - Short: "Get issue by ID", + Use: "issue [issueID]", + Short: "Get issue by ID", Example: "issue issue1", - Args: cobra.ExactArgs(1), + Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { cliCtx := context.NewCLIContext().WithCodec(cdc) diff --git a/x/currencies/internal/types/mint.go b/x/currencies/internal/types/mint.go index fd736fc4..7f6f152b 100644 --- a/x/currencies/internal/types/mint.go +++ b/x/currencies/internal/types/mint.go @@ -6,4 +6,4 @@ var ( // Inflation event type. MintEventType = "mint" -) \ No newline at end of file +) diff --git a/x/genaccounts/internal/types/genesis_account.go b/x/genaccounts/internal/types/genesis_account.go index 01f9a25f..07481105 100644 --- a/x/genaccounts/internal/types/genesis_account.go +++ b/x/genaccounts/internal/types/genesis_account.go @@ -65,4 +65,4 @@ func (ga GenesisAccounts) Contains(addr sdk.AccAddress) bool { } return false -} \ No newline at end of file +} diff --git a/x/multisig/client/cli/tx.go b/x/multisig/client/cli/tx.go index 7f979e0c..ed7fd683 100644 --- a/x/multisig/client/cli/tx.go +++ b/x/multisig/client/cli/tx.go @@ -15,10 +15,10 @@ import ( // PostConfirmCall returns tx command which confirms an existing call. func PostConfirmCall(cdc *codec.Codec) *cobra.Command { cmd := &cobra.Command{ - Use: "confirm-call [callID]", - Short: "Confirm call by multi signature", + Use: "confirm-call [callID]", + Short: "Confirm call by multi signature", Example: "confirm-call 100", - Args: cobra.ExactArgs(1), + Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { cliCtx, txBuilder := helpers.GetTxCmdCtx(cdc, cmd.InOrStdin()) @@ -51,10 +51,10 @@ func PostConfirmCall(cdc *codec.Codec) *cobra.Command { // PostRevokeConfirm returns tx command which revokes an existing call's vote. func PostRevokeConfirm(cdc *codec.Codec) *cobra.Command { cmd := &cobra.Command{ - Use: "revoke-confirm [callID]", - Short: "Revoke confirmation for call by ID", + Use: "revoke-confirm [callID]", + Short: "Revoke confirmation for call by ID", Example: "revoke-confirm 100", - Args: cobra.ExactArgs(1), + Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { cliCtx, txBuilder := helpers.GetTxCmdCtx(cdc, cmd.InOrStdin()) diff --git a/x/oracle/internal/types/asset.go b/x/oracle/internal/types/asset.go index f7696ef8..8ca52933 100644 --- a/x/oracle/internal/types/asset.go +++ b/x/oracle/internal/types/asset.go @@ -58,7 +58,7 @@ func (list Assets) String() string { strBuilder.WriteString("Assets:\n") for i, asset := range list { strBuilder.WriteString(asset.String()) - if i < len(list) - 1 { + if i < len(list)-1 { strBuilder.WriteString("\n") } } diff --git a/x/oracle/internal/types/msg_add_asset.go b/x/oracle/internal/types/msg_add_asset.go index 0c5e9e16..f20de5ab 100644 --- a/x/oracle/internal/types/msg_add_asset.go +++ b/x/oracle/internal/types/msg_add_asset.go @@ -42,7 +42,7 @@ func (msg MsgAddAsset) GetSigners() []sdk.AccAddress { } // NewMsgAddAsset creates a new AddAsset message. -func NewMsgAddAsset(nominee sdk.AccAddress, asset Asset, ) MsgAddAsset { +func NewMsgAddAsset(nominee sdk.AccAddress, asset Asset) MsgAddAsset { return MsgAddAsset{ Asset: asset, Nominee: nominee, diff --git a/x/oracle/internal/types/msg_add_oracle.go b/x/oracle/internal/types/msg_add_oracle.go index 7dd114f9..20278889 100644 --- a/x/oracle/internal/types/msg_add_oracle.go +++ b/x/oracle/internal/types/msg_add_oracle.go @@ -51,7 +51,7 @@ func (msg MsgAddOracle) GetSigners() []sdk.AccAddress { } // MsgAddOracle creates a new AddOracle message. -func NewMsgAddOracle(nominee sdk.AccAddress, assetCode dnTypes.AssetCode, oracle sdk.AccAddress, ) MsgAddOracle { +func NewMsgAddOracle(nominee sdk.AccAddress, assetCode dnTypes.AssetCode, oracle sdk.AccAddress) MsgAddOracle { return MsgAddOracle{ Oracle: oracle, AssetCode: assetCode, diff --git a/x/oracle/internal/types/msg_set_asset.go b/x/oracle/internal/types/msg_set_asset.go index bc3e5de6..9e6a5460 100644 --- a/x/oracle/internal/types/msg_set_asset.go +++ b/x/oracle/internal/types/msg_set_asset.go @@ -42,7 +42,7 @@ func (msg MsgSetAsset) GetSigners() []sdk.AccAddress { } // NewMsgSetAsset creates a new SetAsset message. -func NewMsgSetAsset(nominee sdk.AccAddress, asset Asset, ) MsgSetAsset { +func NewMsgSetAsset(nominee sdk.AccAddress, asset Asset) MsgSetAsset { return MsgSetAsset{ Asset: asset, Nominee: nominee, diff --git a/x/oracle/internal/types/msg_set_oracles.go b/x/oracle/internal/types/msg_set_oracles.go index c61f204d..8b81eed4 100644 --- a/x/oracle/internal/types/msg_set_oracles.go +++ b/x/oracle/internal/types/msg_set_oracles.go @@ -50,7 +50,7 @@ func (msg MsgSetOracles) GetSigners() []sdk.AccAddress { } // MsgAddOracle creates a new SetOracle message. -func NewMsgSetOracles(nominee sdk.AccAddress, assetCode dnTypes.AssetCode, oracles Oracles, ) MsgSetOracles { +func NewMsgSetOracles(nominee sdk.AccAddress, assetCode dnTypes.AssetCode, oracles Oracles) MsgSetOracles { return MsgSetOracles{ Oracles: oracles, AssetCode: assetCode, diff --git a/x/oracle/internal/types/oracle.go b/x/oracle/internal/types/oracle.go index 27239c61..44b89bb0 100644 --- a/x/oracle/internal/types/oracle.go +++ b/x/oracle/internal/types/oracle.go @@ -33,7 +33,7 @@ func (list Oracles) String() string { strBuilder.WriteString("Oracles:\n") for i, oracle := range list { strBuilder.WriteString(oracle.String()) - if i < len(list) - 1 { + if i < len(list)-1 { strBuilder.WriteString("\n") } } diff --git a/x/orderbook/internal/keeper/history_test.go b/x/orderbook/internal/keeper/history_test.go index 18e0920e..d3238e09 100644 --- a/x/orderbook/internal/keeper/history_test.go +++ b/x/orderbook/internal/keeper/history_test.go @@ -44,7 +44,7 @@ func TestOBKeeper_History_StoreIO(t *testing.T) { // add history items for i, inputItem := range inputItems { - blockHeight := int64(i)+1 + blockHeight := int64(i) + 1 input.keeper.SetHistoryItem(input.ctx, inputItem) require.True(t, input.keeper.HasHistoryItem(input.ctx, marketID, blockHeight)) diff --git a/x/orderbook/internal/keeper/order_sorter.go b/x/orderbook/internal/keeper/order_sorter.go index 053ae402..aad55f8a 100644 --- a/x/orderbook/internal/keeper/order_sorter.go +++ b/x/orderbook/internal/keeper/order_sorter.go @@ -47,4 +47,3 @@ func (s ByPriceAscIDAsc) Less(i, j int) bool { func (s ByPriceAscIDAsc) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - diff --git a/x/orders/client/rest/rest.go b/x/orders/client/rest/rest.go index bed28214..d565eac4 100644 --- a/x/orders/client/rest/rest.go +++ b/x/orders/client/rest/rest.go @@ -23,17 +23,17 @@ const ( ) type PostOrderReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` + BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` // Market assetCode in the following format: {base_denomination_symbol}_{quote_denomination_symbol} AssetCode dnTypes.AssetCode `json:"asset_code" example:"btc_dfi"` // Order type (ask/bid) - Direction types.Direction `json:"direction" example:"ask"` + Direction types.Direction `json:"direction" example:"ask"` // QuoteAsset price with decimals (1.0 DFI with 18 decimals -> 1000000000000000000) - Price string `json:"price" example:"100"` + Price string `json:"price" example:"100"` // BaseAsset quantity with decimals (1.0 BTC with 8 decimals -> 100000000) - Quantity string `json:"quantity" example:"10"` + Quantity string `json:"quantity" example:"10"` // Order TTL [s] - TtlInSec string `json:"ttl_in_sec" example:"3"` + TtlInSec string `json:"ttl_in_sec" example:"3"` } type RevokeOrderReq struct { diff --git a/x/orders/internal/keeper/order.go b/x/orders/internal/keeper/order.go index c790b792..f6cc1888 100644 --- a/x/orders/internal/keeper/order.go +++ b/x/orders/internal/keeper/order.go @@ -111,7 +111,6 @@ func (k Keeper) GetReverseIterator(ctx sdk.Context) sdk.Iterator { return sdk.KVStoreReversePrefixIterator(store, types.OrderKeyPrefix) } - // set creates / overwrites order object. func (k Keeper) set(ctx sdk.Context, order types.Order) { store := ctx.KVStore(k.storeKey) diff --git a/x/orders/internal/types/keys.go b/x/orders/internal/types/keys.go index d0bc7a53..ad5a83fd 100644 --- a/x/orders/internal/types/keys.go +++ b/x/orders/internal/types/keys.go @@ -10,7 +10,7 @@ import ( // Storage keys. var ( - KeyDelimiter = []byte(":") + KeyDelimiter = []byte(":") OrderKeyPrefix = []byte("order") LastOrderIDKey = []byte("last_order_id") ) diff --git a/x/orders/internal/types/querier.go b/x/orders/internal/types/querier.go index f46ee4f9..fc009ba9 100644 --- a/x/orders/internal/types/querier.go +++ b/x/orders/internal/types/querier.go @@ -19,7 +19,7 @@ type OrderReq struct { // Client request for markets. type OrdersReq struct { // Page number - Page sdk.Uint `json:"page" yaml:"page"` + Page sdk.Uint `json:"page" yaml:"page"` // Items per page Limit sdk.Uint `json:"limit" yaml:"limit"` // Owner filter diff --git a/x/poa/internal/types/validator.go b/x/poa/internal/types/validator.go index 73bce415..39466bb8 100644 --- a/x/poa/internal/types/validator.go +++ b/x/poa/internal/types/validator.go @@ -58,7 +58,7 @@ func (list Validators) String() string { strBuilder := strings.Builder{} for i, v := range list { strBuilder.WriteString(fmt.Sprintf("[%d] %s", i, v.String())) - if i < len(list) - 1 { + if i < len(list)-1 { strBuilder.WriteString("\n") } } diff --git a/x/vm/client/rest/rest.go b/x/vm/client/rest/rest.go index 856f37f3..9ec2419f 100644 --- a/x/vm/client/rest/rest.go +++ b/x/vm/client/rest/rest.go @@ -50,7 +50,7 @@ type PublishModuleReq struct { type LcsViewReq struct { // Resource address - Account string `json:"address" format:"bech32/hex" example:"0x0000000000000000000000000000000000000001"` + Account string `json:"address" format:"bech32/hex" example:"0x0000000000000000000000000000000000000001"` // Move formatted path (ModuleName::StructName, where ::StructName is optional) MovePath string `json:"move_path" example:"Block::BlockMetadata"` // LCS view JSON formatted request (refer to docs for specs)