## Description Closes: #9404 --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
225 lines
3.2 KiB
Markdown
225 lines
3.2 KiB
Markdown
<!--
|
|
order: 6
|
|
-->
|
|
|
|
# Client
|
|
|
|
## CLI
|
|
|
|
A user can query and interact with the `mint` module using the CLI.
|
|
|
|
### Query
|
|
|
|
The `query` commands allow users to query `mint` state.
|
|
|
|
```sh
|
|
simd query mint --help
|
|
```
|
|
|
|
#### annual-provisions
|
|
|
|
The `annual-provisions` command allow users to query the current minting annual provisions value
|
|
|
|
```sh
|
|
simd query mint annual-provisions [flags]
|
|
```
|
|
|
|
Example:
|
|
|
|
```sh
|
|
simd query mint annual-provisions
|
|
```
|
|
|
|
Example Output:
|
|
|
|
```sh
|
|
22268504368893.612100895088410693
|
|
```
|
|
|
|
#### inflation
|
|
|
|
The `inflation` command allow users to query the current minting inflation value
|
|
|
|
```sh
|
|
simd query mint inflation [flags]
|
|
```
|
|
|
|
Example:
|
|
|
|
```sh
|
|
simd query mint inflation
|
|
```
|
|
|
|
Example Output:
|
|
|
|
```sh
|
|
0.199200302563256955
|
|
```
|
|
|
|
#### params
|
|
|
|
The `params` command allow users to query the current minting parameters
|
|
|
|
```sh
|
|
simd query mint params [flags]
|
|
```
|
|
|
|
Example:
|
|
|
|
```yml
|
|
blocks_per_year: "4360000"
|
|
goal_bonded: "0.670000000000000000"
|
|
inflation_max: "0.200000000000000000"
|
|
inflation_min: "0.070000000000000000"
|
|
inflation_rate_change: "0.130000000000000000"
|
|
mint_denom: stake
|
|
```
|
|
|
|
## gRPC
|
|
|
|
A user can query the `mint` module using gRPC endpoints.
|
|
|
|
### AnnualProvisions
|
|
|
|
The `AnnualProvisions` endpoint allow users to query the current minting annual provisions value
|
|
|
|
```sh
|
|
/cosmos.mint.v1beta1.Query/AnnualProvisions
|
|
```
|
|
|
|
Example:
|
|
|
|
```sh
|
|
grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/AnnualProvisions
|
|
```
|
|
|
|
Example Output:
|
|
|
|
```json
|
|
{
|
|
"annualProvisions": "1432452520532626265712995618"
|
|
}
|
|
```
|
|
|
|
### Inflation
|
|
|
|
The `Inflation` endpoint allow users to query the current minting inflation value
|
|
|
|
```sh
|
|
/cosmos.mint.v1beta1.Query/Inflation
|
|
```
|
|
|
|
Example:
|
|
|
|
```sh
|
|
grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Inflation
|
|
```
|
|
|
|
Example Output:
|
|
|
|
```json
|
|
{
|
|
"inflation": "130197115720711261"
|
|
}
|
|
```
|
|
|
|
### Params
|
|
|
|
The `Params` endpoint allow users to query the current minting parameters
|
|
|
|
```sh
|
|
/cosmos.mint.v1beta1.Query/Params
|
|
```
|
|
|
|
Example:
|
|
|
|
```sh
|
|
grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Params
|
|
```
|
|
|
|
Example Output:
|
|
|
|
```json
|
|
{
|
|
"params": {
|
|
"mintDenom": "stake",
|
|
"inflationRateChange": "130000000000000000",
|
|
"inflationMax": "200000000000000000",
|
|
"inflationMin": "70000000000000000",
|
|
"goalBonded": "670000000000000000",
|
|
"blocksPerYear": "6311520"
|
|
}
|
|
}
|
|
```
|
|
|
|
## REST
|
|
|
|
A user can query the `mint` module using REST endpoints.
|
|
|
|
### annual-provisions
|
|
|
|
```sh
|
|
/cosmos/mint/v1beta1/annual_provisions
|
|
```
|
|
|
|
Example:
|
|
|
|
```sh
|
|
curl "localhost:1317/cosmos/mint/v1beta1/annual_provisions"
|
|
```
|
|
|
|
Example Output:
|
|
|
|
```json
|
|
{
|
|
"annualProvisions": "1432452520532626265712995618"
|
|
}
|
|
```
|
|
|
|
### inflation
|
|
|
|
```sh
|
|
/cosmos/mint/v1beta1/inflation
|
|
```
|
|
|
|
Example:
|
|
|
|
```sh
|
|
curl "localhost:1317/cosmos/mint/v1beta1/inflation"
|
|
```
|
|
|
|
Example Output:
|
|
|
|
```json
|
|
{
|
|
"inflation": "130197115720711261"
|
|
}
|
|
```
|
|
|
|
### params
|
|
|
|
```sh
|
|
/cosmos/mint/v1beta1/params
|
|
```
|
|
|
|
Example:
|
|
|
|
```sh
|
|
curl "localhost:1317/cosmos/mint/v1beta1/params"
|
|
```
|
|
|
|
Example Output:
|
|
|
|
```json
|
|
{
|
|
"params": {
|
|
"mintDenom": "stake",
|
|
"inflationRateChange": "130000000000000000",
|
|
"inflationMax": "200000000000000000",
|
|
"inflationMin": "70000000000000000",
|
|
"goalBonded": "670000000000000000",
|
|
"blocksPerYear": "6311520"
|
|
}
|
|
}
|
|
```
|